Real-time social listening data mining method, device and electronic device

Through the combination method of data acquisition layer, real-time transmission layer and memory database processing layer, combined with deep learning model, the existing technology problems of limited data sources, insufficient real-time performance and low accuracy of emotional analysis in real-time social listening data mining are solved. , realizes cross-platform data integration and real-time monitoring, improves user behavior prediction capabilities, and provides efficient and accurate social listening services.

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

Patent Information

Application Number
CN202411109705.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-10-18
Estimated Expiration
2044-08-14

AI Technical Summary

Technical Problem

Existing technologies have problems in real-time social listening data mining, such as limited data sources, insufficient real-time performance, low accuracy of sentiment analysis, and limited ability to predict user behavior. It is difficult to achieve cross-platform data integration and real-time monitoring, and sentiment analysis has difficulty in processing complex semantics. and poor performance in diverse expressions.

Method used

Using a combination of data acquisition layer, real-time transmission layer and memory database processing layer, by customizing data capture strategies, building message queues, text cleaning and vectorization operations, combined with deep learning models for data preprocessing and feature extraction, the objective function is constructed Predict user behavior and achieve multi-platform data integration and real-time data processing.

Benefits of technology

It achieves efficient and accurate social listening data mining, provides cross-platform data support, real-time and high-precision sentiment analysis, enhances user behavior prediction capabilities, and can quickly respond to market dynamics and consumer needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626701B_ABST
    Figure CN118626701B_ABST
Patent Text Reader

Abstract

In the embodiment of the present invention, a real-time social listening data mining method, device and electronic device are provided, which belong to the field of data processing technology. The method includes: setting a data collection layer, a real-time transmission layer and a memory database processing layer for data mining, and setting a first cache space with a total amount of cached data items C and a hash table corresponding to the original data in the memory database processing layer; setting a data preprocessing function in the memory database processing layer; classifying and processing the data segments in the vectorized data D2 by setting a custom cross-filtering function in the deep learning model; predicting the user's behavior data through the objective function f to obtain the predicted data D4; generating a predicted output based on the predicted data D4 and the predicted parameters, and displaying the predicted output in a visual form. The present invention can provide efficient and accurate social listening services.
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 real-time social listening data mining method, device and electronic equipment. Background Art

[0002] Real-time social listening data refers to the continuous monitoring, collection and analysis of real-time content, conversations, emotions and behavior information generated by users on the Internet, especially on social media platforms, through technical means (such as big data analysis and artificial intelligence algorithms). This data collection method focuses on understanding the public's immediate feedback and discussion on brands, products, events or any specific topics, allowing companies and organizations to quickly respond to market dynamics, identify information trends, understand consumer needs and optimize information push strategies.

[0003] Real-time social listening data covers a wide range of social media platforms, blogs, forums, news websites, etc. Data collection and analysis are almost synchronized with the moment of information release. Real-time social listening is not only about data acquisition, but more importantly, how to efficiently convert this data into meaningful predictive data, so as to better communicate with the target audience and drive product and service innovation.

[0004] The existing technology has the following problems in the process of real-time social listening data mining:

[0005] 1. Limited data sources: Many systems can only process data from specific platforms and lack the ability to integrate data across platforms.

[0006] 2. Lack of real-time performance: Due to the large amount of data, existing systems often have delays when processing and analyzing data, making it difficult to achieve real-time monitoring.

[0007] 3. Low accuracy of sentiment analysis: Existing sentiment analysis technology is not very effective in processing complex semantics and diverse expressions, which can easily lead to misjudgment.

[0008] 4. Limited ability to predict user behavior: Many systems lack the ability to predict future user behavior and cannot provide forward-looking data support.

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

[0010] In view of this, embodiments of the present invention provide a real-time social listening data mining method, device and electronic device, 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 real-time social listening data mining method, comprising:

[0012] A data collection layer, a real-time transmission layer, and a memory database processing layer are set up for data mining. The data collection layer customizes data capture strategies for different social media platforms to obtain original data D1. The real-time transmission layer converts the original data into a real-time queue format by building a message queue.

[0013] A first cache space with a total cache data item of C and a hash table corresponding to the original data are set in the memory database processing layer. The size of each cache item in the cache space is S, and the number of items in the current cache is N. For any time t, each cache item i has a last access timestamp Ti(t). For a query request q, if q exists in the hash table, Tq(t) = t is updated, and the item is moved to the head of the linked list. When N = C and a new item x needs to be inserted, the item y at the tail of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time.

