Social media data analysis and presentation method and device based on geographic location

By integrating the analysis and storage of geolocation information in social media data analysis, combining clustering and time series analysis, we generate interactive maps, and solving the problem of unused geolocation information in existing tools, improving analysis efficiency and users Experience, real-time data processing and trend discovery.

CN118779376BActive Publication Date: 2024-12-10ONE NETWORK INTEROPERABILITY (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411258932.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-10
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Existing social media data analysis tools ignore geolocation information and cannot conduct in-depth analysis. The data is isolated, the real-time utilization rate is low, the display method is single, and the user experience is poor.

Method used

Social media data is obtained through the API interface, geographic location coordinate analysis is performed and stored in the PostGIS geographic information database, clustering algorithms and time series analysis are used to identify hot spot areas, combine user behavior data for prediction analysis, and use Leaflet.js and D3. js generate interactive maps and dynamic trend charts.

Benefits of technology

It realizes the deep integration of geolocation data and social media data, provides more comprehensive analysis results, improves analysis efficiency and accuracy, improves user experience, and can process large amounts of data in real time and discover trend changes in time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779376B_ABST
    Figure CN118779376B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device and electronic device for analyzing and presenting social media data based on geographic location, belonging to the field of data processing technology, the method comprising: performing data processing on the collected data to obtain collected data; performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data; storing the analyzed geographic location information and social media content in a PostGIS geographic information database; performing cluster analysis on the geographic location data using a clustering algorithm to identify hot spots of social media activities; and using D3.js to generate dynamic trend graphs and charts to display data changes in different time periods. The present invention can display data based on the geographic location of social media users, thereby improving the convenience of data display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic device for analyzing and presenting social media data based on geographic location. Background Art

[0002] Social media data analysis refers to the process of obtaining valuable information and insights by collecting, organizing and analyzing data on social media platforms. This data can include but is not limited to user posts, comments, shared content, number of likes, user engagement metrics, etc. Social media data analysis helps businesses and organizations understand user data trends, consumer preferences, and competitor performance.

[0003] In the process of social media data analysis, natural language processing (NLP) technology can be used to analyze the emotional tendencies in the text to determine whether the user's attitude towards a topic is positive, negative, or neutral. Machine learning algorithms can also be used to identify the main topics or categories of discussion, further analyze the relationships and influence between users, monitor the changing trends of keywords or topics over time, and discover emerging topics or trends.

[0004] The existing technology has the following problems in the process of social media data analysis:

[0005] 1. Lack of comprehensive analysis of geolocation data: Existing social media analysis tools often ignore the geolocation information in user-posted content and are unable to provide in-depth location-based analysis.

[0006] 2. Data isolation and lack of association: Geographic location information is usually stored and processed in isolation from other data, lacking effective means of association analysis.

[0007] 3. Low real-time utilization: Due to the large scale of data in existing systems, it is difficult to utilize and analyze real-time geographic location data.

[0008] 4. Single display method: Existing systems often use static charts or simple geographic labels to display geographic location information, lacking interactivity and dynamic display capabilities, resulting in poor user experience.

[0009] The above problems become technical problems that need to be solved. Summary of the invention

[0010] In view of this, an embodiment of the present invention provides a method, device and electronic device for analyzing and presenting social media data based on geographic location, which at least partially solve the problems existing in the prior art.

[0011] In a first aspect, an embodiment of the present invention provides a method for analyzing and presenting social media data based on geographic location, comprising:

[0012] After obtaining user data from multiple social media platforms using API interfaces, the collected data is processed to obtain collected data;

[0013] Performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data;

[0014] The parsed geographic location information and social media content are stored in a PostGIS geographic information database, a spatial index is created for the geographic location data, and a search window is created based on the spatial index;

[0015] Use clustering algorithms to perform cluster analysis on geographic location data to identify hot spots of social media activities. Use time series analysis methods to analyze the changing trends of social media activity in specific areas over different time periods. Combined with user behavior data, predictive analysis of user behavior patterns and preferences is performed.

[0016] Use Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, and use D3.js to generate dynamic trend charts and graphs to show data changes in different time periods and provide intuitive analysis results.

[0017] According to a specific implementation of the embodiment of the present disclosure, after obtaining user data from multiple social media platforms using an API interface, data processing is performed on the collected data to obtain the collected data, including:

[0018] Detect and remove duplicate, missing, and erroneous data;

[0019] Standardize the data formats from different sources and store and process the data in a unified manner;

[0020] Filter out noise data according to preset rules.

[0021] According to a specific implementation of the embodiment of the present disclosure, the performing of geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data includes:

[0022] Convert the text address provided by the user into longitude and latitude coordinates;

[0023] Convert geotags into specific addresses or landmarks;

[0024] Normalize all location data into a uniform latitude and longitude format.

[0025] According to a specific implementation of the embodiment of the present disclosure, the performing of geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data further includes:

[0026] For each address that needs to be parsed, construct a request and send it to the geocoding service. The request contains the complete address information.

[0027] Parse the JSON response returned by the geocoding service and extract the required geographic coordinates from the response;

[0028] Match the parsed geographic coordinates with the original social media data.

[0029] According to a specific implementation of an embodiment of the present disclosure, the parsed geographic location information and social media content are stored in a PostGIS geographic information database, a spatial index is created for the geographic location data, and a retrieval window is created based on the spatial index, including:

[0030] Define table structures to store social media content and related geographic information;

[0031] Convert the parsed geographic location information into a geographic coordinate format supported by PostGIS, and import the social media content and its metadata into the database table;

[0032] Use the spatial functions provided by PostGIS to filter records that meet specified conditions, including:

[0033] ST_Contains: Determines whether a geometric object completely contains another geometric object;

[0034] ST_Within: Determines whether a geometric object is inside another geometric object;

[0035] ST_DWithin: Determines whether the distance between two geometric objects is less than a certain threshold.

[0036] According to a specific implementation of the embodiment of the present disclosure, clustering analysis is performed on geographic location data using a clustering algorithm to identify hot spots of social media activities, and a time series analysis method is used to analyze the trend of social media activity changes in specific areas in different time periods. Combined with user behavior data, predictive analysis of user behavior patterns and preferences is performed, including:

[0037] Run the DBSCAN algorithm using the preset Eps and MinPts values ​​to identify the core points and neighboring points of the geographic location data;

[0038] The core points and their neighboring points are grouped into the same cluster to form a clustering result;

[0039] The area where the number of clusters contained in a unit area of ​​the clustering result exceeds a preset value is set as a hot spot area.

[0040] According to a specific implementation of the embodiment of the present disclosure, the clustering algorithm is used to perform cluster analysis on the geographic location data to identify the hot spots of social media activities, and the time series analysis method is used to analyze the trend of social media activity changes in specific areas in different time periods. Combined with user behavior data, the user's behavior pattern and preference are predicted and analyzed, which also includes:

[0041] Determine the value of d based on the number of differences, draw the autocorrelation function graph, and determine the values ​​of p and q based on the significant peaks on the ACF and PACF graphs;

[0042] Based on the determined p, d, and q values, an ARIMA (p, d, q) model is established, and the parameters of the model are estimated using the maximum likelihood estimation method;

[0043] Use the established ARIMA model to predict future time points.

[0044] According to a specific implementation of the embodiment of the present disclosure, Leaflet.js is used to initialize the interactive map, set the basic parameters of the map, and overlay the analysis results on the map in the form of layers, including:

[0045] Import the Leaflet.js library and its CSS style sheet into the HTML file;

[0046] Create a div element in the HTML file as a container for the map and set its width and height;

[0047] Use JavaScript to initialize the Leaflet map object, specifying the center position of the map and the initial zoom level;

[0048] Add a basic map layer to the map and create a custom layer. Add the custom layer you created to the map so that users can see the analysis results.

[0049] In a second aspect, an embodiment of the present invention provides a device for analyzing and presenting social media data based on geographic location, including:

[0050] The collection module uses the API interface to obtain user data from multiple social media platforms, and then processes the collected data to obtain collected data;

[0051] A parsing module performs geographic location coordinate parsing on the collected data to obtain geographic location information corresponding to the social media content in the collected data;

[0052] A storage module stores the parsed geographic location information and social media content in a PostGIS geographic information database, creates a spatial index for the geographic location data, and creates a retrieval window based on the spatial index;

[0053] The prediction module uses clustering algorithms to perform cluster analysis on geographic location data, identify hot spots of social media activities, use time series analysis methods to analyze the changing trends of social media activity in specific areas over different time periods, and combine user behavior data to perform predictive analysis on user behavior patterns and preferences;

[0054] The display module uses Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, and use D3.js to generate dynamic trend charts and graphs to display data changes in different time periods and provide intuitive analysis results.

[0055] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0056] at least one processor; and,

