Urban block emotion map drawing method based on large language model

Through a method based on the large language model, the problem of low data collection and processing efficiency of urban block emotional map mapping in the existing technology is solved, efficient and accurate emotional map mapping and real-time update are achieved, and the subtlety and user experience of sentiment analysis are enhanced.

CN120086298APending Publication Date: 2025-06-03SHANGHAI UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510122440.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The prior art has problems such as time-consuming and labor-intensive data collection, poor timeliness, difficulty in capturing subtle emotional differences, and inability to deal with large-scale data when drawing emotional maps in urban neighborhoods.

Method used

Using a method based on a large language model, by collecting and preprocessing online and offline data, the large language model is fine-tuned to generate a human-local relationship recognition model, extract emotional elements and conduct emotional analysis, construct a human-local emotional framework, and finally generate a visual urban block emotional map.

Benefits of technology

It realizes efficient and accurate drawing of urban block emotional maps, can reflect the dynamic changes in block emotions in real time, enhances the understanding of individual emotional complexity and diversity, and provides an intuitive and dynamic data display platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086298A_ABST
    Figure CN120086298A_ABST
Patent Text Reader

Abstract

The invention relates to a city block emotional map drawing method based on a large language model, which comprises the following steps: collecting original data and carrying out data preprocessing to generate processed data, the original data comprising online data and offline data; performing model fine tuning on the original large language model based on the processed data to generate a human-ground relation recognition model; performing sentiment element extraction and sentiment analysis on the processed data based on the human-ground relation recognition model; constructing a human-place emotion framework based on the extracted emotion elements and the emotion analysis result; and generating a visual city block emotional map based on the human-place emotional framework and geographic information, wherein the visual city block emotional map changes visual content based on a real-time user instruction. Compared with the prior art, the method has the advantages of high processing efficiency, high drawing accuracy, high interactivity and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of urban renewal, and in particular to a method for drawing an emotional map of urban blocks based on a large language model. Background Art

[0002] As the urbanization process enters a plateau, the concept of urban renewal has gradually come into people's view. Against this backdrop, the characteristics of urban blocks have an increasingly significant impact on urban planning, commercial layout, and the quality of life of residents. In the traditional urban renewal process, planners and architects usually focus on economic value. In reflecting on this state, people have begun to pay attention to the emotional connection and dependence between urban space and local residents. The emotional map of urban blocks is such a tool that can well display the emotional status of urban space and residents.

[0003] Currently, the drawing of urban block emotional maps mainly relies on traditional methods such as questionnaires, field investigations, and statistical analysis. Although these methods can provide certain data support, they have many limitations: First, the data collection process is time-consuming and laborious, and it is difficult to cover a wide range of areas and populations; second, the timeliness of the collected data is poor, and it cannot reflect the dynamic changes of block emotions in real time; third, traditional methods often ignore the complexity and diversity of individual emotions and are difficult to capture subtle emotional differences. In addition, existing technologies are often unable to handle large-scale data and lack efficient data analysis tools to deeply explore and understand the inherent emotional structure of urban blocks. Therefore, how to use advanced technical means to quickly and accurately draw a map that can reflect the emotional characteristics of urban blocks has become an urgent problem to be solved.

[0004] After a literature search of the existing technologies, it is found that in the literature "Exploration of Urban Emotion Maps and Spatial Optimization Based on Online Social Data", the research uses online social data to construct urban emotion maps and explores the influencing factors and spatial optimization of urban emotions. This research analyzes the construction methods and applications of urban emotion maps. However, the data used in this existing technology comes from the structural data crawled from social networks, and the data situation is relatively rough, resulting in low construction accuracy of urban emotion maps.

[0005] Therefore, it is necessary to study a new and more effective method for drawing an emotional map of urban blocks. Summary of the Invention

[0006] The purpose of the present invention is to overcome the above-mentioned defects existing in the prior art and provide a method for drawing an emotional map of urban blocks based on a large language model with high processing efficiency, high drawing accuracy, and strong interactivity.

[0007] The purpose of the present invention can be achieved by the following technical solutions:

[0008] A method for drawing an emotional map of urban blocks based on a large language model, comprising the following steps:

[0009] Collect raw data and perform data preprocessing to generate processed data, where the raw data includes online data and offline data;

[0010] Fine-tune the original large language model based on the processed data to generate a human-place relationship recognition model;

[0011] Extract emotional elements and perform emotional analysis on the processed data based on the human-place relationship recognition model;

[0012] Construct a human-place emotion framework based on the extracted emotional elements and emotional analysis results;