[0014] A data preprocessing function is set in the memory database processing layer. After the data preprocessing function performs text cleaning on the original data stored in the first cache space, a text vectorization operation is performed on the cleaned data to obtain vectorized data D2. The vectorized data is stored in the second cache space in the memory database processing layer.

[0015] By setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model;

[0016] Extract the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, construct an objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4, predict the user's behavior data through the objective function f, and obtain the predicted data D4, where γ is the optimization parameter of the objective function;

[0017] Building a prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h j is the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

[0018] According to a specific implementation of the embodiment of the present disclosure, the data collection layer customizes data capture strategies for different social media platforms to obtain original data D1, including:

[0019] Use the API provided by social media platforms to obtain specific keywords, user mentions, geographic locations, and text content in real time;

[0020] Get the tweet history of a specific user through the User Timeline API;

[0021] Use the Trends API to get trending topics around the world or in a specific region.

[0022] According to a specific implementation of the embodiment of the present disclosure, the real-time transport layer converts the original data into a real-time queue format by constructing a message queue, including:

[0023] Design a unified message format for the original data D1, where each message contains a timestamp, source platform identifier, and data type;

[0024] Before the data enters the message queue, the original data D1 is converted into a unified message format in real time through the data processing module;

[0025] When the amount of data in the message queue exceeds a preset value, a copy is set for the message in the message queue.

[0026] According to a specific implementation of the embodiment of the present disclosure, the memory database processing layer is provided with a first cache space with a total amount of cache data items C and a hash table corresponding to the original data, including:

[0027] The total capacity of the first cache space is set to C data items, the size of each data item is determined according to the content contained in the message format, and a bidirectional linked list is used to maintain the access order of the cached data items;

[0028] Set a unique key value for each data item, which points to the corresponding node in the doubly linked list;

[0029] The size of the hash table is dynamically adjusted based on the number of cached data items.

[0030] According to a specific implementation of the embodiment of the present disclosure, after the data preprocessing function performs text cleaning on the original data stored in the first cache space, a text vectorization operation is performed on the cleaned data to obtain vectorized data D2, including:

[0031] Split the cleaned text into individual words. After collecting all the words, build a vocabulary, where each word has a unique index.

[0032] Create a word frequency vector for each text paragraph. The length of the vector is equal to the size of the vocabulary, and the value at each position represents the frequency of occurrence of the corresponding word in the document.

[0033] The word weights are assigned by calculating the word frequency TF and inverse document frequency IDF of each word, and each word is mapped into a high-dimensional vector space using a pre-trained model. The high-dimensional vector is used to capture the semantic and contextual information of the word.

[0034] For each document contained in the original data, the weighted average of all word vectors is taken to obtain a document-level vector representation, and the original text data is converted into a numerical vector form D2.

[0035] According to a specific implementation of the embodiment of the present disclosure, the data segments in the vectorized data D2 are classified and processed to obtain the classified feature data D3 of the vectorized data D2, including:

[0036] Build a deep learning model. The number of neurons in the fully connected layer of the deep learning model is equal to the number of categories c. Use the softmax activation function to output the probability pc of each category.

[0037] Use the defined cross entropy loss function J to calculate the loss between the current prediction and the actual label, calculate the gradient according to the loss function, and then adjust the model parameters in the opposite direction of the gradient;

[0038] The original vector data D2 is combined with the category label predicted by the model to form classification feature data D3, and each row of the classification feature data D3 contains the vector features in the original vector data D2 and the predicted category of the vector.

[0039] According to a specific implementation of the embodiment of the present disclosure, the user's behavior data is predicted by the objective function f to obtain the predicted data D4, including:

[0040] Construct a feature matrix X including time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4;

[0041] Define the objective function f:

[0042]

[0043] It is the set of all parameters of the objective function, including the weights of LSTM, the embedding matrix of GNN, the parameters of FM, and the decision tree parameters in GBM; It is a global bias term. LSTM is applied to the time series feature K1 to capture the temporal dependency. GNN is applied to the social network structure feature K2 to learn the node embedding in the network. FM is used to capture the second-order cross effect between K3 and K4. GBM is an integrated learner that improves the prediction performance through the gradient boosting method. FM is used to convert the model output into a probability distribution.

