User object classification method and apparatus, computer readable medium, and electronic device
By monitoring user application switching behavior in real time and processing it using a pre-trained language model and an autoencoder clustering network, the dynamic and real-time issues in population classification are resolved, improving the accuracy and timeliness of classification results, reducing the impact of data sparsity and heterogeneity, and enhancing the robustness and usability of classification results.
Patent Information
- Application Number
- CN202111111873.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-18
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2041-09-18
AI Technical Summary
Existing technologies cannot effectively handle the dynamic and real-time nature of user interests and preferences in population classification, and are affected by data sparsity and heterogeneity, resulting in poor accuracy and timeliness of classification results. Furthermore, the use of deep learning models leads to decreased interpretability.
By monitoring the application switching behavior of user objects in real time, an application identifier sequence is generated, and a pre-trained language model such as BERT is used for encoding to generate application identifier word vectors. Then, an autoencoder clustering network is used for clustering and classification to determine the classification result of the user object.
It improves the accuracy and timeliness of population classification, reduces the impact of data sparsity and heterogeneity, enhances the robustness and usability of classification results, and reduces the negative impact of using deep learning models on interpretability.
Smart Images

Figure CN115840818B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data processing, in particular to a user object classification method, a user object classification device, a computer readable medium and an electronic device. BACKGROUND
[0002] With the rapid development of data storage resources and computing resources, the field of big data technology has attracted more and more attention, among which the most widely used is user portrait. Many applications based on user portrait technology have been introduced into academia and industry, such as personalized recommendation, advertising system, etc.
[0003] At present, in the related people classification scheme, a user portrait is generally constructed through the interest or preference of a user (information frequently browsed, focused or historical click records, etc.), and the classification of people is realized based on the user portrait. However, in this technical scheme, the interest or hobby of the user can only be estimated from limited data, which cannot guarantee the dynamics and real-time nature of the user's interest and preference, and cannot well solve the influence of data sparsity and data heterogeneity in user behavior data on the classification result, resulting in poor accuracy and timeliness of the classification result. SUMMARY
[0004] The purpose of the present disclosure is to provide a user object classification method, a user object classification device, a computer readable medium and an electronic device, thereby at least to some extent improving the accuracy and timeliness of the people classification result.
[0005] According to a first aspect of the present disclosure, a user object classification method is provided, comprising:
[0006] real-time monitoring of application switching behavior of a user object, and generating an application identification sequence based on the application switching behavior;
[0007] encoding processing of the application identification sequence by a pre-trained language model to obtain an application identification word vector;
[0008] determining a behavior feature vector corresponding to the user object according to the application identification word vector;
[0009] clustering and classifying the behavior feature vector to determine the classification result of the user object.
[0010] According to a second aspect of the present disclosure, a user object classification device is provided, comprising:
[0011] a sequence generation module for real-time monitoring of application switching behavior of a user object, and generating an application identification sequence based on the application switching behavior;
[0012] a word vector generation module configured to encode the application identification sequence by using a pre-trained language model to obtain an application identification word vector;
[0013] a feature vector determination module configured to determine a behavior feature vector corresponding to the user object according to the application identification word vector;
[0014] a classification result determination module configured to cluster and classify the behavior feature vector to determine a classification result of the user object.
[0015] According to a third aspect of the present disclosure, a computer readable medium is provided, which stores a computer program. The computer program is executed by a processor to implement the method described above.
[0016] According to a fourth aspect of the present disclosure, an electronic device is provided, which comprises:
[0017] a processor; and
[0018] a memory configured to store one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method described above.
[0019] The user object classification method provided by an embodiment of the present disclosure first monitors the application switching behavior of a user object in real time, generates an application identification sequence based on the application switching behavior, encodes the application identification sequence by using a pre-trained language model to obtain an application identification word vector, determines a behavior feature vector corresponding to the user object according to the application identification word vector, and finally clusters and classifies the behavior feature vector to determine a classification result of the user object. On the one hand, the application identification sequence generated according to the real-time monitored application switching behavior is used to cluster and classify the user object, thereby realizing the dynamic and real-time processing of user interests and preferences, improving the accuracy and timeliness of the classification result. On the other hand, the application identification sequence is encoded by using a pre-trained language model, which reduces the sparseness and heterogeneity of low probability in the application identification sequence data based on the characteristics of the pre-trained language model, further guarantees the robustness and accuracy of the classification result. In addition, only the pre-trained language model and the self-encoding clustering network are involved in the entire classification process, which avoids the problem of reducing the explainability of the classification result caused by using too many deep learning models to depict the user portrait in related solutions, improves the usability of the classification result, and expands the application scope of the classification result.
[0020] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings, which are incorporated herein and form a part of the specification, illustrate embodiments consistent with the present disclosure and, together with the description, further serve to explain the principles of the disclosure. It is to be understood that the drawings are designed solely for purposes of illustration to be used in conjunction with the description. It is to be understood that the drawings are designed solely for purposes of illustration and to aid in the understanding of the disclosure, and in no way limit its scope, as described in the detailed description. In the drawings:
[0022] Figure 1 A schematic diagram illustrating an exemplary system architecture to which embodiments of the present disclosure can be applied is shown;
[0023] Figure 2 A schematic diagram illustrating an electronic device to which embodiments of the present disclosure can be applied is shown;
[0024] Figure 3 A schematic diagram illustrating a flow of a user object classification method in an exemplary embodiment of the present disclosure is shown;
[0025] Figure 4 A schematic diagram illustrating a flow of generating an application identification sequence in an exemplary embodiment of the present disclosure is shown;
[0026] Figure 5 A schematic diagram illustrating a flow of various processing procedures for cleaning application switching data in an exemplary embodiment of the present disclosure is shown;
[0027] Figure 6 A schematic diagram illustrating a flow of generating an application identification word vector in an exemplary embodiment of the present disclosure is shown;
[0028] Figure 7 A schematic diagram illustrating a flow of generating a behavior feature vector based on an application identification word vector in an exemplary embodiment of the present disclosure is shown;
[0029] Figure 8 A schematic diagram illustrating a composition of a user object classification apparatus in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0030] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations can be implemented in any
[0031] In addition, the accompanying drawings are included to provide a thorough understanding of the present disclosure and are not intended to be in any way limiting. Like reference numerals in the drawings represent corresponding parts throughout the text in which: the same reference numerals indicate the same or similar parts, and thus repeated description thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities that do not necessarily have to correspond to physically or logically independent entities. These functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0032] Figure 1 A schematic diagram of a system architecture showing an exemplary application environment of a user object classification method and apparatus to which embodiments of the present disclosure can be applied is shown.
[0033] As shown in Figure 1 , the system architecture 100 can include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium to provide a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, and the like. The terminal devices 101, 102, 103 can be various electronic devices with image processing functions, including but not limited to desktop computers, portable computers, smartphones, and tablet computers, and the like. It should be understood that Figure 1 The number of terminal devices, networks, and servers in
[0034] The user object classification method provided by the embodiments of the present disclosure is generally executed by the terminal devices 101, 102, 103, and accordingly, the user object classification apparatus is generally provided in the terminal devices 101, 102, 103. However, it is easily understood by those skilled in the art that the user object classification method provided by the embodiments of the present disclosure can also be executed by the server 105, and accordingly, the user object classification apparatus can also be provided in the server 105, which is not specially limited in the present exemplary embodiment. For example, in an exemplary embodiment, the user can obtain the application program switching behavior of the user object in real time through the terminal device 101, 102, 103, and upload the application program switching behavior to the server 105. The server generates a classification result by using the user object classification method provided by the embodiments of the present disclosure, and transmits the classification result to the terminal device 101, 102, 103, and the like for downstream classification tasks or recommendation tasks.
[0035] An exemplary implementation of the present disclosure provides an electronic device for implementing a user object classification method, which can be Figure 1The electronic device 200 can be a terminal device 101, 102, 103 or a server 105 in the system 100. The electronic device 200 at least includes a processor and a memory, the memory is configured to store executable instructions of the processor, and the processor is configured to execute the user object classification method by executing the executable instructions.
[0036] The electronic device 200 according to this embodiment of the present disclosure will be described below with reference to Figure 2 The electronic device 200. Figure 2 The electronic device 200 shown is only an example and should not limit the function and use range of the embodiments of the present disclosure.
[0037] As Figure 2 The electronic device 200 is in the form of a general computing device. The components of the electronic device 200 can include, but are not limited to, the above-mentioned at least one processing unit 210, the above-mentioned at least one storage unit 220, a bus 230 connecting different system components including the storage unit 220 and the processing unit 210, and a display unit 240. Among them, the storage unit stores program code, and the program code can be executed by the processing unit 210, so that the processing unit 210 executes the steps of various exemplary embodiments according to the present disclosure described in the above “Exemplary Method” section of the specification. For example, the processing unit 210 can perform the steps S310 shown in Figure 3 S310, monitoring the application switching behavior of the user object in real time, and generating an application identification sequence based on the application switching behavior; S320, encoding the application identification sequence by a pre-trained language model to obtain an application identification word vector; S330, determining a behavior feature vector corresponding to the user object according to the application identification word vector; S340, clustering and classifying the behavior feature vector to determine the classification result of the user object.
[0038] The storage unit 220 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 221 and / or a cache memory unit 222, and can further include a read-only memory (ROM) 223. The storage unit 220 can also include a program utility 224 having a set of (at least one) program modules 225, which include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include the implementation of a network environment.
[0039] The bus 230 can represent one or more of several types of bus structures, including a storage unit bus or storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.
[0040] The electronic device 200 can also communicate with one or more external devices 270 such as a keyboard or pointing device, a Bluetooth device, or a device that enables a user to interact with the electronic device 200. Additionally, the electronic device 200 can further communicate with one or more devices that enable the electronic device 200 to perform a function, such as a printer or a plotter, with another computer or device, such as a server or a database, or with any device (e.g., a router, a modem, a phone, etc.) that is capable of receiving and / or transmitting information. Such communication can occur via an Input / Output (I / O) interface 250. Still yet, the electronic device 200 can communicate with one or more networks, such as one or more local area networks (LANs), wide area networks (WANs), and / or the Internet, through a network adapter 260. As depicted, the network adapter 260 communicates with the other components of the electronic device 200 via the bus 230.
[0041] It should be appreciated that the example embodiments described herein can be implemented with both hardware and software, or in software as described herein. Thus, the technical solutions according to the example embodiments of the present disclosure can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the methods according to the example embodiments of the present disclosure.
[0042] First, from the description of user portrait in academia and industry, the connotation of user portrait contains three factors, i.e. user attribute, user feature and user label. Among them, user attribute is divided into static attribute and dynamic attribute, static attribute refers to basic information of user (name, gender, occupation, etc.), dynamic attribute refers to behavior information of user (access frequency, access time, browsing record, etc.), user attribute can be divided according to research purpose; user feature refers to the characteristics or commonality extracted from user attribute by certain method; user label is the labeled text further refined from user feature, which can accurately express user feature and is easy to understand and apply. The research of user portrait is divided into two parts, portrait research based on single user and portrait research based on group user. Single user portrait research extracts user features and refines user label data to construct user portrait for each user in a certain scene, which can directly reflect the specific behavior, demand, interest, preference and other characteristics of user, can comprehensively describe the user features of single user, deeply and comprehensively understand user demand, and can realize functions such as personalized search, recommendation and user behavior prediction by combining related technologies. Group user portrait extracts user features and refines user label to construct user portrait for multiple users in a certain scene, which can not only construct different types of user portraits for users with different user features, but also can make subdivision of users from multiple dimensions and provide corresponding product services.
[0043] At present, the most popular user portrait modeling method is based on user's interest or preference (information frequently browsed or focused by user) and behavior or log (rich behavior, log and click history data), which combines related machine learning method or deep learning model to mine relevant user portrait information and describe it. At present, the application is more in the field of personalized recommendation in Internet. It uses the behavior information of user on the application to describe the portrait of user. For the classification of crowd, it basically adds some post-processing classification task modules to classify the crowd on the basis of the above described portrait.
[0044] However, in the technical scheme of crowd classification based on user portrait, it is difficult to well handle the dynamic and real-time of user interest and preference, intelligently estimate user's interest and preference from limited historical behavior; at the same time, it is difficult to well solve the data sparsity and data heterogeneity in user behavior data, so as to cause the influence of sparse data in massive data on the final clustering result; in addition, too many deep learning models lead to poor explainability of classification result, and further lead to poor usability of final classification result.
[0045] Based on one or more problems in the related technical solutions, the example embodiment first provides a user object classification method. The following takes an example of a server executing the method to specifically describe the user object classification method of the example embodiment.
[0046] Figure 3 A flowchart of a user object classification method in the example embodiment is shown, which can include steps S310 to S340.
[0047] In step S310, application switching behavior of a user object is monitored in real time, and an application identification sequence is generated based on the application switching behavior.
[0048] In an example embodiment, the application switching behavior refers to a behavior operation triggered by a user object on a terminal device installed with at least two applications (APPs), for example, the application switching behavior can be an operation behavior of the user closing an application A in the foreground of the terminal device and starting an application B, or an operation behavior of switching the currently running application A to the background running of the terminal device and starting an application B from the multiple applications running in the background of the terminal device. Of course, the application switching behavior can also be other types of operation behaviors capable of realizing application switching, which are not specially limited in the example embodiment.
[0049] The application identification sequence refers to a sequence of multiple application identifications generated due to the application switching behavior. The application identification can be a text name corresponding to the application, i.e., a name sequence of all applications used by the user in the process of using the terminal device. For example, assuming that the application switching behavior is switched between an application A, an application C, and an application B in sequence within a period of time, then the generated application identification sequence can be “application A identification-application C identification-application B identification”. Of course, this is only an example and should not cause any special limitation to the example embodiment.
[0050] The application switching behavior of the user object can be monitored in real time by setting a corresponding device interface in the terminal device. Of course, the application switching behavior of the user object can also be monitored in real time by a device log in the terminal device, which is not limited in the example embodiment.
[0051] In step S320, the application identification sequence is encoded by a pre-trained language model to obtain an application identification word vector.
[0052] In an example embodiment, the pre-training language model (Bidirectional Encoder Representations from Transformers, BERT) can further increase the generalization ability of the word vector model and fully describe the character level, word level, sentence level and even inter-sentence relationship features. The pre-training language model BERT is a method for processing text information, and the biggest feature is to abandon the traditional recurrent neural network (RNN) and convolutional neural network (CNN), and convert the distance between two words at any position into 1 through the attention mechanism (Attention), effectively solving the long-term dependence problem in natural language processing (NLP).
[0053] By encoding the application identifier sequence through the pre-training language model, the application identifier word vector can fully describe the character level, word level, sentence level and even inter-sentence relationship features in the application identifier sequence, and serve as input data for subsequent classification tasks.
[0054] In step S330, the behavior feature vector corresponding to the user object is determined according to the application identifier word vector.
[0055] In an example embodiment, the behavior feature vector refers to a vector generated by assigning personal features of the user object to the application identifier word vector. For example, the time spent by the user object in each application can be assigned as a personal feature to the vector formed by the application identifier word vector, or the number of interactions of the user object in each application can be assigned as a personal feature to the vector formed by the application identifier word vector. Of course, the behavior feature vector can also be a vector formed by assigning other types of personal features related to the application to the application identifier word vector, and the example embodiment does not make any special limitation.
[0056] In step S340, the behavior feature vector is clustered and classified to determine the classification result of the user object.
[0057] In an example embodiment, the classification result refers to the result of the user object belonging to a crowd obtained by clustering and classifying the behavior feature vector. For example, if the behavior feature vector shows that the user object switches to a game APP multiple times and stays for a long time, the classification result of the user object can be a game crowd. Of course, this is only an illustrative example, and other types of classification results are also possible, and the example embodiment does not make any special limitation.
[0058] The steps S310 to S340 are described in detail as follows.
[0059] In an example embodiment, the step S310 can include Figure 4 The steps S410 and S420 in the method 400 are used to generate the application identification sequence based on the application switching behavior, and refer to the method 300 shown in Figure 4 The method 400 can specifically include the following steps:
[0060] In the step S410, application switching data is acquired based on the application switching behavior, and the application switching data includes terminal identification data, application identification data, and application switching time stamp.
[0061] In the step S420, the application switching data is cleaned, and the application identification sequence is generated based on the cleaned application switching data.
[0062] The application switching data refers to the data related to the application switching behavior collected when the application switching behavior is monitored. For example, the application switching data can include terminal identification data, application identification data, and application switching time stamp. Of course, the application switching data can also be other types of data related to the application switching behavior, which are not limited in the example embodiment.
[0063] The terminal identification data refers to the identification information that uniquely identifies the terminal device or the user object. For example, the terminal identification data can be an International Mobile Equipment Identity (IMEI), or an account data corresponding to the user object. Of course, the terminal identification data can also be other identification information that uniquely identifies the terminal device or the user object, which are not limited in the example embodiment.
[0064] The application switching time stamp refers to the time stamp data of the application switching behavior when a new application is started. The application identification data can be a text name corresponding to the application, or a unique identification code corresponding to the application. Of course, the application identification data can also be other data that uniquely identifies the application, which are not limited in the example embodiment.
[0065] The cleaning process refers to a process of removing dirty data included in the application switching data. By cleaning the application switching data, and generating the application identification sequence based on the cleaned application switching data, the data accuracy of the application identification sequence can be ensured, and the influence of dirty data on the classification result can be avoided, thereby ensuring the accuracy and precision of the classification result from the data source.
[0066] Specifically, the cleaning process in step S420 can include Figure 5 At least one of the plurality of processing processes or a combination of the plurality of processing processes can be used to clean the dirty data in the application switching data. Figure 5 As shown in the figure, the plurality of processing processes can include:
[0067] Step S510, filtering the application switching data in which the application switching timestamp is detected to be incorrect;
[0068] Step S520, performing duplicate merging processing on the application switching data in which the application switching timestamp and the application identification data are repeatedly reported;
[0069] Step S530, deleting the error data under the same terminal identification data.
[0070] The application switching timestamp error can be caused by the change of the terminal device time, resulting in the timestamp error returned to the server, or caused by the network delay, resulting in the timestamp error returned to the server, or caused by other errors, and the present example embodiment is not limited thereto.
[0071] The repeated reporting refers to the problem of multiple reporting of the same data due to network problems or other reasons, and the duplicate merging processing refers to deleting multiple identical data (i.e. the application switching data with the same application switching timestamp and application identification data) and retaining only one data.
[0072] The error data under the same terminal identification data refers to the data garbled or APP pointing to unknown problems that can occur in the terminal device corresponding to a certain terminal identification data.
[0073] Through at least one of the plurality of processing processes or a combination of the plurality of processing processes, the dirty data in the application switching data can be effectively cleaned, the influence of the dirty data on the classification result can be avoided, and the data effectiveness and accuracy can be improved.
[0074] In an example embodiment, the pre-trained language model BERT can be composed of a plurality of attention mechanism-based encoding networks, for example, the pre-trained language model can be composed of 12 attention mechanism-based encoding networks, of course, it can also be composed of 24 attention mechanism-based encoding networks, and the present example embodiment does not specially limit this. Among them, the attention mechanism-based encoding network refers to the Transformer network structure, specifically, it can be the encoder part in the Transformer network structure, since only the application program identification sequence needs to be converted into a word vector in the present example embodiment, and no subsequent decoding task such as translation is required, therefore, the decoder part in the Transformer network structure is not required.
[0075] Specifically, the attention mechanism-based encoding network can at least include a multi-head self-attention network and a feed-forward neural network, wherein the multi-head self-attention network refers to mapping input vectors to different subspaces, which can allow the model to understand the input sequence from different angles, that is, multiple Attention is calculated at the same time, and the combined effect of multiple Attention can be better than a single Attention. The feed-forward neural network (FNN) adopts a one-way multi-layer structure, wherein each layer contains a plurality of neurons, in the feed-forward neural network, each neuron can receive the signal of the previous layer of neurons and generate an output to the next layer, the 0th layer is called the input layer, the last layer is called the output layer, and the other intermediate layers are called hidden layers (or hidden layers, hidden layers). The hidden layer can be one layer or multiple layers, there is no feedback in the entire network, and the signal propagates from the input layer to the output layer in one direction, realizing the transmission of hidden vectors.
[0076] The attention mechanism-based encoding network Transformer of each layer in the pre-trained language model BERT takes the hidden variable of the previous layer as input, and converts it through the network layers of Multi-Head Self Attention, FNN and Layer Norm, and finally outputs a higher interaction hidden variable, that is, an application program identification word vector, which can more accurately and more generally represent the semantic information contained in the application program identification sequence, improve the accuracy of the application program identification word vector, more deeply mine the interests or hobbies contained in the application program switching behavior of the user object, and improve the usability and application scope of the classification result.
[0077] In an example embodiment, step S320 can include step S610 and step S620, realizing the application program identification word vector obtained by the pre-trained language model, as shown in Figure 6 Specifically, it can include:
[0078] Step S610, the application identification sequence is converted to obtain the word vector sequence, the segment vector sequence and the position vector sequence corresponding to the application identification sequence;
[0079] Step S620, the sum of the word vector sequence, the segment vector sequence and the position vector sequence is input into the pre-trained language model for encoding processing to obtain the application identification word vector.
[0080] Wherein, the word vector sequence (Token Embedding) refers to dividing the words in the application identification sequence into a set of limited public sub-word units, which can strike a balance between the effectiveness of the word and the flexibility of the character; the segment vector sequence (Segment Embedding) refers to distinguishing between two different sentences; the position vector sequence (Position Embedding) refers to encoding the position information of the words in the application identification sequence into a feature vector, and the position representation vector is a crucial link to introduce the word position relationship into the model.
[0081] Specifically, the application identification sequence can be converted to obtain the word vector sequence by Word2Vec, Glove and other algorithms, of course, the application identification sequence corresponding word vector sequence can also be trained in the Transformer, and the present example embodiment does not specially limit this. The segment vector sequence is used to distinguish between two different sentences, generally only includes two vectors, one vector is assigned to the previous sentence, and the other vector is assigned to the next sentence, so as to distinguish between two sentences. The position vector sequence is used to mark the position of each word in the application identification sequence.
[0082] For example, assuming that the application identification sequence is “[CLS] application A [SEP] application B [SEP]”, wherein “[CLS]” represents that the application identification sequence is used for pre-training language model, generally placed at the beginning of the sentence, “[SEP]” represents the sentence (segment) symbol, used to separate two application identifications in the input application identification sequence. Then for the application identification sequence, the corresponding word vector sequence can be represented as “E [CLS] E 应 E 用 E 程 E 序 E A E [SEP] E 应 E 用 E 程 E 序 E B E [SEP] ”, the corresponding segment vector sequence can be represented as “EA E A E A E A E A E A E A E B E B E B E B E B E B The corresponding position vector sequence can be represented as "E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 E 10 E 11 E 12 E 13 Of course, the above are merely illustrative examples and do not impose any special limitations on this example embodiment.
[0083] The word vector sequence, segment vector sequence, and position vector sequence can be added together, and the resulting vector can be used as input data for a pre-trained language model. This input data is then fed into the pre-trained language model to encode the application identifier sequence and obtain the application identifier word vector.
[0084] By transforming application identifier sequences into word vector sequences, segment vector sequences, and position vector sequences, and using the sum of these sequences as input data for a pre-trained language model, the generalization ability of the pre-trained language model can be effectively increased. This fully describes the character-level, word-level, sentence-level, and even sentence-level relational features in the application identifier sequences, ensuring the completeness of the semantics represented by the application identifier word vectors. This enables in-depth mining of application switching behavior, estimation of user interests and hobbies from limited data, and further guarantees the accuracy of classification results.
[0085] In one exemplary embodiment, before inputting the word vector sequence, segment vector sequence, and position vector sequence corresponding to the application identifier sequence into the pre-trained language model, the application identifier sequence can be randomly masked based on a pre-built masking language model.
[0086] The mask language model (MLM) can randomly cover some words in the application identification sequence, add special symbols such as the symbol [mask] to the words, convert the task into a sentence with special symbols [mask], predict the removed words, use cross entropy to calculate the loss for optimization, effectively reduce the proportion of low probability APP tokens, reduce the vocabulary, reduce the influence of the sparsity and heterogeneity of the application identification sequence on the clustering result, further ensure the accuracy of the classification result, and improve the robustness of the classification result.
[0087] Specifically, the random mask processing in the example embodiment can include random replacement processing and random masking processing on the application identification sequence according to a preset proportion. For example, the preset proportions of random replacement processing, random masking processing, and no processing can be “10%, 10%, 80%”, that is, 10% of the words in the application identification sequence can be randomly replaced with other words, 10% of the words in the application identification sequence can be randomly replaced with special symbols [mask], and the remaining 80% of the words in the application identification sequence can be processed. Of course, the preset proportions of random replacement processing, random masking processing, and no processing can also be “15%, 15%, 70%”, and specific settings can be made according to actual use scenarios, and the example embodiment does not make special limitations.
[0088] Generally, when random mask processing is performed on data by a mask language model, only part of the words in the input data are randomly masked. In the example embodiment, in addition to randomly masking part of the words, part of the words can also be randomly replaced. Through this improved MLM, the influence of sparse data and heterogeneous data in the application identification sequence on the clustering result can be effectively reduced, and the robustness of the classification result can be improved.
[0089] In an example embodiment, step S330 can include steps S710 to S740, which implement determining the behavior feature vector corresponding to the user object according to the application identification word vector, as shown in Figure 7 As shown, it can specifically include:
[0090] Step S710, obtaining an application switching timestamp corresponding to the application identification word vector;
[0091] Step S720, calculating the use time of each application in the application identification sequence according to the application switching timestamp;
[0092] Step S730, normalizing the use time to determine the weight data of each application;
[0093] Step S740, determining the behavior feature vector corresponding to the user object based on the application identification word vector and the weight data.
[0094] The usage time refers to the time interval from the start of each application in the application identification sequence to the start of another application. Specifically, the usage time of each application in the application identification sequence is calculated according to the application switching timestamp of each application. For example, the application switching timestamp of application A (i.e., the timestamp of the application switching behavior starting application A) is 08:10:00, and the timestamp of the next application B started by the application switching behavior is 09:10:00. It can be considered that the usage time of application A is 1 hour. Of course, this is only an illustrative example and should not impose any special limitations on the present example embodiment.
[0095] The normalization of the usage time refers to the calculation process of the ratio of the usage time of each application in the application identification sequence to the total time corresponding to the application identification sequence. For example, the application identification sequence is "application A, application C, application B", wherein the usage time of application A is 2 hours, the usage time of application C is 1 hour, and the usage time of application B is 2 hours. The total time corresponding to the application identification sequence is 5 hours. After normalizing the usage time of each application, the data obtained is 0.4, 0.2, and 0.4. These data are used as the weight data of the applications, i.e., the weight data of application A is 0.4, the weight data of application C is 0.2, and the weight data of application B is 0.4. Of course, this is only an illustrative example and should not impose any special limitations on the present example embodiment.
[0096] The weight data corresponding to each application can be assigned to the word vector corresponding to each application in the application identification word vector, and the behavior feature vector corresponding to the user object can be obtained.
[0097] By adding the weight data of each application to the application identification word vector, a behavior feature vector that can better reflect the interest and hobby features of each user object is obtained, further mining the interest and hobby features of the user object contained in the application switching behavior, and further improving the accuracy and usability of the classification result.
[0098] In an example embodiment, the self-encoding clustering network (Deep Embedded Cluster, DEC) can also be selected as the classifier for clustering classification in step S340. Specifically, the behavior feature vector can be input into the self-encoding clustering network, and the classification result of the user object is output.
[0099] Among them, the self-encoding clustering network DEC is compared with the commonly used clustering algorithms such as K-means and GMM. Although these methods are fast and suitable for a variety of problems, the distance measurement of the clustering algorithms such as K-means and GMM is limited to the original data space, and when the feature dimension of the input is high, it is often invalid. The self-encoding clustering network DEC can simultaneously use the feature representation of the deep neural network and the clustering assignment, learn the mapping from the data space to the low-dimensional feature space, and optimize the clustering target in the feature space. DEC can cluster data by simultaneously learning k cluster centers in the feature space Z and DNN parameters that map data points to Z. In the example embodiment, the designed clustering parameter can be 20. Of course, the designed clustering parameter can also be other numerical values, which can be customized according to actual conditions. The example embodiment does not specially limit this.
[0100] To sum up, in the example embodiment, first, the application program switching behavior of the user object is monitored in real time, and the application program identification sequence is generated based on the application program switching behavior. Then, the application program identification sequence is encoded and processed by the pre-trained language model to obtain the application program identification word vector, and the behavior feature vector corresponding to the user object is determined according to the application program identification word vector. Finally, the behavior feature vector is clustered and classified to determine the classification result of the user object. On the one hand, the application program identification sequence generated according to the real-time monitored application program switching behavior realizes the clustering and classification of the user object, thereby realizing the dynamic and real-time processing of user interest and preference, improving the accuracy and timeliness of the classification result. On the other hand, the application program identification sequence is encoded and processed by the pre-trained language model, which reduces the sparseness and heterogeneity of the low probability in the application program identification sequence data based on the characteristics of the pre-trained language model, further guarantees the robustness and accuracy of the classification result. On the other hand, only the pre-trained language model and the self-encoding clustering network are involved in the entire classification process, which avoids the problem of reducing the explainability of the classification result caused by using more deep learning models in related schemes when depicting the user portrait, improves the usability of the classification result, and improves the application scope of the classification result.
[0101] The user object classification method proposed in the example embodiment can well represent user identity information, can well handle the dynamics and real-time nature of user interests and preferences, and can estimate user interests and preferences from limited data. Secondly, by improving the MLM in the BERT model, a certain proportion of tokens are randomly masked, reducing the proportion of low-probability app tokens, reducing the vocabulary, and reducing the influence of data sparsity and heterogeneity on clustering results. At the same time, a certain proportion of tokens are randomly replaced to effectively ensure the robustness of the BERT model.
[0102] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the example embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0103] Further, referring to Figure 8 The example embodiment further provides a user object classification device 800, which can include a sequence generation module 810, a word vector generation module 820, a feature vector determination module 830, and a classification result determination module 840. Wherein:
[0104] The sequence generation module 810 is configured to monitor the application switching behavior of the user object in real time, and generate an application identification sequence based on the application switching behavior;
[0105] The word vector generation module 820 is configured to encode the application identification sequence by a pre-trained language model to obtain an application identification word vector;
[0106] The feature vector determination module 830 is configured to determine the behavior feature vector corresponding to the user object according to the application identification word vector;
[0107] The classification result determination module 840 is configured to cluster and classify the behavior feature vector to determine the classification result of the user object.
[0108] In an example embodiment, the pre-trained language model is composed of a plurality of attention mechanism-based encoding networks, and the encoding network includes a multi-head self-attention network and a feedforward neural network; the word vector generation module 820 can be configured to:
[0109] The application identification sequence is converted to obtain a word vector sequence, a segment vector sequence, and a position vector sequence corresponding to the application identification sequence;
[0110] Input the sum of the word vector sequence, the segment vector sequence, and the position vector sequence into the pre-trained language model for encoding processing to obtain an application identification word vector.
[0111] In an example embodiment, the user object classification apparatus 800 can further include a random mask unit, which can be used for:
[0112] Performing random mask processing on the application identification sequence based on a pre-constructed mask language model, the random mask processing including random replacement processing and random masking processing on the application identification sequence according to a preset proportion.
[0113] In an example embodiment, the sequence generation module 810 can be used for:
[0114] Obtaining application switching data based on the application switching behavior, the application switching data including terminal identification data, application identification data, and application switching time stamps;
[0115] Performing cleaning processing on the application switching data, and generating an application identification sequence according to the cleaned application switching data.
[0116] In an example embodiment, the cleaning processing includes at least one or a combination of multiple processing procedures:
[0117] Filtering application switching data in which the application switching time stamp is detected to have an error;
[0118] Performing duplicate item merging processing on application switching data in which the application switching time stamp or the application identification data is repeatedly reported;
[0119] Deleting error data under the same terminal identification data.
[0120] In an example embodiment, the feature vector determination module 830 can be used for:
[0121] Obtaining an application switching time stamp corresponding to the application identification word vector;
[0122] Calculating the use time of each application in the application identification sequence according to the application switching time stamp;
[0123] Performing normalization processing on the use time to determine the weight data of each application;
[0124] Determining the behavior feature vector corresponding to the user object based on the application identification word vector and the weight data.
[0125] In an example embodiment, the classification result determination module 840 can be configured to:
[0126] inputting the behavior feature vector into a self-encoding clustering network, and outputting a classification result of the user object.
[0127] The specific details of each module in the above apparatus have been described in detail in the method embodiment, and the undisclosed details can be referred to the embodiment content of the method part, thus no longer be repeated.
[0128] Those skilled in the art can understand that various aspects of the present disclosure can be implemented as a system, a method or a program product. Therefore, various aspects of the present disclosure can be embodied as a complete hardware embodiment, a complete software embodiment (including firmware, microcode, etc.), or an embodiment combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system" herein.
[0129] The example embodiments of the present disclosure also provide a computer-readable storage medium having a program product stored thereon, which can implement the above-mentioned method of the present disclosure. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes program codes for causing the terminal device to perform the steps of various example embodiments of the present disclosure described in the above "example method" part of the present disclosure when the program product is run on the terminal device, for example, can perform Figures 3 to 7 any one or more steps of any one of the above methods.
[0130] It should be noted that the computer-readable medium shown in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0131] In this disclosure, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for use by or in connection with an instruction execution system, apparatus, or device. The computer readable program code can be transmitted using any appropriate medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of these. A computer readable medium can include any medium that can be read by a computer. Examples of computer readable mediums include but are not limited to memory, optical disc, etc.
[0132] Further, the program code for implementing the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, etc., and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider (ISP).
[0133] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the present disclosure cover any and all variations of the present disclosure including those variations that are now known or become known in the future. The specification and examples are illustrative only and not restrictive of the present disclosure. The true scope and spirit of the present disclosure is indicated by the appended claims.
[0134] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated, and that various modifications and changes can be made without departing from the scope of the present disclosure. The scope of the present disclosure is limited only by the claims appended hereto.
Claims
1. A method of classifying user objects, characterized by, The method comprises: monitoring application switching behavior of a user object in real time, and generating an application identification sequence based on the application switching behavior; encoding the application identification sequence by using a pre-trained language model to obtain an application identification word vector; determining a behavior feature vector corresponding to the user object according to the application identification word vector; performing clustering classification on the behavior feature vector to determine a classification result of the user object.
2. The method of claim 1, wherein, The pre-trained language model is composed of multiple encoding networks based on an attention mechanism, and the encoding network comprises a multi-head self-attention network and a feedforward neural network. The encoding processing of the application identification sequence by using the pre-trained language model to obtain the application identification word vector comprises: performing conversion processing on the application identification sequence to obtain a word vector sequence, a segment vector sequence and a position vector sequence corresponding to the application identification sequence; inputting the sum of the word vector sequence, the segment vector sequence and the position vector sequence into the pre-trained language model for encoding processing to obtain the application identification word vector.
3. The method of claim 2, wherein, The method further comprises: performing random mask processing on the application identification sequence based on a pre-constructed mask language model, wherein the random mask processing comprises random replacement processing and random masking processing on the application identification sequence according to a preset proportion.
4. The method of claim 1, wherein, The generation of the application identification sequence based on the application switching behavior comprises: obtaining application switching data based on the application switching behavior, wherein the application switching data comprises terminal identification data, application identification data and application switching time stamps; performing cleaning processing on the application switching data, and generating the application identification sequence according to the application switching data after the cleaning processing.
5. The method of claim 4, wherein, The cleaning processing on the application switching data comprises at least one or a combination of multiple processing processes: filtering application switching data in which the application switching time stamp is detected to have an error; performing duplicate item merging processing on application switching data in which the application switching time stamp or the application identification data is repeatedly reported; performing deletion processing on error data under the same terminal identification data.
6. The method of claim 4, wherein, The determination of the behavior feature vector corresponding to the user object according to the application identification word vector comprises: obtaining application switching time stamps corresponding to the application identification word vector; calculating the use time of each application in the application identification sequence according to the application switching time stamps; performing normalization processing on the use time to determine weight data of each application; determining the behavior feature vector corresponding to the user object based on the application identification word vector and the weight data.
7. The method according to any one of claims 1 to 6, characterized in that, The clustering classification of the behavior feature vector to determine the classification result of the user object comprises: inputting the behavior feature vector into a self-encoding clustering network to output the classification result of the user object.
8. A user object classifying apparatus characterized by comprising: The method comprises: The sequence generation module is configured to monitor application switching behaviors of a user object in real time and generate an application identification sequence based on the application switching behaviors. The word vector generation module is configured to encode and process the application identification sequence by using a pre-trained language model to obtain an application identification word vector. The feature vector determination module is configured to determine a behavior feature vector corresponding to the user object according to the application identification word vector. The classification result determination module is configured to perform clustering classification on the behavior feature vector to determine a classification result of the user object.
9. A computer readable medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
10. An electronic device, comprising: comprise: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method of any one of claims 1 to 7 via execution of the executable instructions.
Citation Information
Patent Citations
Switching method, base station and user terminal
CN109495935A
Classification model application and classification model training method and device
CN110222171A