[0013] Generate a visualized urban block emotional map based on the human-place emotion framework and geographical information, and the visualized content of the visualized urban block emotional map changes based on real-time user instructions.

[0014] Further, the online data includes data scraped from social media platforms, online forums, blogs, and / or news websites;

[0015] The offline data includes celebrity works, local publications, academic journals, local newspapers, and / or books.

[0016] Further, the process of model fine-tuning includes:

[0017] Based on the target task, screen and obtain an annotated data set for training from the processed data, and the annotation includes multi-dimensional emotional category annotation;

[0018] Use the annotated data set to perform multiple rounds of training on the original large language model to optimize model parameters;

[0019] Adjust the model through cross-validation to generate the human-place relationship recognition model.

[0020] Further, during the process of model fine-tuning, an external knowledge base is introduced to supplement the content of the training data.

[0021] Further, the extracted emotional elements include human elements, spatial elements, and related attributes of each element. The human elements include individuals, community groups, or user groups, and the spatial elements include streets, buildings, parks, schools, or hospitals.

[0022] Further, the emotional analysis results include quantified emotional polarity and emotional intensity.

[0023] Further, the human-place relationship recognition model outputs the extraction results of the emotional elements and the emotional analysis results based on a set probability threshold.

[0024] Further, the constructed human-place emotion framework includes entities and edges. The entities include human elements and spatial elements. The edges represent the emotional relationships between humans and places obtained based on the results of sentiment analysis, and different spatial elements have different weights.

[0025] Further, the generation process of the visualized urban block emotion map includes:

[0026] Performing spatial location registration based on the human-place emotion framework and geographical information;

[0027] Selecting a visualized base map, and overlaying corresponding emotion data on the visualized base map based on the registered human-place emotion framework to generate a visualized urban block emotion map.

[0028] Further, the method further includes:

[0029] Updating the original data in real time based on the interaction data on the visualized urban block emotion map, and then generating an updated visualized urban block emotion map.

[0030] The present invention also provides a computer-readable storage medium, including one or more programs for execution by one or more processors of an electronic device. The one or more programs include instructions for executing the method for drawing an urban block emotion map based on a large language model as described above.

[0031] Compared with the prior art, the present invention has the following beneficial effects:

[0032] First, in the prior art, methods such as questionnaires and interviews are usually used to collect specific structured data, which have relatively high requirements for the interviewer's ability and questionnaire design means. However, the present invention uses a large language model, which can analyze a large amount of text data. The specific advantages are as follows:

[0033] 1. Natural language understanding ability: Large language models such as Qwen have powerful natural language understanding and generation capabilities, which enable them to directly process unorganized raw text materials. For example, in the scenario of social media sentiment analysis, the model can directly read users' comment posts and judge the emotional tendency (positive, negative or neutral) therein without prior conversion of these contents into question answers in a specific format.

[0034] 2. Large-scale data analysis: Traditional research means are limited by human and material costs and often can only cover a limited sample size. In contrast, the method based on a large language model can easily handle data scales of PB level.

[0035] 3. Automated Process: The system built using large language models can achieve a fully automated process from data collection to the generation of insight reports. This means that there is no longer a need to spend a large amount of time designing questionnaires, training interviewers, or manually coding answers, greatly reducing the operation difficulty and execution cost.

[0036] 4. Multilingual Support: In the context of globalization, cross-cultural communication has become increasingly frequent. Large language models generally support multiple language inputs and outputs, which brings great convenience to the analysis of text data in different languages.

[0037] II. By adopting large language models, the present invention greatly enhances the analysis ability of unstructured data such as historical documents, old books, newspapers, and recordings. The application of this technology can not only uncover knowledge that is difficult to obtain by traditional methods, but also provide new perspectives and tools for multiple fields such as historical research, cultural inheritance, and social sciences. The specific advantages are as follows:

[0038] 1. Ability to Process Unstructured Data

[0039] Text Recognition and Conversion: For paper books and newspapers, OCR (Optical Character Recognition) technology can be used to convert them into digital text formats. Large language models can directly process these converted texts without manual collation or re-entry.

[0040] Speech-to-Text: For audio recordings, speech recognition technology can be used to convert the audio content into text, which is then further analyzed by large language models. This enables a large number of resources such as oral history, meeting records, and radio programs to be digitized and systematically analyzed.

[0041] 2. Deep Understanding and Semantic Analysis

[0042] Context Understanding: Large language models have strong context understanding capabilities and can capture implicit meanings and nuances in the text. For example, when analyzing historical documents, the model can identify specific expressions in different historical periods and infer the true intentions of the author based on the context.