[0044] According to a specific implementation of the embodiment of the present disclosure, the prediction data D4 and the prediction parameters Produces prediction output including:

[0045] Using D4 and the corresponding labeled data, learn the parameters through back propagation and gradient descent algorithm ;

[0046] Through the learned parameters And the constructed model function f p , predict the new data instance and get .

[0047] In a second aspect, an embodiment of the present invention provides a real-time social listening data mining device, comprising:

[0048] The acquisition module is provided with a data acquisition layer, a real-time transmission layer and a memory database processing layer for data mining. The data acquisition layer customizes data capture strategies for different social media platforms to obtain the original data D1. The real-time transmission layer converts the original data into a real-time queue format by building a message queue.

[0049] A setting module is provided in which a first cache space with a total amount of cache data items of C and a hash table corresponding to the original data are provided in the memory database processing layer. The size of each cache item in the cache space is S, and the number of items in the current cache is N. For any time t, each cache item i has a last access timestamp Ti(t). For a query request q, if q exists in the hash table, Tq(t) = t is updated, and the item is moved to the head of the linked list. When N = C and a new item x needs to be inserted, the item y at the tail of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time.

[0050] The vector module sets a data preprocessing function in the memory database processing layer, wherein the data preprocessing function performs text cleaning on the original data stored in the first cache space, and then performs a text vectorization operation on the cleaned data to obtain vectorized data D2, and the vectorized data is stored in the second cache space in the memory database processing layer;

[0051] Classification module, by setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model;

[0052] The prediction module extracts the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, constructs the objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4, predicts the user's behavior data through the objective function f, and obtains the predicted data D4, where γ is the optimization parameter of the objective function;

[0053] Output module, build prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h j is the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

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

[0055] at least one processor; and,

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

[0057] 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 real-time social listening data mining method in any of the aforementioned first aspects or any of the implementations of the first aspect.

[0058] 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 real-time social listening data mining method in the aforementioned first aspect or any implementation of the first aspect.

[0059] 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 real-time social listening data mining method in the aforementioned first aspect or any implementation of the first aspect.

[0060] The real-time social listening data mining solution in the embodiment of the present invention includes: setting a data collection layer, a real-time transmission layer and a memory database processing layer for data mining, wherein the data collection layer customizes data capture strategies for different social media platforms to obtain original data D1, and the real-time transmission layer converts the original data into a real-time queue format by building a message queue; the memory database processing layer is provided with a first cache space with a total amount of cache data items C and a hash table corresponding to the original data, the size of each cache item in the cache space is S, the number of items in the current cache is N, for any time t, each cache item i has a last access timestamp Ti(t), for a query request q, if q exists in the hash table, then Tq(t) = t is updated, and the item is moved to the head of the linked list, when N = C When a new item x needs to be inserted, find the item y at the end of the linked list, remove y, and then insert x to the head of the linked list, and update the value of N and the corresponding hash table at the same time; set a data preprocessing function in the memory database processing layer, the data preprocessing function performs text cleaning on the original data stored in the first cache space, and then performs a text vectorization operation on the cleaned data to obtain vectorized data D2, which is stored in the second cache space in the memory database processing layer; by setting a custom cross-filtering function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model; extract the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, and construct the objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4. Predict the user's behavior data through the objective function f to obtain the predicted data D4, where γ is the optimization parameter of the objective function; construct the prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h jis the jth feature mapping function, M is the number of prediction parameters, and the prediction output The present invention can provide efficient and accurate social listening services by introducing multi-platform data integration, real-time data processing, advanced sentiment analysis algorithms and user behavior prediction models. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] 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.

[0062] Figure 1 A schematic flow chart of a real-time social listening data mining method provided by an embodiment of the present invention;

[0063] Figure 2 A schematic flow chart of another real-time social listening data mining method provided by an embodiment of the present invention;

[0064] Figure 3 A schematic diagram of the structure of a real-time social listening data mining device provided by an embodiment of the present invention;

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

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

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] The present disclosure provides a real-time social listening data mining method. The real-time social listening data mining method provided in this embodiment can be executed by a computing device, which can be implemented as software or a combination of software and hardware, and can be integrated in a server, terminal device, etc.

[0072] See also Figure 1 and Figure 2 The present disclosure provides a real-time social listening data mining method, including:

