User login behavior analysis method, device, system and storage medium
By analyzing the user's online behavior data, using the target learning model and the Hidden Markov model to predict the user's future login behavior, the problem of difficulty in analyzing the user's future login behavior in the existing technology is solved, and the effectiveness of the recommendation strategy and user experience are improved.
Patent Information
- Application Number
- CN201910636193.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-15
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2039-07-15
AI Technical Summary
The existing technology is difficult to analyze the user's future login behavior, resulting in poor recommendation strategies.
By obtaining the user's online behavior data, analyzing the user's future purchase intention value using the target learning model, and building a hidden Markov model to predict the user's future login situation.
It realizes accurate analysis of users' future login behavior, improves the conversion effect of recommendation strategies, and improves the user experience.
Smart Images

Figure CN112231548B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, system and storage medium for analyzing user login behavior. Background Art
[0002] More and more user data is recorded on the Internet. The user's search, click, purchase and other behavior data on the website reflect the user's interest and demand for the product. By analyzing and modeling a series of user behavior data, we can analyze the degree of user interest in products and websites, thereby providing data support for user recommendations and website promotion.
[0003] At present, deep learning models are generally used to analyze massive amounts of online user data, and then analyze the products that users may order.
[0004] However, this method can only analyze the purchase behavior of logged-in users, and it is difficult to analyze the user's login behavior in the future. Therefore, it is impossible to make recommendations in advance to users who may log in, making the recommendation strategy ineffective. Summary of the invention
[0005] The present invention provides a method, device, system and storage medium for analyzing user login behavior, which can analyze the login status in the future stage according to the user's online behavior data, so as to make accurate recommendations to the user according to the user's login status in the future stage, improve the conversion effect of the recommendation strategy, and provide a good user experience.
[0006] In a first aspect, an embodiment of the present invention provides a method for analyzing user login behavior, comprising:
[0007] Obtain the user's online behavior data within a preset time period;
[0008] Analyze the user's purchase intention value in the future stage through the target learning model based on the online behavior data;
[0009] Constructing a hidden Markov model according to the purchase intention value of the user in the future stage;
[0010] The hidden Markov model is used to analyze the user's login status in the future stage.
[0011] In a possible design, the online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of added products.
[0012] In one possible design, it also includes:
[0013] Build training samples based on the user's historical online behavior data;
[0014] Taking the actual order record as the target output result, the initial learning model constructed by iterative training of the training samples is performed until the error between the analysis result output by the trained initial learning model and the actual order record is less than a preset threshold; the target learning model is obtained.
[0015] In a possible design, based on the online behavior data, the user's purchase intention value in the future stage is analyzed through a target learning model, including:
[0016] According to the online behavior data, the purchase intention value in each future time period is analyzed respectively through the target learning model; wherein the purchase intention value is used to represent the possibility of the user to purchase the product in the corresponding time period.
[0017] In a possible design, a hidden Markov model is constructed according to the purchase intention value of the user in the future stage, including:
[0018] According to the purchase intention value of the user in the future stage, a state transfer matrix is constructed; the state transfer matrix is used to characterize the possibility of conversion between the purchase intention values in each time period;
[0019] According to the purchase intention value of the user in the future stage and the historical login behavior of the user, an observation matrix is constructed; the observation matrix is used to characterize the future login situation of the user under different purchase intention values;
[0020] Set the initial state vector;
[0021] A hidden Markov model is constructed by using the state transfer matrix, the observation matrix and the initial state vector.
[0022] In a second aspect, an embodiment of the present invention provides a device for analyzing user login behavior, including:
[0023] An acquisition module is used to acquire the online behavior data of users within a preset time period;
[0024] A first analysis module is used to analyze the user's purchase intention value in the future stage through a target learning model based on the online behavior data;
[0025] A construction module, used for constructing a hidden Markov model according to the purchase intention value of the user in the future stage;
[0026] The second analysis module is used to analyze the user's login status in the future stage through the hidden Markov model.
[0027] In a possible design, the online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of added products.
[0028] In a possible design, the system further includes a training module for:
[0029] Build training samples based on the user's historical online behavior data;
[0030] Taking the actual order record as the target output result, the initial learning model constructed by iterative training of the training samples is performed until the error between the analysis result output by the trained initial learning model and the actual order record is less than a preset threshold; the target learning model is obtained.
[0031] In a possible design, the first analysis module is specifically used to:
[0032] According to the online behavior data, the purchase intention value in each future time period is analyzed respectively through the target learning model; wherein the purchase intention value is used to represent the possibility of the user to purchase the product in the corresponding time period.
[0033] In a possible design, the building block is specifically used to:
[0034] According to the purchase intention value of the user in the future stage, a state transfer matrix is constructed; the state transfer matrix is used to characterize the possibility of conversion between the purchase intention values in each time period;
[0035] According to the purchase intention value of the user in the future stage and the historical login behavior of the user, an observation matrix is constructed; the observation matrix is used to characterize the future login situation of the user under different purchase intention values;
[0036] Set the initial state vector;
[0037] A hidden Markov model is constructed by using the state transfer matrix, the observation matrix and the initial state vector.
[0038] In a third aspect, an embodiment of the present invention provides a user login behavior analysis system, comprising: a memory and a processor, wherein the memory stores executable instructions of the processor; wherein the processor is configured to execute the user login behavior analysis method described in any one of the first aspects by executing the executable instructions.
[0039] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for analyzing user login behavior described in any one of the first aspects.
[0040] In a fifth aspect, an embodiment of the present invention provides a program product, comprising: a computer program, wherein the computer program is stored in a readable storage medium, and at least one processor of a server can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the server executes any method for analyzing user login behavior described in the first aspect.
[0041] The present invention provides a method, device, system and storage medium for analyzing user login behavior, which obtains the online behavior data of users within a preset time period; analyzes the purchase intention value of users in the future stage through a target learning model based on the online behavior data; constructs a hidden Markov model based on the purchase intention value of the users in the future stage; and analyzes the login status of users in the future stage through the hidden Markov model. The present invention can analyze the login status in the future stage based on the online behavior data of users, so as to make accurate recommendations to users based on the login status in the future stage of users, improve the conversion effect of the recommendation strategy, and provide a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a schematic diagram of the principle of an application scenario of the present invention;
[0043] Figure 2 A flowchart of a method for analyzing user login behavior provided in Embodiment 1 of the present invention;
[0044] Figure 3 A schematic diagram of the principle of a state transition matrix provided in an embodiment of the present invention;
[0045] Figure 4 A flowchart of a method for analyzing user login behavior provided in Embodiment 2 of the present invention;
[0046] Figure 5 A schematic diagram of the structure of a device for analyzing user login behavior provided in Embodiment 3 of the present invention;
[0047] Figure 6 A schematic diagram of the structure of a device for analyzing user login behavior provided in Embodiment 4 of the present invention;
[0048] Figure 7 This is a structural diagram of a system for analyzing user login behavior provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] In order to facilitate the understanding of the technical solution, the professional terms appearing in the present invention are explained.
[0052] 1) Hidden Markov Model (HMM) is a statistical model in which the system being modeled is considered to be a Markov process with unobserved (hidden) states. It is used to describe a Markov process with hidden unknown parameters. The difficulty is to determine the hidden parameters of the process from the observable parameters. These parameters are then used for further analysis, such as pattern recognition.
[0053] 2) Random Forest refers to an algorithm that uses multiple decision trees to train and analyze samples. In other words, the random forest algorithm is an algorithm that contains multiple decision trees, and its output category is determined by the multiple trees of the category output by individual decision trees. In the Sklearn module library, the functions related to the random forest algorithm are all located in the integrated algorithm module ensemble. The related algorithm functions include the random forest algorithm (RandomForestClassifier), the bagging algorithm (BaggingClassifier), the completely random tree algorithm (ExtraTreesClassifier), the iterative algorithm (Adaboost), the GBT gradient boosting tree algorithm (GradientBoostingClassifier), the gradient regression algorithm (GradientBoostingRegressor), and the voting algorithm (VotingClassifier).
[0054] 3) The state transfer matrix was proposed by the Russian mathematician Markov, who discovered in the early 20th century that in the process of transferring certain factors of a system, the nth result is only affected by the n-1th result, that is, it is only related to the current state, but not to the past state. In Markov analysis, the concept of state transfer is introduced. The so-called state refers to the state in which objective things may appear or exist; state transfer refers to the transfer of objective things from one state to another.
[0055] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0056] More and more user data is being recorded on the Internet. The user's search, click, purchase and other behavioral data on the website reflect the user's interest and demand for the product. By analyzing and modeling a series of user behavior data, we can analyze the degree of user interest in products and websites, thereby providing data support for user recommendations, website promotion, etc. At present, it is generally combined with a deep learning model to analyze the massive amount of online data of users, and then analyze the products that users may order to purchase. However, this method can only analyze the purchase behavior of logged-in users, and it is difficult to analyze the user's login behavior in the future stage. Therefore, it is impossible to make recommendations to users who may log in in advance, making the recommendation strategy ineffective.
[0057] The user login behavior of e-commerce is closely related to the user's willingness to buy. The willingness to buy is reflected in the user's browsing of products, ordering of products, attention to products, adding to purchases, and reducing purchases. These shopping behaviors can be used to build a supervised learning model. Through the random forest algorithm, the user's purchase intention value can be obtained. Then, the hidden state is defined based on these purchase intention values. Over time, a hidden state sequence is obtained; the user's login behavior can be regarded as an observable state. This behavior pattern conforms to the typical hidden Markov process. For example, when a user buys some daily necessities, he will log in to the e-commerce for several days to browse, pay attention, add to purchase, reduce purchases, and place orders; if the user wants to buy a mobile notebook, the price is about 10,000 yuan, the user will be very cautious, and the number of times the user logs in to the e-commerce will last for about a month, or even longer, but the login frequency may not be very high.
[0058] In response to the above technical problems, the present invention provides a method, device, system and storage medium for analyzing user login behavior, which can analyze the login status in the future stage based on the user's online behavior data, so as to make accurate recommendations to the user based on the user's login status in the future stage, improve the conversion effect of the recommendation strategy, and provide a good user experience.
[0059] Figure 1 It is a schematic diagram of the principle of an application scenario of the present invention, such as Figure 1 As shown in the figure, the whole figure is divided into two parts, one is user behavior and the other is the hidden Markov model. The hidden Markov model is divided into two rows of sequences, the first row is the X sequence and the second row is the Y sequence. Each y has an x pointing to it, each y also has another y pointing to it, and each x also has a user behavior set pointing to it.
[0060] The following definitions are given:
[0061] State sequence: The state sequence randomly generated by the hidden Markov chain is called state sequence
[0062] Observation sequence: Each state generates an observation, and the resulting random sequence of observations is called the observation sequence.
[0063] Markov model: The Markov model is a probability model about time series, which describes the process of randomly generating an unobservable state sequence by a hidden Markov chain, and then generating an observation sequence by generating an observation from each state. Specific definition:
[0064] Let Q be the set of all possible states, and each state of Q represents the value of the user's willingness to buy tomorrow, with a specific value range of [0.0, 1.0]. For example, define the value of the user's willingness to buy tomorrow greater than 0.9, that is, the value in the range of 0.9 to 1.0 as q1.
[0065] The numerical mapping relationship of the user’s willingness to purchase tomorrow is shown in Table 1, where Q = q1, q2, q3, q4, q5, q6, q7, q8, q9, q10.
[0066] Table 1
[0067] Purchase intention value state Remark 0.9~1.0 q1 Strong willingness to buy 0.8~0.9 q2 Purchase intention 0.7~0.8 q3 Purchase intention 0.6~0.7 q4 Purchase intention 0.5~0.6 q5 Purchase intention 0.4~0.5 q6 Purchase intention 0.3~0.4 q7 Purchase intention 0.2~0.3 q8 Purchase intention 0.1~0.2 q9 Purchase intention 0.0~0.1 q10 Very weak willingness to buy
[0068] Suppose V is the set of all possible observations. The state of each V represents the result of logging in on a future day. If there is a login on the current day, it takes 1, and if there is no login, it takes 0. For example, 1 means that there will be a login tomorrow, which is called v1; for example, 01 means that there will be no login tomorrow, but there will be a login the day after tomorrow, which is called v2.
[0069] The specific user login behavior mapping relationship is shown in Table 2, where V = v1, v2, v3, v4, v5, v6, v7, v8.
[0070] Table 2
[0071]
[0072]
[0073] Among them, Q has 10 states and V has 8 observations.
[0074] I is a state sequence of length T, and O is the corresponding observation sequence.
[0075] I=(i1,i2,...,iT), O=(o1,o2,...,oT).
[0076] A is the state transfer matrix: A = [aij]nXn, where i = 1, 2, ... 10; j = 1, 2, ... 10.
[0077] Among them, the probability of transitioning to state qj at time t+1 under the condition of being in state qi at time t is: aij=P(it+1=qj|it=qi).
[0078] B is the observation matrix: B = [bj(k)]nXm, where k = 1, 2, ..., 10; j = 1, 2, ..., 8.
[0079] Among them, the probability of generating observation vk under the condition of being in state qj at time t is: bj(k)=P(ot=vk|it=qj).
[0080] π is the initial state vector: π=(πi), where πi=P(i1=qi).
[0081] The hidden Markov model is determined by the initial state vector π, the state transfer matrix A and the observation matrix B. π and A determine the state sequence, and B determines the observation sequence. Therefore, the hidden Markov model λ can be represented by a ternary symbol, that is: λ=(A,B,π). A,B,π are called the three elements of the hidden Markov model.
[0082] Analyzing user login behavior is a probability calculation problem of the hidden Markov model. Given a model λ = (A, B, π) and an observation sequence O = (o1, o2, ..., oT), calculate the probability P(O|λ) of the occurrence of the observation sequence O under the model λ.
[0083] By applying the above method, the login status in the future stage can be analyzed based on the user's online behavior data, so that accurate recommendations can be made to the user based on the user's login status in the future stage, thereby improving the conversion effect of the recommendation strategy and providing a good user experience.
[0084] The following specific embodiments are used to describe in detail the technical solutions of the present invention and how the technical solutions of the present application solve the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0085] Figure 2 This is a flow chart of a method for analyzing user login behavior provided in Embodiment 1 of the present invention, such as Figure 2 As shown, the method in this embodiment may include:
[0086] S101. Obtain online behavior data of a user within a preset time period.
[0087] In this embodiment, the user's historical behavior data is the basis for the analysis of purchase intention and user login behavior. Therefore, the user's online behavior data within a preset time period is first obtained. Among them, the online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of adding products to the shopping cart. These online behavior data indicate which products the user is interested in. For example, if the user has recently browsed a variety of mobile phones of different models and added some mobile phones to the shopping cart, it means that the user will have a strong intention to buy mobile phones in the future. At the same time, it can also be analyzed based on this that the user is more likely to log in in the future. The preset time period can be set to different durations according to actual conditions, such as the last week, the last month, etc.
[0088] Specifically, first, collect user shopping behavior data (-6 days, the sixth day before the end). Use the big data platform to collect the shopping behaviors of e-commerce users browsing products, adding to shopping carts, subtracting from shopping carts, following products, and placing orders, and model them in the form of Hive tables. Specific modeling: user account, product SKU number, brand ID, product first-level classification ID, product second-level classification ID, product third-level classification ID, and measure from three major dimensions: user, user's attitude towards products, and products. For example, the number of views in the last 1, 2, 3, 5, 7, 15, 30 days, the number of days with views in the last 7, 15, 30 days, the average number of views in the last 7, 15, 30 days, the number of adds to cart in the last 1, 2, 3, 5, 7, 15, 30 days, the number of days with adds to cart in the last 7, 15, 30 days, the average number of adds to cart in the last 7, 15, 30 days, the number of deducted carts in the last 1, 2, 3, 5, 7, 15, 30 days, the number of days with deducted carts in the last 7, 15, 30 days, the number of 30 days minus the average number of shopping carts, the number of attentions in the last 1, 2, 3, 5, 7, 15, 30 days, the number of days with attention behavior in the last 7, 15, 30 days, the average number of attentions in the last 7, 15, 30 days, the number of orders in the last 1, 2, 3, 5, 7, 15, 30 days, the number of days with order behavior in the last 7, 15, 30 days, the average number of orders in the last 7, 15, 30 days, the weighted sum of the number of behaviors in the last 1, 2, 3, 5, 7, 15, 30 days, and the conversion rate in the last 1, 2, 3, 5, 7, 15, 30 days. A total of more than 200 dimensional data. Then, collect the order data of the past 5 days. Under the big data platform, collect user order data: user account, product SKU number, brand ID, product first-level category ID, product second-level category ID, product third-level category ID, order quantity, and store it in the Hive table. Then, use the order data to mark the shopping behavior data. The order data of the past five days is used to label the user's shopping behavior data. That is, two hive tables are associated. For the behavior data with orders, the label value is 1, otherwise it is 0. Finally, the labeled user shopping behavior data is formed: user behavior data + label result Label (1 or 0), which is stored in the Hive table, that is, the user shopping behavior data table of the order. Finally, collect today's user shopping behavior data. On the big data platform, collect the user shopping behavior data of the day, that is, the above-mentioned more than 200-dimensional user shopping behavior data, and store it in the Hive table.
[0089] S102. Analyze the user's purchase intention in the future through a target learning model based on the online behavior data.
[0090] In this embodiment, the purchase intention value in each future time period is analyzed respectively based on the online behavior data through the target learning model; wherein the purchase intention value is used to represent the possibility of the user to purchase the product in the corresponding time period.
[0091] Specifically, the random forest algorithm trains the labeled user shopping behavior data to analyze the user's purchase intention at various stages in the future. First, on the big data platform, a Spark task is established. The specific steps include: using Spark SQL to query the labeled user behavior data prepared earlier; using Spark's random forest classifier class to classify the labeled user behavior data and generate a random forest classification model; using the random forest classification model to analyze the user behavior data of the day, generate the user's purchase intention value tomorrow, and store it in the user purchase intention analysis Hive table. The specific user purchase intention Hive table user_buy_prob can be represented by: user_log_acct (user account), buy_prob (purchase intention), dt (date partition). Then, the user's purchase intention tomorrow can also be calculated for 30 days. Repeat the above steps 29 times, plus the first time, you can get the user's purchase intention tomorrow for 30 days, and store the user's purchase intention tomorrow for 30 days in the user purchase intention analysis Hive table. In this way, the purchase intention value of the e-commerce user for tomorrow is calculated for 30 days. For example, to query the purchase intention value of user_log_acct (user account) = "jack" for 30 days, you can query the Hive table user_buy_prob through the SQL statement: select buy_prob, dt from user_buy_prob. After the big data platform is executed, the 6-day user purchase intention record of user jack is shown in Table 3, that is, the purchase intention status of user Jack changes from q1->q2->q9->q10->q7->q3 in the time period from 2018-09-01 to 2018-09-06.
[0092] Table 3
[0093] date Specific willingness value Corresponding status 2018-09-01 0.91 q1 2018-09-02 0.81 q2 2018-09-03 0.13 q9 2018-09-04 0.01 q10 2018-09-05 0.32 q7 2018-09-06 0.78 q3
[0094] It should be noted that this embodiment is not limited to the random forest classification algorithm. In theory, other classification algorithms can also be applied to the present invention. Those skilled in the art can select other learning models according to actual conditions.
[0095] S103: construct a hidden Markov model according to the user's purchase intention value in the future stage.
[0096] In this embodiment, a hidden Markov model is constructed according to the purchase intention value of the user in the future stage, including: constructing a state transfer matrix according to the purchase intention value of the user in the future stage; the state transfer matrix is used to characterize the possibility of mutual conversion of purchase intention values in various time periods; constructing an observation matrix according to the purchase intention value of the user in the future stage and the user's historical login behavior; the observation matrix is used to characterize the user's future login situation under different purchase intention values; setting an initial state vector; and constructing a hidden Markov model through the state transfer matrix, the observation matrix, and the initial state vector.
[0097] Specifically, according to the user's purchase intention value in the future stage, a hidden Markov model is constructed, including:
[0098] (a) Calculate the state transfer matrix A.
[0099] On the big data platform, the 30-day user purchase intention numerical records of the hive table user_buy_prob (user_log_acct, buy_prob, dt) are obtained through the previous calculation. Figure 3 A schematic diagram of the principle of the state transition matrix provided in an embodiment of the present invention is shown in FIG. Figure 3 As shown, q1->q1, q1->q2, q1->q3, ..., q1->q10 can also be expressed as a11, a12, a13, ... a110 of the A matrix. First calculate a11, and the other matrix elements are calculated in the same way. Steps to calculate a11:
[0100] Get the hive table user_buy_prob, and the set of user_log_acct USER_A that meets the conditions of dt = '2018-09-01' and buy_prob> = 0.9 is expressed as SQL: select user_log_acct from user_buy_probwhere dt = '2018-09-01' and buy_prob> = 0.9.
[0101] Get the hive table user_buy_prob, and the set of user_log_acct USER_B that meets the conditions of dt = '2018-09-02' and buy_prob> = 0.9 is expressed as SQL: select user_log_acct from user_buy_probwhere dt = '2018-09-02' and buy_prob> = 0.9.
[0102] The set USER_C = USER_A ∩ USER_B means q1->q1, which is the user set where the user whose purchase intention status is q1 on 2018-09-01 is converted to the user whose purchase intention status is q1 on 2018-09-02.
[0103] a11=the number of USER_C / the number of USER_A, for example, the calculated result is 0.67.
[0104] By analogy, we can calculate that a12=0.03, a13=0.05, a14=0.05, a15=0.05, a16=0.05, a17=0.03, a18=0.02, a19=0.03, and a110=0.02.
[0105] Similarly, we can calculate the values of q2, q3, q4, ... q10 to other state transitions, and finally get the state transition matrix A as:
[0106]
[0107] (II) Calculate the observation matrix B
[0108] On the big data platform, e-commerce user login records are stored in the Hive table user_login, with the following fields: user_log_acct (user account), login_num (number of logins), dt (date partition). Find bj(k) = P(ot = vk | it = qj), the probability of generating an observation vk under the condition of being in state qj at time t.
[0109] First, calculate b1(1)=P(ot=v1|it=q1), and calculate the other matrix elements in the same way:
[0110] Get the hive table user_buy_prob, and the set of user_log_acct USER_Q1 that meets the conditions of dt = '2018-09-01' and buy_prob> = 0.9 is expressed as SQL: select user_log_acct from user_buy_probwhere dt = '2018-09-01' and buy_prob> = 0.9.
[0111] Get the hive table user_login, and the set USER_V1 of user_login that meets the conditions of dt = '2018-09-01' and login_num> = 1 is expressed as SQL: select user_log_acct from user_login where dt = '2018-09-01' and login_num> = 1.
[0112] Find the intersection USER_Q1V1=USER_Q1∩USER_V1, that is, the user's purchase intention tomorrow is greater than 0.9 and he logs in tomorrow.
[0113] b1(1)=USER_Q1V1 set number / USER_Q set number For example: b1(1)=0.71.
[0114] Similarly, calculate b1(2):
[0115] Get the hive table user_login, and the set USER_V2 of user_login that meets the conditions of dt = '2018-09-02' and login_num> = 1 is expressed as SQL: select user_log_acct from user_login where dt = '2018-09-01' and login_num> = 1.
[0116] REAL_USER_V2 = USER_V2 - USER_V1, the set of users who log in the day after tomorrow minus the set of users who log in tomorrow, that is, the set of users who did not log in tomorrow but will log in the day after tomorrow.
[0117] Find the intersection (i.e. users whose purchase intention tomorrow is greater than 0.9 and who do not log in tomorrow but log in the day after tomorrow) USER_Q1V2 = USER_Q1∩REAL_USER_V2
[0118] b1(2)=number of sets of USER_Q1V2 / number of sets of USER_Q For example: b1(2)=0.09.
[0119] By analogy, we can calculate b1(3)=0.03, b1(4)=0.05, b1(5)=0.02, b1(6)=0.05, b1(7)=0.01, b1(8)=0.04
[0120] Similarly, we can calculate the conversion values of q2, q3, q4, ... q10 to the observed state, and finally get the observation matrix B as:
[0121]
[0122] (III) Constructing Hidden Markov Model
[0123] The A and B matrices have been calculated before, and π is given as (1,0,0,0,0,0,0,0,0,0) T , the hidden Markov model λ=(A,B,π) is constructed.
[0124] S104. Analyze the user's login status in the future stage through the hidden Markov model.
[0125] In this embodiment, the login status of the user in the future stage is analyzed by using a hidden Markov model.
[0126] Specifically, the previous steps have constructed a hidden Markov model, which can be used to analyze which day a user is more likely to log in. For example, given user Jack, the initial Q state is q1, indicating a strong willingness to buy, and π is (1, 0, 0, 0, 0, 0, 0, 0, 0) T , observation sequence O = {v1, v1} analyzes the probability P(O|λ) that user Jack will log in tomorrow or the day after tomorrow.
[0127] The probability that user Jack will log in tomorrow is:
[0128] a1(1)=π1b1(O1)=1*0.71=0.71
[0129] a1(2)=π2b2(O1)=0*0.61=0
[0130] All remaining values can be calculated by analogy;
[0131] For example: a1(10)=π10b10(O1)=0*0.04=0
[0132] So the probability that the user will log in tomorrow is 0.71.
[0133] Similarly, the probability of user Jack logging in the day after tomorrow can be calculated in the same way.
[0134] In this embodiment, the online behavior data of the user in a preset time period is obtained; based on the online behavior data, the user's purchase intention value in the future stage is analyzed through the target learning model; based on the user's purchase intention value in the future stage, a hidden Markov model is constructed; and the user's login status in the future stage is analyzed through the hidden Markov model. The present invention can analyze the login status in the future stage based on the user's online behavior data, so that accurate recommendations can be made to the user based on the user's login status in the future stage, thereby improving the conversion effect of the recommendation strategy and providing a good user experience.
[0135] Figure 4This is a flow chart of a method for analyzing user login behavior provided in Embodiment 2 of the present invention, such as Figure 4 As shown, the method in this embodiment may include:
[0136] S201, construct training samples, and obtain the target learning model through iterative training samples.
[0137] In this embodiment, training samples are constructed through the user's historical online behavior data; the actual order record is used as the target output result, and the initial learning model constructed is iteratively trained through the training sample until the error between the analysis result output by the trained initial learning model and the actual order record is less than a preset threshold; the target learning model is obtained. The acquisition of the user's historical online behavior data can refer to S101. The learning model outputs the user's purchase situation in the future stage, and the value range is a numerical value between 0 and 1; for example, if the purchase probability is greater than 50%, and the corresponding actual order record is a successful order, the analysis result is considered correct. The method for constructing the learning model is a prior art and will not be repeated here. It should be noted that this embodiment adopts the random forest classification algorithm, but the learning model is not limited to the random forest classification algorithm. In theory, other classification algorithms can also be applied to the present invention.
[0138] S202: Obtain online behavior data of the user within a preset time period.
[0139] S203. Analyze the user's purchase intention value in the future stage through the target learning model based on the online behavior data.
[0140] S204: construct a hidden Markov model according to the user's purchase intention value in the future stage.
[0141] S205. Analyze the user's login status in the future stage through the hidden Markov model.
[0142] In this embodiment, the specific implementation process and technical principles of steps S202 to S205 can be found in Figure 2 The relevant descriptions in steps S101 to S104 in the method shown are not repeated here.
[0143] In this embodiment, the online behavior data of the user in a preset time period is obtained; based on the online behavior data, the user's purchase intention value in the future stage is analyzed through the target learning model; based on the user's purchase intention value in the future stage, a hidden Markov model is constructed; and the user's login status in the future stage is analyzed through the hidden Markov model. The present invention can analyze the login status in the future stage based on the user's online behavior data, so that accurate recommendations can be made to the user based on the user's login status in the future stage, thereby improving the conversion effect of the recommendation strategy and providing a good user experience.
[0144] In addition, this embodiment can also construct training samples through the user's historical online behavior data; use real order records as the target output results, and iteratively train the constructed initial learning model through training samples until the error between the analysis results output by the trained initial learning model and the real order records is less than a preset threshold; and obtain the target learning model.
[0145] Figure 5 This is a schematic diagram of the structure of the device for analyzing user login behavior provided in the third embodiment of the present invention. Figure 5 As shown, the user login behavior analysis device of this embodiment may include:
[0146] An acquisition module 31 is used to acquire online behavior data of users within a preset time period;
[0147] The first analysis module 32 is used to analyze the user's purchase intention value in the future stage through the target learning model based on the online behavior data;
[0148] A construction module 33 is used to construct a hidden Markov model according to the purchase intention value of the user in the future stage;
[0149] The second analysis module 34 is used to analyze the user's login status in the future stage through a hidden Markov model.
[0150] In one possible design, online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of added products.
[0151] In a possible design, the first analysis module 32 is specifically configured to:
[0152] Based on the online behavior data, the target learning model is used to analyze the purchase intention value in each future time period. Among them, the purchase intention value is used to represent the possibility of users purchasing goods in the corresponding time period.
[0153] In a possible design, the building block 33 is specifically configured to:
[0154] According to the user's purchase intention value in the future stage, a state transfer matrix is constructed; the state transfer matrix is used to represent the possibility of conversion between purchase intention values in different time periods;
[0155] According to the user's purchase intention value in the future stage and the user's historical login behavior, an observation matrix is constructed; the observation matrix is used to characterize the user's future login situation under different purchase intention values;
[0156] Set the initial state vector;
[0157] The hidden Markov model is constructed through the state transfer matrix, observation matrix and initial state vector.
[0158] The user login behavior analysis device of this embodiment can execute Figure 2 For the technical solution in the method shown, its specific implementation process and technical principles can be found in Figure 2 The relevant descriptions in the method shown will not be repeated here.
[0159] In this embodiment, the online behavior data of the user in a preset time period is obtained; based on the online behavior data, the user's purchase intention value in the future stage is analyzed through the target learning model; based on the user's purchase intention value in the future stage, a hidden Markov model is constructed; and the user's login status in the future stage is analyzed through the hidden Markov model. The present invention can analyze the login status in the future stage based on the user's online behavior data, so that accurate recommendations can be made to the user based on the user's login status in the future stage, thereby improving the conversion effect of the recommendation strategy and providing a good user experience.
[0160] Figure 6 A schematic diagram of the structure of a device for analyzing user login behavior provided in Embodiment 4 of the present invention is shown in FIG. Figure 6 As shown, the user login behavior analysis device of this embodiment is Figure 5 Based on the device shown, it can also include:
[0161] The training module 35 is specifically used for:
[0162] Build training samples based on the user's historical online behavior data;
[0163] Taking the real order record as the target output result, the initial learning model constructed by iterative training of training samples is constructed until the error between the analysis result output by the trained initial learning model and the real order record is less than a preset threshold; the target learning model is obtained.
[0164] The user login behavior analysis device of this embodiment can execute Figure 2 , Figure 4 For the technical solution in the method shown, its specific implementation process and technical principles can be found in Figure 2 , Figure 4 The relevant descriptions in the method shown will not be repeated here.
[0165] In this embodiment, the online behavior data of the user in a preset time period is obtained; based on the online behavior data, the user's purchase intention value in the future stage is analyzed through the target learning model; based on the user's purchase intention value in the future stage, a hidden Markov model is constructed; and the user's login status in the future stage is analyzed through the hidden Markov model. The present invention can analyze the login status in the future stage based on the user's online behavior data, so that accurate recommendations can be made to the user based on the user's login status in the future stage, thereby improving the conversion effect of the recommendation strategy and providing a good user experience.
[0166] In addition, this embodiment can also construct training samples through the user's historical online behavior data; use real order records as the target output results, and iteratively train the constructed initial learning model through training samples until the error between the analysis results output by the trained initial learning model and the real order records is less than a preset threshold; and obtain the target learning model.
[0167] Figure 7 This is a schematic diagram of the structure of the user login behavior analysis system provided in Embodiment 5 of the present invention. Figure 7 As shown, the user login behavior analysis system 40 of this embodiment may include: a processor 41 and a memory 42.
[0168] The memory 42 is used to store programs; the memory 42 may include volatile memory (English: volatile memory), such as random-access memory (English: random-access memory, abbreviated: RAM), such as static random-access memory (English: static random-access memory, abbreviated: SRAM), double data rate synchronous dynamic random access memory (English: Double Data Rate Synchronous Dynamic Random Access Memory, abbreviated: DDR SDRAM), etc.; the memory may also include non-volatile memory (English: non-volatile memory), such as flash memory (English: flash memory). The memory 42 is used to store computer programs (such as applications, functional modules, etc. that implement the above method), computer instructions, etc., and the above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories 42. And the above computer programs, computer instructions, data, etc. can be called by the processor 41.
[0169] The above-mentioned computer programs, computer instructions, etc. may be stored in one or more memories 42 in partitions. And the above-mentioned computer programs, computer instructions, data, etc. may be called by the processor 41.
[0170] The processor 41 is used to execute the computer program stored in the memory 42 to implement the various steps in the method involved in the above embodiment.
[0171] For details, please refer to the relevant description in the previous method embodiment.
[0172] The processor 41 and the memory 42 may be independent structures or integrated structures. When the processor 41 and the memory 42 are independent structures, the memory 42 and the processor 41 may be coupled and connected via a bus 43 .
[0173] The user login behavior analysis system of this embodiment can execute Figure 2 , Figure 4 For the technical solution in the method shown, its specific implementation process and technical principles can be found in Figure 2 , Figure 4 The relevant descriptions in the method shown will not be repeated here.
[0174] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When at least one processor of a user device executes the computer-executable instructions, the user device executes the above-mentioned various possible methods.
[0175] Among them, computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a user device. Of course, the processor and the storage medium can also be present in a communication device as discrete components.
[0176] The present application also provides a program product, which includes a computer program. The computer program is stored in a readable storage medium. At least one processor of the server can read the computer program from the readable storage medium. At least one processor executes the computer program so that the server implements any method of the above-mentioned embodiments of the present invention.
[0177] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for analyzing user login behavior, characterized in that: include: Obtain the user's online behavior data within a preset time period; Analyze the user's purchase intention value in the future stage through the target learning model based on the online behavior data; Constructing a hidden Markov model according to the purchase intention value of the user in the future stage; The hidden Markov model is constructed based on a state transfer matrix, an observation matrix and an initial state vector; The hidden Markov model is used to analyze the login status of the user in the future stage, and the login status is the login probability of the user in the future stage.
2. The method according to claim 1, characterized in that The online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of added products.
3. The method according to claim 1, characterized in that Also includes: Build training samples based on the user's historical online behavior data; Taking the real order record as the target output result, the initial learning model constructed by iterative training through the training samples is trained until the error between the analysis result output by the trained initial learning model and the real order record is less than a preset threshold; The target learning model is obtained.
4. The method according to claim 1, characterized in that: According to the online behavior data, the user's purchase intention value in the future stage is analyzed through the target learning model, including: According to the online behavior data, the purchase intention value in each future time period is analyzed respectively through the target learning model; wherein the purchase intention value is used to represent the possibility of the user to purchase the product in the corresponding time period.
5. The method according to claim 4, characterized in that According to the purchase intention value of the user in the future stage, a hidden Markov model is constructed, including: According to the purchase intention value of the user in the future stage, a state transfer matrix is constructed; the state transfer matrix is used to characterize the possibility of conversion between the purchase intention values in each time period; According to the purchase intention value of the user in the future stage and the historical login behavior of the user, an observation matrix is constructed; the observation matrix is used to characterize the future login situation of the user under different purchase intention values; Set the initial state vector; A hidden Markov model is constructed by using the state transfer matrix, the observation matrix and the initial state vector.
6. A device for analyzing user login behavior, characterized in that: include: An acquisition module is used to acquire the online behavior data of users within a preset time period; A first analysis module is used to analyze the user's purchase intention value in the future stage through a target learning model based on the online behavior data; A construction module, used to construct a hidden Markov model according to the purchase intention value of the user in the future stage; the hidden Markov model is constructed based on a state transfer matrix, an observation matrix and an initial state vector; The second analysis module is used to analyze the user's login status in the future stage through the hidden Markov model, and the login status is the login probability of the user in the future stage.
7. The device according to claim 6, characterized in that The online behavior data includes: product browsing records, order records, change records of products in the shopping cart, and records of added products.
8. The device according to claim 6, characterized in that Also includes: Training modules for: Build training samples based on the user's historical online behavior data; Taking the real order record as the target output result, the initial learning model constructed by iterative training through the training samples is trained until the error between the analysis result output by the trained initial learning model and the real order record is less than a preset threshold; The target learning model is obtained.
9. A user login behavior analysis system, characterized in that: include: A memory and a processor, wherein the memory stores executable instructions of the processor; wherein the processor is configured to execute the method for analyzing user login behavior according to any one of claims 1 to 5 by executing the executable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for analyzing user login behavior described in any one of claims 1 to 5 is implemented.
11. A computer program product, characterized in that The computer program product includes computer program codes, and when the computer program codes are executed on a computer, the computer is enabled to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and apparatus for generating information
CN108491267A
Information recommendation method and device, equipment and storage medium
CN109934704A