[0057] a memory communicatively connected to the at least one processor; wherein,

[0058] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the geographic location-based social media data analysis and presentation method in any of the aforementioned first aspects or any of the implementations of the first aspect.

[0059] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the geographic location-based social media data analysis and presentation method in the aforementioned first aspect or any implementation of the first aspect.

[0060] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method for analyzing and presenting social media data based on geographic location in the aforementioned first aspect or any implementation of the first aspect.

[0061] The social media data analysis and presentation scheme based on geographic location in the embodiment of the present invention includes: after obtaining user data from multiple social media platforms using an API interface, performing data processing on the collected data to obtain collected data; performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data; storing the analyzed geographic location information and social media content in a PostGIS geographic information database, creating a spatial index for the geographic location data, and creating a retrieval window based on the spatial index; performing cluster analysis on the geographic location data using a clustering algorithm to identify hot spots of social media activities, using a time series analysis method to analyze the trend of social media activity changes in specific areas in different time periods, and combining user behavior data to predict and analyze user behavior patterns and preferences; using Leaflet.js to initialize an interactive map, setting basic map parameters, superimposing the analysis results on the map in the form of layers, using different colors and icons to mark different types of data, and using D3.js to generate dynamic trend graphs and charts to display data changes in different time periods and provide intuitive analysis results.