[0073] S101, setting up a data collection layer, a real-time transmission layer and a memory database processing layer for data mining. The data collection layer customizes data capture strategies for different social media platforms to obtain original data D1. The real-time transmission layer converts the original data into a real-time queue format by building a message queue.

[0074] The data collection layer is used to efficiently collect data from different social media platforms. Customized development can be performed for the API interface of each social media platform (such as Weibo, WeChat, Twitter, Facebook, etc.).

[0075] During the collection process, perform preliminary data filtering to remove irrelevant or duplicate information, and perform basic data cleaning, such as removing HTML tags, normalizing emoticons, and text standardization. At the same time, convert data from different sources into a unified format, such as JSON or CSV.

[0076] The real-time transport layer is used to transmit data to the memory database processing layer in real time and reliably after data is collected. You can choose a high-performance, high-availability message queue service and select the appropriate queue based on the data volume and real-time requirements.

[0077] Before the data enters the queue, the original data D1 can be converted into a real-time queue format according to the needs of the memory database. At the same time, the queue load balancing strategy can be implemented to ensure even distribution of data, and a retry mechanism can be set to ensure that data is not lost.

[0078] The memory database processing layer is used to quickly process real-time queue data and provide high-speed data query and analysis capabilities. You can choose a high-performance memory database, such as Redis, MemSQL, or Apache Ignite, and choose the appropriate database type based on the data access mode. You can design an efficient data model based on data characteristics, including index strategies, data partitioning, etc., to optimize query performance.

[0079] Data preprocessing, such as feature extraction and data standardization, can be performed in the in-memory database to prepare for subsequent data mining and machine learning models.

[0080] S102, a first cache space with a total cache data item amount of C and a hash table corresponding to the original data is set in the memory database processing layer, the size of each cache item in the cache space is S, the number of items in the current cache is N, for any time t, each cache item i has a last access timestamp Ti(t), for a query request q, if q exists in the hash table, then Tq(t) = t is updated, and the item is moved to the head of the linked list, when N = C and a new item x needs to be inserted, the item y at the tail of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time.

[0081] The first cache space has a memory area of ​​fixed size C, which is specially used to store frequently accessed data items to speed up data access. The hash table is used to quickly locate the location of the cache item. The key of the hash table is the identifier of the cache item, and the value is a pointer to the corresponding node in the linked list. The linked list user maintains the access order of the cache items. Newly accessed items will move to the head of the linked list, and items that have not been accessed for a long time will gradually move to the tail of the linked list. Each node of the linked list contains the data of the cache item, its last access timestamp Ti, and pointers to the previous and next nodes.

[0082] When receiving a query request q, first check whether q exists in the hash table. If it exists, that is, the hash table hits, get the linked list node corresponding to q, update the timestamp Tq(t)=t of the node, and move the node to the head of the linked list to indicate that it has been recently accessed. If it does not exist, return the missing value.

[0083] When there are already N=C items in the cache and a new item x needs to be inserted, first quickly locate it through the hash table to check whether x is already in the cache. If x is already in the cache, only its access time is updated and moved to the head of the linked list without additional operations. If x is not in the cache, find the tail item y of the linked list, remove y from the linked list and hash table, and free up its space. Insert the new item x to the head of the linked list, and add a record of x to the hash table, while the value of N remains unchanged.

[0084] This method ensures that the cache space always retains the most recently accessed data, improving data access efficiency, especially when the data is frequently accessed and the data access pattern is local. By dynamically updating and maintaining the cache content, the system can adapt to changing data access needs, reduce dependence on external storage systems, and thus improve overall performance.

[0085] S103, setting a data preprocessing function in the memory database processing layer, after the data preprocessing function performs text cleaning on the original data stored in the first cache space, performs a text vectorization operation on the cleaned data to obtain vectorized data D2, and the vectorized data is stored in the second cache space in the memory database processing layer.

[0086] Text cleaning can be used to remove noise from raw data, such as HTML tags, special characters, stop words, etc., and to standardize text (such as converting to lowercase, stemming, or lemmatization).

[0087] Convert the cleaned text into a numerical vector for easy processing by machine learning algorithms. You can count the frequency of occurrence of words in the text to form a sparse vector. Count the frequency of words in the document and the inverse document frequency in the entire document collection to provide a measure of word importance. Use a pre-trained model (Word2Vec, GloVe, or BERT, etc.) to map words to a high-dimensional vector space to capture semantic information.