[0043] Sentiment Analysis: By performing sentiment analysis on comments, reports, etc. in old books and newspapers, the social mood and public attitudes of a certain period can be revealed.

[0044] 3. Knowledge Extraction and Association

[0045] Entity Recognition: Large language models can extract key information such as names of people, places, and organizations from old books and newspapers through named entity recognition (NER) technology.

[0046] Topic Modeling: Through topic modeling technology, the main topics and discussion focuses can be automatically discovered from a large amount of text.

[0047] 4. Large-scale data analysis

[0048] Efficient processing: Large language models can efficiently process massive amounts of data, enabling researchers to analyze decades or even centuries of literature in one go.

[0049] Trend analysis: By analyzing data over a long time span, trends in social, cultural, economic, etc. aspects can be discovered.

[0050] 5. Multilingual support

[0051] Cross-language analysis: Many historical documents and newspapers may contain multiple languages. Large language models generally support multilingual processing and can analyze texts in different languages simultaneously.

[0052] Translation and comparison: The model can also automatically translate foreign language texts in old documents, enabling researchers to overcome language barriers and conduct more extensive research.

[0053] III. Through the construction and operation of the interactive map, the present invention not only provides users with an intuitive and dynamic data display platform, but also can continuously collect user feedback and new data. The specific advantages are as follows:

[0054] 1. Enhanced user experience

[0055] Intuitiveness: The interactive map displays data in a graphical way, enabling users to understand complex information at a glance. For example, users can click on the markers on the map to view the specific sentiment analysis results of a certain location.

[0056] Interactivity: Users can directly interact with the map, such as zooming, panning, and filtering specific types of sentiment nodes, etc. This interactivity enhances the user's sense of participation and exploration desire, enabling users to understand the story behind the data more deeply.

[0057] 2. Data collection and feedback mechanism

[0058] User-generated content: The interactive map allows users to submit their own comments or evaluations. These new data can be collected in real time and used to update the knowledge graph and large language model. For example, users can mark their favorite parks on the map and attach their personal feelings, and this information can be used to improve the accuracy of sentiment analysis.

[0059] Feedback loop: Through the operations and feedback of users on the map, the system can continuously adjust and optimize the large language model. For example, if a user has objections to the sentiment classification of a certain location, they can submit corrective suggestions, and these feedbacks can help the model learn and improve.

[0060] 3. Dynamic Update and Real-Time Analysis

[0061] Real-time update: The interactive map can reflect the latest data changes in real time, ensuring that users obtain the most timely information. For example, when a new comment is posted on social media, the corresponding location on the map will automatically update its sentiment status.

[0062] Trend analysis: By continuously monitoring user interaction data, trends and patterns of sentiment changes can be discovered. For example, certain areas may frequently show negative emotions during specific time periods, which can alert relevant departments to take measures to improve the environment or services in that area.

[0063] 4. Multi-Dimensional Data Analysis

[0064] Multi-level display: The interactive map can support the overlay of multiple layers of data to display information from different dimensions. For example, in addition to the sentiment analysis results, other data such as traffic flow, weather conditions, and population density can be overlaid to help users understand the situation of urban blocks from multiple perspectives.

[0065] Personalized view: Users can choose which data layers to display according to their own needs to achieve a personalized map view. For example, a parent may be more concerned about the safety around schools, while a tourist may be more interested in the evaluations of scenic spots. Description of the Drawings

[0066] Figure 1 is a schematic flowchart of the present invention;

[0067] Figure 2 is a schematic diagram of the location element recognition process of the multi-modal large language model in the embodiment of the present invention;

[0068] Figure 3 is a schematic diagram of the emotional map drawing and memory circle constructed with different base map color configurations in the embodiment of the present invention;

[0069] Figure 4 is a schematic diagram of the nostalgic emotional memory circle constructed in the embodiment of the present invention. Detailed Embodiment

[0070] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the following embodiments.

[0071] As Figure 1 shown, this embodiment provides a method for drawing an emotional map of urban blocks based on a large language model, including the following steps:

[0072] Step S1: Data Collection and Processing

[0073] In the data collection stage, data will be collected from both offline and online dimensions. After confirming the implementation location, offline data collection mainly relies on the text materials of high-quality publications, while online data collection involves information collection through online platforms. Each of these two data collection methods has its own advantages and disadvantages. The advantage of offline data collection is that it can deeply explore information and obtain more authentic feedback. Traditional paper publications usually have high text quality and contain rich local emotions, which can better reflect the human-place emotional connection. However, the disadvantages of offline data collection are high cost, long time consumption, and being often affected by the personal perspectives and cognitions of the authors. In the process of offline data collection, in this embodiment, famous people's works, local publications, academic journals, local newspapers and relevant books are mainly used. These text materials usually go through strict editing and review, and can provide more accurate and in-depth local emotion information.

