User Label Recognition Method, Device, Electronic Device and Computer Readable Storage Medium
By obtaining the historical behavior data matrix of user identification, including behavioral characteristics and attribute characteristics, and using the tag recognition model to identify user behavior labels, the problem of low accuracy of user behavior label recognition is solved, and more accurate tag recognition and personalized recommendations are achieved.
Patent Information
- Application Number
- CN202210116249.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-07
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-02-07
AI Technical Summary
In the prior art, the accuracy of user behavior label recognition is low, and traditional methods lack the mining of high-dimensional feature behind behavioral characteristics.
By obtaining the historical behavior data matrix of user identification, including behavioral characteristics and attribute characteristics, the tag identification model is used to identify user behavior labels and generate user behavior labels.
It improves the accuracy of user behavior label recognition, realizes in-depth mining of historical behavior data, and enhances the fitting ability of the label recognition model and the personalized recommendation effect of user portraits.
Smart Images

Figure CN114548242B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and particularly to a method, apparatus, electronic device, and computer-readable storage medium for user label recognition. Background Art
[0002] With the rapid development of Internet technology, a variety of social media platforms have emerged. In the process of using social media platforms, users generate rich user behavior data, and under the condition of obtaining user authorization, analyzing these user behavior data can obtain user behavior labels for each user.
[0003] Among them, the user behavior label refers to a label obtained by abstracting, classifying, and generalizing the user behavior data of different users. Based on the user behavior label, relevant information can be accurately recommended to the user, so that the user can more conveniently obtain the information needed. However, the accuracy of the user behavior labels generated by analyzing user behavior data using traditional methods is relatively low. Summary of the Invention
[0004] Embodiments of the present application provide a method, apparatus, electronic device, and computer-readable storage medium for user label recognition, which can improve the accuracy of user behavior label recognition.
[0005] On the one hand, a method for user label recognition is provided, including:
[0006] Obtaining a historical behavior data matrix corresponding to a user identifier; the historical behavior data matrix includes behavior features and attribute features corresponding to the historical behavior data of the user identifier; the attribute features include features obtained by performing attribute analysis on the historical behavior data;
[0007] Calculating a current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier;
[0008] Inputting the current behavior data matrix of the user identifier into a label recognition model for user behavior label recognition, and generating a user behavior label corresponding to the user identifier.
[0009] On the other hand, a user label recognition apparatus is provided, including:
[0010] A historical behavior data matrix acquisition module, configured to acquire a historical behavior data matrix corresponding to a user identifier; the historical behavior data matrix includes behavior features and attribute features corresponding to the historical behavior data of the user identifier; the behavior features include behavior-related features extracted from the historical behavior data of the user identifier; the attribute features include features obtained by performing attribute analysis on the historical behavior data;
[0011] The current behavior data matrix acquisition module is used to calculate the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier.
[0012] The user behavior label generation module is used to input the current behavior data matrix of the user identifier into a label recognition model to perform user behavior label recognition, and generate a user behavior label corresponding to the user identifier.
[0013] On the other hand, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the above-mentioned focus control method.
[0014] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method are implemented.
[0015] On the other hand, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the above-mentioned method are implemented.
[0016] For the above-mentioned user label recognition method and device, electronic device, and computer-readable storage medium, a historical behavior data matrix corresponding to the user identifier is obtained. The historical behavior data matrix includes behavior characteristics and attribute characteristics corresponding to the historical behavior data of the user identifier. The attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data. Based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, the current behavior data matrix of the user identifier is calculated. The current behavior data matrix of the user identifier is input into a label recognition model to perform user behavior label recognition, and a user behavior label corresponding to the user identifier is generated.
[0017] The obtained historical behavior data matrix corresponding to the user identifier includes both behavior characteristics and attribute characteristics. Since the attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data, compared with the traditional technology, the present application adds attribute characteristics, that is, it is equivalent to mining high-dimensional characteristics from the historical behavior data, realizing a more in-depth mining of the characteristics in the historical behavior data. Then, based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, the current behavior data matrix of the user identifier is calculated. The current behavior data matrix of the user identifier is input into a label recognition model to perform user behavior label recognition, and a user behavior label corresponding to the user identifier is generated. By performing user behavior label recognition through the label recognition model, the accuracy of user behavior label recognition is further improved. Description of the Drawings
[0018] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is an application environment diagram of the user label recognition method in an embodiment;
[0020] Figure 2 It is a flowchart of the user label recognition method in an embodiment;
[0021] Figure 3 It is a flowchart of the user label recognition method in another embodiment;
[0022] Figure 4 For Figure 3 It is a flowchart of the method for extracting the target behavior features and target attribute features of historical behavior data from the historical behavior data in
[0023] Figure 5 It is a schematic diagram of the model structure of the CBOW model in an embodiment;
[0024] Figure 6 For Figure 3 It is a flowchart of the method for constructing the historical behavior data matrix of the user identifier in
[0025] Figure 7 For Figure 2 It is a flowchart of the method for calculating the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier in
[0026] Figure 8 For Figure 2 It is a flowchart of the method for inputting the current behavior data matrix of the user identifier into the label recognition model to perform user behavior label recognition and generating the user behavior label corresponding to the user identifier in
[0027] Figure 9 It is a schematic diagram of the network structure of the label recognition model in an embodiment;
[0028] Figure 10 It is a schematic diagram of the user label recognition method in still another embodiment;
[0029] Figure 11 It is a schematic diagram of the user label recognition method in a specific embodiment;
[0030] Figure 12It is a structural block diagram of a user label recognition device in an embodiment;
[0031] Figure 13 It is a structural block diagram of a user label recognition device in another embodiment;
[0032] Figure 14 It is a schematic internal structure diagram of an electronic device in an embodiment. Detailed implementation manners
[0033] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0034] It can be understood that the terms "first", "second", etc. used in the present application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element. For example, without departing from the scope of the present application, the first convolutional layer can be called the second convolutional layer, and similarly, the second convolutional layer can be called the first convolutional layer. Both the first convolutional layer and the second convolutional layer are convolutional layers, but they are not the same convolutional layer.
[0035] Figure 1 It is a schematic application environment diagram of a user label recognition method in an embodiment. As Figure 1 shown, the application environment includes an electronic device 120. Among them, the electronic device 120 can obtain a historical behavior data matrix corresponding to the user identifier from the server 140. The historical behavior data matrix includes behavior characteristics and attribute characteristics corresponding to the historical behavior data of the user identifier. The attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data. Based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, calculate the current behavior data matrix of the user identifier. Input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate a user behavior label corresponding to the user identifier. Among them, the electronic device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a wearable device (smart bracelet, smart watch, smart glasses, smart gloves, smart socks, smart belt, etc.), a VR (virtual reality) device, a smart home, a driverless car, etc.
[0036] Figure 2 It is a flowchart of a user label recognition method in an embodiment. The user label recognition method in this embodiment is described by taking it running on Figure 1 the electronic device as an example. AsFigure 2 As shown in Figure 2 , the user label recognition method includes steps 220 to 240, where
[0037] Step 220: Obtain a historical behavior data matrix corresponding to the user identifier; the historical behavior data matrix includes behavior characteristics and attribute characteristics corresponding to the historical behavior data of the user identifier; the attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data.
[0038] The electronic device obtains a historical behavior data matrix corresponding to the user identifier, where the user identifier is used to represent the identity information of the user. For example, it can be the user ID (Identity document) in various web pages or various application programs, etc. Among them, the historical behavior data matrix can be understood as a matrix generated based on the historical behavior data of the user identifier, and the historical behavior data is used to record the data corresponding to the historical behavior of the user identifier in each web page or each application program. Here, the historical behavior is used to characterize the operation instructions generated by the user identifier during the historical process of using each web page or each application program.
[0039] Among them, the historical behavior data matrix includes behavior features and attribute features corresponding to the historical behavior data of the user identifier. Specifically, in the historical behavior data matrix, the behavior features and attribute features corresponding to the historical behavior data of the user identifier in each web page or each application program are sequentially recorded. The behavior features can be understood as the behavior-related features directly extracted from the text data of the historical behavior data of the user identifier. For example, the number of uses, the single-use duration, the total use duration, and the relevant features of behaviors such as browsing, searching, collecting, liking, rewarding, purchasing, returning goods, and evaluating in each web page or each application program. The attribute features include the features obtained by performing attribute analysis on the historical behavior data. Here, the attribute features are different from the behavior features. The behavior features can be directly extracted from the text data of the historical behavior data of the user identifier, while the attribute features cannot be directly obtained by extracting from the text data of the historical behavior data. It is necessary to perform context analysis on the text data corresponding to the historical behavior data to implement attribute analysis of the historical behavior data, thereby generating the attribute features of the historical behavior data. That is, mining the attribute features from the historical behavior data is equivalent to mining high-dimensional features from the historical behavior data, and the attribute features can more deeply reflect the hidden features in the historical behavior data. For example, the attribute features can be the user behavior type, the user conversion rate, the product conversion rate, etc., which are the features obtained by performing attribute analysis based on the historical behavior data. Among them, the user conversion rate includes the registered user conversion rate, the logged-in user conversion rate, and the paying user conversion rate, etc., and this application does not limit this. Among them, the registered user conversion rate refers to the ratio of the users attracted by media such as news and advertisements in the web page or application program who are converted into registered users. Similarly, the logged-in user conversion rate refers to the ratio of the users attracted by media such as news and advertisements in the web page or application program who are converted into logged-in users; the paying user conversion rate refers to the ratio of the users attracted by media such as news and advertisements in the web page or application program who are converted into paying users.
[0040] Specifically, the electronic device can obtain the historical behavior data matrix corresponding to the user identifier from the databases corresponding to various web pages or various application programs. The databases corresponding to various web pages or various application programs record a large amount of historical data generated by the user identifier during the use of the web page or the application program, and these historical data include historical behavior data. That is, the electronic device can obtain the historical behavior data corresponding to the user identifier from the databases corresponding to various web pages or various application programs, and then generate the historical behavior data matrix corresponding to the user identifier based on the historical behavior data.
[0041] Step 240, calculate the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier.
[0042] The electronic device can also obtain the current behavior data of the user identifier. Specifically, the electronic device can also obtain the current behavior data of the user identifier from the databases corresponding to various web pages or various application programs. The current behavior data is used to record the data corresponding to the current behaviors of the user identifier in each web page or each application program. Similar to the historical behaviors, the current behaviors here are used to represent the operation instructions generated during the current process of the user identifier using each web page or each application program. For example, the current behaviors include, but are not limited to, the number of uses, the duration of a single use, the total use duration, and operation instructions such as browsing, searching, favoriting, liking, rewarding, purchasing, returning, and evaluating.
[0043] Furthermore, based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, calculate the current behavior data matrix of the user identifier. Specifically, after the electronic device obtains the current behavior data of the user identifier, extract the behavior features and attribute features corresponding to the current behavior data from the current behavior data. Arrange the behavior features and attribute features corresponding to the current behavior data in the matrix arrangement order of the behavior features and attribute features in the historical behavior data matrix of the user identifier to generate the current behavior data matrix of the user identifier. That is, the arrangement order of the behavior features and attribute features in the current behavior data matrix of the same user identifier is the same as that in the historical behavior data matrix.
[0044] Step 260, input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate user behavior labels corresponding to the user identifier.
[0045] After calculating the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate user behavior labels corresponding to the user identifier.
[0046] Among them, the label recognition model is a convolutional neural network model obtained by pre-training for user behavior label recognition based on the current behavior data matrices corresponding to multiple user identifiers and the labeled user behavior labels corresponding to multiple user identifiers in the training set. Since the label recognition model is generated by training based on a large amount of data, using the label recognition model for user behavior label recognition is more flexible compared to using fixed rules for user label recognition. User behavior labels refer to the labels that match user behaviors. For example, the labels that match the number of uses, the duration of a single use, the total use duration, and behaviors such as browsing, searching, favoriting, liking, rewarding, purchasing, returning, and evaluating of the user identifier on a certain web page or application program.
[0047] After generating user behavior tags corresponding to the user identifier, user portraits corresponding to the user identifier can be further generated based on the user behavior tags of the user identifier. Then, personalized recommendations can be made for the user identifier according to the user portraits corresponding to the user identifier. Of course, a series of data analyses can also be performed based on the user portraits corresponding to the user identifier, which is not limited in this application.
[0048] In the embodiments of this application, the obtained historical behavior data matrix corresponding to the user identifier includes both behavior characteristics and attribute characteristics, and since the attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data. In the traditional technology, when identifying user tags, only the method of adding weights to the behavior characteristics of the user identifier is used for identification, lacking the mining of high-dimensional characteristics behind the behavior characteristics. Therefore, compared with the traditional technology, this application adds attribute characteristics, which is equivalent to mining high-dimensional characteristics from historical behavior data, realizing a more in-depth mining of the characteristics in historical behavior data. Then, based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, the current behavior data matrix of the user identifier is calculated. The current behavior data matrix of the user identifier is input into the tag recognition model for user behavior tag recognition, generating user behavior tags corresponding to the user identifier. By using the tag recognition model for user behavior tag recognition, the accuracy of user behavior tag recognition is further improved.
[0049] Continuing from the previous embodiment, the process of obtaining the historical behavior data matrix corresponding to the user identifier, calculating the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier; and inputting the current behavior data matrix of the user identifier into the tag recognition model for user behavior tag recognition to generate user behavior tags corresponding to the user identifier is described. In the embodiments of this application, as Figure 3 shown, a user tag recognition method is provided. Before step 220 of obtaining the historical behavior data matrix corresponding to the user identifier, it further includes:
[0050] Step 320, obtaining the historical behavior data of the user identifier in each application program; the historical behavior data is used to record the data corresponding to the historical behavior of the user identifier in each application program.
[0051] The electronic device obtains the historical behavior data of the user identifier in each application. The applications here may include social applications, life utility applications, office applications, camera beautification applications, shopping applications, entertainment applications, travel applications, financial applications, etc. Of course, the present application does not limit this. Among them, the historical behavior data is used to record the data corresponding to the historical behaviors of the user identifier in each web page or each application. The historical behavior here is used to represent the operation instructions generated during the historical process of the user identifier using each web page or each application. For example, the historical behavior includes, but is not limited to, the number of uses, the single-use duration, the total use duration, and operation instructions such as browsing, searching, collecting, liking, rewarding, purchasing, returning goods, and evaluating.
[0052] Step 340, for the historical behavior data of the user identifier in each application, extract the target behavior features and target attribute features from the historical behavior data.
[0053] In step 320, the historical behavior data of the user identifier in each application is obtained. Then, for the historical behavior data of the user identifier in each application, the target behavior features and target attribute features can be extracted from the historical behavior data of each application. For example, for the historical behavior data of user identifier A in application 1, the target behavior features and target attribute features can be extracted from this historical behavior data. For the historical behavior data of user identifier A in application 2, the target behavior features and target attribute features can be extracted from this historical behavior data. And so on, the target behavior features and target attribute features of the historical behavior data of user identifier A in each application can be obtained.
[0054] Here, after the behavior features and attribute features can be extracted from the historical behavior data first, further based on the feature importance of the features, the behavior features with a feature importance higher than the preset feature importance threshold are selected from the behavior features as the target behavior features, and the attribute features with a feature importance higher than the preset feature importance threshold are selected from the attribute features as the target attribute features.
[0055] Among them, the behavioral features can be understood as the behavior-related features directly extracted from the text data of the historical behavior data of the user identifier. For example, the number of times of use, the duration of single use, the total duration of use in each web page or each application, and the relevant features of behaviors such as browsing, searching, collecting, liking, rewarding, purchasing, returning goods, and evaluating. The attribute features include the features obtained by performing attribute analysis on the historical behavior data. Here, the attribute features are different from the behavioral features. The behavioral features can be directly extracted from the text data of the historical behavior data of the user identifier, while the attribute features cannot be directly obtained by extracting from the text data of the historical behavior data. It is necessary to perform context analysis on the text corresponding to the historical behavior data to implement attribute analysis of the historical behavior data, so as to generate the attribute features of the historical behavior data.
[0056] Step 360, construct a historical behavior data matrix of the user identifier based on the target behavioral features and target attribute features of the historical behavior data.
[0057] After obtaining the target behavioral features and target attribute features of the historical behavior data of user identifier A in each application, a historical behavior data matrix of the user identifier can be constructed based on the target behavioral features and target attribute features of the historical behavior data. Specifically, the target behavioral features and target attribute features of user identifier A under each application can be arranged in sequence according to the matrix to generate the historical behavior data matrix of user identifier A. Among them, the historical behavior data matrix A of user identifier A can be referred to as shown in Table 1-1 below:
[0058] Table 1-1
[0059] User ID A Application 1 Application 3 Application 2 …… Application n Frequency Frequency 1 Frequency 3 Frequency 2 …… Frequency n Duration Duration 1 Duration 3 Duration 2 …… Duration n First Attribute Feature First Attribute Feature 1 First Attribute Feature 3 First Attribute Feature 2 …… First Attribute Feature n Second Attribute Feature Second Attribute Feature 1 Second Attribute Feature 3 Second Attribute Feature 2 …… Second Attribute Feature n …… …… …… …… …… ……
[0060] In the embodiments of the present application, when constructing the historical behavior data matrix of the user identifier, not only the behavior features are extracted from the historical behavior data, but also the attribute features are mined from the historical behavior data. Since the attribute features can more deeply reflect the hidden features in the historical behavior data, it is equivalent to mining high-dimensional features from the historical behavior data. Therefore, for the historical behavior data of the user identifier in each application, the target behavior features and target attribute features of the historical behavior data are extracted from the historical behavior data. Then, based on the target behavior features and target attribute features of the historical behavior data, the historical behavior data matrix of the user identifier is constructed. Obviously, the constructed historical behavior data matrix can more comprehensively and deeply characterize the behavior data of the user identifier, and improve the feature dimension of each sample data. Furthermore, in the subsequent process of calculating the current behavior data matrix of the user identifier based on the historical behavior feature matrix and inputting the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition, the fitting ability of the label recognition model is further improved. Finally, the accuracy of the user behavior label corresponding to the generated user identifier is improved.
[0061] Continuing from the previous embodiment, the construction process of the historical behavior data matrix of the user identifier is described. In the embodiments of the present application, as Figure 4 shown, step 340 is further described in detail. For the historical behavior data of the user identifier in each application, the specific implementation steps of extracting the target behavior features and target attribute features of the historical behavior data from the historical behavior data include:
[0062] Step 342, for the historical behavior data of the user identifier in each application, extract the features related to the historical behavior from the historical behavior data as the initial behavior features of the historical behavior data;
[0063] Among them, the historical behavior data is used to record the data corresponding to the historical behavior of the user identifier in each web page or each application. Here, the historical behavior is used to represent the operation instructions generated during the historical process of the user identifier using each web page or each application. For example, the historical behavior includes, but is not limited to, the number of uses, the single-use duration, the total use duration, and operation instructions such as browsing, searching, collecting, liking, rewarding, purchasing, returning, and evaluating. The above behaviors such as browsing, searching, collecting, liking, rewarding, purchasing, returning, and evaluating all involve the object of action and the number of actions. For example, in the collection behavior, it involves the collection object and the number of collections for the collection object; in the liking behavior, it involves the liking object and the number of likes for the liking object; in the rewarding behavior, it involves the rewarding object and the number of rewards for the rewarding object, etc.
[0064] For the historical behavior data of a user identifier in various application programs, extract features related to historical behaviors from the historical behavior data. Among them, the features related to historical behaviors are the features related to the operation instructions generated during the historical process of the user identifier using various web pages or application programs. For example, the above-mentioned number of uses, single-use duration, total use duration, and behaviors such as browsing, searching, collecting, liking, rewarding, purchasing, returning goods, and evaluating. The features related to the above operation instructions such as browsing, searching, collecting, liking, rewarding, purchasing, returning goods, and evaluating.
[0065] Then, all or part of the features related to historical behaviors extracted from the historical behavior data can be used as the initial behavior features of the historical behavior data.
[0066] Step 344: Perform attribute analysis on the historical behavior data to generate the initial attribute features of the historical behavior data.
[0067] For the historical behavior data of a user identifier in various application programs, perform attribute analysis on the historical behavior data to generate the initial attribute features of the historical behavior data. Among them, this attribute analysis can be the process of extracting word vectors from the text corresponding to the historical behavior data, or the process of performing feature engineering on the initial behavior features of the historical behavior data to generate high-dimensional features. The high-dimensional features here include high-dimensional combination features and new features generated by performing feature engineering on the initial behavior features. Among them, feature engineering refers to the process of using a series of engineering methods to screen better data features from the original data to improve the training effect of the model.
[0068] Therefore, after performing attribute analysis on the historical behavior data, word vectors can be extracted from the text corresponding to the historical behavior data and used as the initial attribute features of the historical behavior data. The high-dimensional features generated by performing feature engineering on the initial behavior features of the historical behavior data can also be used as the initial attribute features of the historical behavior data. This application does not make any limitations in this regard.
[0069] Step 346: Use the extreme gradient boosting algorithm to extract the target behavior features and target attribute features of the historical behavior data from the initial behavior features and initial attribute features of the historical behavior data.
[0070] Among them, the extreme gradient boosting algorithm (XGBoost, eXtreme Gradient Boosting), hereinafter referred to as the XGBoost algorithm. The core of the XGBoost algorithm is to continuously add trees and continuously perform feature splitting to grow a tree. Each time a tree is added, it is actually a process of learning a new function to fit the residual of the previous prediction.
[0071] For the historical behavior data of the user identifier in each application, the extreme gradient boosting algorithm is used to calculate the feature importance of the initial behavior features and the feature importance of the initial attribute features of the historical behavior data, and the behavior features with feature importance higher than the preset feature importance threshold are selected from the initial behavior features as the target behavior features, and the attribute features with feature importance higher than the preset feature importance threshold are selected from the initial attribute features as the target attribute features. For example, m initial behavior features are extracted from multiple initial behavior features as the target behavior features, and m initial attribute features are extracted from multiple initial attribute features as the target attribute features. Here, no limit is imposed on the value of m.
[0072] In the embodiments of the present application, for the historical behavior data of the user identifier in each application, features related to the historical behavior are extracted from the historical behavior data as the initial behavior features of the historical behavior data. After performing attribute analysis on the historical behavior data, word vectors can be extracted from the text corresponding to the historical behavior data, and the word vectors are used as the initial attribute features of the historical behavior data. The high-dimensional features generated by performing feature engineering processing on the initial behavior features of the historical behavior data can also be used as the initial attribute features of the historical behavior data. In this way, whether the initial attribute features are obtained through the above-mentioned process of extracting word vectors or the above-mentioned process of performing feature engineering processing, it is equivalent to mining high-dimensional features from the historical behavior data, and the feature dimension of each sample data is increased.
[0073] At the same time, the extreme gradient boosting algorithm is used to extract the target behavior features and target attribute features of the historical behavior data from the initial behavior features and initial attribute features of the historical behavior data based on the feature importance. In this way, the initial behavior features and initial attribute features are processed in a refined manner based on the feature importance, and the target behavior features and target attribute features with feature importance higher than the preset feature importance threshold are retained. Thus, while reducing the computational complexity of the subsequent user label recognition process, the accuracy of the recognized user labels is ensured.
[0074] Continuing from the previous embodiment, the steps of how to extract the target behavior features and target attribute features of the historical behavior data from the historical behavior data during the construction process of the historical behavior data matrix of the user identifier are described. In the embodiments of the present application, step 344 is further described in detail, and the specific implementation steps of generating the initial attribute features of the historical behavior data by performing attribute analysis on the historical behavior data include:
[0075] Perform text segmentation on the historical behavior data to generate the text segmentation result of the historical behavior data;
[0076] Input the text segmentation result of the historical behavior data into the Word2vec neural network model for word vector extraction to generate multiple word vectors of the historical behavior data;
[0077] Use multiple word vectors of historical behavior data as the initial attribute features of the historical behavior data.
[0078] Specifically, obtain the text data corresponding to the historical behavior data, perform text segmentation on the historical behavior data to generate the text segmentation result of the historical behavior data. Among them, text segmentation includes at least two processes: sentence segmentation and word segmentation. In one case, the text segmentation result here includes the sentences obtained after sentence segmentation of the text data and the words obtained after word segmentation of the sentences; in another case, the text segmentation result here includes the words obtained after word segmentation.
[0079] Furthermore, input the text segmentation result of the historical behavior data into the Word2vec neural network model for word vector extraction to generate multiple word vectors of the historical behavior data. Among them, the Word2vec neural network model is an NLP tool, and its feature is to vectorize all words, so that the relationship between words can be quantitatively measured and the connection between words can be mined. Here, the Word2vec neural network model can specifically adopt the CBOW model to extract word vectors. Among them, CBOW is the abbreviation of Continuous Bag-of-Words Model, and the CBOW model is a model that predicts the occurrence probability of the current word based on the words in the context. Specifically, input the text segmentation result of the historical behavior data into the CBOW model for mapping encoding to generate multiple word vectors of the historical behavior data.
[0080] Among them, the model structure of the CBOW model is as Figure 5 shown. The CBOW model includes an input layer, a hidden layer (mapping layer), and an output layer. Assume that the total number of words in the corpus here is V; the number of context words is C, which are respectively represented as x 1k 、x 2k ……x Ck ; the dimension of the mapping layer / word vector is N;
[0081] First, obtain the text data of the historical behavior data of each user identifier in each application; in the input layer, input the context words x 1k 、x 2k ……x Ck in each text data into the hidden layer, that is, the number of nodes in the input layer is C context words;
[0082] Secondly, in the hidden layer, calculate the average value of the word vectors (word embeddings) obtained by multiplying each node in the input layer by the weight matrix W V*N to obtain the output h of the hidden layer. The specific calculation formula is as follows;
[0083]
[0084] Again, the input for each node in the output layer is: where is the j-th column of the output matrix W'; after passing through the loss function in the output layer, the probability distribution when the output center word is a certain word vector j is:
[0085]
[0086] where the loss function here is:
[0087]
[0088] where the update rule for the output weight matrix W' is:
[0089]
[0090] The update rule for the weight matrix W:
[0091]
[0092] Finally, multiple word vectors of historical behavior data are generated based on the generated word vectors and the probabilities of the word vectors, and the multiple word vectors of historical behavior data are used as the initial attribute features of the historical behavior data.
[0093] In the embodiment of the present application, the specific implementation steps of performing attribute analysis on historical behavior data and generating initial attribute features of historical behavior data include: first, performing text segmentation on historical behavior data to generate text segmentation results of historical behavior data. Secondly, the text segmentation results of historical behavior data are input into the Word2vec neural network model for word vector extraction to generate multiple word vectors of historical behavior data. Finally, multiple word vectors of historical behavior data are used as the initial attribute features of historical behavior data. Word vector extraction is performed through the Word2vec neural network model, and multiple word vectors extracted from historical behavior data are used as the initial attribute features of historical behavior data. Based on word vectors, the relationship between words and words in historical behavior data can be better reflected. Therefore, based on the initial attribute features of historical behavior data obtained by word vectors, high-dimensional features in historical behavior data can be mined. Based on the target behavior features and target attribute features of historical behavior data, a historical behavior data matrix of user identification is constructed. Obviously, the constructed historical behavior data matrix can characterize the behavior data of user identification more comprehensively and deeply, and improve the feature dimension of each sample data. Furthermore, in the subsequent process of calculating the current behavior data matrix of the user ID based on the historical behavior feature matrix and inputting the current behavior data matrix of the user ID into the tag recognition model for user behavior tag recognition, the fitting ability of the tag recognition model is further improved. Ultimately, the accuracy of the user behavior tag corresponding to the generated user ID is improved.
[0094] In one embodiment, Figure 6 As shown, step 360, based on the target behavior characteristics and target attribute characteristics of the historical behavior data, construct a historical behavior data matrix of the user identifier, including:
[0095] Step 362, the target behavior characteristics and target attribute characteristics of the historical behavior data are arranged in a matrix arrangement to generate an initial historical behavior data matrix of the user identifier.
[0096] After obtaining the target behavior features and target attribute features of the historical behavior data of user identifier A in each application, the initial historical behavior data matrix of the user identifier can be generated by arranging them in the matrix layout based on the target behavior features and target attribute features of the historical behavior data. Here, arranging in the matrix layout can, for each application, arrange the target behavior features and target attribute features of the historical behavior data in one application in a column, and then arrange the target behavior features and target attribute features of the historical behavior data in each application in turn. Finally, the initial historical behavior data matrix of the user identifier is obtained. In the initial historical behavior data matrix, there is no unique arrangement order among the various applications, and the present application does not limit this. Among them, the initial historical behavior data matrix of user identifier A can be referred to as shown in Table 1-2 below:
[0097] Table 1-2
[0098] User ID A Application 1 Application 2 Application 3 …… Application n Frequency Frequency 1 Frequency 2 Frequency 3 …… Frequency n Duration Duration 1 Duration 2 Duration 3 …… Duration n First Attribute Feature First Attribute Feature 1 First Attribute Feature 2 First Attribute Feature 3 …… First Attribute Feature n Second Attribute Feature Second Attribute Feature 1 Second Attribute Feature 2 Second Attribute Feature 3 …… Second Attribute Feature n …… …… …… …… …… ……
[0099] Step 364, for each piece of historical behavior data, calculate the similarity between the target attribute feature of the historical behavior data and the target attribute features of other pieces of historical behavior data in the historical behavior data.
[0100] Since in the initial historical behavior data matrix, there is no unique arrangement order among the various applications, the association between the historical behavior data of each application cannot be reflected. Therefore, for each piece of historical behavior data, the similarity between the target attribute feature of the historical behavior data and the target attribute features of other pieces of historical behavior data in the historical behavior data can be calculated. And the association between the historical behavior data of each application is reflected by this similarity.
[0101] Specifically, the similarity between all or part of the target attribute features of the historical behavior data and all or part of the target attribute features of other pieces of historical behavior data in the historical behavior data can be calculated. For example, referring to Table 1-2, for the historical behavior data of Application 1 of user identifier A, calculate the similarity between all or part of the target attribute features in the historical behavior data of Application 1 and all or part of the target attribute features in the historical behavior data of Application 2. Then calculate the similarity between all or part of the target attribute features in the historical behavior data of Application 1 and all or part of the target attribute features in the historical behavior data of Application 3. Calculate the similarity between all or part of the target attribute features in the historical behavior data of Application 1 and all or part of the target attribute features in the historical behavior data of each other application in turn.
[0102] In this way, the similarity between all or part of the target attribute features in the historical behavior data of application 2 and all or part of the target attribute features in the historical behavior data of each other application is calculated in sequence. The similarity between all or part of the target attribute features in the historical behavior data of application 3 and all or part of the target attribute features in the historical behavior data of each other application is calculated in sequence. In this way, the similarity between all or part of the target attribute features in the historical behavior data of any two applications is obtained.
[0103] Step 366: Sort each historical behavior data in the initial historical behavior data matrix based on the similarity to generate a historical behavior data matrix of the user identifier.
[0104] For the historical behavior data of application 1, assume that the similarity between all or part of the target attribute features in the historical behavior data of application 1 and all or part of the target attribute features in the historical behavior data of application 3 is the highest. Then, move the target behavior features and target attribute features in the historical behavior data of application 3 to be arranged adjacent to application 1. Similarly, reorder the target behavior features and target attribute features in the historical behavior data of all applications of user identifier A. In this way, a historical behavior data matrix of the user identifier is generated. Among them, the historical behavior data matrix of user identifier A can be referred to as shown in Table 1-1 and will not be elaborated here.
[0105] In the embodiment of the present application, the target behavior features and target attribute features of the historical behavior data are arranged in a matrix layout manner to generate an initial historical behavior data matrix of the user identifier. For each historical behavior data, calculate the similarity between the target attribute features of the historical behavior data and the target attribute features of other historical behavior data in each historical behavior data. Sort each historical behavior data in the initial historical behavior data matrix based on the similarity to generate a historical behavior data matrix of the user identifier. Based on the similarity, convert the multi-dimensional features (target behavior features and target attribute features) of each application from disordered arrangement to ordered arrangement. In this way, after obtaining the multi-dimensional features of the current behavior data of the user identifier, the multi-dimensional features of the current behavior data of the user identifier can be accurately mapped to the historical behavior data matrix. Furthermore, the accuracy of the user labels recognized by inputting the historical behavior data matrix of the user identifier into the label recognition model subsequently is also improved.
[0106] In one embodiment, as Figure 7 shown, step 240: Calculate the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, including:
[0107] Step 242: Obtain the current behavior data of the user identifier; the current behavior data is used to record the data corresponding to the current behaviors of the user identifier in each application.
[0108] The electronic device obtains the current behavior data of the user identifier in each application. The applications here may include social applications, life utility applications, office applications, camera beauty applications, shopping applications, entertainment applications, travel applications, financial applications, etc. Of course, the present application does not make any limitations in this regard. Among them, the current behavior data is used to record the data corresponding to the current behaviors of the user identifier in each web page or each application. The current behavior here is used to represent the operation instructions generated during the current use of each web page or each application by the user identifier. For example, the current behavior includes, but is not limited to, operation instructions such as the number of uses, single-use duration, total use duration, and browsing, searching, favoriting, liking, rewarding, purchasing, returning, and evaluating.
[0109] Step 244: For the current behavior data of the user identifier in each application, extract the behavior features and attribute features corresponding to the current behavior data from the current behavior data.
[0110] In step 242, the current behavior data of the user identifier in each application is obtained. Then, for the current behavior data of the user identifier in each application, the behavior features and attribute features can be extracted from the current behavior data of each application. For example, for the current behavior data of user identifier A in application 1, the behavior features and attribute features can be extracted from this current behavior data. For the current behavior data of user identifier A in application 2, the behavior features and attribute features can be extracted from this current behavior data. And so on, the behavior features and attribute features of the current behavior data of user identifier A in each application can be obtained.
[0111] Among them, the behavior features can be understood as the features related to behaviors directly extracted from the text data of the current behavior data of the user identifier. For example, the number of uses, single-use duration, total use duration in each web page or each application, and the related features of behaviors such as browsing, searching, favoriting, liking, rewarding, purchasing, returning, and evaluating. The attribute features include the features obtained by performing attribute analysis on the current behavior data. Here, the attribute features are different from the behavior features. The behavior features can be directly extracted from the text data of the current behavior data of the user identifier, while the attribute features cannot be directly obtained by extracting from the text data of the current behavior data. It is necessary to perform context analysis on the text corresponding to the current behavior data to implement the attribute analysis of the current behavior data, so as to generate the attribute features of the current behavior data.
[0112] Step 246: Generate the current behavior data matrix of the user identifier according to the behavior characteristics, attribute characteristics of the current behavior data, and the historical behavior data matrix of the user identifier.
[0113] The process of obtaining the behavior characteristics and attribute characteristics of the current behavior data is similar to the process of obtaining the behavior characteristics and attribute characteristics from the historical behavior data, and will not be elaborated here. After obtaining the multi-dimensional characteristics (behavior characteristics and attribute characteristics) of the current behavior data, referring to the matrix arrangement of the multi-dimensional characteristics in the historical behavior data matrix A of the user identifier, arrange the multi-dimensional characteristics of the current behavior data in a matrix to generate the current behavior data matrix of the user identifier. That is, a certain dimension characteristic in this historical behavior data matrix and the dimension characteristic of this current behavior data matrix are in the same position in the matrix. And generally, the multi-dimensional characteristics in the current behavior data matrix corresponding to the user identifier A are less than or equal to the multi-dimensional characteristics in the historical behavior data matrix of the user identifier A, and the present application does not make a limit on this.
[0114] In the embodiments of the present application, the process of constructing the current behavior data matrix of the user identifier includes: obtaining the current behavior data of the user identifier, and for the current behavior data of the user identifier in each application, extract the behavior characteristics and attribute characteristics corresponding to the current behavior data from the current behavior data. Generate the current behavior data matrix of the user identifier according to the behavior characteristics, attribute characteristics of the current behavior data, and the historical behavior data matrix of the user identifier. Refer to the historical behavior data matrix of the user identifier to convert the current behavior data of the user identifier into a current behavior data matrix. Thus, the current behavior data matrix can be input into the label recognition model to recognize the user label of the user identifier in the current behavior.
[0115] Continuing from the previous embodiment, the construction process of the current behavior data matrix of the user identifier is described. In the embodiments of the present application, step 246 is further described in detail. The specific implementation steps of generating the current behavior data matrix of the user identifier according to the behavior characteristics, attribute characteristics of the current behavior data, and the historical behavior data matrix of the user identifier include:
[0116] Arrange the behavior characteristics and attribute characteristics of the current behavior data according to the matrix arrangement of the historical behavior data matrix of the user identifier to generate the original matrix of the current behavior characteristics of the user identifier;
[0117] Perform normalization processing on the behavior characteristics and attribute characteristics in the original matrix of the current behavior characteristics to generate the current behavior data matrix.
[0118] After obtaining the multi-dimensional features (behavioral features and attribute features) of the current behavioral data, arrange the behavioral features and attribute features of the current behavioral data according to the matrix arrangement of the historical behavioral data matrix of the user identifier to generate the original matrix of the current behavioral features of the user identifier. The behavioral features and attribute features of the current behavioral data can be mapped to the corresponding positions in the historical behavioral data matrix, thus generating the original matrix of the current behavioral features of the user identifier.
[0119] Among them, mapping the behavioral features and attribute features of the current behavioral data to the corresponding positions in the historical behavioral data matrix, and thus generating the original matrix of the current behavioral features of the user identifier can be achieved in the following way: Combine the historical behavioral data matrix A of the user identifier to construct a matrix B with the same size as the historical behavioral data matrix. Assume that the current behavioral data has the j-th feature in the multi-dimensional features, then set the j-th feature in matrix B to 1; assume that the current behavioral data does not have the j-th feature in the multi-dimensional features, then set the j-th feature in matrix B to 0. Among them, the matrix B of the user identifier A can be referred to as shown in Table 1-3 below:
[0120] Table 1-3
[0121] User ID A 1 0 1 …… 0 Frequency 1 0 1 …… 0 Duration 1 0 1 …… 0 First Attribute Feature 1 0 1 …… 0 Second Attribute Feature 1 0 1 …… 0 …… …… …… …… …… ……
[0122] In this way, after taking the dot product of the matrix B of the user identifier A and the historical behavioral data matrix A of the user identifier, the original matrix C of the current behavioral data of the user identifier is generated. For example, after taking the dot product of the matrix B (Table 1-3) of the user identifier A and the historical behavioral data matrix A (Table 1-1) of the user identifier, the original matrix C of the current behavioral data of the user identifier is generated. Among them, the original matrix C of the current behavioral data of the user identifier A can be referred to as shown in Table 1-4 below:
[0123] Table 1-4
[0124] User ID A Application 1 0 Application 2 …… 0 Frequency Frequency 1 0 Frequency 2 …… 0 Duration Duration 1 0 Duration 2 …… 0 First Attribute Feature First Attribute Feature 1 0 First Attribute Feature 2 …… 0 Second Attribute Feature Second Attribute Feature 1 0 Second Attribute Feature 2 …… 0 …… …… …… …… …… ……
[0125] After generating the original matrix C of the current behavioral data of the user identifier A, the behavioral features and attribute features in the original matrix of the current behavioral features can be normalized or standardized to generate the current behavioral data matrix.
[0126] Among them, for normalizing the behavioral features and attribute features in the original matrix of the current behavioral features, the following formula can be used for calculation:
[0127]
[0128] X scaled =X std *(max - min)+min (1 - 7)
[0129] Among them, X.max and X.min refer to the maximum and minimum values of the given scaling range. For example, X.max can be set to 1 and X.min can be set to 0; X is the multi-dimensional feature in the original matrix C of the current behavior data; X std refers to the variance of the multi-dimensional features in the original matrix C of the current behavior data; X scaled refers to the standard deviation of the multi-dimensional features in the original matrix C of the current behavior data.
[0130] Specifically, since X.max is set to 1 and X.min is set to 0, after normalizing the multi-dimensional features in the original matrix C of the current behavior data, the multi-dimensional features in the original matrix C of the current behavior data are scaled to between 0 and 1.
[0131] Finally, based on the standard deviation of the multi-dimensional features in the original matrix C of the current behavior data, the current behavior data matrix is generated.
[0132] In the embodiment of the present application, in the process of constructing the current behavior data matrix of the user identifier, first, the behavior features and attribute features of the current behavior data are arranged according to the matrix arrangement method of the historical behavior data matrix of the user identifier to generate the original matrix of the current behavior features of the user identifier; secondly, the behavior features and attribute features in the original matrix of the current behavior features are normalized to generate the current behavior data matrix. Based on the historical behavior data matrix, the current behavior data is accurately converted into a matrix form. And the original matrix of the current behavior features is normalized, realizing the compression processing of the data in the original matrix of the current behavior features and reducing the amount of data. It is convenient to input the current behavior data matrix into the label recognition model for user label recognition later, which improves the accuracy of user label recognition while reducing the calculation amount in the process of user label recognition.
[0133] In one embodiment, the label recognition model is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network.
[0134] Among them, the AlexNet convolutional neural network sequentially includes 5 convolutional layers (for short) and 3 fully connected layers (fully connected layer FC6, fully connected layer FC7, fully connected layer FC8). The 5 convolutional layers here include convolutional layer C1, convolutional layer C2, convolutional layer C3, convolutional layer C4, and convolutional layer C5. Among them, the processing procedures of convolutional layer C1 and convolutional layer C2 are both: first perform convolutional processing on the input feature map, then use the ReLU function as the activation function of convolutional layer C1 for nonlinear processing, then perform pooling processing in the pooling layer, and finally, perform normalization processing on the result of the pooling processing. Among them, the processing procedures of convolutional layer C3 and convolutional layer C4 are both: first perform convolutional processing on the input feature map, and then use the ReLU function as the activation function for nonlinear processing. Among them, the processing procedure of convolutional layer C5 is: first perform convolutional processing on the input feature map, then use the ReLU function as the activation function of convolutional layer C5 for nonlinear processing, and then perform pooling processing in the pooling layer.
[0135] The 3 fully connected layers here include fully connected layer FC6, fully connected layer FC7, and fully connected layer FC8. Among them, the processing procedures of fully connected layer FC6, fully connected layer FC7, and fully connected layer FC8 are all: first perform fully connected processing on the input feature map, then use the ReLU function as the activation function for nonlinear processing, and finally perform dropout processing to avoid overfitting.
[0136] Among them, the VGGNet convolutional neural network can be divided into VGG16 and VGG19, etc., and this application does not make any limitations in this regard. Here, VGG16 contains 16 layers of network structure, and VGG19 contains 19 layers of network structure. The last three fully connected layers in VGG16 and VGG19 are exactly the same, and both VGG16 and VGG19 include 5 groups of convolutional layers in the overall network structure, and a max pooling layer MaxPool is connected after the convolutional layer. The difference between VGG16 and VGG19 lies in the number of cascaded convolutional layers included in these 5 groups of convolutional layers. VGG19 has 3 more cascaded convolutional layers than VGG16.
[0137] In addition, the size of the convolutional kernel used in the VGGNet convolutional neural network is 3*3. By using multiple convolutional layers with smaller convolutional kernels instead of a convolutional layer with a larger convolutional kernel, the VGGNet convolutional neural network can, on the one hand, reduce the parameters, and on the other hand, it is equivalent to performing more nonlinear mappings, increasing the fitting and expression ability of the network.
[0138] In the embodiments of the present application, the label recognition model is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network. Specifically, the label recognition model adopts the network structure of the AlexNet convolutional neural network, and replaces the larger convolutional kernels in the convolutional layers of the AlexNet convolutional neural network with smaller convolutional kernels. First, it adopts the simple network structure in the AlexNet convolutional neural network; second, replacing the larger convolutional kernels in the convolutional layers of the AlexNet convolutional neural network with smaller convolutional kernels can, on the one hand, reduce the parameters, and on the other hand, is equivalent to performing more non-linear mappings, increasing the fitting and expression ability of the network.
[0139] In one embodiment, the label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers;
[0140] As Figure 8 shown, in step 260, input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition, and generate a user behavior label corresponding to the user identifier, including:
[0141] Step 262, input the current behavior data matrix of the user identifier into the convolutional layer for convolutional processing to generate a first intermediate information matrix;
[0142] Step 264, input the first intermediate information matrix into the pooling layer for pooling processing to generate a second intermediate information matrix;
[0143] Step 266, input the second intermediate information matrix into the fully connected layer for processing to generate a user behavior label corresponding to the user identifier.
[0144] The label recognition model in the embodiments of the present application is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network. Specifically, the label recognition model adopts the network structure of the AlexNet convolutional neural network, and replaces the larger convolutional kernels in the convolutional layers of the AlexNet convolutional neural network with smaller convolutional kernels. The label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers. Here, no specific limitations are imposed on the specific structure of the label recognition model. For example, the label recognition model can include four convolutional layers, two pooling layers, and three fully connected layers; of course, the label recognition model can also include five convolutional layers, two pooling layers, and three fully connected layers; of course, the label recognition model can also include four convolutional layers, two pooling layers, and four fully connected layers.
[0145] Specifically, as Figure 9As shown in the figure, it is a schematic diagram of the network structure of a label recognition model in an embodiment. The label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers. Among them, at least four convolutional layers include the first convolutional layer C1, the second convolutional layer C2, the third convolutional layer C3, and the fourth convolutional layer C4. At least two pooling layers include the first pooling layer pooling1 and the second pooling layer pooling2. At least three fully connected layers include the first fully connected layer FC5, the second fully connected layer FC6, and the third fully connected layer FC7. The output of the first convolutional layer is connected to the input of the first pooling layer, the output of the first pooling layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second pooling layer, the output of the second pooling layer is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, and the output of the fourth convolutional layer is sequentially connected to the first fully connected layer, the second fully connected layer, and the third fully connected layer. And a relatively small convolutional kernel is used in the convolutional layer here, such as 3*3 or 5*5, etc., and the present application does not limit this.
[0146] The current behavior data matrix of the user identifier can be regarded as a grayscale image frame. The elements (multi-dimensional features) in the current behavior data matrix can be regarded as the pixels of the grayscale image frame, and the values of the multi-dimensional features can be regarded as the pixel values of the grayscale image frame. Then, in the process of inputting the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate a user behavior label corresponding to the user identifier, it includes: inputting the current behavior data matrix of the user identifier (regarded as a grayscale image frame) into the convolutional layer for convolutional processing to generate a first intermediate information matrix; inputting the first intermediate information matrix into the pooling layer for pooling processing to generate a second intermediate information matrix; inputting the second intermediate information matrix into the fully connected layer for processing to generate a user behavior label corresponding to the user identifier.
[0147] Specifically, the current behavior data matrix of the user identifier is sequentially input into the convolutional layer in the label recognition model as a grayscale image frame for convolutional processing to generate a first intermediate feature map (Feature Map), which is equivalent to the first intermediate information matrix; inputting the first intermediate feature map into the pooling layer for pooling processing to generate a second intermediate feature map (Feature Map), which is equivalent to the second intermediate information matrix; finally, inputting the second intermediate feature map (Feature Map) into the fully connected layer for processing to generate a user behavior label corresponding to the user identifier. Suppose the output layer in the fully connected layer includes 1000 convolutional kernels, that is, neurons. Then, after training with 1000 convolutional kernels, 1000 float-type values will be output. These 1000 float-type values are the prediction results, that is, the user behavior labels corresponding to the user identifier. Of course, the number of convolutional kernels in the output layer is not limited here.
[0148] In the embodiments of the present application, the label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers, and the convolutional layers here use smaller convolutional kernels. Then, the current behavior data matrix of the user identification can be regarded as a grayscale image frame. Then, the current behavior data matrix (regarded as a grayscale image frame) of the user identification is input into the convolutional layer for convolutional processing to generate a first intermediate information matrix; then, the first intermediate information matrix is input into the pooling layer for pooling processing to generate a second intermediate information matrix; finally, the second intermediate information matrix is input into the fully connected layer for processing to generate a user behavior label corresponding to the user identification. First, a simple network structure in the AlexNet convolutional neural network is adopted; second, the larger convolutional kernels in the convolutional layers of the AlexNet convolutional neural network are replaced with smaller convolutional kernels. On the one hand, this can reduce the parameters, and on the other hand, it is equivalent to performing more non-linear mappings, increasing the fitting expression ability and generalization ability of the network. Thus, more data can be predicted through the label recognition model, improving the robustness and recall rate of the label recognition model.
[0149] In one embodiment, the activation functions used in at least four convolutional layers, the first fully connected layer, and the second fully connected layer are ReLU functions, and the activation function used in the third fully connected layer is a softmax function.
[0150] Specifically, the label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers, and the convolutional layers here use smaller convolutional kernels. For example, the size of the convolutional kernels of at least four convolutional layers is 3×3. Of course, the size of the convolutional kernels is not limited here. Using smaller convolutional kernels in the convolutional layer can, on the one hand, reduce the parameters, and on the other hand, it is equivalent to performing more non-linear mappings.
[0151] Among them, the activation functions used in at least four convolutional layers, the first fully connected layer, and the second fully connected layer in the label recognition model are ReLU functions. The linear rectification function (ReLU function), also known as the rectified linear unit, is an activation function in an artificial neural network (activation function), usually referring to non-linear functions represented by the ramp function and its variants. Among them, the formula of the ReLU function is as follows:
[0152] f(x) = max(0, x) (1-8)
[0153] Among them, the activation function adopted by the third fully connected layer, i.e., the output layer, is the softmax function. The softmax function is generally an exponential function. Since the curve of the exponential function shows an increasing trend and the slope of the curve gradually increases, the Softmax function in exponential form can be used to amplify a relatively small change on the x-axis on the y-axis. The formula of the softmax function is as follows:
[0154]
[0155] Among them, N represents the number of categories, a represents the output vector of the fully connected layer (FC layer), and a j represents the j-th value of the vector a.
[0156] In the embodiments of the present application, the ReLU function is used as the activation function in at least four convolutional layers, the first fully connected layer, and the second fully connected layer of the label recognition model. Using the ReLU function as the activation function can perform gradient descent and backpropagation more effectively, thereby avoiding the problems of gradient explosion and gradient disappearance. And the activation function adopted by the third fully connected layer, i.e., the output layer, is the softmax function. The Softmax function in exponential form can be used to amplify a relatively small change on the x-axis on the y-axis. Therefore, using different activation functions for nonlinear processing in the label recognition model can comprehensively extract features. Furthermore, the accuracy of user behavior label recognition can be improved.
[0157] In one embodiment, as Figure 10 shown, a user label recognition method is provided, which further includes:
[0158] Step 1020, obtain a training set, where the training set includes a current behavior data matrix corresponding to multiple user identifiers and an annotated user behavior label corresponding to multiple user identifiers.
[0159] The training process of the label recognition model is provided here. First, from various web pages or various application programs, obtain a current behavior data matrix corresponding to multiple user identifiers and an annotated user behavior label corresponding to multiple user identifiers. Among them, the current behavior data matrix corresponding to the user identifier can be calculated based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier. The annotated user behavior label corresponding to the user identifier can be a label generated by manual annotation, and the present application does not limit this. Based on the current behavior data matrix corresponding to multiple user identifiers and the annotated user behavior label corresponding to multiple user identifiers, the training set is obtained.
[0160] Step 1040: Input the current behavior data matrix corresponding to multiple user identifiers into the initial label recognition model for user behavior label recognition, and generate predicted user behavior labels corresponding to the user identifiers.
[0161] Here, the initial label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers. Among them, at least four convolutional layers include the first convolutional layer, the second convolutional layer, the third convolutional layer, and the fourth convolutional layer; at least two pooling layers include the first pooling layer and the second pooling layer; at least three fully connected layers include the first fully connected layer, the second fully connected layer, and the third fully connected layer. The output of the first convolutional layer is connected to the input of the first pooling layer, the output of the first pooling layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second pooling layer, the output of the second pooling layer is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, and the output of the fourth convolutional layer is successively connected to the first fully connected layer, the second fully connected layer, and the third fully connected layer. And initial values are preset for each parameter in the initial label recognition model. Here, a relatively small convolutional kernel is used in the convolutional layer, such as 3*3 or 5*5, etc. The present application does not limit this.
[0162] Secondly, input the current behavior data matrix corresponding to multiple user identifiers into the initial label recognition model for user behavior label recognition, and generate predicted user behavior labels corresponding to the user identifiers. Specifically, input the current behavior data matrix corresponding to multiple user identifiers into the convolutional layer in the initial label recognition model for convolutional processing to generate a first intermediate information matrix; input the first intermediate information matrix into the pooling layer for pooling processing to generate a second intermediate information matrix; input the second intermediate information matrix into the fully connected layer for processing to generate predicted user behavior labels corresponding to the user identifiers.
[0163] Step 1060: Calculate the value of the loss function according to the labeled user behavior labels corresponding to the user identifiers and the predicted user behavior labels corresponding to the user identifiers.
[0164] Again, after obtaining the predicted user behavior labels corresponding to each user identifier, the value of the loss function can be calculated according to the labeled user behavior labels corresponding to the user identifiers and the predicted user behavior labels corresponding to the user identifiers.
[0165] Among them, the activation function used in the third fully connected layer, that is, the output layer, is the softmax function. The formula of the softmax function is as follows:
[0166]
[0167] Among them, N represents the number of categories, a represents the output vector of the fully connected layer (FC layer), aj Represents the j-th value of vector a.
[0168] Then, through S i Derive a j and calculate the gradient value D using the gradient descent method j S i . Through S i Derive a j The formula for the derivative is as follows:
[0169]
[0170] Among them, the formula for the loss function L of the output layer is:
[0171] Secondly, calculate the derivative of the loss function L with respect to the input x i to obtain the value of the loss function L:
[0172]
[0173] Among them, k is j, -y i (1 - p j ) is the gradient value D when i = j j S i , -p k p i is the gradient value D when i ≠ j j S i ; p i refers to the probability of the prediction result, and y i refers to the actual result corresponding to the prediction result.
[0174] Step 1080, adjust the parameters of the initial label recognition model based on the value of the loss function to generate a label recognition model.
[0175] Finally, based on the value of the loss function L, the parameters of the initial label recognition model can be adjusted to obtain a label recognition model. That is, adjust the initial values of the parameters of the initial label recognition model based on the value of the loss function L, so that the predicted user behavior labels calculated by the label recognition model after parameter adjustment are closer to the labeled user behavior labels.
[0176] In the embodiments of the present application, a training process of a label recognition model is provided. First, a training set is obtained. The training set includes a current behavior data matrix corresponding to multiple user identifiers and labeled user behavior labels corresponding to multiple user identifiers. Second, the current behavior data matrix corresponding to multiple user identifiers is input into an initial label recognition model to perform user behavior label recognition, and predicted user behavior labels corresponding to the user identifiers are generated. Third, according to the labeled user behavior labels corresponding to the user identifiers and the predicted user behavior labels corresponding to the user identifiers, the value of a loss function is calculated. Finally, based on the value of the loss function, the parameters of the initial label recognition model are adjusted to generate a label recognition model. By training the initial label recognition model based on the current behavior data matrix corresponding to a large number of user identifiers in the training set and the labeled user behavior labels corresponding to a large number of user identifiers, the accuracy of the finally obtained label recognition model is improved. Furthermore, the accuracy of the user behavior labels corresponding to the user identifiers generated by inputting the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition is improved.
[0177] In one embodiment, a user label recognition method is provided, which further includes:
[0178] Generating a user profile corresponding to the user identifier based on the user behavior label of the user identifier;
[0179] Performing personalized recommendation for the user identifier according to the user profile corresponding to the user identifier.
[0180] Specifically, the electronic device obtains a historical behavior data matrix corresponding to the user identifier. The historical behavior data matrix includes behavior characteristics and attribute characteristics corresponding to the historical behavior data of the user identifier; the attribute characteristics include the characteristics obtained by performing attribute analysis on the historical behavior data. Based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, the current behavior data matrix of the user identifier is calculated. The current behavior data matrix of the user identifier is input into the label recognition model to perform user behavior label recognition, and user behavior labels corresponding to the user identifier are generated.
[0181] Then, a user profile corresponding to the user identifier can be generated based on the user behavior label of the user identifier. Among them, the user profile refers to a labeled user model abstracted according to information such as the user's social attributes, living habits, and consumption behaviors. The core of constructing a user profile is to label the user, and the label is a highly refined feature identifier obtained by analyzing user information.
[0182] Finally, personalized recommendations can be made for the user identifier based on the user portrait corresponding to the user identifier. That is, based on the tagged user model, for the user behavior tags in the user model, personalized recommendation information corresponding to the user behavior tags is determined. And the personalized recommendation information is sent to the web page or application program logged in by the user identifier, thus completing the process of making personalized recommendations for the user identifier based on the user portrait corresponding to the user identifier. For example, product recommendations, advertisement placement, etc. are made for the user identifier according to the user portrait corresponding to the user identifier. This application does not make any limitations in this regard.
[0183] For example, the user behavior tags in the user model of a certain user identifier A include: stock trading, decoration, training courses, beauty makeup, etc. Then personalized recommendation information can be determined based on these user behavior tags: A-share information, decoration companies, oral English video courses, lipsticks, etc. And the personalized recommendation information is sent to the web page or application program logged in by the user identifier, so that the user identifier can obtain this personalized recommendation information during the process of logging in or browsing the web page or application program.
[0184] In the embodiments of this application, personalized recommendation based on the user portrait is realized, which improves the recommendation efficiency and can recommend products or content that users are really interested in, thus improving the accuracy of the recommendation. Furthermore, the conversion rate of the product or the click-through rate of the pushed content is increased.
[0185] In a specific embodiment, as Figure 11 shown, a method for identifying user tags is provided, including:
[0186] Step 1102, obtaining the historical behavior data of the user identifier in each application program; the historical behavior data is used to record the data corresponding to the historical behavior of the user identifier in each application program;
[0187] Step 1104, for the historical behavior data of the user identifier in each application program, extracting the features related to the historical behavior from the historical behavior data as the initial behavior features of the historical behavior data;
[0188] Step 1106, performing attribute analysis on the historical behavior data to generate the initial attribute features of the historical behavior data;
[0189] Among them, step 1106 includes step 1106a, performing text segmentation on the historical behavior data to generate the text segmentation result of the historical behavior data; step 1106b, inputting the text segmentation result of the historical behavior data into the Word2vec neural network model for word vector extraction to generate multiple word vectors of the historical behavior data; step 1106c, using the multiple word vectors of the historical behavior data as the initial attribute features of the historical behavior data;
[0190] Step 1108: Extract the target behavior features and target attribute features of the historical behavior data from the initial behavior features and initial attribute features of the historical behavior data using the extreme gradient boosting algorithm;
[0191] Step 1110: Arrange the target behavior features and target attribute features of the historical behavior data in a matrix layout to generate the initial historical behavior data matrix of the user identifier;
[0192] Step 1112: Calculate the similarity between the target attribute features of each historical behavior data and the target attribute features of other historical behavior data in each historical behavior data;
[0193] Step 1114: Sort each historical behavior data in the initial historical behavior data matrix based on the similarity to generate the historical behavior data matrix of the user identifier;
[0194] Step 1116: Obtain the current behavior data of the user identifier; the current behavior data is used to record the data corresponding to the current behavior of the user identifier in each application;
[0195] Step 1118: For the current behavior data of the user identifier in each application, extract the behavior features and attribute features corresponding to the current behavior data from the current behavior data;
[0196] Step 1120: Arrange the behavior features and attribute features of the current behavior data in the matrix layout of the historical behavior data matrix of the user identifier to generate the original matrix of the current behavior features of the user identifier;
[0197] Step 1122: Perform normalization processing on the behavior features and attribute features in the original matrix of the current behavior features to generate the current behavior data matrix;
[0198] Step 1124: Input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate the user behavior label corresponding to the user identifier. Here, the label recognition model is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network. Among them, the label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers; at least four convolutional layers include the first convolutional layer, the second convolutional layer, the third convolutional layer, and the fourth convolutional layer, at least two pooling layers include the first pooling layer, the second pooling layer, and at least three fully connected layers include the first fully connected layer, the second fully connected layer, and the third fully connected layer;
[0199] The output of the first convolutional layer is connected to the input of the first pooling layer, the output of the first pooling layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second pooling layer, the output of the second pooling layer is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, and the output of the fourth convolutional layer is sequentially connected to the first fully-connected layer, the second fully-connected layer, and the third fully-connected layer.
[0200] In the embodiment of the present application, the obtained historical behavior data matrix corresponding to the user identifier includes both behavior features and attribute features. Moreover, since the attribute features include the features obtained by performing attribute analysis on the historical behavior data, compared with the traditional technology, the present application adds attribute features, which is equivalent to mining high-dimensional features from the historical behavior data and realizing a more in-depth mining of the features in the historical behavior data. Then, based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, the current behavior data matrix of the user identifier is calculated. The current behavior data matrix of the user identifier is input into the label recognition model for user behavior label recognition, and user behavior labels corresponding to the user identifier are generated.
[0201] Among them, the label recognition model is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network. First, it adopts the simple network structure in the AlexNet convolutional neural network. Second, the larger convolutional kernels in the convolutional layers of the AlexNet convolutional neural network are replaced with smaller convolutional kernels. On the one hand, this can reduce the parameters, and on the other hand, it is equivalent to performing more non-linear mappings, increasing the fitting and expression ability of the network. Finally, through the label recognition model for user behavior label recognition, the accuracy of user behavior label recognition is further improved.
[0202] In one embodiment, as Figure 12 shown, a user label recognition device 1200 is provided, including:
[0203] A historical behavior data matrix acquisition module 1220, configured to acquire a historical behavior data matrix corresponding to a user identifier; the historical behavior data matrix includes behavior features and attribute features corresponding to the historical behavior data of the user identifier; the attribute features include the features obtained by performing attribute analysis on the historical behavior data;
[0204] A current behavior data matrix acquisition module 1240, configured to calculate the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier;
[0205] The user behavior label generation module 1260 is configured to input the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition, and generate user behavior labels corresponding to the user identifier.
[0206] In one embodiment, as Figure 13 shown, a user label recognition device 1200 is provided, further including: a historical behavior data matrix construction module 1280; wherein, the historical behavior data matrix construction module 1280 includes:
[0207] The historical behavior data acquisition unit 1282 is configured to acquire the historical behavior data of the user identifier in each application; the historical behavior data is used to record the data corresponding to the historical behavior of the user identifier in each application;
[0208] The first feature extraction unit 1284 is configured to extract the target behavior feature and the target attribute feature of the historical behavior data from the historical behavior data of the user identifier in each application.
[0209] The historical behavior data matrix construction unit 1286 is configured to construct the historical behavior data matrix of the user identifier based on the target behavior feature and the target attribute feature of the historical behavior data.
[0210] In one embodiment, the feature extraction unit 1284 is further configured to extract the features related to the historical behavior from the historical behavior data of the user identifier in each application as the initial behavior feature of the historical behavior data; perform attribute analysis on the historical behavior data to generate the initial attribute feature of the historical behavior data; and extract the target behavior feature and the target attribute feature of the historical behavior data from the initial behavior feature and the initial attribute feature of the historical behavior data by using the extreme gradient boosting algorithm.
[0211] In one embodiment, the feature extraction unit 1284 is further configured to perform text segmentation on the historical behavior data to generate the text segmentation result of the historical behavior data; input the text segmentation result of the historical behavior data into the Word2vec neural network model for word vector extraction to generate multiple word vectors of the historical behavior data; and use the multiple word vectors of the historical behavior data as the initial attribute feature of the historical behavior data.
[0212] In one embodiment, the historical behavior data matrix construction unit 1286 is further configured to arrange the target behavior features and target attribute features of the historical behavior data in a matrix arrangement manner to generate an initial historical behavior data matrix of the user identifier; calculate the similarity between the target attribute features of the historical behavior data and the target attribute features of other historical behavior data in each historical behavior data; and sort each historical behavior data in the initial historical behavior data matrix based on the similarity to generate a historical behavior data matrix of the user identifier.
[0213] In one embodiment, the current behavior data matrix acquisition module 1240 includes:
[0214] A current behavior data acquisition unit, configured to acquire the current behavior data of the user identifier; the current behavior data is used to record the data corresponding to the current behavior of the user identifier in each application program;
[0215] A second feature extraction unit, configured to extract the behavior features and attribute features corresponding to the current behavior data from the current behavior data of the user identifier in each application program;
[0216] A current behavior data matrix generation unit, configured to generate a current behavior data matrix of the user identifier according to the behavior features and attribute features of the current behavior data and the historical behavior data matrix of the user identifier.
[0217] In one embodiment, the current behavior data matrix generation unit is further configured to arrange the behavior features and attribute features of the current behavior data in the matrix arrangement manner of the historical behavior data matrix of the user identifier to generate a current behavior feature original matrix of the user identifier; and perform normalization processing on the behavior features and attribute features in the current behavior feature original matrix to generate a current behavior data matrix.
[0218] In one embodiment, the label recognition model is a convolutional neural network model constructed based on the AlexNet convolutional neural network and the VGGNet convolutional neural network.
[0219] In one embodiment, the label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers;
[0220] The user behavior label generation module 1260 is further configured to input the current behavior data matrix of the user identifier into the convolutional layer for convolutional processing to generate a first intermediate information matrix; input the first intermediate information matrix into the pooling layer for pooling processing to generate a second intermediate information matrix; and input the second intermediate information matrix into the fully connected layer for processing to generate a user behavior label corresponding to the user identifier.
[0221] In one embodiment, at least four convolutional layers include a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer, at least two pooling layers include a first pooling layer and a second pooling layer, and at least three fully connected layers include a first fully connected layer, a second fully connected layer, and a third fully connected layer;
[0222] The output of the first convolutional layer is connected to the input of the first pooling layer, the output of the first pooling layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second pooling layer, the output of the second pooling layer is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, and the output of the fourth convolutional layer is sequentially connected to the first fully connected layer, the second fully connected layer, and the third fully connected layer.
[0223] In one embodiment, the convolutional kernels of at least four convolutional layers have a size of 3×3.
[0224] In one embodiment, the activation functions used in at least four convolutional layers, the first fully connected layer, and the second fully connected layer are ReLU functions, and the activation function used in the third fully connected layer is a softmax function.
[0225] In one embodiment, there is provided a user label recognition device, further including: a label recognition model training module, configured to obtain a training set, where the training set includes a current behavior data matrix corresponding to multiple user identifiers and an annotated user behavior label corresponding to multiple user identifiers; input the current behavior data matrix corresponding to multiple user identifiers into an initial label recognition model for user behavior label recognition to generate a predicted user behavior label corresponding to the user identifier; calculate the value of a loss function according to the annotated user behavior label corresponding to the user identifier and the predicted user behavior label corresponding to the user identifier; and adjust the parameters of the initial label recognition model based on the value of the loss function to generate a label recognition model.
[0226] In one embodiment, there is provided a user label recognition device, further including:
[0227] A user profile generation module, configured to generate a user profile corresponding to a user identifier based on the user behavior label of the user identifier;
[0228] A personalized recommendation module, configured to perform personalized recommendation for the user identifier according to the user profile corresponding to the user identifier.
[0229] The division of each module in the above user label recognition device is only for illustrative purposes. In other embodiments, the user label recognition device may be divided into different modules as needed to complete all or part of the functions of the above user label recognition device.
[0230] For the specific limitations of the user label recognition device, reference may be made to the limitations of the user label recognition method in the foregoing text, which will not be elaborated herein. Each module in the above user label recognition device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or stored in the memory of the electronic device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0231] Figure 14 FIG. is a schematic diagram of the internal structure of an electronic device in an embodiment. The electronic device can be any terminal device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc. The electronic device includes a processor and a memory connected by a system bus. Among them, the processor can include one or more processing units. The processor can be a CPU (Central Processing Unit) or a DSP (Digital Signal Processing), etc. The memory can include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement a user label recognition method provided in each of the following embodiments. The internal memory provides a high-speed cache operating environment for the operating system computer program in the non-volatile storage medium.
[0232] In the embodiments of the present application, the implementation of each module in the provided user label recognition device can be in the form of a computer program. The computer program can run on the electronic device. The program module constituted by the computer program can be stored on the memory of the electronic device. When the computer program is executed by the processor, the steps of the method described in the embodiments of the present application are implemented.
[0233] The embodiments of the present application also provide a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, cause the processors to execute the steps of the user label recognition method.
[0234] The embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, causes the computer to execute the user label recognition method.
[0235] Any reference to memory, storage, database, or other media used in this application may include non-volatile and / or volatile memory. Non-volatile memory may include ROM (Read-Only Memory), PROM (Programmable Read-only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-only Memory), or flash memory. Volatile memory may include RAM (Random Access Memory), which serves as an external cache. By way of illustration and not limitation, RAM is available in many forms, such as SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), SDRAM (Synchronous Dynamic Random Access Memory), double data rate DDR SDRAM (Double Data Rate Synchronous Dynamic Random Access memory), ESDRAM (Enhanced Synchronous Dynamic Random Access memory), SLDRAM (Sync Link Dynamic Random Access Memory), RDRAM (Rambus Dynamic Random Access Memory), DRDRAM (Direct Rambus Dynamic Random Access Memory).
[0236] The above embodiments merely represent several implementation manners of this application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several variations and improvements can still be made, and these all fall within the protection scope of this application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.
Claims
1. A user label recognition method, characterized in that, Including: Obtain a historical behavior data matrix corresponding to the user identifier; the historical behavior data matrix includes behavior characteristics and attribute characteristics corresponding to the historical behavior data of the user identifier; the attribute characteristics include characteristics obtained by performing attribute analysis on the historical behavior data; Based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier, calculate the current behavior data matrix of the user identifier; Input the current behavior data matrix of the user identifier into a label recognition model for user behavior label recognition, and generate a user behavior label corresponding to the user identifier; The calculating the current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier includes: obtaining the current behavior data of the user identifier; the current behavior data is used to record data corresponding to the current behavior of the user identifier in each application program; for the current behavior data of the user identifier in each application program, extract behavior characteristics and attribute characteristics corresponding to the current behavior data from the current behavior data; generate the current behavior data matrix of the user identifier according to the behavior characteristics and attribute characteristics of the current behavior data and the historical behavior data matrix of the user identifier; The generating the current behavior data matrix of the user identifier according to the behavior characteristics and attribute characteristics of the current behavior data and the historical behavior data matrix of the user identifier includes: arranging the behavior characteristics and attribute characteristics of the current behavior data in the matrix arrangement manner of the historical behavior data matrix of the user identifier to generate an original matrix of the current behavior characteristics of the user identifier; performing normalization processing on the behavior characteristics and the attribute characteristics in the original matrix of the current behavior characteristics to generate the current behavior data matrix.
2. The method according to claim 1, characterized in that The method further includes: Obtain the historical behavior data of the user identifier in each application program; the historical behavior data is used to record data corresponding to the historical behavior of the user identifier in each application program; For the historical behavior data of the user identifier in each application program, extract the target behavior characteristics and target attribute characteristics of the historical behavior data from the historical behavior data; Based on the target behavior characteristics and target attribute characteristics of the historical behavior data, construct the historical behavior data matrix of the user identifier.
3. The method according to claim 2, wherein The extracting the target behavior characteristics and target attribute characteristics of the historical behavior data from the historical behavior data for the user identifier in each application program includes: For the historical behavior data of the user identifier in each application program, extract features related to the historical behavior from the historical behavior data as the initial behavior characteristics of the historical behavior data; Perform attribute analysis on the historical behavior data to generate the initial attribute characteristics of the historical behavior data; Adopt an extreme gradient boosting algorithm to extract the target behavior characteristics and target attribute characteristics of the historical behavior data from the initial behavior characteristics and initial attribute characteristics of the historical behavior data.
4. The method according to claim 3, wherein Performing attribute analysis on the historical behavior data to generate initial attribute features of the historical behavior data, including: Performing text segmentation on the historical behavior data to generate a text segmentation result of the historical behavior data; Inputting the text segmentation result of the historical behavior data into a Word2vec neural network model for word vector extraction to generate multiple word vectors of the historical behavior data; Using the multiple word vectors of the historical behavior data as the initial attribute features of the historical behavior data.
5. The method according to claim 2, characterized in that, Constructing a historical behavior data matrix of the user identifier based on the target behavior features and target attribute features of the historical behavior data, including: Arranging the target behavior features and target attribute features of the historical behavior data according to a matrix arrangement method to generate an initial historical behavior data matrix of the user identifier; Calculating the similarity between the target attribute feature of each historical behavior data and the target attribute features of other historical behavior data in each historical behavior data; Sorting each historical behavior data in the initial historical behavior data matrix based on the similarity to generate a historical behavior data matrix of the user identifier.
6. The method according to claim 1, wherein The label recognition model is a convolutional neural network model constructed based on an AlexNet convolutional neural network and a VGGNet convolutional neural network.
7. The method according to claim 6, wherein The label recognition model includes at least four convolutional layers, at least two pooling layers, and at least three fully connected layers; Inputting the current behavior data matrix of the user identifier into the label recognition model for user behavior label recognition to generate a user behavior label corresponding to the user identifier, including: Inputting the current behavior data matrix of the user identifier into the convolutional layer for convolutional processing to generate a first intermediate information matrix; Inputting the first intermediate information matrix into the pooling layer for pooling processing to generate a second intermediate information matrix; Inputting the second intermediate information matrix into the fully connected layer for processing to generate a user behavior label corresponding to the user identifier.
8. The method according to claim 7, wherein The at least four convolutional layers include a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer, the at least two pooling layers include a first pooling layer and a second pooling layer, and the at least three fully connected layers include a first fully connected layer, a second fully connected layer, and a third fully connected layer; The output of the first convolutional layer is connected to the input of the first pooling layer, the output of the first pooling layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the second pooling layer, the output of the second pooling layer is connected to the input of the third convolutional layer, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, and the output of the fourth convolutional layer is sequentially connected to the first fully connected layer, the second fully connected layer, and the third fully connected layer.
9. The method according to claim 7 or 8, characterized in that The convolutional kernel size of the at least four convolutional layers is 3×3.
10. The method according to claim 8, wherein The activation functions used in the at least four convolutional layers, the first fully-connected layer, and the second fully-connected layer are ReLU functions, and the activation function used in the third fully-connected layer is a softmax function.
11. The method according to claim 6, characterized in that The method further includes: Obtaining a training set, where the training set includes a current behavior data matrix corresponding to multiple user identifiers and an annotated user behavior label corresponding to the multiple user identifiers; Inputting the current behavior data matrix corresponding to the multiple user identifiers into an initial label recognition model for user behavior label recognition, and generating a predicted user behavior label corresponding to the user identifier; Calculating the value of a loss function based on the annotated user behavior label corresponding to the user identifier and the predicted user behavior label corresponding to the user identifier; Adjusting the parameters of the initial label recognition model based on the value of the loss function to generate a label recognition model.
12. The method according to claim 1, wherein The method further includes: Generating a user profile corresponding to the user identifier based on the user behavior label of the user identifier; Performing personalized recommendation on the user identifier according to the user profile corresponding to the user identifier.
13. A user tag recognition device, characterized in that, It includes: A historical behavior data matrix acquisition module for acquiring a historical behavior data matrix corresponding to a user identifier; the historical behavior data matrix includes a behavior feature and an attribute feature corresponding to the historical behavior data of the user identifier; the behavior feature includes a behavior-related feature extracted from the historical behavior data of the user identifier; the attribute feature includes a feature obtained by performing attribute analysis on the historical behavior data. A current behavior data matrix acquisition module for calculating a current behavior data matrix of the user identifier based on the current behavior data of the user identifier and the historical behavior data matrix of the user identifier. A user behavior label generation module for inputting the current behavior data matrix of the user identifier into a label recognition model for user behavior label recognition, and generating a user behavior label corresponding to the user identifier. The current behavior data matrix acquisition module includes: a current behavior data acquisition unit for acquiring the current behavior data of the user identifier; the current behavior data is used to record data corresponding to the current behavior of the user identifier in each application program; a second feature extraction unit for extracting a behavior feature and an attribute feature corresponding to the current behavior data from the current behavior data of the user identifier in each application program; a current behavior data matrix generation unit for generating the current behavior data matrix of the user identifier according to the behavior feature and the attribute feature of the current behavior data and the historical behavior data matrix of the user identifier. The current behavior data matrix generation unit is further configured to arrange the behavior feature and the attribute feature of the current behavior data in the matrix arrangement manner of the historical behavior data matrix of the user identifier to generate an original current behavior feature matrix; and perform normalization processing on the behavior feature and the attribute feature in the original current behavior feature matrix to generate the current behavior data matrix.
14. An electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, characterized in that, When the computer program is executed by the processor, the processor is caused to perform the steps of the user label recognition method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the user label recognition method according to any one of claims 1 to 12 are implemented.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the steps of the user label recognition method according to any one of claims 1 to 12 are implemented.
Citation Information
Patent Citations
Product recommendation method and device based on conversation robot, medium and server
CN109727091A
Information pushing method and system and non-transitory storage medium
CN111274501A
User portrait generation method and device, equipment and storage medium
CN112035742A