Media terminal user behavior data acquisition method and system
By monitoring and analyzing user behavior data in real time, the media terminal user behavior data collection methods and systems can deeply understand user behavior patterns, automatically activate data collection, and build behavior analysis models, solving the problem that traditional information retrieval technology is difficult to accurately identify user needs, and achieving more accurate content recommendations and user satisfaction improvements.
Patent Information
- Application Number
- CN202411399113.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-03-07
AI Technical Summary
When traditional information retrieval technology processes a large amount of unstructured or semi-structured data, it is difficult to deeply analyze user behavior patterns, resulting in insufficient content recommendations and user interface design, which affects user experience and satisfaction.
By monitoring and capturing user behavior data in real time, generating user interaction data sets, analyzing user behavior patterns, mining implicit connections between user behavior and media content, setting event trigger points, automatically activate data collection, building behavior analysis models, monitoring and tracking user behavior dynamics in real time, generating real-time prediction results for behavior trends, and conducting user satisfaction assessments.
Improve the real-time and accuracy of data collection and can more effectively identify user preferences and behavior patterns. Media companies can customize personalized content recommendations for users, improve user satisfaction and participation, and enhance the company's user insight and market response capabilities.
Smart Images

Figure CN119576712A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information retrieval technology, and in particular to a method and system for collecting user behavior data at a media terminal. Background Art
[0002] Information retrieval technology is a field that focuses on efficiently and effectively retrieving, organizing, and managing information. Information retrieval technology is particularly important in the context of growing data volumes and information needs. It involves various algorithms and systems for searching, discovering, and classifying large amounts of unstructured or semi-structured data, such as text files, images, or web content. Information retrieval technology focuses not only on finding data, but also on the relevance and availability of data, enabling users to quickly find the information they need from massive amounts of data.
[0003] The main purpose of the media terminal user behavior data collection method is to understand user preferences, habits and behavior patterns by collecting and analyzing user behavior data on different media terminals. It helps media companies optimize content recommendations, improve user interface design, enhance user experience, and even conduct market analysis and advertising positioning. By analyzing how users interact with different media content, companies can more effectively customize personalized content and services, thereby achieving the effect of improving user satisfaction and increasing user stickiness. In addition, this data collection and analysis can also provide insights for new product development and help companies better understand the target market.
[0004] Traditional information retrieval technology mainly focuses on efficient and effective retrieval, organization and management of information. However, when processing large amounts of unstructured or semi-structured data, it lacks the ability to deeply analyze user behavior patterns and has difficulty accurately identifying users' personalized needs and preferences. This results in inaccurate content recommendations and user interface design, affecting user experience and satisfaction. Failure to accurately capture and analyze users' interests and interaction patterns for specific content results in inaccurate content recommendations, making it difficult for users to find content of real interest in massive amounts of information, thereby reducing user stickiness and engagement, limiting media companies' ability to innovate in content customization and market strategies, and hindering the development of personalized services. Summary of the invention
[0005] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method and system for collecting user behavior data of media terminals.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a method for collecting user behavior data of a media terminal comprises the following steps; S1: Based on the user behavior data recorded by media terminals, including user clicks, viewing time, and channel switching behavior, real-time monitoring and capture of user behavior data is performed to generate a user interaction data set; S2: Based on the user interaction data set, analyzing the frequency of users viewing target type content and the conversion pattern between contents, and generating a user behavior pattern analysis result; S3: Based on the analysis results of the user behavior pattern, the implicit connection between the user behavior and the media content is mined, the support and confidence between the item sets are calculated, and the content relevance index is generated; S4: Based on the content relevance index, set event trigger points, automatically activate data collection by formulating trigger rules and condition judgment criteria, and generate an event-driven data collection mechanism; S5: Based on the event-driven data collection mechanism, a behavior analysis model is constructed to monitor and track user behavior dynamics in real time and generate real-time prediction results of behavior trends; S6: Based on the real-time prediction results of the behavioral trends, evaluate user interactions, conduct quantitative analysis of user engagement, and generate user satisfaction evaluation results.
[0007] The present invention has improvements in that the user interaction data set includes the number of clicks of users, the length of time for watching channels, and the number of channel switching times; the user behavior pattern analysis results include the user's preferences for watching various types of content, content browsing and switching patterns, and similar behavior patterns among user groups; the content relevance index includes the correlation strength of user interaction between various contents, and the association rules between user behavior and content features; the event-driven data collection mechanism includes trigger point setting, data collection start conditions, and data recording methods; the behavior trend real-time prediction results include the user's active time period, preferred content type, and interaction frequency; the user satisfaction evaluation results include the positive and negative ratios of user feedback, interaction depth, and content relevance evaluation.
[0008] The present invention is improved in that the specific steps of real-time monitoring and capturing of user behavior data based on user behavior data recorded by media terminals, including user clicks, viewing time, and channel switching behavior, and generating a user interaction data set are as follows; S101: Based on the user behavior data recorded by the media terminal, monitor and capture user click events, viewing time and channel switching behavior, collect data and transmit it to the data server in real time to generate an initialization behavior data set; S102: Based on the initialized behavior data set, data cleaning and formatting are performed, duplicate records are filtered, null values are processed, key behavior features are extracted, a data framework is constructed, and user interaction preference data is generated; S103: Based on the user interaction preference data, the user behavior pattern is identified, and a user interaction data set is generated by allocating and summarizing the user behavior pattern through data points.
[0009] The present invention is improved in that, based on the user interaction data set, the frequency of users viewing target type content and the conversion pattern between contents are analyzed, and the specific steps of generating the user behavior pattern analysis result are as follows: S201: Based on the user interaction data set, record the number of times and duration of users' viewing, calculate the user attention of multiple content types, and generate user attention data; S202: Analyze the switching frequency and sequence of the user when watching multiple contents based on the user attention data, identify the viewing path and pattern, and generate a user behavior pattern map; S203: Based on the user behavior pattern map, an ARIMA model is established, and the behavior patterns and behavior trends of various user groups are predicted using a forecast method, and individual and group behaviors are compared to generate user behavior pattern analysis results.
[0010] The present invention is improved in that the specific steps of mining the implicit connection between user behavior and media content, calculating the support and confidence between item sets, and generating content relevance index based on the user behavior pattern analysis result are as follows; S301: Based on the user behavior pattern analysis result, the user behavior is divided into multiple categories such as browsing, watching or channel switching, converted into a structured data format, and the data is visualized to generate a user behavior category set; S302: Based on the user behavior category set, perform data association analysis, mine the relationship between behavior categories, identify key behavior patterns, and generate a user behavior association model; S303: Based on the user behavior association model, statistical analysis is performed to quantitatively evaluate the association rules, and the association strength levels between the content and the user behavior are divided according to the evaluation results to generate a content association index.
[0011] The present invention is improved in that, based on the content relevance index, event trigger points are set, trigger rules and condition judgment criteria are formulated, data collection is automatically activated, and the specific steps of generating an event-driven data collection mechanism are as follows; S401: Based on the content relevance index, identify key user behavior features for triggering data collection, including user click count and viewing time thresholds, set event trigger points, and generate behavior trigger point standards; S402: Based on the behavior trigger point standard, formulate trigger rules and condition judgment standards, judge whether the user behavior reaches the viewing time threshold, and generate trigger logic conditions; S403: Based on the trigger logic conditions, an automatic activation mechanism for data collection is constructed, and condition judgment criteria are embedded in the data collection framework, and data is automatically collected when the trigger conditions are met, thereby generating an event-driven data collection mechanism.
[0012] The present invention is improved in that, based on the event-driven data collection mechanism, a behavior analysis model is constructed to monitor and track user behavior dynamics in real time, and the specific steps of generating real-time prediction results of behavior trends are as follows; S501: Based on the event-driven data collection mechanism, perform structured processing on user interaction data, convert click and scroll behaviors into event sequences, annotate timestamps and behavior types, and generate event sequence data sets; S502: Based on the event sequence data set, applying a neural network framework to analyze user behavior characteristics, identify behavior trends and patterns, and generate a behavior characteristic recognition model; S503: Based on the behavior feature recognition model, extract and symbolize the logical rules of the recognized user behavior pattern, track and predict the user's behavior dynamics, and generate real-time prediction results of behavior trends.
[0013] The present invention is improved in that, based on the real-time prediction results of the behavioral trends, the user interaction is evaluated and the user participation is quantitatively analyzed, and the specific steps of generating the user satisfaction evaluation results are as follows; S601: Based on the real-time prediction result of the behavior trend, a time index is set, the user interaction frequency and duration are sorted by date and time, and a smoothing process is applied to the sequence data to generate time-indexed behavior data; S602: Based on the time-indexed behavior data, calculate the user interaction statistical indicators in each time window, including the mean and standard deviation, construct a time series profile of user engagement, and generate statistical quantitative engagement data; S603: Based on the statistically quantified participation data, identify participation change patterns, perform quantitative analysis on trends, and generate user satisfaction evaluation results.
[0014] A media terminal user behavior data collection system, the system comprising: The user activity monitoring module captures the user's click events and content browsing behaviors based on the user behavior data recorded by the media terminal, and sends the user interaction data to the server in real time to generate a user behavior data set; The viewing preference analysis module analyzes the user's clicks and viewing durations on various contents based on the user behavior data set, identifies the user's preferred content types and channels, and generates user preference analysis results; The behavior pattern recognition module analyzes the user's viewing sequence based on the user preference analysis result, summarizes the key behavior patterns, and generates a behavior pattern recognition result; The content relationship mining module mines the association rules between user behavior and viewing content based on the behavior pattern recognition result, analyzes the relationship between the content, and generates content association analysis results; The dynamic trigger setting module formulates condition judgment criteria based on the content relevance analysis results, sets trigger conditions for data collection according to the user's viewing behavior and content relevance, and generates dynamic trigger rules; The behavior prediction model module analyzes user behavior data based on the dynamic trigger rules, predicts user behavior trends, and generates a user behavior prediction model; The engagement evaluation module quantifies the user's engagement with the content based on the user behavior prediction model, analyzes changes in engagement over time, and generates user satisfaction evaluation results.
[0015] Compared with the prior art, the advantages and positive effects of the present invention are: In the present invention, by real-time monitoring and capturing user behavior data, in-depth analysis of user group behavior patterns is performed, and by formulating trigger rules and conditional judgment criteria, data collection is automatically activated, which not only improves the real-time and accuracy of data collection, but also can more effectively identify user preferences and behavior patterns. Media companies calculate the support and confidence between item sets to explore the implicit connection between user behavior and media content, and then customize personalized content recommendations for users to improve user satisfaction and participation. The event-driven data collection mechanism can accurately capture relevant data when a specific event is triggered, so that the behavior analysis model can monitor and track user behavior dynamics in real time, providing companies with deeper user insights and more flexible market response capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flow chart of a method for collecting user behavior data of a media terminal proposed by the present invention; Figure 2 The present invention provides a detailed flow chart of step S1 in the method for collecting user behavior data of a media terminal; Figure 3 The present invention provides a detailed flow chart of step S2 in the method for collecting user behavior data of a media terminal; Figure 4 The present invention provides a detailed flow chart of step S3 in the method for collecting user behavior data of a media terminal; Figure 5 The present invention provides a detailed flow chart of step S4 in the method for collecting user behavior data of a media terminal; Figure 6 The present invention provides a detailed flow chart of step S5 in the method for collecting user behavior data of a media terminal; Figure 7 The present invention provides a detailed flow chart of step S6 in the method for collecting user behavior data of a media terminal; Figure 8 A module diagram of a media terminal user behavior data collection system is proposed for the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0018] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating positions or positional relationships, are based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, in the description of the present invention, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0019] Embodiment 1 See also Figure 1 , the present invention provides a technical solution: a method for collecting user behavior data of a media terminal. In order to achieve the above-mentioned purpose, the present invention adopts the following technical solution: a method for collecting user behavior data of a media terminal, comprising the following steps; S1: Based on the user behavior data recorded by media terminals, including user clicks, viewing time, and channel switching behavior, real-time monitoring and capture of user behavior data is performed to generate a user interaction data set; S2: Based on the user interaction data set, analyze the frequency of users viewing target content and the conversion patterns between content to generate user behavior pattern analysis results; S3: Based on the results of user behavior pattern analysis, the implicit connection between user behavior and media content is mined, the support and confidence between item sets are calculated, and the content relevance index is generated; S4: Based on the content relevance index, set the event trigger point, automatically activate data collection by formulating trigger rules and condition judgment criteria, and generate an event-driven data collection mechanism; S5: Based on the event-driven data collection mechanism, a behavior analysis model is built to monitor and track user behavior dynamics in real time and generate real-time prediction results of behavior trends; S6: Based on the real-time prediction results of behavioral trends, evaluate user interactions, conduct quantitative analysis of user engagement, and generate user satisfaction evaluation results.
[0020] The user interaction data set includes the number of clicks of users, the length of time they watch channels, and the number of channel switching times. The user behavior pattern analysis results include the user's preference for watching various types of content, the patterns of content browsing and switching, and similar behavior patterns among user groups. The content relevance indicators include the correlation strength of user interactions between various contents, and the association rules between user behavior and content features. The event-driven data collection mechanism includes trigger point setting, data collection start conditions, and data recording methods. The real-time prediction results of behavioral trends include the user's active time period, preferred content type, and interaction frequency. The user satisfaction evaluation results include the positive and negative ratio of user feedback, interaction depth, and content relevance evaluation.
[0021] See also Figure 2 ,Based on the user behavior data recorded by the media terminal, including user clicks, viewing time, and channel switching behavior, the specific steps of real-time monitoring and capturing user behavior data and generating user interaction data sets are as follows; S101: Based on the user behavior data recorded by the media terminal, monitor and capture user click events, viewing time and channel switching behavior, collect data and transmit it to the data server in real time to generate an initialization behavior data set; In sub-step S101, based on the user behavior data recorded by the media terminal, the user click events, viewing time and channel switching behavior are monitored and captured, and the data is transmitted and preliminarily sorted in real time using the Python programming language and the Pandas library. The data is loaded by calling the read_csv function of DataFrame, the timestamp format is converted using the to_datetime function, and the drop_duplicates method is applied to remove duplicate records to generate an initialization behavior data set.
[0022] S102: Based on the initialization behavior data set, perform data cleaning and formatting, filter duplicate records, process null values, extract key behavior features, build a data framework, and generate user interaction preference data; In sub-step S102, data cleaning and formatting are performed based on the initialized behavior data set. The fillna method in the Pandas library is used to process null values. Empty strings are replaced with np.nan to mark null values. The dropna function is then used to remove rows containing null values. The astype method of DataFrame is used to optimize data types and reduce memory usage. Regular expression matching is used to extract key behavior features, a data frame is constructed, and user interaction preference data is generated.
[0023] S103: Based on the user interaction preference data, the user behavior pattern is identified, and a user interaction data set is generated by allocating and summarizing the user behavior pattern through data points.
[0024] In sub-step S103, based on the user interaction preference data, the user behavior pattern is identified, and a machine learning algorithm is used. The KMeans clustering algorithm is implemented using the scikit-learn library. The number of clusters is determined by setting the n_clusters parameter, and the fit_predict method is called to perform model training on the user interaction preference data and summarize the user behavior patterns. According to the clustering results, a data framework is constructed to generate a user interaction data set.
[0025] See also Figure 3 ,Based on the user interaction data set, the frequency of users watching target type content,and the conversion pattern between contents are analyzed.,The specific steps to generate the user behavior pattern analysis results are as follows, S201: Based on the user interaction data set, record the number of times and duration of users' viewing, calculate the user attention of various content types, and generate user attention data; In sub-step S201, based on the user interaction dataset, a clustering algorithm is adopted, and KMeans clustering is performed using Python's scikit-learn library. The cluster number parameter is set to be dynamically determined according to the content type. KMeans++ is selected as the initialization method to reduce the randomness of initialization and accelerate convergence. The maximum number of iterations is set to 300 to ensure stable operation of the algorithm. The Euclidean distance is used to calculate the distance between samples. The cluster center is updated through iteration until the convergence condition is met or the maximum number of iterations is reached to generate user attention data.
[0026] S202: Analyze the switching frequency and sequence of users when viewing multiple contents based on the user attention data, identify viewing paths and patterns, and generate a user behavior pattern map; In sub-step S202, based on the user attention data, a sequence analysis method is adopted, and Python's Pandas library is used for data processing. The user viewing records are stored through the DataFrame object. The numpy library is combined for numerical calculations, and the switching frequency between users viewing different content types is calculated. The sort_values function is used to sort the results to determine the viewing order. The Matplotlib library is used to draw a user behavior pattern map. The chart type is set to a scatter plot. The horizontal axis represents the content type, the vertical axis represents the switching frequency, and the size of the point reflects the user's attention. A user behavior pattern map is generated.
[0027] S203: Based on the user behavior pattern map, an ARIMA model is established, and the forecast method is used to predict the behavior patterns and behavior trends of various user groups, and individual and group behaviors are compared to generate user behavior pattern analysis results.
[0028] In sub-step S203, based on the user behavior pattern map, the time series analysis method is adopted and executed using the statsmodels library of Python. The user behavior trend is predicted through the ARIMA model. The model parameters are set as the order of the autoregressive term AR, the difference term I, and the moving average term MA. The optimal model parameters are selected according to the AIC (Akaike Information Criterion), and the model fitting process is executed. The forecast method is used to predict the future user behavior trend. The predicted results are compared with the historical data to generate the user behavior pattern analysis results. The relationship in the process of building the ARIMA model is: ; in, Indicates time User behavior vectors, including Different user behavior characteristics, Both represent the autoregressive coefficient matrix, represents the white noise error vector, Represents the time series data relative to the current time The past User behavior value at a time point; The model can process multiple user behavior features at the same time and capture the interdependence and dynamic changes between different features. Through the autoregressive coefficient matrix, it can capture the intrinsic dynamic characteristics of the time series and improve the accuracy of behavior pattern analysis. At the same time, it contains white noise error vectors, which can reduce the model's sensitivity to noise data.
[0029] The execution process is as follows: Collect user behavior data, including number of views, viewing time, click-through rate, channel preference, etc. Pre-process this data, such as cleaning and standardization.
[0030] Use time series analysis methods to analyze historical data of user behavior and calculate historical values and the corresponding error term The autocorrelation function and partial autocorrelation function of the time series are used to identify the order of the autoregressive term AR and the moving average term MA, i.e. the parameters p and q, and the order d of the difference term I is determined at the same time.
[0031] Use historical user behavior data to train the ARIMA model and obtain the autoregressive coefficient and moving average coefficient.
[0032] For the newly introduced user behavior factors, machine learning algorithms such as linear regression, gradient boosting, support vector machine and decision tree are used to determine the weight coefficients respectively.
[0033] The ARIMA model is combined with the newly introduced weight coefficients and user behavior factors to form an improved prediction model, which is used to predict future user behavior trends.
[0034] Use statistical methods such as mean square error to evaluate the accuracy of the prediction model and adjust and optimize the model as needed.
[0035] See also Figure 4 ,Based on the results of user behavior pattern analysis, the ,concrete steps of mining the implicit connection between user ,behavior and media content, calculating the support and confidence between ,item sets, and generating content relevance index are as follows; S301: Based on the analysis results of user behavior patterns, user behaviors are classified into multiple categories such as browsing, watching or channel switching, converted into a structured data format, and data visualization is performed to generate a user behavior category set; In sub-step S301, based on the results of the user behavior pattern analysis, a data classification algorithm is used, and the data is preprocessed using Python's Pandas library. The user behavior data is converted into a structured format through a DataFrame object, and the apply function is used to classify each behavior data based on predefined behavior category standards, such as browsing, watching, or channel switching. The Matplotlib library is used for data visualization, and the chart type is set to a bar chart. The horizontal axis represents the behavior category, and the vertical axis represents the frequency of the behavior. The height of the bar chart reflects the distribution frequency of the behavior category, and a user behavior category set is generated.
[0036] S302: Based on the user behavior category set, perform data association analysis, mine the relationship between behavior categories, identify key behavior patterns, and generate a user behavior association model; In sub-step S302, based on the user behavior category set, an association rule learning algorithm is adopted, and the Apriori algorithm is executed using the mlxtend library of Python. The support threshold is set to 0.01 and the confidence threshold is set to 0.5. Frequent item sets and strong association rules between behavior categories are identified. Through frequent item set and association rule analysis, the user's switching pattern between different behavior categories is identified. The networkx library is used to build a graph model, in which nodes represent behavior categories and edges represent the association strength between behavior categories, to generate a user behavior association model.
[0037] S303: Based on the user behavior association model, statistical analysis is performed to quantitatively evaluate the association rules, and the association strength levels between the content and the user behavior are divided according to the evaluation results to generate a content association index.
[0038] In sub-step S303, based on the user behavior association model, a statistical analysis method is adopted, and numerical calculations are performed using Python's SciPy library. By performing a chi-square test, the association rules are quantitatively evaluated to determine the statistical significance of each rule. According to the evaluation results, the quantile function qcut of the numpy library is used to grade the association strength, and the association strength is divided into three levels: weak, medium, and strong. Based on this, a distribution diagram of the content association index is constructed, with the horizontal axis representing the content category and the vertical axis representing the association strength level, to generate the content association index; The content relevance index includes lift and confidence, and the calculation formula is: ; in, Indicates the degree of improvement, Indicates confidence, Representing Item Sets The support of Representing Item Sets The support of represents the adjustment factor used for lift correction, represents the adjustment factor used for confidence correction, Indicates in the item set Conditional Itemset The probability of appearing at the same time; This formula can measure the strength of association rules through lift, which can better reflect the actual correlation between two item sets than simple confidence. The confidence can further describe the reliability of association rules and enhance the understanding of content correlation. At the same time, multiple indicators are used in combination to provide a more comprehensive assessment of the strength of association rules.
[0039] See also Figure 5 ,Based on the content relevance index, the event trigger point is set, and the data collection is automatically activated by formulating trigger rules and condition judgment criteria, and the specific steps of generating event-driven data collection mechanism are as follows; S401: Based on the content relevance index, identify key user behavior features for triggering data collection, including user click count and viewing time thresholds, set event trigger points, and generate behavior trigger point standards; In sub-step S401, based on the content relevance index, key user behavior features used to trigger data collection are identified, including user click counts and viewing time thresholds. Numerical analysis is performed using Python language and NumPy library. By setting numpy array filtering conditions, the average number of clicks and average viewing time are calculated. Based on this, event trigger points are determined. Behavior trigger conditions are set through if-else logic judgment to generate behavior trigger point standards.
[0040] S402: Based on the behavior trigger point standard, formulate trigger rules and condition judgment standards, judge whether the user behavior reaches the viewing time threshold, and generate trigger logic conditions; In sub-step S402, based on the behavioral trigger point standard, trigger rules and condition judgment standards are formulated, and the trigger logic conditions are written in Python. By applying conditional judgment statements to user behavior data, such as using if statements to check whether the user's viewing time reaches the set time threshold, Boolean logic operators are used to determine the logical relationship between multiple trigger conditions to ensure that the data collection process is triggered when all preset conditions are met, and generate trigger logic conditions.
[0041] S403: Based on the trigger logic conditions, an automatic activation mechanism for data collection is constructed, and the condition judgment standard is embedded in the data collection framework, and data is automatically collected when the trigger conditions are met, thereby generating an event-driven data collection mechanism.
[0042] In sub-step S403, based on the trigger logic conditions, an automatic activation mechanism for data collection is constructed, the condition judgment criteria are embedded in the data collection framework, and event monitoring and callback functions are used to automatically activate the data collection process when the trigger conditions are met. By writing specific functions, user behavior events such as clicks and views are monitored. Once the trigger conditions are met, the data collection function is immediately called to execute the data collection task, generating an event-driven data collection mechanism.
[0043] See also Figure 6 ,Based on the event-driven data collection mechanism, the specific steps of building a behavior analysis model,,monitoring and tracking user behavior dynamics in real time, and generating real-time prediction results of,behavior trends are as follows; S501: Based on the event-driven data collection mechanism, perform structured processing on user interaction data, convert click and scroll behaviors into event sequences, annotate timestamps and behavior types, and generate event sequence data sets; In sub-step S501, data preprocessing operations are performed based on the event-driven data collection mechanism. JavaScript is used to monitor user interaction behaviors such as clicking and scrolling, and the behaviors are converted into event sequences. A unique timestamp and a clear behavior type label are assigned to each event. The data is organized in JSON format to ensure the structuring of the event sequence data set, so that the data set contains rich user interaction details and generates an event sequence data set.
[0044] S502: Based on the event sequence data set, a neural network framework is applied to analyze user behavior characteristics, identify behavior trends and patterns, and generate a behavior characteristic recognition model; In sub-step S502, based on the event sequence data set, a deep learning algorithm is adopted, and a recurrent neural network (RNN) is constructed using the TensorFlow and Keras libraries. The model structure is designed, including an input layer that receives event sequence data, a hidden layer that uses LSTM units to process time series data to identify time-dependent features, and an output layer that identifies user behavior trends and patterns based on the analysis results. The optimizer is set to Adam, and the loss function selects binary_crossentropy to generate a behavior feature recognition model.
[0045] S503: Based on the behavior feature recognition model, extract and symbolize the logical rules of the identified user behavior pattern, track and predict the user's behavior dynamics, and generate real-time prediction results of behavior trends.
[0046] In sub-step S503, based on the behavior feature recognition model, the decision tree algorithm is executed through Python's sklearn library to convert the user behavior pattern identified by the deep learning model into a logical rule. The rule is expressed in a symbolic form and can clearly describe the decision path of user behavior. Combined with historical user behavior data, the future user behavior dynamics are predicted and the real-time prediction results of behavior trends are generated. The relationship in the process of real-time prediction of behavior trends is: ; in, Indicates time and historical time The alignment score, represents the weight matrix used to calculate the attention alignment score, Indicates historical time The hidden state vector of Indicates at time The hidden state vector of represents the bias vector for calculating the attention alignment score, Indicates at time The new hidden state vector is Indicates time The input vector is represents the total number of time steps, Indicates that it has been processed by long short-term memory units; The above formula can capture important historical information in the time series through the Attention mechanism, improving the model's ability to capture long-term dependencies. By introducing the context vector, it can comprehensively consider historical information and make the calculation of the current state more accurate. At the same time, the combination of LSTM and Attention mechanism significantly improves the expressiveness and accuracy of time series prediction.
[0047] See also Figure 7 ,Based on the real-time prediction results of behavioral trends, the user interaction is evaluated, and the quantitative analysis of user engagement is performed.,The specific steps for generating user satisfaction evaluation results are as follows; S601: Based on the real-time prediction results of the behavior trend, a time index is set, the user interaction frequency and duration are sorted by date and time, and a smoothing process is applied to the sequence data to generate time-indexed behavior data; In sub-step S601, the time index is set based on the real-time prediction results of the behavioral trend. By extracting the timestamp of the user interaction event, the to_datetime function in the Python pandas library is used to convert the timestamp to the standard time format, and the DataFrame.sort_values method is used to sort by date and time. The rolling method in the pandas library is applied to smooth the sequence data, and the data is moved and averaged by specifying the window size and sliding step parameters to generate time-indexed behavioral data.
[0048] S602: Based on the time-indexed behavior data, calculate the user interaction statistical indicators in each time window, including the mean and standard deviation, construct a time series profile of user engagement, and generate statistical quantitative engagement data; In sub-step S602, based on the time-indexed behavioral data, the user interaction statistical indicators in each time window are calculated, and the groupby method in the pandas library is used to group the time windows. The mean and std functions are applied to calculate the mean and standard deviation in each group respectively, and a time series overview of user engagement is constructed. By combining the outputs of statistical functions, statistical quantitative engagement data is generated.
[0049] S603: Based on the statistically quantified engagement data, identify engagement change patterns, conduct quantitative analysis on trends, and generate user satisfaction evaluation results.
[0050] In sub-step S603, based on the statistical quantification of participation data, the participation change pattern is identified, and the time series analysis method is adopted. Specifically, the seasonal_decompose function in the statsmodels library is used to decompose the time series data by setting the model parameters to additive or multiplicative, so as to quantify the trend, seasonality and residual components and generate the user satisfaction evaluation results. The relationship in the process of generating the user satisfaction evaluation results is: ; in, Indicates time The smoothed value vector of Indicates time The original user behavior feature vector, represents the adaptive smoothing coefficient vector, represents element-wise multiplication, Indicates at time The hidden state of Indicates at time The hidden state of It means that it has been processed by nonlinear activation function. represents the initial smoothing coefficient vector, represents the weight vector used to adjust the original user behavior characteristics, The weight vector used to adjust the smoothing feature of the previous time point, represents the weight used to adjust the smoothed features of the first two time points.
[0051] This formula smoothes multiple user behavior features at the same time, which can more accurately reflect the comprehensive situation of user satisfaction; each feature has a different smoothing coefficient, which can be personalized according to the dynamic changes of different features; at the same time, each feature is independently smoothed using element-by-element multiplication to retain the independent information of each feature and improve the accuracy of the evaluation.
[0052] See also Figure 8 ,Media terminal user behavior data collection system, the system includes; The user activity monitoring module captures the user's click events and content browsing behaviors based on the user behavior data recorded by the media terminal, and sends the user interaction data to the server in real time to generate a user behavior data set; The viewing preference analysis module analyzes the user's clicks and viewing time on various contents based on the user behavior data set, identifies the content types and channels preferred by the user, and generates user preference analysis results; The behavior pattern recognition module analyzes the user's viewing sequence based on the user preference analysis results, summarizes the key behavior patterns, and generates behavior pattern recognition results; The content relationship mining module mines the association rules between user behavior and viewing content based on the behavior pattern recognition results, analyzes the relationship between content, and generates content association analysis results; The dynamic trigger setting module formulates conditional judgment criteria based on the content relevance analysis results, sets the trigger conditions for data collection according to the user's viewing behavior and content relevance, and generates dynamic trigger rules; The behavior prediction model module analyzes user behavior data based on dynamic trigger rules, predicts user behavior trends, and generates a user behavior prediction model; The engagement evaluation module quantifies the user's engagement with the content based on the user behavior prediction model, analyzes the changes in engagement over time, and generates user satisfaction evaluation results.
[0053] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.
Claims
1. A method for collecting user behavior data of a media terminal, characterized in that: The method comprises the following steps, Based on the user behavior data recorded by media terminals, including user clicks, viewing time, and channel switching behavior, real-time monitoring and capture of user behavior data is performed to generate user interaction data sets; Based on the user interaction data set, analyzing the frequency of users viewing target type content and the conversion pattern between contents, and generating user behavior pattern analysis results; Based on the user behavior pattern analysis results, the implicit connection between user behavior and media content is mined, the support and confidence between item sets are calculated, and a content relevance index is generated; Based on the content relevance index, event trigger points are set, and data collection is automatically activated by formulating trigger rules and condition judgment criteria to generate an event-driven data collection mechanism; Based on the event-driven data collection mechanism, a behavior analysis model is constructed to monitor and track user behavior dynamics in real time and generate real-time prediction results of behavior trends; Based on the real-time prediction results of the behavioral trends, user interactions are evaluated, and a quantitative analysis of user engagement is performed to generate user satisfaction evaluation results; The user interaction data set includes the number of clicks of users, the length of time they watch channels, and the number of channel switching times. The user behavior pattern analysis results include the user's preferences for watching various types of content, content browsing and switching patterns, and similar behavior patterns among user groups. The content relevance index includes the correlation strength of user interactions between various contents, and the association rules between user behavior and content features. The event-driven data collection mechanism includes trigger point setting, data collection start conditions, and data recording methods. The real-time prediction results of behavioral trends include the user's active time period, preferred content type, and interaction frequency. The user satisfaction evaluation results include the positive and negative ratios of user feedback, interaction depth, and content relevance evaluation.
2. The method for collecting media terminal user behavior data according to claim 1, characterized in that: Based on the user behavior data recorded by the media terminal, including user clicks, viewing time, and channel switching behavior, the specific steps for real-time monitoring and capturing user behavior data and generating a user interaction data set are as follows; Based on the user behavior data recorded by the media terminal, monitor and capture user click events, viewing time and channel switching behavior, collect data and transmit it to the data server in real time to generate an initialization behavior data set; Based on the initialized behavior data set, data cleaning and formatting are performed, duplicate records are filtered, null values are processed, key behavior features are extracted, a data framework is constructed, and user interaction preference data is generated; Based on the user interaction preference data, the user behavior pattern is identified, and the user interaction data set is generated by allocating and summarizing the user behavior pattern through data point allocation.
3. The method for collecting media terminal user behavior data according to claim 2, characterized in that: Based on the user interaction data set, the specific steps of analyzing the frequency of users viewing target type content and the conversion pattern between contents to generate the user behavior pattern analysis result are as follows: Based on the user interaction data set, record the number of times and duration of users' viewing, calculate the user attention of multiple content types, and generate user attention data; Based on the user attention data, analyzing the switching frequency and sequence of users when viewing multiple contents, identifying viewing paths and patterns, and generating a user behavior pattern map; Based on the user behavior pattern map, an ARIMA model is established and the forecast method is used to predict the behavior patterns and behavior trends of various user groups, and individual and group behaviors are compared to generate user behavior pattern analysis results.
4. The method for collecting media terminal user behavior data according to claim 3, characterized in that: The relationship in the process of building the ARIMA model is: ; in, Indicates time User behavior vectors, including Different user behavior characteristics; Both represent the autoregressive coefficient matrix, represents the white noise error vector, Represents the time series data relative to the current time The past The user behavior value at a point in time.
5. The method for collecting media terminal user behavior data according to claim 4, characterized in that: Based on the user behavior pattern analysis results, the specific steps of mining the implicit connection between user behavior and media content, calculating the support and confidence between item sets, and generating content relevance index are as follows; Based on the user behavior pattern analysis results, the user behaviors are divided into multiple categories such as browsing, watching or channel switching, converted into a structured data format, and the data is visualized to generate a user behavior category set; Based on the user behavior category set, data association analysis is performed to mine the relationship between behavior categories, identify key behavior patterns, and generate a user behavior association model; Based on the user behavior association model, statistical analysis is performed to quantitatively evaluate the association rules, and the association strength level between the content and the user behavior is divided according to the evaluation results to generate a content association index; Among them, the content relevance index includes lift and confidence, and the corresponding calculation formula is: ; in, Indicates the degree of improvement, Indicates confidence, Representing Item Sets The support of Representing Item Sets The support of represents the adjustment factor used for lift correction, represents the adjustment factor used for confidence correction, Indicates in the item set Conditional Itemset The probability of appearing at the same time.
6. The method for collecting media terminal user behavior data according to claim 5, characterized in that: Based on the content relevance index, event trigger points are set, and data collection is automatically activated by formulating trigger rules and condition judgment criteria. The specific steps for generating an event-driven data collection mechanism are as follows: Based on the content relevance index, identify key user behavior features for triggering data collection, including user click count and viewing time thresholds, set event trigger points, and generate behavior trigger point standards; Based on the behavior trigger point standard, formulate trigger rules and condition judgment standards, judge whether the user behavior reaches the viewing time threshold, and generate trigger logic conditions; Based on the trigger logic conditions, an automatic activation mechanism for data collection is constructed, and the condition judgment standard is embedded in the data collection framework. Data is automatically collected when the trigger conditions are met, generating an event-driven data collection mechanism.
7. The method for collecting media terminal user behavior data according to claim 6, characterized in that: Based on the event-driven data collection mechanism, the specific steps of building a behavior analysis model, monitoring and tracking user behavior dynamics in real time, and generating real-time prediction results of behavior trends are as follows; Based on the event-driven data collection mechanism, structured processing of user interaction data is performed to convert click and scroll behaviors into event sequences, and timestamps and behavior types are annotated to generate event sequence data sets; Based on the event sequence data set, a neural network framework is applied to analyze user behavior characteristics, identify behavior trends and patterns, and generate a behavior feature recognition model; Based on the behavior feature recognition model, the logic rules of the recognized user behavior patterns are extracted and symbolized, the user's behavior dynamics are tracked and predicted, and real-time prediction results of behavior trends are generated; Among them, the relationship in the process of real-time prediction of behavioral trends is: ; in, Indicates time and historical time The alignment score, represents the weight matrix used to calculate the attention alignment score, Indicates historical time The hidden state vector of Indicates at time The hidden state vector of represents the bias vector for calculating the attention alignment score, Indicates at time The new hidden state vector is Indicates time The input vector is represents the total number of time steps, Indicates that it has been processed by long short-term memory units.
8. The method for collecting user behavior data of a media terminal according to claim 7, characterized in that: Based on the real-time prediction results of the behavioral trends, the user interactions are evaluated and the user engagement is quantitatively analyzed. The specific steps for generating the user satisfaction evaluation results are as follows; Based on the real-time prediction results of the behavioral trends, time indexing is performed, the user interaction frequency and duration are sorted by date and time, and smoothing is applied to the sequence data to generate time-indexed behavioral data; Based on the time-indexed behavior data, calculate the user interaction statistical indicators in each time window, including the mean and standard deviation, construct a time series profile of user engagement, and generate statistical quantitative engagement data; Based on the statistically quantified participation data, the participation change pattern is identified, the trend is quantitatively analyzed, and the user satisfaction evaluation result is generated. The relationship in the process of generating the user satisfaction evaluation result is: ; in, Indicates time The smoothed value vector of Indicates time The original user behavior feature vector, represents the adaptive smoothing coefficient vector, represents element-wise multiplication, Indicates at time The hidden state of Indicates at time The hidden state of It means that it has been processed by nonlinear activation function. represents the initial smoothing coefficient vector, represents the weight vector used to adjust the original user behavior characteristics, The weight vector used to adjust the smoothing feature of the previous time point, represents the weight used to adjust the smoothed features of the first two time points.
9. A media terminal user behavior data collection system, characterized in that: According to the method for collecting media terminal user behavior data according to any one of claims 1 to 8, the system comprises: The user activity monitoring module captures the user's click events and content browsing behaviors based on the user behavior data recorded by the media terminal, and sends the user interaction data to the server in real time to generate a user behavior data set; The viewing preference analysis module analyzes the user's clicks and viewing durations on various contents based on the user behavior data set, identifies the user's preferred content types and channels, and generates user preference analysis results; The behavior pattern recognition module analyzes the user's viewing sequence based on the user preference analysis result, summarizes the key behavior patterns, and generates a behavior pattern recognition result; The content relationship mining module mines the association rules between user behavior and viewing content based on the behavior pattern recognition result, analyzes the relationship between the content, and generates content association analysis results; The dynamic trigger setting module formulates condition judgment criteria based on the content relevance analysis results, sets trigger conditions for data collection according to the user's viewing behavior and content relevance, and generates dynamic trigger rules; The behavior prediction model module analyzes user behavior data based on the dynamic trigger rules, predicts user behavior trends, and generates a user behavior prediction model; The engagement evaluation module quantifies the user's engagement with the content based on the user behavior prediction model, analyzes changes in engagement over time, and generates user satisfaction evaluation results.