[0074] In contrast, the advantage of online data collection is that it can quickly and widely obtain a large amount of information, and the cost is relatively low. The diversity and real-time nature of network data provide rich perspectives for analysis. However, the disadvantages of online data collection may include issues of data quality control, such as possible biases, incompleteness or obsolescence in network data, as well as low response rates and selection biases that may be encountered in online surveys. In the online data collection stage, in this embodiment, various channels such as social media platforms, online forums, blogs and news websites are used to collect user-generated content related to human-place emotions. Through natural language processing technology, a large amount of text data can be effectively screened and analyzed to extract keywords and topics related to local emotions. In addition, online data collection can also quickly obtain the emotional feedback and opinions of respondents through methods such as questionnaires. In this process, this embodiment takes various measures to improve the quality of data, such as adopting diverse sample selection, cleaning and validating the data, etc., to reduce problems of biases and incompleteness.

[0075] Data is collected from social media platforms, including posts, comments, likes and shares made by users. Data is collected from online review websites, including ratings and comments of users on local merchants and locations. They cover a wide range of public opinions, historical records and cultural expressions, and can provide rich context information for the emotional analysis of urban blocks. Different from the data of online social media, the data of famous people's works is concise in word usage, clear in expression, and has a very high information density. The content mentioned therein should have a relatively high weight.

[0076] The process of data collection includes the following key points:

[0077] Data type definition: List the data types to be collected, such as text data (user comments, descriptions, etc.), geographical information data (GPS coordinates, urban block boundaries, etc.), and other possible data types (such as image data, weather data, etc.).

[0078] Data scale and scope: The scope of the data mainly focuses on the blocks to be studied. In the online data, the blocks to be studied are included as tags, such as #Duolun Road, #North Sichuan Road, etc. Offline data mainly includes local chronicles, biographies of local celebrities, memoirs, special issues of local newspapers and magazines, etc. The larger the scale of the data, the better. High-quality data can better reflect the local space and the feelings of residents.

[0079] Data collection methods: Include using programming languages to build automated scripts, API calls, manual collection, etc. Among them, most of the data on social networks is crawled through automated scripts built with Python. For specific media, the API call method is used to obtain data. Most of the content of offline data is manually collected.

[0080] In this embodiment, taking the North Sichuan Road Sub-district in Hongkou District as the research object, a large amount of text data and video data are obtained from social networks, and are processed into audio and text data for analysis in subsequent work. The specific steps for data acquisition are as follows:

[0081] S101. Analyze the website: Visit various social platform websites, use developer tools to observe network requests and responses, so as to determine the location of the data to be obtained on the page and how it is loaded.

[0082] S102. Determine the request: Analyze the search function of the website, search for relevant content such as "Hongkou District" and "North Sichuan Road" on the website, and filter out other content.

[0083] S103. Write code: Use Python libraries to send network requests, parse the website return document, and process the return data.

[0084] S104. Process data: Currently, network data usually has a lot of content such as advertisements and promotions, and there are also repetitive contents that need to be removed through programming code.

[0085] S105. Data extraction: Extract relevant information containing the keyword "North Sichuan Road", which may be video links, titles, descriptions, Douyin topics, etc.

[0086] S106. Data storage: Save the extracted data in the database for subsequent use.

[0087] After obtaining the above data, it is necessary to process the data. The main reason is that there are obvious biases in some information during the data acquisition process. In current domestic social networks, there are generally some creators who conduct drainage operations. For example, those engaged in real estate-related content will promote and even brag about their products through videos or articles to achieve the purpose of sales. Such content may cause misunderstandings and needs to be removed.

[0088] The data preprocessing in this embodiment is divided into steps such as data cleaning, data annotation, data conversion, data augmentation, and dataset division. Data cleaning mainly removes invalid, incorrect, incomplete, or irrelevant data records, including low-quality comments, vulgar language, and other content. Data annotation marks the weights of a part of the original data for subsequent fine-tuning learning. Data conversion includes performing OCR operations on bitmap-formatted book scans to obtain vector content, and performing structured NER entity recognition on unstructured data. Data augmentation includes operations such as flipping, cropping, and rotating graphic data to increase the richness of the data and make the trained recognition model more perfect. Dataset division mainly re-divides the cleaned data into a training set and a test set to enable the detection of the model's quality during the subsequent training process.

[0089] Step S2: Model fine-tuning training

