Data processing method, device, equipment and storage medium
By using unlabeled data sets for pre-training and labeled data set fine-tuning, combined with mask feature training, the overfitting problem caused by data sparsity in traditional models in determining user intent is solved, and the accuracy of the user intent determination model is significantly improved. accuracy.
Patent Information
- Application Number
- CN202010225311.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-26
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-03-26
AI Technical Summary
Traditional user intention determination models rely on labeled data sets and have limited data volume, resulting in user features and intentions being sparse given the data, resulting in model overfitting and low accuracy.
By using user data without user intention labels (unlabeled data set) to train the user intention determination model, through mask feature training, the model can learn the interaction and representation between user features, thereby improving the accuracy of the model and utilizing the unlabeled data set. Labeled data sets are pre-trained and combined with labeled data sets for fine-tuning or joint training.
It improves the accuracy of the user intention determination model, avoids overfitting, enhances the model's learning ability for user feature interaction and representation, and significantly improves the user intention determination ability in actual scenarios.
Smart Images

Figure CN111831901B
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of computers, and more particularly to a data processing method, apparatus, device, and computer-readable storage medium. Background Art
[0002] With the rapid development of network technology, network users have an increasing demand for personalized and refined products or services. In order to achieve personalization, it is necessary to quickly and accurately identify user intent, where user intent can refer to the user's interests or needs, the goals the user wants to achieve, or the tasks the user wants to complete, etc. For example, search engines provide personalized search results by mining the user's search intent, customer service systems provide more efficient customer service by understanding user intent, and video websites recommend video content that is more in line with the user's interests based on the user's intent. Summary of the invention
[0003] According to some embodiments of the present disclosure, a data processing method, apparatus, device, and computer-readable storage medium are provided.
[0004] In a first aspect of the present disclosure, a data processing method is provided. The method includes obtaining multiple quantized representations corresponding to multiple types of user data, and masking at least one of the multiple quantized representations, wherein the user data at least indicates a user profile and a user behavior of a user. The method also includes training a model for determining user intent using at least one masked quantized representation and other unmasked quantized representations of the multiple quantized representations as inputs, and using at least one unmasked quantized representation as output.
[0005] In a second aspect of the present disclosure, a method for determining user intent is provided, wherein the method comprises obtaining data related to the user as input, and determining the user intent based on the input using the model trained according to the first aspect.
[0006] In a third aspect of the present disclosure, a data processing device is provided. The device includes an acquisition module, a mask module, and a training module. The acquisition module is configured to acquire multiple quantization representations corresponding to multiple types of user data, wherein the user data at least indicates a user profile and a user behavior of a user. The mask module is configured to mask at least one quantization representation among the multiple quantization representations. The training module is configured to train a model for determining user intent with at least one masked quantization representation and other unmasked quantization representations among the multiple quantization representations as inputs, and with at least one unmasked quantization representation as output.
[0007] In a fourth aspect of the present disclosure, a device for determining user intent is provided, comprising an acquisition module configured to obtain data related to the user as input, and a use module configured to determine the user intent based on the input using the model trained according to the third aspect.
[0008] In a fifth aspect of the present disclosure, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer-executable instructions, and the computer-executable instructions are executed by the processor to implement the method according to the first aspect and / or the second aspect of the present disclosure.
[0009] In a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method according to the first aspect and / or the second aspect of the present disclosure.
[0010] According to various embodiments of the present disclosure, by using user data without user intent labels to train a user intent determination model, the model can better learn the interactions and representations between user features, thereby improving the accuracy of the user intent determination model. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The features, advantages and other aspects of the various implementations of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Several implementations of the present disclosure are shown here in an exemplary and non-limiting manner. In the accompanying drawings:
[0012] Figure 1 An example environment for determining user intent according to an embodiment of the present disclosure is shown;
[0013] Figure 2 A flow chart of a data processing method according to an embodiment of the present disclosure is shown;
[0014] Figure 3 A schematic diagram showing data in a data set without user intention labels according to an embodiment of the present disclosure is shown;
[0015] Figure 4 A schematic diagram showing data in a user intention label data set according to an embodiment of the present disclosure is shown;
[0016] Figure 5 A schematic diagram showing segmented training of a user intent determination model according to an embodiment of the present disclosure is shown;
[0017] Figure 6 A schematic diagram of a joint training framework for a user intent determination model according to an embodiment of the present disclosure is shown;
[0018] Figure 7A schematic diagram showing an example architecture of a feature-independent neural network model according to an embodiment of the present disclosure is shown;
[0019] Figure 8 A schematic diagram showing another example architecture of a feature-independent neural network model according to an embodiment of the present disclosure is shown;
[0020] Fig. 9 An example user interface of a customer service scenario based on user intent according to an embodiment of the present disclosure is shown;
[0021] Fig.10 A flowchart showing a method of using a user intent determination model according to an embodiment of the present disclosure; and
[0022] Fig.11 A block diagram of a computing device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION
[0023] The preferred implementations of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the implementations set forth herein. On the contrary, these implementations are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0024] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "based at least in part on". The terms "an example implementation" and "an implementation" mean "at least one example implementation". The term "another implementation" means "at least one additional implementation". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0025] User intent refers to the user's interests or needs, the goals the user wants to achieve, or the tasks the user wants to complete, etc. For applications and websites, understanding user intent can help provide better recommendations or services to users. User intent determination can be viewed as a single-label or multi-label classification problem. The user intent determination model determines one or more user intents of a user based on user features.
[0026] The traditional model training method is to use user data with user intent labels (referred to as "labeled datasets") for training, such as using user features and labeled user intents for training. However, the amount of data in labeled datasets is usually limited, while user intents and user features may be of many types, which results in user features and user intents being sparse under given data, causing the trained model to overfit, and thus failing to train an accurate user intent determination model. Therefore, the accuracy of the user intent determination model trained by traditional methods is not high enough.
[0027] To this end, an embodiment of the present disclosure proposes a user intent determination scheme based on mask feature training. According to an embodiment of the present disclosure, by using user data without user intent labels (referred to as "unlabeled dataset") to train a user intent determination model, the model can better learn the interaction and representation between user features, thereby improving the accuracy of the user intent determination model.
[0028] The embodiments of the present disclosure mask some user features so that the model learns how to predict masked features from some unmasked features. Therefore, the embodiments of the present disclosure can use a large number of unlabeled data sets to pre-train the model and then use labeled data sets to fine-tune the model, or use unlabeled data sets and labeled data sets to jointly train the model. Since the number of unlabeled data sets is very large, some embodiments of the present disclosure can improve the accuracy of the trained user intent determination model by training with a large number of unlabeled data sets.
[0029] As an example, assume that the unlabeled data set includes multiple user features, such as gender, age, city, taxi date, departure place, destination, user comments, etc. The embodiment of the present disclosure can mask the city, and then use the features such as gender, age, taxi date, departure place, destination, user comments as model input and the city as model output to pre-train the user intention determination model, so that the model can predict the city feature based on other features. Through this training method, the model can learn the interaction and representation between user features, which helps to improve the accuracy of the model.
[0030] The following will refer to the attached Figure 1-10 Some example embodiments of the present disclosure are described.
[0031] Figure 1 An example environment 100 for determining user intent according to an embodiment of the present disclosure is shown. Figure 1As shown, the example environment 100 includes a plurality of user devices 110-1, 110-2 (collectively or individually referred to as "user devices 110") and a server 120, wherein the user devices 110 and the server 120 are connected via a network 115, wherein the network 115 may be any wired network, wireless network, or a combination thereof. The user device 110 may be any electronic device capable of connecting to a network, including but not limited to a smart phone, a tablet computer, a desktop computer, a notebook computer, a smart wearable device (such as a smart watch, smart glasses), a navigation device, a multimedia player device, a smart speaker, and the like.
[0032] The server 120 includes a user data repository 123 and a user intention determination model 125. The server 120 may be a centralized server, a distributed server, or a cloud. The user data repository 123 stores a large amount of user data, including user profiles and user behavior data. In some embodiments, the user profile may include personal information registered by the user in the application and / or website, such as gender, age, city, occupation, etc. The user behavior may be data on related actions performed by the user in the application and / or website, such as the user's taxi-hailing behavior in the taxi-hailing application, the user's comment behavior on the comment object, the user's click behavior on the website, etc.
[0033] The user intent determination model 125 is a model trained according to the training method of an embodiment of the present disclosure, such as a neural network model. The user intent determination model 125 can obtain user data from the user data repository 123, and determine one or more user intents of the user based on the obtained user data. In addition, the user intent determination model 125 can transmit the determined user intent to other systems or modules to perform corresponding tasks. Optionally, the user intent determination model 125 can transmit the determined user intent to the customer service system, and the customer service system can then recommend questions related to the user intent to the user, which helps the user to directly click on the questions recommended by the customer service system without manually entering the questions, thereby improving the user experience. Alternatively, the user intent determination model 125 can transmit the determined user intent to a search engine, an e-commerce system, a news server, a video server, and the like.
[0034] like Figure 1 As shown, with the help of the user intent determined by the user intent determination model 125, the user device 110-1 can recommend issues that the user cares about to the user in the chat window, and the user device 110-2 can recommend information that the user is interested in to the user. Figure 1In the example environment 100, the user intent determination model 125 is deployed in the server 120, but the user intent determination model 125 may also be deployed locally on the user device 110. The following describes an example implementation of training the user intent determination model 125 using an unlabeled dataset and a labeled dataset.
[0035] Figure 2 A flow chart of a data processing method 200 according to an embodiment of the present disclosure is shown. The method 200 may be executed on a single computing device or multiple computing devices, or may be executed using dedicated accelerator resources.
[0036] In block 202, multiple quantitative representations corresponding to multiple types of user data are obtained, wherein the user data at least indicates a user profile and a user behavior of the user. For example, multiple user features are obtained from an unlabeled data set, and the fields of the user features include, for example, the user's gender, age, business occurrence time, user comments, etc. Then, the user features are converted into one-hot vectors and / or multi-hot vectors that are easy to train for machine learning, for example, vectors a, b, c, d, e, f, etc. are obtained.
[0037] In block 204, at least one of the plurality of quantized representations is masked. In some embodiments, the number of vectors to be masked may be determined based on a predetermined ratio, and then the vectors to be masked may be masked to a specific value (e.g., a zero value) or a random value. For example, one tenth of all vectors may be masked, and if one tenth of the total is not an integer, it may be rounded up. By setting a suitable mask ratio, the efficiency of mask training may be improved. In an example where a plurality of quantized representations are vectors a, b, c, d, e, f, etc., vector b may be masked to obtain a masked vector b'.
[0038] In box 206, a model for determining user intent is trained with at least one masked quantization representation and other unmasked quantization representations in multiple quantization representations as inputs, and at least one unmasked quantization representation as output. For example, vectors a, b', c, d, e, f, etc. are used as inputs of the model, and vector b is used as the true output of the model to train the user intent determination model 125, that is, vectors a, b', c, d, e, f, etc. can be used to predict vector b. Therefore, the embodiments of the present disclosure train the user intent determination model 125 by using user features of a large number of users, so that the user intent determination model 125 can better learn the interaction and representation of user features (such as the association between features, using other features to represent sparse features, etc.), thereby improving the accuracy of the user intent determination model 125.
[0039] The embodiments of the present disclosure use unlabeled data sets to train the model. Due to the presence of a large amount of unlabeled data, feature representations can be better learned, especially for sparse and less common features. Unlike the traditional processing object, which is sequential data, the embodiments of the present disclosure process multiple user features that are disordered from each other. In addition, the interaction between features is helpful for subsequent task-related learning. In addition, some user intentions are related to some features, so feature prediction can be used directly for intent prediction. For example, a user intention A is closely related to a sparse feature B. Through the training of the unlabeled data set of the embodiments of the present disclosure, the sparse feature B can be derived from other features, and then the similar feature representation of the sparse feature B can be inferred in the absence of the sparse feature B, thereby determining the user intention A.
[0040] Optionally, embodiments of the present disclosure may use a large number of unlabeled data sets to pre-train model 125 and then use labeled data sets to fine-tune model 125. Alternatively, embodiments of the present disclosure may use unlabeled data sets and labeled data sets to jointly train model 125. Since unlabeled data sets do not require manual annotation and their number is very large, some embodiments of the present disclosure can significantly improve the accuracy of the trained model 125 by training with a large number of unlabeled data sets, avoiding overfitting of the model in labeled data set training. After training the user intent determination model 125, the model 125 can be used to determine the user intent based on the user data in actual scenarios.
[0041] the following Figure 3 and Figure 4 Describes examples of unlabeled and labeled datasets used as training data, respectively. Figure 5 and Figure 6 Two training methods, staged training and joint training, are described respectively. Figure 7 and Figure 8 Describes two example model architectures for user intent determination models. Fig. 9 Example usage scenarios for the user intent determination model are described.
[0042] Figure 3 FIG. 3 is a schematic diagram showing data in an unlabeled dataset 310 according to an embodiment of the present disclosure. The unlabeled dataset 310 can be represented as D u ={x1,x2,…,x N}, where D u There are N data records, each of which can correspond to a user. For example, unlabeled data can be collected from logs where users do not explicitly express their user intent. For each data record, there are K feature fields (also called "feature domains"), namely For example, "day of the week" is a field that can have one of multiple values, such as "Monday", "Tuesday", etc., where "Monday" is a feature. For data records, features may be sparse, and some feature values may rarely appear. Different fields can have different data types, for example, feature values in a field can be numeric, type, text, etc.
[0043] like Figure 3 As shown, the unlabeled data set 310 stores a large number of user data records, each of which may include several user features, including but not limited to user profiles (such as gender, age, etc.), user behavior data (such as the day of the week when the taxi-hailing behavior occurs, user comments, etc.), and some statistical features (such as the average taxi-hailing distance of the user, etc.). In some embodiments, the user's features may reach hundreds or even more.
[0044] refer to Figure 3 , all user features can be encoded into one-hot vectors and / or multi-hot vectors. Quantile statistics can be used to convert numerical features into one-hot vectors. For example, they can be divided into several numerical ranges and then each feature value can be mapped to the corresponding numerical range. Type features can be converted into one-hot vectors or multi-hot vectors, and the bag-of-words model can be used to convert text into multi-hot vectors. Figure 3 As shown, for a data record 315 in the unlabeled data set 310, it can be encoded to generate a vector set 325 including a one-hot vector and a multi-hot vector. For a one-hot vector, there is only one 1 and the others are all 0; for a multi-hot vector, there are two or more 1s, where the 1 in each position represents a corresponding value or label. Figure 3 As shown, the one-hot vector corresponding to "male" in the gender field can be (1, 0), and the one-hot vector corresponding to "female" is (0, 1). "Friendly" in the user comment field corresponds to the second position, and "enthusiastic" corresponds to the fourth position. In addition, a feature mask flag can be added to the last bit of each vector, where 0 indicates unmasked and 1 indicates masked. Therefore, the length of each vector is equal to the number of possible features plus one. For example, an 8-dimensional vector can be used to refer to the day of the week. By converting user features into one-hot vectors and multi-hot vectors, it is convenient to pre-train features in the model.
[0045] Continue to refer Figure 3, some vectors in the vector set 325 can be masked, for example, the vector of the feature "Monday" in the field "day of the week" is masked, for example, all its values are set to 0, and then the last feature mask flag is set to 1. Alternatively, a random value can be generated for the vector of the feature "Monday". The vectors of other user features (such as gender, age, comments, etc.) are not masked. Therefore, the vector set 325 is masked to form a new vector set 335. According to an embodiment of the present disclosure, a pair of training data can be constructed to pre-train the user intent determination model 125 using the new vector set 335 as the input of the model and the original vector of the feature "Monday" as the true output of the model. In this way, the user intent determination model 125 can be trained to train the user feature interaction pattern, which is more helpful for user intent determination.
[0046] Figure 4 FIG. 4 is a schematic diagram showing data in a labeled dataset 410 according to an embodiment of the present disclosure. The labeled dataset 410 may be represented as D l ={(x1,y1),(x2,y2),…,(x M ,y M )}, where D l With M pairs of data samples, we can collect labeled data from the user's intention to click on the recommendation or the log that clearly expresses his intention. Since the proportion of users who clearly express their intention in applications or websites is usually very low, M is much smaller than N. For the labeled data record (x i ,y i ), The vector representing the labeled user intent, where L represents the size of the user intent label, The value 0 at the position corresponding to user intention l indicates that intention l does not exist, while the value 1 indicates that intention l exists.
[0047] like Figure 4 As shown, Figure 3 Compared with the unlabeled dataset 310 shown, the labeled dataset 410 has an additional column of labeled "user intent". For a certain data record 415 in the labeled dataset 410, it can be encoded to generate a vector set 425 including a one-hot vector and a multi-hot vector. Then, the vectors in the vector set 425 other than the user intent can be used as the input of the model and the user intent vector can be used as the true output of the model to construct a pair of training data to further train the user intent determination model 125, that is, to fine-tune the trained user intent determination model 125 for the user intent task.
[0048] After obtaining the unlabeled dataset D u And the labeled dataset D lAfter the training data is obtained, you can use Figure 5 The phased training method shown or using Figure 6 The joint training method shown is used to train the user intent determination model 125 of the embodiment of the present disclosure.
[0049] Figure 5 FIG. 1 shows a schematic diagram of segmented training of the user intent determination model 125 according to an embodiment of the present disclosure. Figure 5 As shown, the training of the user intention determination model 125 may include two stages, namely a pre-training stage 501 and a fine-tune stage 502. The pre-training stage 501 uses an unlabeled dataset D u To learn the feature interaction pattern, the fine-tuning stage 502 reuses the learned feature interaction pattern to train a specific user intent determination task. Figure 5 As shown, the user intent determination model 125 includes an embedding layer 510, a neural network layer 520, a mask feature output layer 540, a pre-trained loss function layer 550, a user intent output layer 570, and a user intent loss function layer 580, wherein the embedding layer 510 maps a high-dimensional vector to a low-dimensional vector, the neural network layer 520 learns the nonlinear relationship between user features and outputs, and the reusable part 530 composed of the embedding layer 510 and the neural network layer 520 can be reused in two stages.
[0050] In the pre-training stage 501, an unlabeled dataset D is used. u The user intent determination model 125 is pre-trained with the data in the example to learn the interactions and representations between the features. For each data record, the features in some fields are randomly masked and treated as unknowns, and then the masked features are predicted using other features. For data record i, its masked features can be represented as F i , then the learning goal of the model is The number of masked features is set to That is, round up γK, where γ represents the mask ratio, such as 0.1. The mask input of the masked feature vector is represented as The goal of the pre-training stage 501 is to predict the masked feature vector based on the mask input, that is,
[0051] like Figure 5 As shown, the input 505 of the model is a masked form of the user feature vector, which is represented as input enter Includes one-hot vectors and / or multi-hot vectors, some of which are masked, input For example, it can be Figure 3The embedding layer 510 inputs the mask into Converted into a low-dimensional dense vector h in ={h 1 ,h 2 ,…,h K}, the neural network layer 520 is based on the input vector h in Generate a context vector h across representations out The mask feature output layer 540 is based on the context vector h out The corresponding predicted output 545 is obtained, which is represented as output x'. The pre-trained loss function layer 550 calculates the predicted output x' i And the real output The loss between is used to adjust the parameters of the model, thereby pre-training the user intent determination model 125.
[0052] For the one-hot vector, the output x is obtained by the softmax function ′k =softmax(hW k ),in represents the learnable parameters, L k represents the dimension of feature k, and d represents the size of h. For multi-hot vectors, the probability of each feature can be predicted by the sigmoid function Where V k Indicates that k Similar learnable parameters. The pre-training loss function layer 550 determines the training loss. For a certain data record, the pre-training loss function is expressed as formula (1):
[0053]
[0054] Among them, F o represents the masked one-hot vector, F m represents the masked multi-hot vector, L o and L m denote the losses for one-hot vectors and multi-hot vectors, respectively.
[0055] In some embodiments, the embedding layer 510 embeds the one-hot vector and the multi-hot vector into a dense vector, which can retain key information and has better generalization ability. For the multi-hot vector, the multi-hot vector can be first converted into multiple one-hot vectors, and the multiple one-hot vectors can be converted into vectors of multiple predetermined dimensions respectively, and then the dense vector corresponding to the multi-hot vector is determined based on the mean of the vectors of the multiple predetermined dimensions. In this way, the embedding layer can effectively convert the multi-hot vector, thereby improving the processing efficiency.
[0056] Therefore, through the pre-training of the pre-training stage 501, the user intention determination model 125 can be trained from the unlabeled dataset Du The interaction and representation patterns of user features are learned, which are mainly cross-combinations of features. Setting a deeper neural network can better learn complex patterns between features. Therefore, the neural network layer 520 in the user intent determination model 125 can be a deep neural network (DNN).
[0057] Continue to refer Figure 5 In the fine-tuning stage 502, a labeled dataset D is used l Fine-tuning the user intent determination model 125 based on the data in the model. Fine-tuning refers to loading the pre-trained model 125, for example, loading a bunch of network weight values, and then inputting the data set of the specific domain task into the model 125, continuing the back propagation training on the network, and constantly adjusting the weights of the original model, thereby obtaining a model suitable for the new specific task. Figure 5 As shown, the reusable part 530 that has been trained in the pre-training stage can be reused, and a user intention output layer 570 and a user intention loss function layer 580 are added. In the fine-tuning stage 502, the input 565 of the model is a user feature vector, which is represented as input x. For example, input x is Figure 4 The vector set 425 described in the above description excludes the user's intention. The embedding layer 510 generates an input vector h according to the input x. in , the neural network layer 520 is based on the input vector h in Generate context vector h out , the user intention output layer 570 is based on the context vector h out The corresponding predicted output 575 is obtained, which is represented as output y'. The user intention loss function layer 580 adjusts the parameters of the model by the loss between the predicted output y' and the true output y, thereby fine-tuning the user intention determination model 125. In the fine-tuning stage 502, both the common embedding layer 510 and the neural network layer 520 are optimized, and the user intention output layer 570 and the user intention loss function layer 580 are optimized for the target task.
[0058] For the task of determining user intent, T binary classifiers can be used, where each classifier corresponds to each user intent. The output result is y' = {y'1, y'2, ..., y' T}, the user intention loss function of the user intention loss function layer 580 can be expressed as formula (2):
[0059]
[0060] in represents the predicted output of the t-th intent of the ith data record, Represents the true output of the tth intent of the ith data record.
[0061] Therefore, according to an embodiment of the present disclosure, by using the unlabeled dataset D u The user intention determination model 125 is pre-trained with a large amount of unlabeled data in the dataset D l Fine-tuning the user intent determination model 125 based on the data in can improve the accuracy of the trained user intent determination model 125.
[0062] Figure 6 FIG. 1 is a schematic diagram of a joint training framework of a user intent determination model 125 according to an embodiment of the present disclosure. Figure 5 The staged training framework shown, Figure 6 It shows that the unlabeled dataset D is used in a multi-task manner. u And the labeled dataset D l To jointly train the model.
[0063] like Figure 6 As shown, the masked vector 505 can be used as the model input, and the original vector of the masked feature and the labeled user intent vector can be used as the output to jointly train the masked feature output layer 540 and the user intent output layer 570 in the user intent determination model 125. In the joint training process, the context vector h output by the neural network layer 520 out It is used for both the mask feature output layer 540 and the user intent output layer 570, and then jointly optimizes the pre-training loss function layer 550 and the user intent loss function layer 580. u The loss function of the loss function layer is the same as the above formula (1). l For labeled data in , the loss function can be determined based on the weighted sum of the pre-training loss function and the user intention loss function, as shown in the following formula (2):
[0064]
[0065] where α represents a hyperparameter that controls the weight of the loss.
[0066] Therefore, by jointly training the mask feature output layer 540 and the user intent output layer 570 in the user intent determination model 125, the efficiency of model training can be accelerated.
[0067] In addition, some embodiments of the present disclosure also propose an improved neural network model architecture. The inventors of the present application found that the features of users are relatively independent of each other, and these features are position-independent. Therefore, according to the improved neural network layer 520 of the embodiment of the present disclosure, some neural network parameters for each feature are set to be unshared, and for each user intent, the model only cares about some relevant user features, rather than all user features, thereby improving the accuracy of the model.
[0068] Figure 7 FIG. 1 is a schematic diagram showing an architecture of a feature-independent neural network model according to an embodiment of the present disclosure. Figure 7 As shown, the user intent determination model 125 also includes an embedding layer 510, a neural network layer 520, a mask feature output layer 540, a pre-trained loss function layer 550, a user intent output layer 570, and a user intent loss function layer 580, wherein the input of the embedding layer 510 is a mask input 705, which is represented as input The embedding layer 510 inputs the mask Converted into a dense vector 715, i.e. h in ={h 1 ,h 2 ,…,h K}, the neural network layer 520 is used for feature crossing, and is therefore also called a feature crossing layer.
[0069] like Figure 7 As shown, the input of the neural network layer 520 is a context-independent dense vector 715, i.e., h in ={h 1 ,h 2 ,…,h K}, the output of the neural network layer 520 is a context feature vector 725 for each user feature, i.e. Context means that each context feature vector incorporates information from other user features. The neural network layer 520 includes K feature intersection blocks (abbreviated as FIBs), and each user feature is set with a separate FIB. Therefore, the model according to the embodiment of the present disclosure is a feature-independent neural network model. For the FIB of the nth layer of the kth feature, an attention mechanism can be used to aggregate information from other features of the previous layer to form a new vector representation. As shown in the following formula (4):
[0070]
[0071] Each FIB includes a multi-head self-attention layer (abbreviated as MHA) and a feed-forward layer (abbreviated as PWF), such as Figure 7As shown in Figure 2, MHA is used to extract contextual information of each user feature. Multi-head can output multiple groups to obtain more contextual information. PWF further extracts contextual information based on the output of MHA, which is used to increase nonlinearity while considering the interaction between different implicit dimensions. Figure 7 A feature cross-layer of a layer in the neural network layer 520 is shown in FIG. The neural network layer 520 may include multiple layers. The attention mechanism enables the neural network to have the ability to focus on a subset of its input features, so that specific inputs can be selected. In the neural network layer 520, the parameters for each user feature are not shared. For example, for the first feature in the mask input 705, there is a corresponding first attention parameter in the MHA and a corresponding first feedforward parameter in the PWF; for the second feature in the mask input 705, there is a corresponding second attention parameter in the MHA and a corresponding second feedforward parameter in the PWF. By not sharing parameters between FIBs, the positional dependence of the model on different user features can be reduced, thereby helping to improve the accuracy of the model. In MHA, r heads are used to perform self-attention calculations in parallel. For the i-th head, the weight vector is represented by the following formula (5):
[0072]
[0073] where for k = 1, 2, ..., K, and i = 1, 2, ..., r, represents feature-independent and head-independent trainable parameters for attention computation, and d represents h k size.
[0074] Concatenate the results of all headers together as output It can be expressed by the following formula (6):
[0075]
[0076] in represents a feature-independent trainable parameter, and Att represents the attention calculation.
[0077] Next, the output Feature-independent feedforward processing is applied to generate the output of each FIB as shown in equation (7):
[0078]
[0079] in as well as represents a trainable parameter for k features, Gelu represents an activation function, and d' represents an intermediate dimension. Therefore, in the embodiments of the present disclosure, whether in MHA or PWF, each user feature uses its own parameter, so the parameters are not shared in MHA and PWF.
[0080] For each user feature, multiple layers can be aggregated, so the output of the feature intersection in the neural network layer 520 is Continue to refer Figure 7 , the mask feature output layer 540 for pre-training and the user intent output layer 570 for fine-tuning training are different layers, where both the mask feature output layer 540 and the user intent output layer 570 use logistic regression to calculate the output. For the pre-training stage, for each mask feature k, the corresponding context vector To generate the final output 735, namely x', where the context vector Includes the information most relevant to feature k. For the fine-tuning stage, Figure 7 The output scheme using the last layer of attention pooling is shown. For user intent t, the user intent output layer 570 uses attention pooling to aggregate the context vector h out The relevant information to form a single vector h t , as shown in the following formula (8):
[0081]
[0082] in as well as Represents a trainable parameter.
[0083] Therefore, it can be To calculate the output 745, where and is a trainable parameter, and the output layer for each intent can have independent parameters. Therefore, by generating context vectors for each user feature and obtaining relevant user feature information through attention pooling, each user intent can use only part of the features to generate the final result, thereby improving the accuracy of the output user intent. In addition, during the training process, the hyperparameters of the model can include the embedding layer size, the hidden layer size, the number of attention heads, the number of stacked layers, and so on.
[0084] The traditional method of predicting user intent is to compress all information into a single vector, and then use this vector to predict all user intent. However, each user intent may only be related to a part of the user features. For example, the detour problem in the taxi scene is mainly related to the estimated travel distance and the actual travel distance. Therefore, the traditional single vector affects the accuracy of the model, for example, for long-tail user intent. To this end, the embodiment of the present disclosure proposes a neural network model architecture based on feature independence, and generates a context vector for each feature k. Each intent obtains the output result by aggregating the context vector related to it, thereby further improving the accuracy of the model. Compared with a single feature representation, the use of multi-feature representation for prediction can improve the accuracy of intent prediction in predicting multi-intent tasks. In addition, the neural network model architecture based on feature independence can also learn more complex feature interactions and representations.
[0085] Figure 8 FIG. 2 shows a schematic diagram of another architecture of a feature-independent neural network model according to an embodiment of the present disclosure. Figure 8 As shown, the user intent determination model 125 also includes an embedding layer 510, a neural network layer 520, a mask feature output layer 540, a pre-trained loss function layer 550, a user intent output layer 570, and a user intent loss function layer 580. Figure 7 The difference between the architecture with only the last layer of attention pooling is that Figure 8 The architecture adds a flag bit to the mask input 805 of the model, and adds a flag bit to the feature intersection of each layer, the number of which can be equal to the number of user intentions. In the process of feature intersection, the flag bit will fuse the information of other features, that is, all layers are subjected to attention pooling. The embedding layer 510 obtains the vector 815 based on the mask input 508, and the neural network layer 520 generates the context vector 825 based on the vector 815, that is, Where T represents the total number of user intentions, h out The second half of is used to generate the user intent output result. The corresponding part in the context vector 825 is used to determine the mask feature output 835, where the corresponding part of the flag bit in the context vector 825 is input to the user intent output layer 570, and then the user intent output 845 is calculated. In the fine-tuning stage, the flag bit feature is regarded as a mask feature and the corresponding value is predicted. Therefore, for the user intent t, it can be obtained by To calculate the output 845, where and Therefore, the embodiment of the present disclosure adds a flag bit in the mask input, which can perform attention pooling in each layer, thereby outputting the user's intention more accurately.
[0086] Fig. 9 An example user interface 900 of a taxi customer service scenario based on user intent according to an embodiment of the present disclosure is shown. In the taxi customer service scenario, users usually enter the customer service system with questions. With the help of the user intent determination model 125 trained by the embodiment of the present disclosure, it is possible to accurately predict the questions that users may want to ask, thereby facilitating intelligent customer service and / or manual customer service to help users solve problems more quickly and efficiently. In the taxi customer service scenario, the user may be a passenger or a driver. By predicting the questions that the passenger or driver is expected to ask, retrieving pre-set question and answer pairs, and displaying the relevant questions in advance, the user experience can be improved and human resources can be reduced.
[0087] like Fig. 9 As shown, when it is detected that a user has entered the customer service user interface, user data (such as user profile and user taxi-hailing behavior data, etc.) can be obtained, and then the trained user intent determination model 125 is used to determine one or more questions associated with a given user, such as the top few questions with the highest relevance. Then, before the user sends a question in the chat window, the customer robot 910 first sends a message 920 to the user to recommend related questions, such as "how to query historical tracks", "how to contact the driver", etc. In this way, the user can directly click on the relevant question without having to manually enter the question, because the recommended questions are some of the most relevant questions predicted based on the user's personal profile and behavior data, and therefore they are in line with the user's true intentions. In this way, the communication efficiency in the customer scenario is improved and the user experience is enhanced. It should be understood that although Fig. 9 A usage scenario of the user intent determination model 125 according to an embodiment of the present disclosure is shown, but it may also be applicable to other usage scenarios.
[0088] Fig.10 A flowchart of a method 1000 for determining a model using user intent according to an embodiment of the present disclosure is shown. It should be understood that the method for using the model and the method for training the model can be performed by different devices. In box 1002, data related to the user is obtained as a model input. For example, in the use of the user intent determination model 125 according to an embodiment of the present disclosure, user data of the target user, such as a user profile and behavior data, is obtained. In box 1004, the user intent is determined based on the input using the user intent determination model 125. Since the embodiments of the present disclosure can better train the model, the model of the embodiments of the present disclosure can more accurately determine the user's intent.
[0089] See above for Figures 1 to 10 An example of a method according to the present disclosure is described in detail, and implementation of a corresponding device will be described hereinafter.
[0090] According to an exemplary implementation of the present disclosure, there is provided a data processing apparatus, comprising: an acquisition module, configured to acquire a plurality of quantized representations corresponding to a plurality of types of user data, wherein the user data at least indicates a user profile and a user behavior of a user; a masking module, configured to mask at least one quantized representation among the plurality of quantized representations; and a training module, configured to train a model for determining user intent with at least one masked quantized representation and other unmasked quantized representations among the plurality of quantized representations as inputs, and with at least one unmasked quantized representation as output.
[0091] In some embodiments, the user profile of the user includes at least the user's gender, the user behavior of the user includes at least the user's comment text, and the acquisition module includes: a one-hot conversion module, configured to convert the user's gender into a one-hot quantitative representation, in which there is a specific value; and a multi-hot conversion module, configured to convert the user's comment text into a multi-hot quantitative representation, in which there are two or more specific values.
[0092] In some embodiments, the training module includes: a first conversion module, configured to convert a multi-heat quantization representation into a plurality of unique-heat quantization representations; a second conversion module, configured to convert the plurality of unique-heat quantization representations into quantization representations of a plurality of predetermined dimensions respectively; and a dense quantization representation determination module, configured to determine a dense quantization representation corresponding to the multi-heat quantization representation based on the quantization representations of a plurality of predetermined dimensions.
[0093] In some embodiments, the model is a neural network model, and the training module includes: a pre-training module, configured to take at least one masked quantization representation and other unmasked quantization representations of multiple quantization representations as input, and at least one unmasked quantization representation as output, to pre-train the neural network model regardless of user intent; and a further training module, configured to take multiple quantization representations as input, and take the user's labeled quantization representation of the user's intent as output, to further train the trained neural network model related to user intent.
[0094] In some embodiments, the training module includes: a user intent acquisition module, configured to acquire the user's labeled user intent from a user intent dataset; and a joint training module, configured to take at least one masked quantized representation and other unmasked quantized representations of multiple quantized representations as input, and take at least one unmasked quantized representation and the labeled quantized representation of the user intent as output, and jointly train multiple layers in the model, the multiple layers including at least a first output layer for pre-training and a second output layer for user intent.
[0095] In some embodiments, the model is a neural network model including an embedding layer, a feature intersection layer and two output layers, the feature intersection layer includes an attention layer and a feedforward layer, and the training module includes: an embedding module configured to generate multiple input representations based on the input; and a feature intersection module configured to generate multiple context representations based on the multiple input representations.
[0096] In some embodiments, the feature intersection module includes: a first generation module, configured to generate a first context representation corresponding to a first input representation among multiple input representations based on a first attention parameter in the attention layer and a first feedforward parameter in the feedforward layer; and a second generation module, configured to generate a second context representation corresponding to a second input representation among multiple input representations based on a second attention parameter in the attention layer and a second feedforward parameter in the feedforward layer, the first attention parameter is different from the second attention parameter, and the first feedforward parameter is different from the second feedforward parameter.
[0097] In some embodiments, the training module further includes: an attention pooling module configured to generate a new representation for output by performing pooling processing based on an attention mechanism on multiple context representations.
[0098] In some embodiments, the training module further includes: a flag adding module configured to add one or more flags to the input; and a flag output module configured to generate one or more context representations corresponding to the one or more flags by a feature cross layer.
[0099] In some embodiments, the mask module includes: a mask number determination module, configured to determine the number of quantization representations to be masked among multiple quantization representations based on a predetermined ratio, the number of quantization representations to be masked being less than the total number of the multiple quantization representations; and a mask value determination module, configured to mask at least one quantization representation to a specific value or a random value.
[0100] In some embodiments, the device also includes: a question recommendation module, configured to determine one or more questions associated with the given user through a trained model based on determining that the given user enters the customer service user interface; and a question presentation module, configured to present one or more questions to the given user on the customer service user interface.
[0101] In some embodiments, a device for determining user intent is provided, comprising an acquisition module configured to obtain data related to a user as input, and a use module configured to determine user intent based on the input using a model trained according to an embodiment of the present disclosure.
[0102] In addition, according to an exemplary implementation of the present disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory is used to store computer-executable instructions, and the computer-executable instructions are executed by the processor to implement the method described above.
[0103] Therefore, according to the apparatus and devices of the embodiments of the present disclosure, by using a large amount of user data without user intent labels to train the user intent determination model, the model can better learn the interaction and representation of the feature interactions of the user data, thereby improving the accuracy of the user intent determination model.
[0104] Fig.11 A block diagram illustrating a computing device / server 1100 in which one or more embodiments of the present disclosure may be implemented is shown. It should be understood that Fig.11 The computing device / server 1100 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein.
[0105] like Fig.11 As shown, computing device / server 1100 is in the form of a general-purpose computing device. Components of computing device / server 1100 may include, but are not limited to, one or more processors or processing units 1110, memory 1120, storage device 1130, one or more communication units 1140, one or more input devices 1150, and one or more output devices 1160. Processing unit 1110 may be an actual or virtual processor and is capable of performing various processes according to a program stored in memory 1120. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to increase the parallel processing capabilities of computing device / server 1100.
[0106] The computing device / server 1100 typically includes a plurality of computer storage media. Such media may be any available media accessible to the computing device / server 1100, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1120 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1130 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the computing device / server 1100.
[0107] The computing device / server 1100 may further include additional removable / non-removable, volatile / non-volatile storage media. Fig.11 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. Memory 1120 may include a computer program product 1125 having one or more program modules that are configured to perform various methods or actions of various embodiments of the present disclosure.
[0108] The communication unit 1140 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device / server 1100 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the computing device / server 1100 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0109] Input device 1150 may be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 1160 may be one or more output devices, such as a display, speaker, printer, etc. Computing device / server 1100 may also communicate with one or more external devices (not shown) as needed, such as storage devices, display devices, etc., with one or more devices that enable users to interact with computing device / server 1100, or with any device that enables computing device / server 1100 to communicate with one or more other computing devices (e.g., network card, modem, etc.) through communication unit 1140. Such communication may be performed via an input / output (I / O) interface (not shown).
[0110] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
[0111] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0112] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0113] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0114] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0115] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A data processing method, comprising: obtaining a plurality of quantified representations corresponding to a plurality of types of user data, the user data indicating at least a user profile and a user behavior of a user; masking at least one quantized representation of the plurality of quantized representations; as well as Training a model for determining user intent with at least one masked quantized representation and other unmasked quantized representations of the plurality of quantized representations as input and at least one unmasked quantized representation as output; The model is a neural network model, and the model trained to determine the user's intent includes: Pre-training the neural network model independently of user intent by taking at least one masked quantized representation and other unmasked quantized representations of the plurality of quantized representations as inputs and taking at least one unmasked quantized representation as output; as well as The pre-trained neural network model is further trained with respect to user intent by taking the multiple quantized representations as input and taking the quantized representation of the user's annotated user intent as output.
2. The method according to claim 1, wherein the user profile of the user includes at least the gender of the user, the user behavior of the user includes at least the comment text of the user, and obtaining a plurality of quantitative representations corresponding to a plurality of types of user data comprises: Convert the gender of the user into a unique quantification representation, wherein a specific value exists in the unique quantification representation; as well as The comment text of the user is converted into a multi-caloric quantitative representation, in which two or more specific values exist.
3. The method of claim 2, wherein training a model for determining user intent comprises: converting the multi-heat quantification representation into a plurality of unique-heat quantification representations; Converting the multiple unique heat quantitative representations into quantitative representations of multiple predetermined dimensions respectively; as well as Based on the quantized representations of the plurality of predetermined dimensions, a dense quantized representation corresponding to the multi-caloric quantized representation is determined.
4. The method of claim 1, wherein training a model for determining user intent comprises: Acquire the annotated user intent of the user from a user intent dataset; as well as Taking at least one masked quantized representation and other unmasked quantized representations of the multiple quantized representations as input, and taking at least one unmasked quantized representation and the labeled quantized representation of user intent as output, multiple layers in the model are jointly trained, and the multiple layers include at least a first output layer for pre-training and a second output layer for user intent.
5. The method of claim 1, wherein the model is a neural network model comprising an embedding layer, a feature cross layer, and two output layers, the feature cross layer comprising an attention layer and a feedforward layer, and training the model for determining user intent comprises: Generating, by the embedding layer, a plurality of input representations based on the input; as well as A plurality of context representations are generated by the feature intersection layer based on the plurality of input representations.
6. The method according to claim 5, wherein generating a plurality of context representations based on the plurality of input representations by the feature intersection layer comprises: generating a first context representation corresponding to a first input representation of the plurality of input representations based on a first attention parameter in the attention layer and a first feed-forward parameter in the feed-forward layer; as well as Based on a second attention parameter in the attention layer and a second feedforward parameter in the feedforward layer, a second context representation corresponding to a second input representation among the multiple input representations is generated, the first attention parameter is different from the second attention parameter, and the first feedforward parameter is different from the second feedforward parameter.
7. The method according to claim 5 or 6, wherein training a model for determining user intent further comprises: A new representation for output is generated by performing a pooling process based on an attention mechanism on the multiple context representations.
8. The method according to claim 5 or 6, wherein training a model for determining user intent further comprises: Add one or more flags to the input; as well as One or more context representations corresponding to the one or more flag bits are generated by the feature intersection layer.
9. The method of claim 1 , wherein masking at least one of the plurality of quantized representations comprises: determining, based on a predetermined ratio, a number of quantized representations to be masked from the plurality of quantized representations, the number of quantized representations to be masked being less than a total number of the plurality of quantized representations; as well as The at least one quantized representation is masked to a specific value or a random value.
10. The method according to claim 1, further comprising: Based on determining that a given user enters a customer service user interface, determining one or more issues associated with the given user through the trained model; as well as The one or more questions are presented to the given user on the customer service user interface.
11. A method for determining user intent, comprising: Obtaining data related to the user as input; as well as The user intention is determined based on the input using a model trained according to the data processing method of any one of claims 1-10.
12. A data processing device, comprising: an acquisition module configured to acquire a plurality of quantitative representations corresponding to a plurality of types of user data, the user data indicating at least a user profile and a user behavior of a user; a masking module configured to mask at least one quantized representation of the plurality of quantized representations; as well as A training module is configured to train a model for determining user intent by taking at least one masked quantized representation and other unmasked quantized representations of the plurality of quantized representations as inputs and taking at least one unmasked quantized representation as output; Wherein, the model is a neural network model, and the training module includes: A pre-training module configured to take the masked at least one quantized representation and other unmasked quantized representations of the plurality of quantized representations as inputs and take the unmasked at least one quantized representation as output, to perform pre-training on the neural network model that is independent of user intention; and The further training module is configured to take the multiple quantized representations as input and the quantized representation of the user's annotated user intention as output, and perform further training on the pre-trained neural network model related to the user intention.
13. The apparatus according to claim 12, wherein the user profile of the user includes at least the gender of the user, the user behavior of the user includes at least the comment text of the user, and the acquisition module includes: A one-hot conversion module, configured to convert the gender of the user into a one-hot quantitative representation, wherein the one-hot quantitative representation has a specific value; as well as The multi-heat conversion module is configured to convert the comment text of the user into a multi-heat quantitative representation, in which there are two or more specific values.
14. The apparatus according to claim 13, wherein the training module comprises: A first conversion module is configured to convert the multi-heat quantification representation into a plurality of unique heat quantification representations; A second conversion module is configured to convert the multiple unique heat quantization representations into quantization representations of multiple predetermined dimensions respectively; as well as The dense quantized representation determination module is configured to determine a dense quantized representation corresponding to the multi-heat quantized representation based on the quantized representations of the plurality of predetermined dimensions.
15. The apparatus according to claim 12, wherein the training module comprises: A user intention acquisition module, configured to acquire the annotated user intention of the user from the user intention dataset; as well as A joint training module is configured to take at least one masked quantization representation and other unmasked quantization representations of the multiple quantization representations as input, and take at least one unmasked quantization representation and the labeled quantization representation of the user intent as output, and jointly train multiple layers in the model, the multiple layers including at least a first output layer for pre-training and a second output layer for user intent.
16. The apparatus according to claim 12, wherein the model is a neural network model comprising an embedding layer, a feature cross layer and two output layers, the feature cross layer comprising an attention layer and a feedforward layer, and the training module comprises: an embedding module configured to generate a plurality of input representations based on the input; as well as A feature intersection module is configured to generate a plurality of context representations based on the plurality of input representations.
17. The apparatus according to claim 16, wherein the feature intersection module comprises: A first generating module configured to generate a first context representation corresponding to a first input representation of the plurality of input representations based on a first attention parameter in the attention layer and a first feed-forward parameter in the feed-forward layer; as well as A second generation module is configured to generate a second context representation corresponding to a second input representation of the multiple input representations based on a second attention parameter in the attention layer and a second feedforward parameter in the feedforward layer, wherein the first attention parameter is different from the second attention parameter, and the first feedforward parameter is different from the second feedforward parameter.
18. The apparatus according to claim 16 or 17, wherein the training module further comprises: The attention pooling module is configured to generate a new representation for output by performing pooling processing based on the attention mechanism on the multiple context representations.
19. The apparatus according to claim 16 or 17, wherein the training module further comprises: A flag adding module, configured to add one or more flags to the input; as well as The flag output module is configured to generate one or more context representations corresponding to the one or more flags by the feature cross layer.
20. The apparatus according to claim 12, wherein the mask module comprises: a mask number determination module configured to determine, based on a predetermined ratio, a number of quantized representations to be masked among the plurality of quantized representations, the number of quantized representations to be masked being less than a total number of the plurality of quantized representations; as well as The mask value determination module is configured to mask the at least one quantized representation into a specific value or a random value.
21. The apparatus according to claim 12, further comprising: A question recommendation module, configured to determine one or more questions associated with a given user through the trained model based on determining that the given user enters the customer service user interface; as well as The question presentation module is configured to present the one or more questions to the given user on the customer service user interface.
22. An apparatus for determining user intent, comprising: An acquisition module, configured to obtain data related to the user as input; as well as A using module is configured to determine the user intention based on the input using a model trained by the data processing device according to any one of claims 12-21.
23. An electronic device, comprising: processor; as well as A memory storing computer executable instructions, which are configured to implement the method according to any one of claims 1 to 10 or the method according to claim 11 when the computer executable instructions are executed by the processor.
24. A computer-readable storage medium having computer-executable instructions stored thereon, wherein the computer-executable instructions are executed by a processor to implement the method according to any one of claims 1 to 10 or the method according to claim 11.