[0062] The solution of this application has the following beneficial effects:

[0063] It can deeply integrate geographic location data with social media data to provide more comprehensive analysis results. By associating geographic location with the content posted by users, it can analyze from both the spatial dimension and the content dimension to obtain deeper insights.

[0064] Through standardized geographic coordinate parsing and data storage, complex spatial queries and association analysis are supported. Using geographic information databases and spatial indexing technology, data from different sources can be quickly retrieved and associated, improving the efficiency and accuracy of analysis.

[0065] Interactive maps and dynamic visualization technology are used to provide an intuitive user experience, making it easier for users to understand and use the analysis results. Users can view social media activities in different locations through interactive maps and obtain intuitive visual feedback.

[0066] By utilizing efficient data processing and analysis algorithms, it is possible to quickly process and analyze large amounts of real-time social media data and detect trend changes in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0068] Figure 1 A schematic diagram of a process flow of a method for analyzing and presenting social media data based on geographic location provided by an embodiment of the present invention;

[0069] Figure 2 A schematic flow chart of another method for analyzing and presenting social media data based on geographic location provided by an embodiment of the present invention;

[0070] Figure 3 A schematic diagram of the structure of a device for analyzing and presenting social media data based on geographic location provided by an embodiment of the present invention;

[0071] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0072] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0073] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0074] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0075] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0076] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0077] The embodiment of the present disclosure provides a method for analyzing and presenting social media data based on geographic location. The method for analyzing and presenting social media data based on geographic location provided in this embodiment can be performed by a computing device, which can be implemented as software, or as a combination of software and hardware, and which can be integrated in a server, terminal device, etc.

[0078] See also Figure 1 The present disclosure provides a method for analyzing and presenting social media data based on geographic location, including:

[0079] S101, after using the API interface to obtain user data from multiple social media platforms, the collected data is processed to obtain collected data.

[0080] Use the API interface to obtain geo-tagged posts, pictures, and videos from multiple social media platforms. The specific steps are as follows:

[0081] Platform selection: Choose a social media platform with a broad user base and public access to data.

[0082] API interface call: Write scripts to obtain data containing geotags in batches through the API interface of social media platforms to ensure data diversity and coverage.

[0083] Data storage: The initially collected data is stored in a temporary database for subsequent processing.

[0084] Process the collected data, remove duplicate and invalid data, and ensure the accuracy and completeness of the data. The specific steps are as follows:

[0085] Data cleaning: Detect and delete duplicate data, missing data, and erroneous data to ensure the consistency and reliability of the data set.

[0086] Formatting: Standardize the data formats from different sources to ensure that the data can be stored and processed uniformly.

[0087] Data filtering: Filter out noisy data, such as irrelevant posts or data containing inaccurate geographic location information, based on pre-defined rules.

[0088] S102, performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data.

[0089] As a way, you can use geocoding and reverse geocoding techniques to convert text addresses or geotags into standardized latitude and longitude coordinates. The specific steps are as follows:

[0090] Geocoding: Convert user-supplied text addresses into latitude and longitude coordinates using a third-party geocoding service such as the Google Geocoding API.

[0091] Reverse geocoding: Convert geotags into specific addresses or landmark information so that users can more intuitively understand location data.

[0092] Coordinate standardization: Standardize all location data into a unified latitude and longitude format for subsequent analysis and presentation.

[0093] As another method, in order to improve the accuracy of geographic location prediction, the collected data is parsed for geographic location coordinates, including the following steps:

[0094] S1021, using a large language model to extract an explicit geographic feature set GE={GE1, GE2, ...GEn} and an implicit geographic feature set GY={GY1, GY2, ...GYm} from the text content of the collected data.

[0095] Explicit geographic features refer to specific places, cities, countries and other geographical entities directly mentioned in the text. Extracting these features can identify place name entities from the text.

[0096] Let T represent the text set in the collected data, , where t i is the i-th sentence in the text;

[0097] For each sentence , apply large models To extract place name entities :

[0098]

[0099] gather Contains all place name entities in the sentence;

[0100] Set up a mapping function S to correct spelling errors in set E and map synonymous place name entities to standard names:

[0101] E'=S(E)

[0102] Aggregate the removed duplicate entities into the final set of explicit geographic features GE:

[0103]

[0104] Unique() represents the deduplication function.

[0105] Implicit geographic features refer to geographic information that is not directly mentioned in the text but can be inferred from the context.

[0106] You can use pre-trained language models Parse the contextual meaning of text in collected data:

[0107]

[0108] Where C represents each sentence The context representation vector of ;

[0109] Let K be the set of keywords, , l is the number of keywords, and the relevance score between keywords and context is calculated:

[0110] ,in , Calculate the function for correlation;

[0111] Select a threshold θ based on the relevance score, filter out keywords below the threshold θ, and obtain the filtered keyword set K':

[0112]

[0113] According to the filtered keyword set K', use the knowledge graph Determine the hidden geographic feature GY:

[0114] .

[0115] S1022, calculate the aggregation value Jf=J(GE) of the explicit geographic feature set GE through the aggregation function J. When the aggregation value Jf is greater than the first preset value J0, perform an aggregation operation on the explicit geographic feature set GE={GE1, GE2,…GEn} to obtain the first target set MF={MF1, MF2,…MFp}.

[0116] A clustering function J can be defined to measure the clustering degree between explicit geographic features. The clustering degree can reflect the correlation or proximity between geographic features.

[0117] For the explicit geographic feature set GE and the preset document set DG, define the aggregation function J:

[0118]

[0119] Representation characteristics and Frequency of co-occurrence in document collection DG:

[0120]

[0121] in, is an indicator function. When document d contains and Returns 1 if yes, otherwise returns 0, |DG| is the size of the document collection;

[0122] Compute the sum of the co-occurrence frequencies of all feature pairs:

[0123]

[0124] Filter out geographic feature pairs with a degree of aggregation higher than the first preset value J0 and combine them with P:

[0125]

[0126] From the selected geographic feature pair set P, generate disjoint subsets, each subset represents a set of highly correlated geographic features;

[0127] Let C be the set of generated subsets, ,in , for all ;

[0128] Each subset Add as an element to the first target set MF:

[0129] .

[0130] S1023. Based on the fusion function R and the pre-constructed fusion parameters K=[UG, DM, TS, HE], a fusion operation R(K, GY) is performed on the implicit geographic feature set GY={GY1, GY2, …GYm} to obtain a second target set MS={MS1, MS2, …MSq}, where UG represents the user's social information, DM represents location information, TS represents time information, and HE represents environmental information.

[0131] Based on the implicit geographic feature set GY and the fusion parameter K, the fusion operation R is defined:

[0132] R(K,GY)=MS

[0133] For each hidden geographic feature Perform feature extraction to obtain latent feature vector , using the preset neural network model to calculate each latent feature vector Weight :

[0134]

[0135] in, is the true label of the kth training sample in the neural network module, is the predicted label, is the regression coefficient, is the weight of the regularization term;

[0136] The feature vectors are fused by weighted summation.

[0137]

[0138] is the integrated feature vector after fusion, all the integrated feature vectors Put them into the second target set MS, and get the second target set MS={MS1,MS2,…MSq}.

[0139] S1024, performing similarity calculation on the first target set MF and the second target set MS to obtain a similarity value DX. When the similarity value is greater than a second preset value DX0, determining the geographic location LS=GP(MF, MS) of the social media user by calculating a function GP, ​​the first target set MF and the second target set MS.

[0140] For each vector in MF and each vector in MS , calculate the similarity between them :

[0141]

[0142] nl is the dimension of the vectors in the first target set MF and the second target set MS, then the similarity value DX between the first target set MF and the second target set MS is expressed as:

[0143] .

[0144] Calculate each dominant geographic feature Weight And each hidden geographic feature Weight , then the geographical location LS of the social media user is expressed as:

[0145]

[0146] and Represents dominant geographical features and implicit geographic features The geographic location coordinates of Function is used to determine the user's final geographic location.

[0147] S103, storing the parsed geographic location information and social media content in a PostGIS geographic information database, creating a spatial index for the geographic location data, and creating a search window based on the spatial index.

[0148] Store the parsed geographic location information and social media content in geographic information databases such as PostGIS or MongoDB to support efficient spatial query and analysis. The specific steps are as follows:

[0149] Database design: Design the database structure, including multiple data tables such as user information, social media content, and geographic location information.

[0150] Data storage: Store the preprocessed and parsed data in the database to ensure data integrity and consistency.

[0151] Index creation: Create spatial indexes for geographic location data to optimize query performance and improve data retrieval efficiency.

[0152] S104, using clustering algorithms to perform cluster analysis on geographic location data, identifying hot spots of social media activities, using time series analysis methods to analyze the changing trends of social media activity in specific areas in different time periods, and combining user behavior data to perform predictive analysis on user behavior patterns and preferences.