[0090] This step aims to fine-tune the pre-trained model to make the large language model better adapt to the relevant tasks of local sentiment extraction. The core goal is to adjust the general large language model so that it can effectively understand and process a large amount of local text. Since this task involves specific expressions such as dialects, local characteristics, and folk customs, which are significantly different from the training materials of traditional general large language models, it is necessary to enhance the model's understanding ability. During the fine-tuning process, the data collected and manually annotated in the early stage will be used, and the data processing means include text cleaning, word segmentation, stop word removal, and part-of-speech tagging. Through fine-tuning, the performance of the model in tasks such as sentiment classification, sentiment intensity estimation, or other related tasks can be improved.

[0091] During the fine-tuning process, this embodiment adopts the method of transfer learning and trains on data in a specific domain to improve the model's ability to recognize local sentiment. First, an annotated dataset with high relevance to the target task will be selected to ensure the diversity and representativeness of the training samples. Then, use this data to train the model for multiple rounds, gradually optimizing key hyperparameters such as the learning rate and batch size, so that it can more accurately capture the nuances of local sentiment. During the fine-tuning process, the sentiment categories are set to multiple dimensions, such as sentiment polarity (positive, negative, neutral) and sentiment intensity (low, medium, high), emphasizing the model's ability to understand context information in order to more accurately capture the sentiment related to urban blocks. For example, consider the influence of geographical location, time factors, etc. on sentiment. In addition, it is necessary to emphasize the model's adaptability in a specific domain (such as urban blocks), and through fine-tuning, the model can better understand the specific language and sentiment expression methods in this domain. Through fine-tuning, the urban spatial elements to be recognized can also be clarified, including but not limited to streets, buildings, public facilities (such as parks, schools, hospitals), transportation hubs, etc. In addition to regular supervised learning, semi-supervised or unsupervised learning methods can also be used to improve the model's ability to process unseen samples.

[0092] In addition, to further improve the performance of the model, cross-validation will also be implemented to evaluate the model's performance on different datasets and make necessary adjustments according to the results. This embodiment uses the k-fold cross-validation method to evaluate the model performance and makes further improvement decisions based on this. This process not only helps to discover the potential deficiencies of the model but also ensures its robustness and reliability in practical applications.

[0093] Through the above series of steps, the goal is to build an efficient large language model that can accurately reflect local sentiment, providing strong technical support for the subsequent creation of the human-land sentiment map.

[0094] In this embodiment, a pre-trained large language model of Qwen-Plus is adopted and further fine-tuned on this basis to make the model more effectively adapt to the task of extracting local sentiment elements in Shanghai. Qwen-Plus has been fully pre-trained on a large-scale corpus and has strong natural language understanding and generation capabilities. The fine-tuning process includes adjusting the loss function based on multi-dimensional sentiment classification tasks to better adapt to different sentiment category weight distributions, and using appropriate regularization techniques to prevent overfitting.

[0095] After obtaining the fine-tuned large model, taking the large model as the core, build a NER workflow and agent to enable it to automatically optimize the output of the content. At the same time, the missing location background information in the training data can be supplemented by introducing an external knowledge base.

[0096] Step S3: Feature extraction

[0097] After the fine-tuning in step S2, the large language model of this embodiment is no longer a general domain model, but a model with the ability to recognize the human-place relationship. This model can handle extraction and evaluation tasks in the field of human-place relationship better than the general domain model. Based on the fine-tuned model, a named entity recognition (NER) task is carried out, and the fine-tuned model is used to recognize and extract specific types of entities from the text, such as person names and place names (such as "Songhelou", "Lu Xun Park", etc.). In addition, in order to further improve the recognition effect, this embodiment also jointly trains the combined image data and text data. By analyzing the location information in the image, the model can obtain more comprehensive context, thereby enhancing its understanding of relevant entities in the text. This multi-modal learning method will significantly improve the overall performance of the model, enabling it to more accurately extract and recognize emotional elements in practical applications. Finally, the trained and optimized model is applied to the actual sentiment analysis task, while continuously monitoring its performance and making iterative improvements according to the feedback to ensure the effectiveness and reliability of the model in different scenarios. As Figure 2 shown, in this embodiment, the multi-modal ability of the Qwen large language model is used to identify relevant location-related elements from the image information in the data to supplement and enhance the deficiencies of the text data.

[0098] Taking the identification and classification of specific types of entities in the text, such as locations, organization names, etc. as an example, the specific spatial element identification process includes:

[0099] Model deployment: Deploy the fine-tuned large language model to an environment suitable for performing the NER task. This may involve setting up an API interface or running directly on a local server.