[0088] The second cache space is used to store the vectorized data D2 for subsequent analysis or direct use by machine learning models, reducing the overhead of real-time vector calculations. A management mechanism similar to the first cache space can be designed, but specifically for the storage and access of vectorized data. The second cache space ensures efficient use of memory by using data compression technology, storing only a subset of active data, or using external storage combined with memory cache.

[0089] The original data is read from the first cache space, and after cleaning and vectorization, it is directly written into the second cache space. In order not to affect the real-time performance of the data, an asynchronous processing method can be used, that is, text cleaning and vectorization are performed in the background, and the front-end query can directly access the processed data.

[0090] Through the above design, the in-memory database processing layer not only accelerates data access, but also improves the efficiency of subsequent analysis and model training through preprocessing and vectorization, thereby enhancing the system's data processing capabilities as a whole.

[0091] S104, by setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model.

[0092] A deep learning model (such as convolutional neural network CNN, recurrent neural network RNN ​​or transformer Transformer, etc.) can be designed. The output layer of the model should have c nodes, each node corresponding to the predicted probability of a category.

[0093] The vectorized data D2 is input into the model, and the model performs forward propagation through a series of layers (including but not limited to convolutional layers, fully connected layers, activation functions, etc.), and finally generates the predicted probability p for each category. c . Using the defined cross entropy loss function, according to the actual label y c And the model predicts the probability p c , calculate the loss J.

[0094] According to the calculated loss J, the back propagation algorithm is executed to update the model parameters to minimize the loss. The process of forward propagation, loss calculation and back propagation is repeated until the model converges or reaches the predetermined training round.

[0095] Through this process, the original vectorized data D2 is converted into feature data D3 carrying classification information, and each data point is associated with a set of probability values ​​reflecting the possibility of the categories to which it belongs.

[0096] S105, extract the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, construct an objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4, predict the user's behavior data through the objective function f, and obtain the predicted data D4, where γ is the optimization parameter of the objective function.

[0097] The user's behavior patterns at different time points can be analyzed, such as login frequency, active time period, behavior interval time, etc., and the time series feature K1 can be obtained using sliding window averaging, trend analysis, periodicity analysis and other techniques.

[0098] The user's position in the network, relationship strength, community affiliation, etc. can be counted, and the social network structure feature K2 can be obtained through centrality measurement (degree centrality, closeness centrality) and community detection algorithm.

[0099] The degree of deviation of user behavior from the average behavior of the group can be calculated, such as consumption level, preference uniqueness, etc. The user deviation value feature K3 can be calculated by statistical methods such as standardized score and Z-score.

[0100] By analyzing the quality of interaction between users and other users or content, such as likes, comments, sharing times, positive / negative feedback ratio, etc., the interactive evaluation feature K4 is obtained.

[0101] Based on the feature type and prediction task, a suitable learning model can be selected, such as recurrent neural network (RNN) for processing time series K1, graph neural network (GNN) for processing social network structure K2, and deep learning models such as multi-layer perceptron (MLP) can integrate all features for prediction. Input the extracted features K1 to K4 into the objective function to obtain the prediction results of the user's future behavior and form the prediction data D4.

[0102] S106, construct prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h j is the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

[0103] Each hj function is responsible for extracting specific feature information or patterns from the prediction data D4. For example, h1 may process time series features K1, h2 processes social network structure features K2, and so on.

[0104] Prediction parameters : Each The weight corresponding to the feature mapping function hj determines the contribution of the feature in the final prediction.

[0105] The activation function g() is used to convert the linear combination of features into a predicted output. The activation function can be sigmoid, softmax or other types of functions.

[0106] By inputting the prediction data D4 into the prediction function Fp defined above, using the learned parameters , calculate the predicted output .

[0107] You can choose a chart based on the nature of the prediction task. For example, if it is a classification task, you can use confusion matrix, ROC curve, precision recall curve, etc.; if it is a regression task, you can use scatter plot (actual value vs. predicted value), time series graph (showing trend prediction over time), etc.

[0108] Through the above steps, not only the prediction output is generated , and the prediction results are clearly displayed in a visual form, which helps to intuitively understand the performance of the model and the characteristics of the data.