[0153] Apply clustering algorithms (such as DBSCAN) to detect hotspots, use time series analysis methods to analyze geographic distribution trends, and combine user behavior data for pattern recognition and prediction. The specific steps are as follows:

[0154] a Hot spot area detection:

[0155] The DBSCAN algorithm is used to perform cluster analysis on geographic location data to identify hot spots of social media activities.

[0156] b. Trend analysis:

[0157] Use time series analysis methods to analyze the changing trends of social media activity in specific areas over different time periods.

[0158] c Behavioral pattern analysis:

[0159] Combine user behavior data to identify user behavior patterns and preferences and conduct predictive analysis.

[0160] S105, use Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, use D3.js to generate dynamic trend charts and graphs, show the data changes in different time periods, and provide intuitive analysis results.

[0161] Use map visualization libraries such as Leaflet.js or D3.js to display analysis results through interactive maps, so that users can dynamically view social media activities in different time periods and locations. The specific steps are as follows:

[0162] a map initialization

[0163] Use Leaflet.js to initialize the interactive map and set the basic parameters of the map (such as center point, zoom level, etc.).

[0164] bData Visualization

[0165] Overlay the analysis results on the map as layers, using different colors and icons to mark different types of data.

[0166] cInteractive Function

[0167] The map is interactive, and users can view detailed data of different areas by clicking, dragging, zooming, and other operations.

[0168] dDynamic display

[0169] Use D3.js to generate dynamic trend graphs and charts to show data changes in different time periods and provide intuitive analysis results.

[0170] Through the above steps, the present invention realizes efficient analysis and visual display of social media data based on geographic location, provides comprehensive, accurate and intuitive analysis results, and helps users better understand and use these data.

[0171] According to a specific implementation of the embodiment of the present disclosure, after obtaining user data from multiple social media platforms using an API interface, data processing is performed on the collected data to obtain the collected data, including:

[0172] Detect and remove duplicate, missing, and erroneous data;

[0173] Standardize the data formats from different sources and store and process the data in a unified manner;

[0174] Filter out noise data according to preset rules.

[0175] According to a specific implementation of the embodiment of the present disclosure, the performing of geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data includes:

[0176] Convert the text address provided by the user into longitude and latitude coordinates;

[0177] Convert geotags into specific addresses or landmarks;

[0178] Normalize all location data into a uniform latitude and longitude format.

[0179] According to a specific implementation of the embodiment of the present disclosure, the performing of geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data further includes:

[0180] For each address that needs to be parsed, construct a request and send it to the geocoding service. The request contains the complete address information.

[0181] Parse the JSON response returned by the geocoding service and extract the required geographic coordinates from the response;

[0182] Match the parsed geographic coordinates with the original social media data.

[0183] According to a specific implementation of an embodiment of the present disclosure, the parsed geographic location information and social media content are stored in a PostGIS geographic information database, a spatial index is created for the geographic location data, and a retrieval window is created based on the spatial index, including:

[0184] Define table structures to store social media content and related geographic information;

[0185] Convert the parsed geographic location information into a geographic coordinate format supported by PostGIS, and import the social media content and its metadata into the database table;

[0186] Use the spatial functions provided by PostGIS to filter records that meet specified conditions, including:

[0187] ST_Contains: Determines whether a geometric object completely contains another geometric object;

[0188] ST_Within: Determines whether a geometric object is inside another geometric object;

[0189] ST_DWithin: Determines whether the distance between two geometric objects is less than a certain threshold.

[0190] According to a specific implementation of the embodiment of the present disclosure, clustering analysis is performed on geographic location data using a clustering algorithm to identify hot spots of social media activities, and a time series analysis method is used to analyze the trend of social media activity changes in specific areas in different time periods. Combined with user behavior data, predictive analysis of user behavior patterns and preferences is performed, including:

[0191] Run the DBSCAN algorithm using the preset Eps and MinPts values ​​to identify the core points and neighboring points of the geographic location data;

[0192] The core points and their neighboring points are grouped into the same cluster to form a clustering result;

[0193] The area where the number of clusters contained in a unit area of ​​the clustering result exceeds a preset value is set as a hot spot area.

[0194] According to a specific implementation of the embodiment of the present disclosure, the clustering algorithm is used to perform cluster analysis on the geographic location data to identify the hot spots of social media activities, and the time series analysis method is used to analyze the trend of social media activity changes in specific areas in different time periods. Combined with user behavior data, the user's behavior pattern and preference are predicted and analyzed, which also includes:

[0195] Determine the value of d based on the number of differences, draw the autocorrelation function graph, and determine the values ​​of p and q based on the significant peaks on the ACF and PACF graphs;

[0196] Based on the determined p, d, and q values, an ARIMA (p, d, q) model is established, and the parameters of the model are estimated using the maximum likelihood estimation method;

[0197] Use the established ARIMA model to predict future time points.