[0100] Input data: Submit the preprocessed text to the model one by one to obtain the prediction results for potential entities within each sentence.

[0101] Definition of entity categories: Clearly define the categories of spatial elements to be recognized, including but not limited to: Geographical locations: specific locations such as "Songhelou", "Lu Xun Park", etc.; Transportation nodes: stations, airports, bridges, etc.; Public service points: post offices, fire stations, etc.

[0102] Threshold setting: To ensure the recognition quality, the probability threshold of the model output can be adjusted according to the actual situation, and only the results with a confidence level higher than a certain level are retained.

[0103] In addition to the name, relevant attributes also need to be extracted, such as:

[0104] Type: The type of spatial element (such as park, commercial area, residential area).

[0105] Location: The geographical location of the spatial element (such as coordinates, street names).

[0106] Emotional association: Emotional information related to spatial elements (e.g., "This park is very beautiful" can be marked as positive emotion).

[0107] Of course, many tasks cannot be fully completed at this step and need to be repeatedly executed to confirm their accuracy. By introducing web search results, etc., more complex content can be sorted out. Since some long names may be split into multiple phrases, an algorithm needs to be designed to automatically detect and merge these fragments. A mechanism should be established for manual review and correction of errors that occur during the automatic annotation process, especially those that are prone to confusion.

[0108] Step S4: Construction and localization of the human-land emotion framework

[0109] The human-land emotion map of each place has local characteristics and carries the local cultural core. When making the human-land emotion map of urban blocks, the human-land emotion framework is defined starting from the characteristics of each place. This requires clarifying the structure of the framework, including elements (entities) and edges (relationships). The elements mainly include people (individuals, groups) and places (spatial elements), and the edges represent the emotional relationships between people and places. Then, the constructed human-land emotion framework is registered for geospatial localization to ensure that the main elements within the framework can be aligned with the Geographic Information System (GIS system).

[0110] The elements constructed in the human-land emotion framework include two different types: people and places.

[0111] People: Can be specific individuals, community groups, or broader user groups. Each "person" element may contain attributes such as age range, gender, occupation, etc.

[0112] Places: Include but are not limited to spatial elements such as streets, buildings, parks, schools, hospitals, etc. These elements should also have attributes describing their characteristics, such as geographical location coordinates, type (commercial area / residential area), area size, etc.

[0113] After that, the relationships between the elements are established. Using the extracted spatial elements (geospatial elements) and relevant people (such as reviewers, authors, interviewees, etc.), the human-land relationship is constructed. This requires defining the types of relationships between people and places, such as:

[0114] 1. Positive emotion: Like

[0115] 2. Negative emotion: Dislike

[0116] 3. Neutral emotion: Neutral

[0117] Afterwards, use the fine-tuned large language model to perform sentiment analysis on the data prepared in step S1 and the human-land entities obtained in step S3, and extract the sentiment polarity and sentiment intensity. Map the sentiment polarity to scores (e.g., positive is +1, negative is -1, neutral is 0). Further refine the score range according to the sentiment intensity (e.g., strong, general, slight) (for example, strongly positive can be scored 0.8, slightly positive can be scored 0.2).

[0118] This is the main link connecting "people" and "land", representing people's attitudes or feelings towards a certain place. According to the previously set sentiment categories, this relationship can be further divided into positive, negative, neutral, and different intensity levels (low, medium, high). Additional information can also be attached to each edge, such as the specific time point of the sentiment evaluation and the source channels (social media comments, questionnaires, etc.).

[0119] In this step, use the large language model to assist in quantifying the human-land sentiment, sort out the human-land sentiment elements obtained previously, organize their weights, determine the backbone and affiliated content of the human-land sentiment framework on the ground, and perform spatial positioning and registration.

[0120] First, deeply sort out the human-land sentiment elements collected in the early stage, and identify the key sentiment dimensions and related factors. These factors may include the emotional reactions of local residents to the environment, their sense of identity with specific locations, and their significance in the cultural, historical, and social contexts. In this embodiment, this process refers to the sentiment wheel structure of Plutchik and uses the large language model to analyze the collected Sichuan North Road corpus content, and extracts eight kinds of sentiment contents that conform to the local characteristics of Sichuan North Road Street, namely nostalgia, joy, criticism, admiration, surprise, expectation, pride, and loss.

[0121] Next, assign weights to each sentiment element based on its importance in the overall sentiment framework. This weight assignment will consider various factors, including the universality of the sentiment, the feedback of the interviewees, and the support of historical data. Through this method, a human-land sentiment framework that is both scientifically based and reflects local characteristics can be constructed.