[0109] According to a specific implementation of the embodiment of the present disclosure, the data collection layer customizes data capture strategies for different social media platforms to obtain original data D1, including:

[0110] Use the API provided by social media platforms to obtain specific keywords, user mentions, geographic locations, and text content in real time;

[0111] Get the tweet history of a specific user through the User Timeline API;

[0112] Use the Trends API to get trending topics around the world or in a specific region.

[0113] According to a specific implementation of the embodiment of the present disclosure, the real-time transport layer converts the original data into a real-time queue format by constructing a message queue, including:

[0114] Design a unified message format for the original data D1, where each message contains a timestamp, source platform identifier, and data type;

[0115] Before the data enters the message queue, the original data D1 is converted into a unified message format in real time through the data processing module;

[0116] When the amount of data in the message queue exceeds a preset value, a copy is set for the message in the message queue.

[0117] According to a specific implementation of the embodiment of the present disclosure, the memory database processing layer is provided with a first cache space with a total amount of cache data items C and a hash table corresponding to the original data, including:

[0118] The total capacity of the first cache space is set to C data items, the size of each data item is determined according to the content contained in the message format, and a bidirectional linked list is used to maintain the access order of the cached data items;

[0119] Set a unique key value for each data item, which points to the corresponding node in the doubly linked list;

[0120] The size of the hash table is dynamically adjusted based on the number of cached data items.

[0121] According to a specific implementation of the embodiment of the present disclosure, after the data preprocessing function performs text cleaning on the original data stored in the first cache space, a text vectorization operation is performed on the cleaned data to obtain vectorized data D2, including:

[0122] Split the cleaned text into individual words. After collecting all the words, build a vocabulary, where each word has a unique index.

[0123] Create a word frequency vector for each text paragraph. The length of the vector is equal to the size of the vocabulary, and the value at each position represents the frequency of occurrence of the corresponding word in the document.

[0124] The word weights are assigned by calculating the word frequency TF and inverse document frequency IDF of each word, and each word is mapped into a high-dimensional vector space using a pre-trained model. The high-dimensional vector is used to capture the semantic and contextual information of the word.

[0125] For each document contained in the original data, the weighted average of all word vectors is taken to obtain a document-level vector representation, and the original text data is converted into a numerical vector form D2.

[0126] According to a specific implementation of the embodiment of the present disclosure, the data segments in the vectorized data D2 are classified and processed to obtain the classified feature data D3 of the vectorized data D2, including:

[0127] Build a deep learning model. The number of neurons in the fully connected layer of the deep learning model is equal to the number of categories c. Use the softmax activation function to output the probability pc of each category.

[0128] Use the defined cross entropy loss function J to calculate the loss between the current prediction and the actual label, calculate the gradient according to the loss function, and then adjust the model parameters in the opposite direction of the gradient;

[0129] The original vector data D2 is combined with the category label predicted by the model to form classification feature data D3, and each row of the classification feature data D3 contains the vector features in the original vector data D2 and the predicted category of the vector.

[0130] According to a specific implementation of the embodiment of the present disclosure, the user's behavior data is predicted by the objective function f to obtain the predicted data D4, including:

[0131] Construct a feature matrix X including time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4;

[0132] Define the objective function f:

[0133]

[0134] It is the set of all parameters of the objective function, including the weights of LSTM, the embedding matrix of GNN, the parameters of FM, and the decision tree parameters in GBM; It is a global bias term. LSTM is applied to the time series feature K1 to capture the temporal dependency. GNN is applied to the social network structure feature K2 to learn the node embedding in the network. FM is used to capture the second-order cross effect between K3 and K4. GBM is an integrated learner that improves the prediction performance through the gradient boosting method. FM is used to convert the model output into a probability distribution.

[0135] According to a specific implementation of the embodiment of the present disclosure, the prediction data D4 and the prediction parameters Produces prediction output including:

[0136] Using D4 and the corresponding labeled data, learn the parameters through back propagation and gradient descent algorithm ;

[0137] Through the learned parameters And the constructed model function f p , predict the new data instance and get .

[0138] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a real-time social listening data mining device 30, comprising:

[0139] The acquisition module 301 is provided with a data acquisition layer, a real-time transmission layer and a memory database processing layer for data mining. The data acquisition layer customizes data capture strategies for different social media platforms to obtain raw data D1. The real-time transmission layer converts the raw data into a real-time queue format by constructing a message queue.

