User behavior analysis method and device based on machine learning, equipment and medium
By using fine-grained behavioral data processing and pre-trained models to identify users' hesitation states, and combining this with business scenario-based intervention strategies, the problem of insufficient hesitation behavior identification in traditional methods has been solved, thereby improving the accuracy and real-time performance of user behavior analysis.
Patent Information
- Application Number
- CN202511694945.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2025-12-19
AI Technical Summary
Traditional user behavior analysis methods struggle to accurately identify user hesitation during the decision-making process, making it difficult to take timely and effective intervention measures.
By acquiring fine-grained behavioral data from user interaction interfaces, standardizing and segmenting it into behavioral sub-sequences, extracting time-series feature vectors, using a pre-trained hesitation recognition model to identify hesitation probabilities, and combining this with business scenarios to match target intervention strategies and provide personalized intervention content.
It enables accurate identification and real-time intervention of users' hesitation states, improves the accuracy and real-time nature of user behavior analysis, and enhances user experience and business conversion rate.
Smart Images

Figure CN121167494A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of user behavior analysis, and particularly relates to a user behavior analysis method, device and equipment based on machine learning and a medium. BACKGROUND
[0002] With the continuous development of Internet and mobile application technology, user behavior analysis technology has gradually become an important means to improve user experience and promote business conversion. In existing user behavior analysis methods, user behavior data on the interaction interface is collected to analyze user operation habits and preferences, so as to realize personalized services and recommendations.
[0003] In traditional user behavior analysis, simple statistical analysis methods are usually used, such as calculating the dwell time and click times of users on a certain page, to judge the user's behavior pattern. These methods can reflect the user's behavior characteristics to some extent, but cannot accurately capture the hesitation behavior of users in the decision-making process. For example, when users repeatedly switch between multiple options or stay at a certain decision point for a long time, the traditional method cannot identify this hesitation state, so it cannot take effective intervention measures in time. SUMMARY
[0004] Therefore, it is necessary to provide a user behavior analysis method, device and equipment based on machine learning, which can accurately identify the hesitation behavior of users and provide effective intervention strategies on this basis.
[0005] In a first aspect, the application provides a user behavior analysis method based on machine learning, comprising:
[0006] Obtaining original behavior data generated by a user on an interaction interface to obtain a fine-grained behavior event stream containing a timestamp;
[0007] Performing behavior aggregation on the fine-grained behavior event stream to generate a standardized user behavior sequence;
[0008] Based on the standardized user behavior sequence, the sliding time window is divided to obtain a plurality of behavior sub-sequences;
[0009] Respectively performing time sequence feature extraction on the plurality of behavior sub-sequences to obtain a time sequence feature vector; the time sequence feature vector represents the dynamic pattern of each behavior sub-sequence;
[0010] Inputting the time sequence feature vector into a pre-trained hesitation recognition model to perform hesitation probability prediction and generate a hesitation probability value corresponding to each behavior sub-sequence;
[0011] When the hesitation probability value is greater than or equal to a preset hesitation threshold, it is judged that the user is in a hesitation state, and a hesitation judgment result is generated;
[0012] Based on the hesitation judgment result, a corresponding target intervention strategy is obtained from a preset intervention strategy library according to a current business scenario in which the user is located. The target intervention strategy is used to present corresponding intervention content to the user to guide the user to complete a target conversion behavior.
[0013] In one of the embodiments, the construction step of the pre-trained hesitation recognition model includes:
[0014] Historical user behavior data is obtained, and the historical user behavior data is labeled to generate a sample data set containing hesitation labels;
[0015] The sample data set is divided to obtain a training set and a validation set;
[0016] Based on the training set, the initial time series neural network model is supervised trained to generate a trained hesitation recognition model;
[0017] The performance of the trained hesitation recognition model is evaluated according to the validation set to obtain an evaluation result;
[0018] Based on the evaluation result, the hyperparameters of the initial time series neural network model are adjusted to obtain the pre-trained hesitation recognition model.
[0019] In one of the embodiments, the construction step of the preset intervention strategy library includes:
[0020] According to different business scenario types, a strategy classification directory is created to obtain the strategy classification directory;
[0021] For each category in the strategy classification directory, one or more specific intervention strategies are configured to generate an initial strategy set;
[0022] The trigger condition, intervention content and execution parameter corresponding to each intervention strategy in the initial strategy set are defined to obtain a structured intervention strategy item;
[0023] All structured intervention strategy items are stored to obtain the preset intervention strategy library.
[0024] In one of the embodiments, based on the hesitation judgment result, a corresponding target intervention strategy is obtained from a preset intervention strategy library according to a current business scenario in which the user is located, including:
[0025] According to the current business scenario in which the user is located, a plurality of intervention strategies associated with the business scenario are selected from the preset intervention strategy library to obtain a candidate intervention strategy set;
[0026] For each strategy in the candidate intervention strategy set, query the intervention effect indicators of the strategy in historical applications for user groups with the same user profile tags to obtain historical effect data.
[0027] The historical performance data of each strategy is weighted and fused with the corresponding hesitation probability value to obtain the comprehensive recommendation score for each strategy; the comprehensive recommendation score is obtained by the following formula:
[0028]
[0029] in, For strategy The overall recommendation score, For strategy Historical performance data, This provides the global average performance data for all strategies. For strategy The number of times it has been executed in history It is a smooth hyperparameter;
[0030] Based on the set of candidate intervention strategies, the strategy with the highest comprehensive recommendation score is selected to obtain the corresponding target intervention strategy.
[0031] In one embodiment, after matching the user's current business scenario with a pre-set intervention strategy library based on the hesitation judgment result, the process further includes:
[0032] Acquire user behavior data following the implementation of the target intervention strategy;
[0033] Based on subsequent behavioral data, determine whether the user has completed the target conversion behavior within a preset time window and generate a conversion judgment result;
[0034] Based on the conversion assessment results, the click-through rate of the target intervention strategy is calculated to obtain the intervention effectiveness index;
[0035] The intervention effect indicators are associated with the identifiers of the target intervention strategies to generate strategy effect records; these records are used to adjust the priority of strategies or update the content of strategies in the pre-set intervention strategy library.
[0036] In one embodiment, adjusting the priority of a preset intervention strategy library or updating its strategy content includes:
[0037] Based on the strategy effectiveness records, all strategies in the intervention strategy library are sorted by effectiveness indicators to obtain a strategy effectiveness ranking list.
[0038] Based on the strategy effect ranking list, the strategies with ranking positions lower than a preset threshold are marked to generate a set of to-be-optimized strategies.
[0039] By adjusting the content of the strategies in the set of to-be-optimized strategies, updated intervention strategies are generated.
[0040] In a second aspect, the present application further provides a user behavior analysis device based on machine learning, comprising:
[0041] A data acquisition module is configured to acquire original behavior data generated by a user in an interactive interface to obtain a fine-grained behavior event stream containing timestamps.
[0042] A behavior aggregation module is configured to aggregate the fine-grained behavior event stream to generate a standardized user behavior sequence.
[0043] A behavior segmentation module is configured to segment the standardized user behavior sequence through a sliding time window to obtain a plurality of behavior subsequences.
[0044] A feature extraction module is configured to extract time sequence features from the plurality of behavior subsequences respectively to obtain time sequence feature vectors; the time sequence feature vectors represent dynamic patterns of the behavior subsequences.
[0045] A hesitation prediction module is configured to input the time sequence feature vectors into a pre-trained hesitation recognition model to predict a hesitation probability, and generate a hesitation probability value corresponding to each behavior subsequence.
[0046] A state judgment module is configured to judge that the user is in a hesitation state when the hesitation probability value is greater than or equal to a preset hesitation threshold, and generate a hesitation judgment result.
[0047] A strategy matching module is configured to match a target intervention strategy from a preset intervention strategy library based on the hesitation judgment result and according to a current business scenario of the user; the target intervention strategy is used to present corresponding intervention content to the user to guide the user to complete a target conversion behavior.
[0048] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the user behavior analysis method based on machine learning of the first aspect when executing the computer program.
[0049] In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the user behavior analysis method based on machine learning of the first aspect.
[0050] The aforementioned machine learning-based user behavior analysis methods, devices, equipment, and media, by acquiring and standardizing fine-grained behavioral event streams, can accurately capture every user action on the interactive interface. By segmenting behavioral sequences using a sliding time window and extracting temporal features, the dynamic patterns of user behavior, especially the characteristics of hesitation behavior, are effectively captured. Furthermore, by leveraging a pre-trained hesitation recognition model to accurately predict user hesitation states, the system can promptly detect hesitation behavior at critical moments in user decision-making. Finally, by matching target intervention strategies based on the user's current business scenario, personalized guidance can be provided to help users successfully complete their target conversion behavior. This machine learning-based user behavior analysis method not only improves the accuracy and real-time performance of user behavior analysis but also enhances user experience and business conversion rates through precise intervention, effectively addressing the shortcomings of traditional methods in identifying user hesitation behavior and providing effective intervention. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 A flowchart illustrating a user behavior analysis method based on machine learning provided by this invention;
[0053] Figure 2 A flowchart illustrating a method for generating a pre-trained hesitation recognition model in an optional embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of the structure of a user behavior analysis device based on machine learning provided by the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0056] In one embodiment, such as Figure 1 As shown, a user behavior analysis method based on machine learning is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and further to a system including both a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0057] S111, acquire the original behavior data generated by the user in the interactive interface to obtain a fine-grained behavior event stream containing a timestamp.
[0058] Optionally, before acquiring the user operation behavior through preset burying points in the key elements of the interactive interface, the explicit authorization of the user based on the privacy policy needs to be acquired first to ensure that the data collection meets the requirements of data protection related regulations and confidentiality agreements. Only behavior events such as clicks, swipes, and stays and corresponding millisecond-level timestamps are captured during the acquisition process, and sensitive personal information such as user names and contact information is not collected; the user's unique identifier is processed using a hash algorithm for irreversible desensitization to avoid associating with the user's real identity. At the same time, the transmission of behavior data uses Transport Layer Security (TLS) encryption to ensure that the data is not stolen or tampered with during transmission, and the fine-grained behavior event stream formed finally only retains behavior features and timing information, which not only records the user's operation trajectory completely, but also strictly safeguards the user's information security.
[0059] S112, aggregate the fine-grained behavior event stream to generate a standardized user behavior sequence.
[0060] Optionally, during the behavior aggregation process, the fine-grained behavior event stream is first grouped according to the user's unique identifier (such as user ID, device ID) to ensure that the behaviors of the same user are processed in a centralized manner. Subsequently, invalid events such as repeated reporting due to network fluctuations and instantaneous operations due to accidental touches are filtered, and the event types are standardized named, such as "click" "click" unified as "click event", and the core parameters of the event are extracted, such as the coordinate range of the click position, the page name of the stay event, and finally arranged in ascending order of timestamp to form a user behavior sequence with uniform structure and clear timing.
[0061] S113, based on the standardized user behavior sequence, the sliding time window is divided to obtain multiple behavior subsequences.
[0062] Optionally, the sliding time window division needs to first set the window length and the sliding step, the window length can be determined according to the typical duration of user decision in the business scenario, such as the decision cycle of an e-commerce product page, and the sliding step is set according to the real-time requirement, such as sliding the window once every certain duration. In specific operation, starting from the starting timestamp of the standardized user behavior sequence, all behavior events within the window length are intercepted as the first subsequence; then the window is moved backward by the sliding step, and the behavior events in the subsequent corresponding period are intercepted, until the entire behavior sequence is covered, thereby obtaining multiple continuous and possibly overlapping behavior subsequences.
[0063] S114, respectively, time sequence feature extraction is carried out on the plurality of behavior sub-sequences, and a time sequence feature vector is obtained; the time sequence feature vector represents the dynamic mode of each behavior sub-sequence.
[0064] Optionally, the time sequence feature extraction extracts features from the time dimension and the event type dimension for each behavior sub-sequence. The time dimension features include the total number of events within the sub-sequence, the average interval length of adjacent events, the longest interval length, the standard deviation of the interval length, etc.; the event type dimension features include the occurrence frequency and proportion of each type of event, the conversion sequence of event types (such as the conversion mode of “click-swipe-click”), the number of occurrences of specific key events (such as the click of the add-to-cart button), etc. After quantifying the above features into numerical values, they are arranged in a predetermined order to form a fixed-dimension vector, i.e., a time sequence feature vector, to quantitatively represent the dynamic behavior mode of the sub-sequence.
[0065] S115, inputting the time sequence feature vector into a pre-trained hesitation recognition model to perform hesitation probability prediction, and generating a hesitation probability value corresponding to each behavior sub-sequence.
[0066] Optionally, the pre-trained hesitation recognition model can adopt a long short-term memory network (LSTM, Long Short-Term Memory), which captures long-term dependencies in time series data through a gating mechanism and is suitable for processing dynamic features of behavior sub-sequences. The training data of this model comes from labeled samples of historical user behavior, i.e., behavior sub-sequences with known hesitation or non-hesitation states and their corresponding time sequence feature vectors. After multiple rounds of iterative training, the model can learn the feature patterns corresponding to the hesitation state. After inputting the time sequence feature vector into the model, the output layer of the model maps the result to between 0 and 1 through a sigmoid function, and the obtained numerical value is the hesitation probability value corresponding to the behavior sub-sequence. The higher the value, the greater the possibility that the user is in a hesitation state.
[0067] S116, when the hesitation probability value is greater than or equal to a preset hesitation threshold, it is determined that the user is in a hesitation state, and a hesitation judgment result is generated.
[0068] Optionally, the preset hesitation threshold is determined by analyzing the probability distribution characteristics of the hesitation state and the non-hesitation state in the historical labeled data, and a value that can achieve the optimal balance between the model recognition accuracy and the recall rate is preferentially selected. When the hesitation probability value corresponding to the behavior sub-sequence reaches or exceeds the preset threshold, it is directly determined that the user is in a hesitation state within the time interval corresponding to the sub-sequence, and the generated hesitation judgment result only includes the “hesitation” state label and the specific time range corresponding to the state, which is defined by the start and end time stamps of the behavior sub-sequence, to ensure that the judgment result accurately corresponds to the threshold triggering condition.
[0069] S117, based on the hesitation judgment result, matching from a preset intervention strategy library according to a current business scene of the user to obtain a corresponding target intervention strategy; the target intervention strategy is used to present corresponding intervention content to the user to guide the user to complete a target conversion behavior.
[0070] Optionally, the identification of the business scene can be achieved by analyzing the page identifier (such as page ID, route path) of the current interaction interface, the core target (such as product browsing, order submission) of the current operation of the user, and the associated business attribute (such as product category, service type). In the preset intervention strategy library, the strategies are stored according to business scenes, and each scene is associated with multiple targeted strategies. For example, the e-commerce product browsing scene can be associated with strategies such as "showing user evaluation" and "providing coupons". When matching, the corresponding strategy set is first selected according to the current business scene, and then the confidence level of the hesitation judgment result, i.e. the hesitation probability value, is used to select the most suitable strategy from the set as the target intervention strategy, to ensure that the intervention content is consistent with the current scene and state of the user.
[0071] In the above-mentioned user behavior analysis method based on machine learning, through the collection and standardization processing of fine-grained behavior data, combined with the time sequence division and feature extraction of the sliding window, the pre-trained model is used to accurately identify the user hesitation state, and the targeted intervention strategy is matched based on the business scene, to realize the real-time and accurate judgment and effective guidance of the user hesitation state, thereby improving the completion efficiency of the user target conversion behavior.
[0072] In an optional embodiment, as shown in Figure 2 The construction steps of the pre-trained hesitation recognition model include:
[0073] S211, obtaining historical user behavior data and labeling the historical user behavior data to generate a sample data set containing hesitation labels.
[0074] Optionally, the historical accumulated fine-grained behavior event stream is extracted from the data storage system in priority, and these data need to contain complete user operation records and timestamp information to ensure the time sequence integrity and effectiveness of the data. In the labeling process, clear labeling specifications need to be formulated to determine the judgment features of the hesitation state, such as the operation stagnation time length of the user at the key decision node, repeated switching of the same function module, and multiple cancellation operations. In the labeling process, a combination of manual labeling and rule-assisted labeling can be used. First, the labeling personnel value the behavior sequence according to the specifications, and then the data with labeling contradictions or errors are removed through the preset verification rules, to finally form a sample data set in which each sample is associated with a "hesitation" or "non-hesitation" label, to ensure the accuracy and consistency of the sample labels.
[0075] S212, dividing the sample data set to obtain a training set and a validation set.
[0076] Optionally, the sample data set is divided in a stratified sampling manner, the core of which is to ensure that the proportion of samples with hesitation labels and non-hesitation labels in the training set and the validation set is consistent with that in the original sample data set, so as to avoid model training bias caused by unbalanced data distribution. In the division process, the proportion of the two types of labels in the original data is first counted, and then samples of corresponding quantities are extracted from the two types of label samples according to the proportion to form the training set and the validation set, so as to ensure that the validation set can truly reflect the generalization ability of the model in the actual scene.
[0077] S213, based on the training set, the initial time sequence neural network model is supervised training, and a trained hesitation recognition model is generated.
[0078] Optionally, the initial time sequence neural network model is preferably a long short-term memory network. Through the gating mechanism of the input gate, the forgetting gate and the output gate, the model can effectively capture the long-term dependence relationship in the time sequence data and adapt to the time sequence characteristics of the user behavior sequence. During training, the samples in the training set are first converted into standardized time sequence feature vectors as input data of the model; the output layer of the model maps the prediction result to the [0, 1] interval through the sigmoid function, and obtains the hesitation probability prediction value of the sample. The error between the prediction value and the true label of the sample is calculated by using the cross-entropy loss function, and the weight parameters of the model are updated iteratively by using the stochastic gradient descent optimizer, so as to continuously minimize the loss value until the convergence effect of the model on the training set reaches the preset standard, and the model training is completed.
[0079] S214, the performance of the trained hesitation recognition model is evaluated according to the validation set, and an evaluation result is obtained.
[0080] Optionally, during the evaluation process, accuracy, recall rate and F1 score are mainly used as core evaluation indexes, wherein the accuracy represents the proportion of samples predicted correctly by the model in the total samples, the recall rate represents the proportion of hesitation samples accurately identified by the model in all real hesitation samples, and the F1 score comprehensively reflects the balance level of the accuracy and the recall rate. The time sequence feature vectors in the validation set are input into the trained model to obtain the prediction labels of each sample, and by comparing the prediction labels with the true labels, the specific values of the above three indexes are calculated to form a complete evaluation result, so as to judge the generalization performance of the model on unseen data and the accuracy of the hesitation state recognition.
[0081] S215, based on the evaluation result, the hyperparameters of the initial time sequence neural network model are adjusted to obtain a pre-trained hesitation recognition model.
[0082] Optionally, hyperparameter adjustment needs to be carried out for key parameters of the initial model, including the number of hidden layer units of the long short-term memory network, the learning rate, the number of iterations, and the batch size, etc. By using grid search or random search, the preset hyperparameter combinations are traversed, the model is retrained for each set of hyperparameters, and the performance is evaluated through the validation set. According to the evaluation results, the optimal hyperparameter combination is selected, for example, if the model has underfitting problem, the number of hidden layer units or the number of iterations can be appropriately increased; if the training process is violent, the learning rate can be reduced. Through multiple rounds of parameter adjustment, the evaluation index of the model on the validation set is optimized, and finally a pre-trained hesitation recognition model with stable performance is obtained.
[0083] In the above embodiments, through standardized sample construction, scientific data division, accurate model training, comprehensive performance evaluation, and targeted hyperparameter optimization, the pre-training process of the hesitation recognition model is completed, and the accuracy and generalization ability of the model in recognizing the user's hesitation state are effectively improved.
[0084] In one of the embodiments, the construction steps of the preset intervention strategy library include:
[0085] S311, according to different business scenario types, creating a strategy classification directory to obtain the strategy classification directory.
[0086] Optionally, the core classification dimensions of the business scenario are first sorted out, which can usually be divided according to the core business target, the user operation stage, or the service type, and exemplarily covers the product browsing, order settlement, and after-sales consultation scenarios in the e-commerce field, the course selection, payment opening, and learning Q&A scenarios in the online education field, etc. For each sorted scenario type, a unique scenario identification code is assigned, and the core feature description of the scenario is supplemented, such as the typical operation path of the user in the scenario, the key decision node, and other information, to finally construct a strategy classification directory with clear hierarchy and explicit classification, ensuring that each business scenario can correspond to a dedicated strategy classification branch.
[0087] S312, for each category in the strategy classification directory, one or more specific intervention strategies are configured to generate an initial strategy set.
[0088] Optionally, for each category in the strategy classification directory, specific intervention strategies are designed in combination with the user demand and decision pain points of the business scenario corresponding to the category. For example, the product browsing scenario can be configured with strategies such as "showing real product evaluations", "pushing time-limited preferential information", and "providing same-category product comparison recommendations", and the order settlement scenario can be configured with strategies such as "answering payment security questions", "showing logistics time efficiency guarantees", and "providing order splitting and merging solutions". Each strategy needs to clearly define its core intervention direction to ensure that the strategy can accurately target the hesitation points that the user may have in the scenario. All configured strategies are classified according to the category to form an initial strategy set.
[0089] S313, define the trigger condition, intervention content and execution parameter corresponding to each intervention strategy in the initial strategy set, to obtain a structured intervention strategy entry.
[0090] Optionally, the trigger condition needs to specify the prerequisite for the policy to take effect, which can be defined as the judgment result of the user hesitation state (such as the hesitation probability reaching the preset threshold), the occurrence of a specific behavior event (such as returning to the commodity list page for three times in a row), or a specific stage of the business scenario (such as not operating after entering the order payment page). The intervention content needs to determine the specific presentation form and core information, such as text prompts, pop-up window displays, sidebar recommendations, and the like, as well as the corresponding script content, image materials, or function entry links. The execution parameter includes the display duration, push frequency, display position (such as the top, middle pop-up window, or bottom floating window of the page), priority ranking, and the like. Organize the above information in a unified structured format, with each strategy corresponding to an entry containing a strategy ID, a trigger condition expression, intervention content details, and execution parameter configuration, to form a structured intervention strategy entry.
[0091] S314, store all structured intervention strategy entries to obtain a preset intervention strategy library.
[0092] Optionally, a database suitable for structured data storage is used for storage, and a relational database or a non-relational database can be selected according to the needs of the business for query efficiency and scalability. When storing, a multi-dimensional index is established for each structured intervention strategy entry, such as according to the business scenario category identifier, strategy ID, and trigger condition type, to facilitate subsequent quick retrieval and matching. At the same time, a data integrity verification mechanism is set up to automatically verify whether the entry has information missing, format errors, and the like during storage, to ensure that all entries meet the preset specifications. After storage is completed, a preset intervention strategy library that can be dynamically called and easily managed is formed, supporting subsequent query, modification, and addition operations of the strategy according to business needs.
[0093] In the above embodiments, the strategy directory is constructed according to the business scenario classification, the intervention strategy is configured specifically, and the key attributes are specified, and finally the structured strategy entry is stored, realizing the precise binding and efficient management of the intervention strategy and the business scenario, and effectively improving the accuracy and response efficiency of the intervention strategy call.
[0094] In one of the embodiments, based on the hesitation judgment result, the corresponding target intervention strategy is obtained from the preset intervention strategy library according to the current business scenario in which the user is located, including:
[0095] S411. Based on the user's current business scenario, select multiple intervention strategies related to the business scenario from the preset intervention strategy library to obtain a candidate intervention strategy set.
[0096] Optionally, the specific business scenario is determined by parsing the page identifier, core interactive behavior, and associated business attributes of the current user's operation. Using the unique identifier corresponding to this scenario, pre-defined scenario-related tags are retrieved from a pre-defined intervention strategy library. Each strategy in the intervention strategy library is pre-bound with the identifier information of its associated business scenario. Through precise matching or fuzzy matching, all intervention strategies consistent with the current business scenario tags are selected. These strategies collectively constitute a candidate intervention strategy set, ensuring that all strategies within the set are suitable for the current user's business environment.
[0097] S412. For each strategy in the candidate intervention strategy set, query the intervention effect indicators of the strategy in historical applications for user groups with the same user profile labels, and obtain historical effect data.
[0098] Optionally, user profile tags are first extracted. These tags are generated by aggregating information such as the user's historical behavior data, preference settings, and basic attributes, covering key dimensions such as consumption level, operating habits, and interests. Based on these profile tags, the historical execution record database of strategies is queried to filter out user groups whose profile tags are completely consistent with or highly similar to the current user's. The intervention effect indicators of each strategy in the candidate strategy set for this group are extracted. These effect indicators include click-through rate, target conversion completion rate, and user dwell time improvement rate. These indicators together constitute the historical effect data corresponding to each strategy.
[0099] S413. The historical performance data of each strategy is weighted and fused with the corresponding hesitation probability value to obtain a comprehensive recommendation score for each strategy. The comprehensive recommendation score is calculated using the following formula:
[0100]
[0101] in, For strategy The overall recommendation score, For strategy Historical performance data, This provides the global average performance data for all strategies. For strategy The number of times it has been executed in history It is a smoothing hyperparameter.
[0102] Optionally, the weight allocation logic is based on the sufficiency and reliability of historical execution data of the strategy. Among these, Representative strategy The more times the strategy has been executed in history, the richer the historical performance data accumulated in real-world scenarios, indicating its richer historical performance. The higher the credibility, the less credible it is; conversely, if Less, only rely on Bias may be caused by insufficient data samples. Smoothing hyperparameters. Its function is to When the weighting is small, avoid excessive weighting. ,pass The weighting introduces a global averaging effect. This represents the overall average performance of all strategies, serving as a benchmark when data is insufficient and balancing individual data fluctuations. The above allocation method results in a comprehensive score. When there is sufficient historical data for a strategy, it mainly reflects its actual effect; when there is insufficient data, it refers more to the general performance of the whole, which not only ensures that the score reflects the characteristics of the individual strategy, but also reduces the small sample bias through the global benchmark, making the recommendation results more robust and reliable.
[0103] S414. Based on the set of candidate intervention strategies, select the strategy with the highest comprehensive recommendation score to obtain the corresponding target intervention strategy.
[0104] Optionally, the comprehensive recommendation scores of all strategies in the candidate intervention strategy set are sorted in descending order. If there are ties in scores during the sorting process, the strategy with more historical executions can be prioritized to ensure the reliability of the strategy. After sorting, the strategy with the highest ranking is selected as the target intervention strategy. This strategy is the optimal intervention plan in the current business scenario, combining historical effects and user profiles, and can best meet user needs and improve the effectiveness of intervention guidance.
[0105] In the above embodiments, candidate strategies are accurately screened through business scenarios, historical performance data is matched with user profiles, and the optimal strategy is selected by weighted fusion calculation. This achieves a high degree of adaptation between the intervention strategy and the user scenario and its own characteristics, effectively improving the pertinence and effectiveness of the intervention strategy and providing a scientific basis for strategy selection to guide users to complete the target conversion behavior.
[0106] In one embodiment, after matching the user's current business scenario with a pre-set intervention strategy library based on the hesitation judgment result, the process further includes:
[0107] S511. Obtain subsequent behavioral data generated by the user after implementing the target intervention strategy.
[0108] Optionally, by presetting the intervention content and subsequent key operation node, the user behavior data is continuously captured, including the user's click, browse, ignore and other operations on the intervention content, as well as the full-link behavior of page jump, function trigger, order submission and the like generated in the subsequent interaction interface. All captured behavior data is attached with a unique strategy execution session identifier, which corresponds to the target intervention strategy executed, ensuring that the user feedback data of a specific strategy can be accurately associated and the user behavior trajectory after intervention can be completely obtained.
[0109] S512, based on the subsequent behavior data, whether the user completes the target conversion behavior within the preset time window is judged, and a conversion judgment result is generated.
[0110] Optionally, the preset time window needs to be reasonably set according to the target conversion period of the business scenario, for example, the e-commerce ordering scenario can be set to a reasonable time length from the execution of the intervention strategy to the user's possible payment. The target conversion behavior needs to be defined in advance, which can be determined according to the business target, such as product ordering, course purchase, form submission and other core value behaviors. By searching the subsequent behavior data for whether there is an operation record that meets the definition of the target conversion behavior and the operation occurs within the preset time window, if there is, it is determined as a successful conversion, otherwise it is a conversion failure, and a clear conversion judgment result is generated accordingly.
[0111] S513, according to the conversion judgment result, the click-through rate of the target intervention strategy is calculated, and the intervention effect index is obtained.
[0112] Optionally, the calculation of the click-through rate is based on the reach and feedback data of the intervention strategy, and the specific formula is: click-through rate = number of users who click the intervention content ÷ number of users who successfully receive the intervention content x 100%. Among them, the number of users who successfully receive the intervention content refers to the cumulative number of users to whom the intervention content has been normally displayed, and the number of users who click the intervention content is the cumulative number of users who click the intervention content selected from the subsequent behavior data. Combined with the conversion judgment result, the conversion completion rate and other auxiliary indexes can be further calculated to form an intervention effect index system that comprehensively reflects the intervention effect.
[0113] S514, the intervention effect index is associated with the identifier of the target intervention strategy executed, and a strategy effect record is generated; the strategy effect record is used for strategy priority adjustment or strategy content update of the preset intervention strategy library.
[0114] Optionally, the policy identifier is a unique code assigned to each intervention policy for precise positioning of the specific policy in the intervention policy library. The calculated intervention effect indicator is associated and bound with the code, while the corresponding business scenario information, user portrait label and preset time window parameters of the policy execution are recorded to form a complete policy effect record. This record will serve as the core data basis for subsequent priority adjustment of policies in the intervention policy library, optimization or replacement of inefficient policies, and ensure that the policy library can continuously adapt to changes in business needs.
[0115] In the above embodiments, by collecting user behavior data after intervention, accurately judging the target conversion effect and quantitatively calculating the intervention indicators, and finally forming a clear policy effect record, the closed-loop tracking and evaluation of intervention policy effect is realized, providing reliable data support for dynamic optimization of the intervention policy library, and further improving the adaptability and conversion guiding effect of subsequent intervention policies.
[0116] In one of the embodiments, the strategy priority adjustment or strategy content update of the preset intervention policy library includes:
[0117] S611, according to the policy effect record, the effect indicators of all strategies in the intervention policy library are sorted to obtain a policy effect sorting list.
[0118] Optionally, the core intervention effect indicators in the policy effect record are selected as the sorting basis, usually with conversion completion rate as the primary sorting dimension, supplemented by click-through rate, user stay time improvement rate and other auxiliary indicators to build a multi-dimensional sorting system. Specifically, all strategies are sorted in descending order according to the core indicators, and for strategies with the same core indicator value, the strategies are sorted in turn according to the priority of the auxiliary indicators, ensuring that the sorting result can fully reflect the actual application value of the strategy. Through this sorting logic, all strategies in the intervention policy library are sorted into an ordered policy effect sorting list, clearly presenting the effect level of each strategy.
[0119] S612, based on the policy effect sorting list, strategies with a sorting position lower than a preset threshold are marked to generate a set of strategies to be optimized.
[0120] Optionally, the preset threshold needs to be determined comprehensively considering the overall size of the intervention policy library, the minimum requirement of the business for the policy effect and the industry benchmark level, which can be set in the form of ranking percentage or specific ranking position. Based on the policy effect sorting list, the sorting position of each strategy is compared with the preset threshold one by one, and the strategies with a sorting position lower than the preset threshold are uniformly marked. The marking information needs to include the policy identifier, the current effect indicator value and the corresponding business scenario. All marked strategies are summarized to generate a set of strategies to be optimized.
[0121] S613, generating an updated intervention strategy by adjusting the content of the strategy in the set of strategies to be optimized.
[0122] Optionally, for each strategy in the set of strategies to be optimized, the core reasons for poor effectiveness are analyzed in combination with the corresponding strategy effectiveness record and the business scenario to which it belongs, such as mismatch between trigger condition and user behavior, disconnection between intervention content and user demand, unreasonable execution parameter settings, etc. Corresponding optimization measures are taken for specific problems. If only partial adjustment is needed, the trigger condition expression of the strategy can be modified, the copy or material of the intervention content can be optimized, the display position and frequency of the execution parameters can be adjusted, etc. If there is a fundamental defect in the existing strategy logic, a new intervention strategy content is replaced by referring to the design ideas of high-effect strategies in the same scenario. The optimized strategy needs to maintain the same structured format as the original strategy to ensure seamless integration into the intervention strategy library.
[0123] In the above embodiments, low-effect strategies are screened out by accurately sorting the strategy effectiveness, and are modified or replaced for optimization, realizing dynamic iterative updating of the intervention strategy library, effectively eliminating low-effect strategies and improving the overall quality of the intervention strategy library.
[0124] In the above method, device, equipment and medium for analyzing user behavior based on machine learning, the user's fine-grained behavior event stream is obtained and standardized as a behavior sequence, the behavior dynamic pattern is captured by using a sliding time window division and a timing feature extraction, and the user's hesitation state is accurately predicted by using a pre-trained hesitation recognition model. At the same time, based on the business scenario, the optimal target intervention strategy is selected from the preset intervention strategy library by weighted calculation of historical effectiveness and global effectiveness, and the effectiveness is evaluated by subsequent behavior data to continuously optimize the strategy library, forming a complete closed loop from behavior analysis, state recognition to intervention optimization. The technical scheme effectively solves the problems of misjudgment and missed judgment of the hesitation state caused by relying on single macro data and fixed rules in the prior art, and the problem of lack of scene pertinence of intervention strategies, realizes accurate recognition of the user's hesitation state and personalized intervention guidance, and improves the completion efficiency of the user's target conversion behavior.
[0125] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least some of the other steps or steps or stages in other steps.
[0126] Based on the same inventive concept, the embodiments of the present application also provide a device for implementing the above-mentioned machine learning-based user behavior analysis method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more machine learning-based user behavior analysis device embodiments provided below can refer to the limitations of the machine learning-based user behavior analysis method described above, and will not be repeated here.
[0127] In an exemplary embodiment, as shown in Figure 3 a machine learning-based user behavior analysis device 10 is provided, comprising:
[0128] a data acquisition module 11, configured to acquire original behavior data generated by a user on an interaction interface to obtain a fine-grained behavior event stream containing a timestamp;
[0129] a behavior aggregation module 12, configured to perform behavior aggregation on the fine-grained behavior event stream to generate a standardized user behavior sequence;
[0130] a behavior segmentation module 13, configured to segment the standardized user behavior sequence by a sliding time window to obtain a plurality of behavior sub-sequences;
[0131] a feature extraction module 14, configured to respectively perform time sequence feature extraction on the plurality of behavior sub-sequences to obtain time sequence feature vectors; the time sequence feature vectors represent dynamic patterns of the behavior sub-sequences;
[0132] a hesitation prediction module 15, configured to input the time sequence feature vectors into a pre-trained hesitation recognition model to predict a hesitation probability, and generate a hesitation probability value corresponding to each behavior sub-sequence;
[0133] a state judgment module 16, configured to judge that the user is in a hesitation state and generate a hesitation judgment result when the hesitation probability value is greater than or equal to a preset hesitation threshold;
[0134] The policy matching module 17 is configured to match, based on the hesitation judgment result, from a preset intervention policy library according to a current service scenario in which the user is located, to obtain a corresponding target intervention policy; the target intervention policy is configured to present corresponding intervention content to the user to guide the user to complete a target conversion behavior.
[0135] In one of the embodiments, the hesitation prediction module comprises:
[0136] The data labeling unit is configured to obtain historical user behavior data and label the historical user behavior data to generate a sample data set containing a hesitation label.
[0137] The data division unit is configured to divide the sample data set to obtain a training set and a verification set.
[0138] The model training unit is configured to supervise training of the initial time series neural network model based on the training set to generate a trained hesitation recognition model.
[0139] The performance evaluation unit is configured to evaluate the performance of the trained hesitation recognition model based on the verification set to obtain an evaluation result.
[0140] The parameter adjustment unit is configured to adjust the hyperparameters of the initial time series neural network model based on the evaluation result to obtain a pre-trained hesitation recognition model.
[0141] In one of the embodiments, the policy matching module comprises:
[0142] The policy classification unit is configured to create a policy classification directory according to different service scenario types to obtain the policy classification directory.
[0143] The policy configuration unit is configured to configure one or more specific intervention policies for each category in the policy classification directory to generate an initial policy set.
[0144] The policy definition unit is configured to define the trigger condition, intervention content and execution parameter corresponding to each intervention policy in the initial policy set to obtain a structured intervention policy item.
[0145] The policy storage unit is configured to store all the structured intervention policy items to obtain a preset intervention policy library.
[0146] In one of the embodiments, the policy matching module comprises:
[0147] The policy screening unit is configured to screen, from the preset intervention policy library, a plurality of intervention policies associated with the service scenario in which the user is currently located to obtain a candidate intervention policy set.
[0148] An effect query unit is configured to query, for each strategy in the set of candidate intervention strategies, an intervention effect indicator of the strategy in historical applications for a user group having the same user portrait label, to obtain historical effect data;
[0149] A score calculation unit is configured to weight and fuse the historical effect data of each strategy and the corresponding hesitation probability value, to obtain a comprehensive recommendation score of each strategy. The comprehensive recommendation score is obtained by the following calculation formula:
[0150]
[0151] wherein, is the comprehensive recommendation score of the strategy , the historical effect data of the strategy , the global average effect data of all strategies, is the historical execution times of the strategy , and is a smoothing hyperparameter. A strategy selection unit is configured to select, based on the set of candidate intervention strategies, a strategy with the highest comprehensive recommendation score, to obtain a corresponding target intervention strategy.
[0152] In one of the embodiments, the strategy matching module further includes:
[0153] A data acquisition unit is configured to acquire subsequent behavior data generated by a user after executing the target intervention strategy.
[0154] A conversion judgment unit is configured to judge, based on the subsequent behavior data, whether the user completes a target conversion behavior within a preset time window, to generate a conversion judgment result.
[0155] An effect calculation unit is configured to calculate, according to the conversion judgment result, a click-through rate of the target intervention strategy, to obtain an intervention effect indicator.
[0156] A record generation unit is configured to associate the intervention effect indicator with an identifier of the executed target intervention strategy, to generate a strategy effect record. The strategy effect record is used to adjust a strategy priority or update a strategy content of a preset intervention strategy library.
[0157] In one of the embodiments, the record generation unit includes:
[0158] A sorting subunit is configured to sort, according to the strategy effect record, all strategies in the intervention strategy library according to the effect indicators, to obtain a strategy effect sorting list.
[0159]
[0160] The marking sub-unit is configured to mark a policy whose ranking position is lower than a preset threshold based on the policy effect ranking list, and generate a set of to-be-optimized policies.
[0161] The policy updating sub-unit is configured to generate an updated intervention policy by adjusting the content of the policy in the set of to-be-optimized policies.
[0162] In an embodiment, a computer device is provided, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the machine learning based user behavior analysis method as described above when executing the computer program.
[0163] In an embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the steps of the machine learning based user behavior analysis method as described above.
[0164] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts are described in the part of the method embodiment. The device embodiment described above is merely illustrative, wherein the components described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., they can be located in one place or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present disclosure according to actual needs. Those skilled in the art can understand and implement it without creative labor.
[0165] The above described embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the patent scope of the application. It should be pointed out that, for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application.
Claims
1. A user behavior analysis method based on machine learning, characterized in that, The method includes: Obtain raw behavioral data generated by users in the interactive interface to obtain a fine-grained behavioral event stream containing timestamps; The fine-grained behavioral event stream is aggregated to generate a standardized user behavior sequence; Based on the standardized user behavior sequence, multiple behavior sub-sequences are obtained by segmenting the sequence using a sliding time window; Temporal features are extracted from the multiple behavioral subsequences to obtain temporal feature vectors; the temporal feature vectors represent the dynamic patterns of each behavioral subsequence. The time-series feature vector is input into a pre-trained hesitation recognition model to predict the hesitation probability, generating hesitation probability values corresponding to each behavioral subsequence. When the hesitation probability value is greater than or equal to the preset hesitation threshold, the user is determined to be in a hesitant state, and a hesitation judgment result is generated. Based on the hesitation judgment result, and according to the user's current business scenario, a matching is performed from a preset intervention strategy library to obtain the corresponding target intervention strategy; the target intervention strategy is used to present the corresponding intervention content to the user in order to guide the user to complete the target conversion behavior.
2. The method according to claim 1, characterized in that, The steps for constructing the pre-trained hesitation recognition model include: Acquire historical user behavior data, annotate the historical user behavior data, and generate a sample dataset containing hesitation labels; The sample dataset is divided into a training set and a validation set; Based on the training set, supervised training is performed on the initial temporal neural network model to generate a trained hesitation recognition model; The performance of the trained hesitation recognition model is evaluated based on the validation set to obtain the evaluation results; Based on the evaluation results, the hyperparameters of the initial temporal neural network model are adjusted to obtain the pre-trained hesitation recognition model.
3. The method according to claim 1, characterized in that, The construction steps of the preset intervention strategy library include: Create a strategy category directory based on different business scenario types; For each category in the strategy classification directory, configure one or more specific intervention strategies to generate an initial strategy set; The triggering conditions, intervention content, and execution parameters of each intervention strategy in the initial strategy set are defined to obtain structured intervention strategy entries; All structured intervention strategy entries are stored to obtain the preset intervention strategy library.
4. The method according to claim 1, characterized in that, Based on the hesitation judgment result, and according to the user's current business scenario, a matching strategy is obtained from a preset intervention strategy library, including: Based on the user's current business scenario, multiple intervention strategies associated with the business scenario are selected from the preset intervention strategy library to obtain a candidate intervention strategy set; For each strategy in the candidate intervention strategy set, query the intervention effect index of the strategy in historical applications for user groups with the same user profile labels to obtain historical effect data. The historical performance data of each strategy is weighted and fused with the corresponding hesitation probability value to obtain the comprehensive recommendation score for each strategy; the comprehensive recommendation score is obtained by the following formula: in, For strategy The overall recommendation score, For strategy Historical performance data, This provides the global average performance data for all strategies. For strategy The number of times it has been executed in history It is a smooth hyperparameter; Based on the set of candidate intervention strategies, the strategy with the highest comprehensive recommendation score is selected to obtain the corresponding target intervention strategy.
5. The method according to claim 1, characterized in that, After determining the target intervention strategy based on the hesitation judgment result and the user's current business scenario, the process further includes: Acquire subsequent behavioral data generated by the user after the implementation of the target intervention strategy; Based on the subsequent behavior data, determine whether the user has completed the target conversion behavior within a preset time window, and generate a conversion judgment result; Based on the conversion judgment results, the click pass rate of the target intervention strategy is calculated to obtain the intervention effect index; The intervention effect indicators are associated with the identifiers of the target intervention strategies being implemented to generate strategy effect records; the strategy effect records are used to adjust the strategy priorities or update the strategy content of the preset intervention strategy library.
6. The method according to claim 5, characterized in that, The step of adjusting the priority of the preset intervention strategy library or updating the strategy content includes: Based on the strategy effect records, all strategies in the intervention strategy library are sorted by effect indicators to obtain a strategy effect ranking list. Based on the strategy effect ranking list, strategies whose ranking position is lower than a preset threshold are marked to generate a set of strategies to be optimized. By adjusting the strategy content in the set of strategies to be optimized, an updated intervention strategy is generated.
7. A user behavior analysis device based on machine learning, characterized in that, The device includes: The data acquisition module is used to acquire raw behavioral data generated by users in the interactive interface and obtain a fine-grained behavioral event stream containing timestamps. The behavior aggregation module is used to aggregate the fine-grained behavior event stream to generate standardized user behavior sequences; The behavior segmentation module is used to segment the standardized user behavior sequence using a sliding time window to obtain multiple behavior sub-sequences. The feature extraction module is used to extract temporal features from the multiple behavioral sub-sequences to obtain temporal feature vectors; the temporal feature vectors represent the dynamic patterns of each behavioral sub-sequence. The hesitation prediction module is used to input the time-series feature vector into the pre-trained hesitation recognition model to predict the hesitation probability and generate the hesitation probability value corresponding to each behavior subsequence. The state judgment module is used to determine that the user is in a hesitant state when the hesitancy probability value is greater than or equal to a preset hesitancy threshold, and to generate a hesitancy judgment result. The strategy matching module is used to match the user's current business scenario with a preset intervention strategy library based on the hesitation judgment result, and obtain the corresponding target intervention strategy. The target intervention strategy is used to present the corresponding intervention content to the user to guide the user to complete the target conversion behavior.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.
Citation Information
Cited By
Marketing strategy generation method and system based on user behavior sequence
CN121660773A
Automobile customer intelligent interaction system and method based on large model technology
CN122222624A