[0122] After the framework is constructed, register the key elements in the framework with the geographic information system for spatial positioning. Unify the names of the key elements in the framework (i.e., the elements with higher weights), integrate the aliases / former names, etc., and then perform positioning in the geographic information system. This step involves combining the sentiment elements with the geographic information system (GIS) data, and accurately mapping the sentiment elements to the actual geographic space through geographic coordinates. This process not only helps to visualize the distribution of human-land sentiment, but also reveals the differences and connections in sentiment between different locations.

[0123] Step S5: Visualization map production and memory circle construction

[0124] In the process of constructing a human-land urban block emotional map, visualization is a key step in transforming abstract data into intuitive information. Among them, the 30-minute memory circle is an important display content of the visualization map, and the presentation of the memory circle is completed through a visual and interactive map.

[0125] This step mainly consists of three steps. The first is to select a suitable base map, the second is data conversion and overlay, and the third is memory circle drawing.

[0126] The first step: Select a suitable base map.

[0127] Selecting a suitable base map overlay is mainly for design considerations. Various base maps are important components of the display map, so the color configuration of the base map will affect the construction of the memory circle map.

[0128] Base map type: Select a suitable base map according to the target audience and application scenario. Common base map types include satellite images, street maps, topographic maps, etc. For example, if you are concerned about the specific layout of urban blocks, a street map may be more appropriate; if you want to show the visual effects of natural landscapes or buildings, satellite images are better.

[0129] Color configuration: The color of the base map should be coordinated with the overall design style and be easy to distinguish different geographical elements. The color should not be too bright or complex to avoid distracting users' attention from the main information. At the same time, considering the experience of color-blind users, designs that rely solely on color to distinguish important information should be avoided.

[0130] Overlay layer: In addition to the basic base map, other useful information layers can be added, such as traffic networks, administrative division boundaries, etc., to enhance the functionality and practicality of the map.

[0131] The second step: Data conversion and overlay.

[0132] It is mainly necessary to convert the spatial element nodes of the human-land nodes in step S4 into geographical spatial coordinates. According to the human-land emotional attributes calculated in step S4, weights can be assigned to the location nodes, and important nodes under various different emotions are screened and arranged in space.

[0133] Coordinate conversion: Convert the spatial element nodes extracted in step S4 from text descriptions into specific geographical spatial coordinates. This step usually requires the help of GIS (Geographic Information System) tools or online map API services, such as Google Maps API, Amap API, etc., to perform address-to-latitude and longitude coordinate parsing.

[0134] Weight Assignment: Based on the calculation results in step S4, corresponding sentiment weights are assigned to each location node. These weights can reflect the importance of the location under different sentiment categories. For example, a place that is frequently mentioned and has positive evaluations may receive a higher positive weight.

[0135] Node Screening: Key nodes are screened according to set criteria (such as sentiment intensity threshold, frequency of occurrence, etc.). This can reduce redundant information on the map and make the final presented result clearer and easier to understand.

[0136] The third step is to implement the content through the graphical display on the visual map and achieve the drawing of the memory circle.

[0137] Dot Symbols: For the selected important nodes, they can be represented by dot symbols on the map. Different sentiment attributes can be distinguished by icons of different colors or shapes. For example, green dots represent positive sentiment, and red triangles represent negative sentiment.

[0138] Heat Map: The overall situation of the sentiment distribution within a certain area is presented in the form of a heat map. The depth of the color can reflect the average sentiment tendency or the level of sentiment intensity within a specific area.

[0139] Path Lines: If there is a need to show the movement trajectories or activity routes of people, relevant nodes can be connected by lines. These paths can be drawn in different styles according to their nature (such as daily commuting, leisure walks, etc.).

[0140] Interaction Function: Provide rich interaction options to allow users to explore the data more flexibly. Other data such as traffic flow, weather conditions, population density, etc. can be overlaid to help users understand the urban blocks from multiple perspectives. At the same time, users can choose which data layers to display according to their own needs to achieve a personalized map view. For example, allow users to click on a single node to view detailed information, adjust the time slider to observe the trend of sentiment changes, etc.

[0141] As Figure 3 shown, the color configuration of the base map not only affects the overall visual effect but also directly affects the construction of the memory circle map and users' understanding. When selecting the base map, this embodiment considers various factors, including the purpose of the map, the target audience, and the type of information to be conveyed. The design of the base map should ensure the clear readability of the information and at the same time effectively highlight the scope and characteristics of the thirty-minute memory circle. This memory circle represents the area that residents can reach in their daily lives and reflects their emotional connection and cognition of the surrounding environment. To enhance the readability of the map, this embodiment uses gradient colors and transparency adjustments to clearly display the distribution of sentiment elements on the base map. As Figure 4As shown, after drawing the visual map, the 30-minute walkable range can be obtained by calculating spatial accessibility, and the emotional states and spatial distributions within the walkable range are overlaid to obtain the 30-minute memory circle and its related content.