[0140] Setting module 302, in which a first cache space with a total cache data item of C and a hash table corresponding to the original data are set in the memory database processing layer, the size of each cache item in the cache space is S, the number of items in the current cache is N, and for any time t, each cache item i has a last access timestamp Ti(t). For a query request q, if q exists in the hash table, Tq(t) = t is updated, and the item is moved to the head of the linked list. When N = C and a new item x needs to be inserted, the item y at the tail of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time;

[0141] The vector module 303 sets a data preprocessing function in the memory database processing layer, wherein the data preprocessing function performs text cleaning on the original data stored in the first cache space, and then performs a text vectorization operation on the cleaned data to obtain vectorized data D2, and the vectorized data is stored in the second cache space in the memory database processing layer;

[0142] Classification module 304, by setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model;

[0143] The prediction module 305 extracts the time series feature K1, the social network structure feature K2, the user offset value feature K3 and the interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, constructs an objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, the social network structure feature K2, the user offset value feature K3 and the interaction evaluation feature K4, predicts the user's behavior data through the objective function f, and obtains the predicted data D4, where γ is the optimization parameter of the objective function;

[0144] Output module 306, construct prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h jis the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

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

[0146] at least one processor; and,

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

[0148] 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 real-time social listening data mining method in the foregoing method embodiment.

[0149] 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.

[0150] 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. The computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the real-time social listening data mining method in the aforementioned method embodiment.

[0151] 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.

[0152] like Figure 4As 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.

[0153] 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.

[0154] 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.

[0155] 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 real-time social listening data mining method, characterized in that: include: A data collection layer, a real-time transmission layer, and a memory database processing layer are set up for data mining. The data collection layer customizes data capture strategies for different social media platforms to obtain original data D1. The real-time transmission layer converts the original data into a real-time queue format by building a message queue. A first cache space with a total cache data item of C and a hash table corresponding to the original data are set in the memory database processing layer. The size of each cache item in the cache space is S, and the number of items in the current cache is N. For any time t, each cache item i has a last access timestamp Ti(t). For a query request q, if q exists in the hash table, Tq(t) = t is updated, and the linked list node corresponding to q is moved to the head of the linked list. When N = C and a new item x needs to be inserted, the tail item y of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time. A data preprocessing function is set in the memory database processing layer. After the data preprocessing function performs text cleaning on the original data stored in the first cache space, a text vectorization operation is performed on the cleaned data to obtain vectorized data D2. The vectorized data is stored in the second cache space in the memory database processing layer. By setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model; Extract the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, construct an objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4, predict the user's behavior data through the objective function f, and obtain the predicted data D4, where γ is the optimization parameter of the objective function; Building a prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h j is the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

2. The method according to claim 1, characterized in that The data collection layer customizes data capture strategies for different social media platforms to obtain raw data D1, including: Use the API provided by social media platforms to obtain specific keywords, user mentions, geographic locations, and text content in real time; Get the tweet history of a specific user through the User Timeline API; Use the Trends API to get trending topics around the world or in a specific region.

3. The method according to claim 2, characterized in that The real-time transport layer converts the original data into a real-time queue format by constructing a message queue, including: Design a unified message format for the original data D1, where each message contains a timestamp, source platform identifier, and data type; Before the data enters the message queue, the original data D1 is converted into a unified message format in real time through the data processing module; When the amount of data in the message queue exceeds a preset value, a copy is set for the message in the message queue.

4. The method according to claim 3, characterized in that The memory database processing layer is provided with a first cache space with a total amount of cache data items C and a hash table corresponding to the original data, including: The total capacity of the first cache space is set to C data items, the size of each data item is determined according to the content contained in the message format, and a bidirectional linked list is used to maintain the access order of the cached data items; Set a unique key value for each data item, which points to the corresponding node in the doubly linked list; The size of the hash table is dynamically adjusted based on the number of cached data items.