[0198] According to a specific implementation of the embodiment of the present disclosure, Leaflet.js is used to initialize the interactive map, set the basic parameters of the map, and overlay the analysis results on the map in the form of layers, including:

[0199] Import the Leaflet.js library and its CSS style sheet into the HTML file;

[0200] Create a div element in the HTML file as a container for the map and set its width and height;

[0201] Use JavaScript to initialize the Leaflet map object, specifying the center position of the map and the initial zoom level;

[0202] Add a basic map layer to the map and create a custom layer. Add the custom layer you created to the map so that users can see the analysis results.

[0203] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a social media data analysis and presentation device 30 based on geographic location, comprising:

[0204] The collection module 301 uses an API interface to obtain user data from multiple social media platforms, and then processes the collected data to obtain collected data;

[0205] The parsing module 302 performs geographic location coordinate parsing on the collected data to obtain geographic location information corresponding to the social media content in the collected data;

[0206] The storage module 303 stores the parsed geographic location information and social media content in a PostGIS geographic information database, creates a spatial index for the geographic location data, and creates a search window based on the spatial index;

[0207] Prediction module 304, using clustering algorithms to perform cluster analysis on geographic location data, identifying hot spots of social media activities, using time series analysis methods to analyze the trend of social media activity in specific areas in different time periods, and combining user behavior data to perform predictive analysis on user behavior patterns and preferences;

[0208] The display module 305 uses Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, and use D3.js to generate dynamic trend charts and graphs to display data changes in different time periods and provide intuitive analysis results.

[0209] See also Figure 4 The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:

[0210] at least one processor; and,

[0211] a memory communicatively connected to the at least one processor; wherein,

[0212] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the social media data analysis and presentation method based on geographic location in the aforementioned method embodiment.

[0213] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the aforementioned method embodiment.

[0214] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the geographic location-based social media data analysis and presentation method in the aforementioned method embodiment.

[0215] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 60 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0216] like Figure 4 As shown, the electronic device 60 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0217] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, a gage, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 60 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0218] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0219] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for analyzing and presenting social media data based on geographic location, It is characterized in that include: After obtaining user data from multiple social media platforms using API interfaces, the collected data is processed to obtain collected data; Performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data; The parsed geographic location information and social media content are stored in a PostGIS geographic information database, a spatial index is created for the geographic location data, and a search window is created based on the spatial index; Use clustering algorithms to perform cluster analysis on geographic location data to identify hot spots of social media activities. Use time series analysis methods to analyze the changing trends of social media activity in specific areas over different time periods. Combined with user behavior data, predictive analysis of user behavior patterns and preferences is performed. Use Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, and use D3.js to generate dynamic trend charts and graphs to show the data changes in different time periods and provide intuitive analysis results; in The performing geographic location coordinate analysis on the collected data includes: The explicit geographic feature set GE={GE1,GE2,…GEn} and the implicit geographic feature set GY={GY1,GY2,…GYm} are extracted from the text content of the collected data using a large language model; Let T represent the text set in the collected data, , where t i is the i-th sentence in the text; For each sentence , apply large models To extract place name entities : gather Contains all place name entities in the sentence; Set up a mapping function S to correct spelling errors in set E and map synonymous place name entities to standard names: E'=S(E) Aggregate the removed duplicate entities into the final set of explicit geographic features GE: Unique() represents the deduplication function; Using a pre-trained language model Parse the contextual meaning of text in collected data: Where C represents each sentence The context representation vector of ; Let K be the set of keywords, , l is the number of keywords, and the relevance score between keywords and context is calculated: ,in , Calculate the function for correlation; Select a threshold θ based on the relevance score, filter out keywords below the threshold θ, and obtain the filtered keyword set K': According to the filtered keyword set K', use the knowledge graph Determine the hidden geographic feature GY: ; By using the aggregation function J, the aggregation value Jf=J(GE) of the explicit geographic feature set GE is calculated. When the aggregation value Jf is greater than a first preset value J0, an aggregation operation is performed on the explicit geographic feature set GE={GE1, GE2, ...GEn} to obtain a first target set MF={MF1, MF2, ...MFp}; For the explicit geographic feature set GE and the preset document set DG, define the aggregation function J: Representation characteristics and Frequency of co-occurrence in document collection DG: in, is an indicator function. When document d contains and Returns 1 if yes, otherwise returns 0, |DG| is the size of the document collection; Compute the sum of the co-occurrence frequencies of all feature pairs: Filter out geographic feature pairs with a degree of aggregation higher than the first preset value J0 and combine them with P: From the selected geographic feature pair set P, generate disjoint subsets, each subset represents a set of highly correlated geographic features; Let C be the set of generated subsets, ,in , for all ; Each subset Add as an element to the first target set MF: ; Based on the fusion function R and the pre-constructed fusion parameter K=[UG,DM,TS,HE], the implicit geographic feature set GY={GY1,GY2,…GYm} is subjected to a fusion operation R(K,GY) to obtain a second target set MS={MS1,MS2,…MSq}, where UG represents the user's social information, DM represents the location information, TS represents the time information, and HE represents the environmental information; Based on the implicit geographic feature set GY and the fusion parameter K, the fusion operation R is defined: R(K,GY)=MS For each hidden geographic feature Perform feature extraction to obtain latent feature vector , using the preset neural network model to calculate each latent feature vector Weight : in, is the true label of the kth training sample in the neural network module, is the predicted label, is the regression coefficient, is the weight of the regularization term; Fusion of feature vectors by weighted summation; is the integrated feature vector after fusion, all the integrated feature vectors Put it into the second target set MS, and obtain the second target set MS={MS1,MS2,…MSq}; S1024, performing similarity calculation on the first target set MF and the second target set MS to obtain a similarity value DX, and when the similarity value is greater than a second preset value DX0, determining a geographic location LS=GP(MF,MS) of the social media user by calculating a function GP, ​​the first target set MF and the second target set MS; For each vector in MF And each vector in MS , calculate the similarity between them : nl is the dimension of the vectors in the first target set MF and the second target set MS, and the similarity value DX between the first target set MF and the second target set MS is expressed as: ; Calculate each dominant geographic feature Weight And each implicit geographic feature Weight , then the geographical location LS of the social media user is expressed as: and Represents dominant geographical features and implicit geographic features The geographic location coordinates of Function is used to determine the user's final geographic location.