[0142] The above-mentioned visual urban block emotional map has an interactive function. Through the operations and feedback of users on the map, the system can continuously adjust and optimize the large language model. For example, if a user disagrees with the emotional classification of a certain location, they can submit corrective suggestions, and these feedbacks can help the model learn and improve. At the same time, the interactive map can reflect the latest data changes in real time to ensure that users obtain the most timely information. For example, when new comments are posted on social media, the emotional state of the corresponding location on the map will be automatically updated.

[0143] In other embodiments, the above method may further include: continuously monitoring the user interaction data to discover trends and patterns of emotional changes. For example, certain areas may frequently show negative emotions during specific time periods, which can remind relevant departments to take measures to improve the environment or services in that area.

[0144] If the above method is implemented in the form of software functional units and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. And the aforementioned storage medium includes: USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs, etc., which can store program codes.

[0145] In other embodiments, a system for drawing an urban block emotional map based on a large language model may be provided, including a front-end user layer, a control layer, a memory, and one or more programs stored in the memory. The one or more programs include instructions for executing the method as described above and can be called by the control layer. After the control layer adjusts the instructions for the program to execute the urban block emotional map drawing method, an emotional map is generated, and the interactive function of the emotional map is displayed to the user through the front-end user layer for use. In the front-end user layer, the user mainly realizes functions such as logging in, browsing, and calling the model for calculation, and allows the user to perform interactive operations on the website.

[0146] The model calculation function in the system conforms to the above method description of the present invention, and will not be elaborated here. Those of ordinary skill in the art can understand that all or part of the processes in implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above various methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0147] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.

Claims

1. A method for drawing an urban block sentiment map based on a large language model, characterized in that: The following steps are involved: Collecting raw data and performing data preprocessing to generate processed data, wherein the raw data includes online data and offline data; Fine-tune the original large language model based on the processed data to generate a person-land relationship recognition model; Extracting sentiment elements and performing sentiment analysis on the processed data based on the human-land relationship recognition model; Constructing a human-land emotion framework based on the extracted emotion elements and the emotion analysis results; A visualized city block emotion map is generated based on the human-land emotion framework and geographic information, and the visualized city block emotion map changes visualization content based on real-time user instructions.

2. The method for drawing a city block emotion map based on a large language model according to claim 1 is characterized in that: The model fine-tuning process includes: Based on the target task, a labeled data set for training is obtained by screening from the processed data, wherein the labeling includes multi-dimensional emotion category labeling; Using the labeled data set to perform multiple rounds of training on the original large language model to optimize model parameters; The model is adjusted by cross-validation to generate the human-land relationship recognition model.

3. The method for drawing a city block emotion map based on a large language model according to claim 2 is characterized in that: During the process of fine-tuning the model, an external knowledge base is introduced to supplement the content of the training data.

4. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The extracted emotional elements include human elements, spatial elements and related attributes of each element. The human elements include individuals, community groups or user groups, and the spatial elements include streets, buildings, parks, schools or hospitals.

5. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The sentiment analysis result includes quantified sentiment polarity and sentiment intensity.

6. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The human-land relationship recognition model outputs the extraction result and the sentiment analysis result of the sentiment element based on a set probability threshold.

7. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The constructed human-land emotion framework includes entities and edges. The entities include human elements and spatial elements. The edges represent the emotional relationship between humans and lands obtained based on the results of emotion analysis. Different spatial elements have different weights.

8. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The generation process of the visual city block emotion map includes: Realize spatial registration based on the human-land emotional framework and geographic information; A visualization base map is selected, and based on the aligned human-land emotion framework, corresponding emotion data is superimposed on the visualization base map to generate a visualization city block emotion map.

9. The method for drawing a city block emotion map based on a large language model according to claim 1, characterized in that: The method further includes: Based on the interactive data on the visualized city block emotion map, the original data is collected in real time to generate an updated visualized city block emotion map.

10. A computer-readable storage medium, characterized in that: It includes one or more programs for execution by one or more processors of an electronic device, and the one or more programs include instructions for executing the method for drawing an urban block sentiment map based on a large language model as described in any one of claims 1-9.

Citation Information

Cited By

  • User emotion interaction method based on intelligent bus platform

    CN120763862A