5. The method according to claim 4, characterized in that After the data preprocessing function performs text cleaning on the original data stored in the first cache space, the data preprocessing function performs a text vectorization operation on the cleaned data to obtain vectorized data D2, including: Split the cleaned text into individual words. After collecting all the words, build a vocabulary, where each word has a unique index. Create a word frequency vector for each text paragraph. The length of the vector is equal to the size of the vocabulary, and the value at each position represents the frequency of occurrence of the corresponding word in the document. The word weights are assigned by calculating the word frequency TF and inverse document frequency IDF of each word, and each word is mapped into a high-dimensional vector space using a pre-trained model. The high-dimensional vector is used to capture the semantic and contextual information of the word. For each document contained in the original data, the weighted average of all word vectors is taken to obtain a document-level vector representation, and the original text data is converted into a numerical vector form D2.

6. The method according to claim 5, characterized in that The data segments in the vectorized data D2 are classified and processed to obtain the classification feature data D3 of the vectorized data D2, including: Build a deep learning model. The number of neurons in the fully connected layer of the deep learning model is equal to the number of categories c. Use the softmax activation function to output the probability pc of each category. Use the defined cross entropy loss function J to calculate the loss between the current prediction and the actual label, calculate the gradient according to the loss function, and then adjust the model parameters in the opposite direction of the gradient; The original vector data D2 is combined with the category label predicted by the model to form classification feature data D3, and each row of the classification feature data D3 contains the vector features in the original vector data D2 and the predicted category of the vector.

7. The method according to claim 6, characterized in that The user's behavior data is predicted by the objective function f to obtain the predicted data D4, including: Construct a feature matrix X including time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4; Define the objective function f: It is the set of all parameters of the objective function, including the weights of LSTM, the embedding matrix of GNN, the parameters of FM, and the decision tree parameters in GBM; It is a global bias term. LSTM is applied to the time series feature K1 to capture the temporal dependency. GNN is applied to the social network structure feature K2 to learn the node embedding in the network. FM is used to capture the second-order cross-effect between K3 and K4. GBM is an integrated learner that combines the outputs of different components and improves the prediction performance through the gradient boosting method. FM is used to convert the model output into a probability distribution.

8. The method according to claim 7, characterized in that The prediction data D4 and the prediction parameters Produces prediction output, include: Using D4 and the corresponding labeled data, learn the parameters through back propagation and gradient descent algorithm ; Through the learned parameters And the constructed model function f p , predict the new data instance and get .

9. A real-time social listening data mining device, characterized in that: include: The acquisition module is provided with a data acquisition layer, a real-time transmission layer and a memory database processing layer for data mining. The data acquisition layer customizes data capture strategies for different social media platforms to obtain the original data D1. The real-time transmission layer converts the original data into a real-time queue format by building a message queue. A setting module is provided in which a first cache space with a total amount of cache data items of C and a hash table corresponding to the original data are provided in the memory database processing layer. The size of each cache item in the cache space is S, and the number of items in the current cache is N. For any time t, each cache item i has a last access timestamp Ti(t). For a query request q, if q exists in the hash table, Tq(t) = t is updated, and the linked list node corresponding to q is moved to the head of the linked list. When N = C and a new item x needs to be inserted, the item y at the tail of the linked list is found, y is removed, and then x is inserted to the head of the linked list, and the value of N and the corresponding hash table are updated at the same time. The vector module sets a data preprocessing function in the memory database processing layer, wherein the data preprocessing function performs text cleaning on the original data stored in the first cache space, and then performs a text vectorization operation on the cleaned data to obtain vectorized data D2, and the vectorized data is stored in the second cache space in the memory database processing layer; Classification module, by setting a custom cross-filter function in the deep learning model , classify and process the data segments in the vectorized data D2 to obtain the classified feature data D3 of the vectorized data D2, where c is the number of categories and y c are the coding values ​​of different categories, p c Predict the probability values ​​of different categories for the model; The prediction module extracts the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4 corresponding to the classification feature data D3 from the original data, constructs the objective function f(K1, K2, K3, K4, γ) based on the time series feature K1, social network structure feature K2, user offset value feature K3 and interaction evaluation feature K4, predicts the user's behavior data through the objective function f, and obtains the predicted data D4, where γ is the optimization parameter of the objective function; Output module, build prediction function ), based on the prediction data D4 and prediction parameters Producing prediction output , , g is the activation function, h j is the jth feature mapping function, M is the number of prediction parameters, and the prediction output Presented in a visual form.

10. An electronic device, 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 real-time social listening data mining method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • A data acquisition and analysis method based on a social network

    CN109902216A

  • User real-time viewpoint detection method based on social media content and structure

    CN110059190A