2. The method according to claim 1, It is characterized in that After obtaining user data from multiple social media platforms using the API interface, the collected data is processed to obtain collected data, including: Detect and remove duplicate, missing, and erroneous data; Standardize the data formats from different sources and store and process the data in a unified manner; Filter out noise data according to preset rules.

3. The method according to claim 2, It is characterized in that The performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data includes: Convert the text address provided by the user into longitude and latitude coordinates; Convert geotags into specific addresses or landmarks; Normalize all location data into a uniform latitude and longitude format.

4. The method according to claim 3, It is characterized in that The performing geographic location coordinate analysis on the collected data to obtain geographic location information corresponding to the social media content in the collected data also includes: For each address that needs to be parsed, construct a request and send it to the geocoding service. The request contains the complete address information. Parse the JSON response returned by the geocoding service and extract the required geographic coordinates from the response; Match the parsed geographic coordinates with the original social media data.

5. The method according to claim 4, It is characterized in that The method stores the parsed geographic location information and social media content in a PostGIS geographic information database, creates a spatial index for the geographic location data, and creates a search window based on the spatial index, including: Define table structures to store social media content and related geographic information; Convert the parsed geographic location information into a geographic coordinate format supported by PostGIS, and import the social media content and its metadata into the database table; Use the spatial functions provided by PostGIS to filter records that meet specified conditions, including: ST_Contains: Determines whether a geometric object completely contains another geometric object; ST_Within: Determines whether a geometric object is inside another geometric object; ST_DWithin: Determines whether the distance between two geometric objects is less than a certain threshold.

6. The method according to claim 5, It is characterized in that The clustering algorithm is used to perform cluster analysis on geographic location data to identify hot spots of social media activities, and the time series analysis method is used to analyze the trend of social media activity changes in specific areas in different time periods. Combined with user behavior data, predictive analysis of user behavior patterns and preferences is performed, including: Run the DBSCAN algorithm using the preset Eps and MinPts values ​​to identify the core points and neighboring points of the geographic location data; The core points and their neighboring points are grouped into the same cluster to form a clustering result; The area where the number of clusters contained in a unit area of ​​the clustering result exceeds a preset value is set as a hot spot area.

7. The method according to claim 6, It is characterized in that The clustering analysis of geographic location data using clustering algorithms to identify hot spots of social media activities, the use of time series analysis methods to analyze the trend of social media activity changes in specific areas in different time periods, and the combination of user behavior data to predict user behavior patterns and preferences also include: Determine the value of d based on the number of differences, draw the autocorrelation function graph, and determine the values ​​of p and q based on the significant peaks on the ACF and PACF graphs; Based on the determined p, d, and q values, an ARIMA (p, d, q) model is established, and the parameters of the model are estimated using the maximum likelihood estimation method; Use the established ARIMA model to predict future time points.

8. The method according to claim 7, It is characterized in that Leaflet.js is used to initialize the interactive map, set the basic parameters of the map, and overlay the analysis results on the map in the form of layers, including: Import the Leaflet.js library and its CSS style sheet into the HTML file; Create a div element in the HTML file as a container for the map and set its width and height; Use JavaScript to initialize the Leaflet map object, specifying the center position of the map and the initial zoom level; Add a basic map layer to the map, create a custom layer, and add the custom layer to the map so that users can see the analysis results.

9. A device for analyzing and presenting social media data based on geographic location, It is characterized in that include: The collection module uses the API interface to obtain user data from multiple social media platforms, and then processes the collected data to obtain collected data; A parsing module performs geographic location coordinate parsing on the collected data to obtain geographic location information corresponding to the social media content in the collected data; A storage module stores the parsed geographic location information and social media content in a PostGIS geographic information database, creates a spatial index for the geographic location data, and creates a retrieval window based on the spatial index; The prediction module uses clustering algorithms to perform cluster analysis on geographic location data, identify hot spots of social media activities, use time series analysis methods to analyze the changing trends of social media activity in specific areas over different time periods, and combine user behavior data to perform predictive analysis on user behavior patterns and preferences; The display module uses Leaflet.js to initialize the interactive map, set the basic parameters of the map, overlay the analysis results on the map in the form of layers, use different colors and icons to mark different types of data, and use D3.js to generate dynamic trend charts and graphs to display data changes in different time periods and provide intuitive analysis results; in The performing geographic location coordinate analysis on the collected data includes: The explicit geographic feature set GE={GE1,GE2,…GEn} and the implicit geographic feature set GY={GY1,GY2,…GYm} are extracted from the text content of the collected data using a large language model; Let T represent the text set in the collected data, , where t i is the i-th sentence in the text; For each sentence , apply large models To extract place name entities : gather Contains all place name entities in the sentence; Set up a mapping function S to correct spelling errors in set E and map synonymous place name entities to standard names: E'=S(E) Aggregate the removed duplicate entities into the final set of explicit geographic features GE: Unique() represents the deduplication function; Using a pre-trained language model Parse the contextual meaning of text in collected data: Where C represents each sentence The context representation vector of ; Let K be the set of keywords, , l is the number of keywords, and the relevance score between keywords and context is calculated: ,in , Calculate the function for correlation; Select a threshold θ based on the relevance score, filter out keywords below the threshold θ, and obtain the filtered keyword set K': According to the filtered keyword set K', use the knowledge graph Determine the hidden geographic feature GY: ; By using the aggregation function J, the aggregation value Jf=J(GE) of the explicit geographic feature set GE is calculated. When the aggregation value Jf is greater than a first preset value J0, an aggregation operation is performed on the explicit geographic feature set GE={GE1, GE2, ...GEn} to obtain a first target set MF={MF1, MF2, ...MFp}; For the explicit geographic feature set GE and the preset document set DG, define the aggregation function J: Representation characteristics and Frequency of co-occurrence in document collection DG: in, is an indicator function. When document d contains and Returns 1 if yes, otherwise returns 0, |DG| is the size of the document collection; Compute the sum of the co-occurrence frequencies of all feature pairs: Filter out geographic feature pairs with a degree of aggregation higher than the first preset value J0 and combine them with P: From the selected geographic feature pair set P, generate disjoint subsets, each subset represents a set of highly correlated geographic features; Let C be the set of generated subsets, ,in , for all ; Each subset Add as an element to the first target set MF: ; Based on the fusion function R and the pre-constructed fusion parameter K=[UG,DM,TS,HE], the implicit geographic feature set GY={GY1,GY2,…GYm} is subjected to a fusion operation R(K,GY) to obtain a second target set MS={MS1,MS2,…MSq}, where UG represents the user's social information, DM represents the location information, TS represents the time information, and HE represents the environmental information; Based on the implicit geographic feature set GY and the fusion parameter K, the fusion operation R is defined: R(K,GY)=MS For each hidden geographic feature Perform feature extraction to obtain latent feature vector , using the preset neural network model to calculate each latent feature vector Weight : in, is the true label of the kth training sample in the neural network module, is the predicted label, is the regression coefficient, is the weight of the regularization term; Fusion of feature vectors by weighted summation; is the integrated feature vector after fusion, all the integrated feature vectors Put it into the second target set MS, and obtain the second target set MS={MS1,MS2,…MSq}; S1024, performing similarity calculation on the first target set MF and the second target set MS to obtain a similarity value DX, and when the similarity value is greater than a second preset value DX0, determining a geographic location LS=GP(MF,MS) of the social media user by calculating a function GP, ​​the first target set MF and the second target set MS; For each vector in MF And each vector in MS , calculate the similarity between them : nl is the dimension of the vectors in the first target set MF and the second target set MS, and the similarity value DX between the first target set MF and the second target set MS is expressed as: ; Calculate each dominant geographic feature Weight And each implicit geographic feature Weight , then the geographical location LS of the social media user is expressed as: and Represents dominant geographical features and implicit geographic features The geographic location coordinates of Function is used to determine the user's final geographic location.

10. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the geographical location-based social media data analysis and presentation method described in any one of claims 1 to 8.