Method and apparatus for training a content producer's category prediction model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
- Filing Date
- 2023-07-24
- Publication Date
- 2026-06-12
Smart Images

Figure CN116956154B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a training method, apparatus, electronic device, and storage medium for a category prediction model of content producers. Background Technology
[0002] With the development of computer and network technologies, live streaming has become widely popular. On current live streaming platforms, there are a huge number of content producers, and these producers can be divided into multiple categories based on the content they produce.
[0003] In related technologies, the data is typically classified into multiple categories by manually determining the cluster categories and the total number of clusters in advance. However, the subjective factors that greatly influence the determination of cluster categories and the number of clusters by manual means result in poor data classification accuracy. Summary of the Invention
[0004] This disclosure provides a training method, apparatus, electronic device, and storage medium for a category prediction model of content producers, to at least address the problem of poor clustering accuracy in related technologies. The technical solution of this disclosure is as follows:
[0005] According to a first aspect of the present disclosure, a method for training a category prediction model for content producers is provided, comprising:
[0006] Acquire training data, which includes content production features corresponding to content producers and content production augmentation features obtained by data augmentation processing based on the content production features.
[0007] The content production features and the content production augmentation features are respectively input into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained. The results are: the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer; the classification result prediction vector output by the second fully connected layer; the second high-dimensional feature matrix of the content production features; and the fourth high-dimensional feature matrix of the content production augmentation features. The classification result prediction vector is used to predict the type of the content production features. The dimensions of the first high-dimensional feature matrix and the second high-dimensional feature matrix are different, and the dimensions of the third high-dimensional feature matrix and the fourth high-dimensional feature matrix are different.
[0008] A first loss function is calculated based on the first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix, and a second loss function is calculated based on the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix and the classification result prediction vector. The first difference represents the difference between the content production feature and the content production augmentation feature, and the second difference represents the difference between the classification result of the content production feature and the classification result of the content production augmentation feature.
[0009] Based on the first loss function and the second loss function, a comprehensive loss function is calculated, and based on the comprehensive loss function, a trained category prediction model for content producers is obtained.
[0010] In one embodiment, the content producer's category prediction model includes a feature extraction layer, a first fully connected layer, and a second fully connected layer;
[0011] The step of inputting the content production features and the content production augmentation features into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, respectively, to obtain the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer, and the classification result prediction vector, the second high-dimensional feature matrix of the content production features, and the fourth high-dimensional feature matrix of the content production augmentation features output by the second fully connected layer, includes:
[0012] The feature extraction layer determines the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature.
[0013] The first feature vector and the second feature vector are input into the first fully connected layer to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature.
[0014] The first feature vector and the second feature vector are input into the second fully connected layer to obtain the classification result prediction vector, the second high-dimensional feature matrix corresponding to the content production feature, and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature.
[0015] In one embodiment, the first high-dimensional feature matrix includes a plurality of first row vectors, and the third high-dimensional feature matrix includes a plurality of second row vectors. The step of calculating a first loss function based on a first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix includes:
[0016] For the first row vector, determine the second row vector corresponding to the first row vector and other second row vectors other than the second row vector corresponding to the first row vector in the third high-dimensional feature matrix, calculate the first distance between the first row vector and the second row vector corresponding to the first row vector, and calculate the second distance between the first row vector and the other second row vectors.
[0017] For the second row vector, determine the first row vector corresponding to the second row vector and other first row vectors other than the first row vector corresponding to the second row vector in the first high-dimensional feature matrix, calculate the third distance between the second row vector and the first row vector corresponding to the second row vector, and calculate the fourth distance between the second row vector and the other first row vectors;
[0018] Each of the first distance, each of the second distance, each of the third distance, and each of the fourth distance are used as the first difference degree, and a first loss function is calculated based on the first difference degree. The first distance and the third distance are positively correlated with the first loss function, and the second distance and the fourth distance are negatively correlated with the first loss function.
[0019] In one embodiment, the second high-dimensional feature matrix includes a plurality of first column vectors, and the fourth high-dimensional feature matrix includes a plurality of second column vectors; the step of calculating the second loss function based on the second difference between the second high-dimensional feature matrix and the third high-dimensional feature matrix and the classification result prediction vector includes:
[0020] For the first column vector, determine the second column vector corresponding to the first column vector and other second column vectors besides the second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix, calculate the fifth distance between the first column vector and the second column vector corresponding to the first column vector, and calculate the sixth distance between the first column vector and the other second column vectors.
[0021] For the second column vector, determine the first column vector corresponding to the second column vector and other first column vectors other than the first column vector corresponding to the second column vector in the second high-dimensional feature matrix, calculate the seventh distance between the second column vector and the first column vector corresponding to the second column vector, and calculate the eighth distance between the second column vector and the other first column vectors;
[0022] The fifth distance, the sixth distance, the seventh distance, and the eighth distance are used as the second difference degree, and the second loss function is calculated based on the second difference degree and the classification result prediction vector. The fifth distance and the seventh distance are positively correlated with the second loss function, and the sixth distance and the eighth distance are negatively correlated with the second loss function.
[0023] In one embodiment, the content producer's category prediction model further includes a business prediction module, and the method further includes:
[0024] The classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix are concatenated to obtain the first comprehensive high-dimensional feature matrix. The classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix are concatenated to obtain the second comprehensive high-dimensional feature matrix.
[0025] The business prediction module predicts the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix to obtain the predicted business value.
[0026] Based on the predicted business values and the sample business values corresponding to the content production features, a third loss function is calculated.
[0027] The step of calculating the comprehensive loss function based on the first loss function and the second loss function includes:
[0028] Calculate the comprehensive loss function based on the first loss function, the second loss function, and the third loss function.
[0029] In one embodiment, calculating the comprehensive loss function based on the first loss function, the second loss function, and the third loss function includes:
[0030] The comprehensive loss function is obtained by weighting the first loss function, the first weight corresponding to the first loss function, the second loss function, the second weight corresponding to the second loss function, the third loss function, and the third weight corresponding to the third loss function.
[0031] In one embodiment, the method further includes:
[0032] Obtain the target content production characteristics of the target content producer;
[0033] The target content production features are input into the trained content producer category prediction model to obtain the target category corresponding to the target content producer, and to determine the multiple content producers included in the target category.
[0034] The target category includes multiple content creators who are recommended to the target user accounts corresponding to the target content creators.
[0035] According to a second aspect of the present disclosure, a training apparatus for a category prediction model of a content producer is provided, comprising:
[0036] The first acquisition unit is configured to acquire training data, the training data including content production features corresponding to the content producer and content production augmentation features obtained by data augmentation processing based on the content production features.
[0037] The first determining unit is configured to input the content production feature and the content production augmentation feature into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, respectively, to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature output by the first fully connected layer, and the classification result prediction vector output by the second fully connected layer, the second high-dimensional feature matrix of the content production feature and the fourth high-dimensional feature matrix of the content production augmentation feature. The classification result prediction vector is used to predict the type of the content production feature. The dimensions of the first high-dimensional feature matrix and the second high-dimensional feature matrix are different, and the dimensions of the third high-dimensional feature matrix and the fourth high-dimensional feature matrix are different.
[0038] The first computing unit is configured to perform calculation of a first loss function based on a first difference degree between a first high-dimensional feature matrix and a third high-dimensional feature matrix, and to calculate a second loss function based on a second difference degree between a second high-dimensional feature matrix and a fourth high-dimensional feature matrix and the classification result prediction vector. The first difference degree represents the difference between the content production feature and the content production augmentation feature, and the second difference degree represents the difference between the classification result of the content production feature and the classification result of the content production augmentation feature.
[0039] The second computing unit is configured to calculate a comprehensive loss function based on the first loss function and the second loss function, and obtain a trained category prediction model for the content producer based on the comprehensive loss function.
[0040] In one embodiment, the content producer's category prediction model includes a feature extraction layer, a first fully connected layer, and a second fully connected layer;
[0041] The first determining unit is specifically used for:
[0042] The feature extraction layer determines the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature.
[0043] The first feature vector and the second feature vector are input into the first fully connected layer to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature.
[0044] The first feature vector and the second feature vector are input into the second fully connected layer to obtain the classification result prediction vector, the second high-dimensional feature matrix corresponding to the content production feature, and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature.
[0045] In one embodiment, the first computing unit includes:
[0046] The first computational subunit is configured to perform the following operations for the first row vector: determine the second row vector corresponding to the first row vector in a third high-dimensional feature matrix, and other second row vectors besides the second row vector corresponding to the first row vector; calculate the first distance between the first row vector and the second row vector corresponding to the first row vector; and calculate the second distance between the first row vector and the other second row vectors.
[0047] The second computational subunit is configured to perform the following operations for the second row vector: determine the first row vector corresponding to the second row vector in the first high-dimensional feature matrix, and other first row vectors besides the first row vector corresponding to the second row vector; calculate the third distance between the second row vector and the first row vector corresponding to the second row vector; and calculate the fourth distance between the second row vector and the other first row vectors.
[0048] The third calculation subunit is configured to perform the following: taking each of the first distances, each of the second distances, each of the third distances, and each of the fourth distances as the first difference degree, and calculating a first loss function based on the first difference degree, wherein the first distances and the third distances are positively correlated with the first loss function, and the second distances and the fourth distances are negatively correlated with the first loss function.
[0049] In one embodiment, the second computing unit includes:
[0050] The fourth computational subunit is configured to perform the following operations for the first column vector: determine the second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix, and other second column vectors besides the second column vector corresponding to the first column vector; calculate the fifth distance between the first column vector and the second column vector corresponding to the first column vector; and calculate the sixth distance between the first column vector and the other second column vectors.
[0051] The fifth calculation subunit is configured to perform the following operations for the second column vector: determine the first column vector corresponding to the second column vector in the second high-dimensional feature matrix, and other first column vectors other than the first column vector corresponding to the second column vector; calculate the seventh distance between the second column vector and the first column vector corresponding to the second column vector; and calculate the eighth distance between the second column vector and the other first column vectors.
[0052] The sixth calculation subunit is configured to use each of the fifth distances, the sixth distances, the seventh distances, and the eighth distances as the second difference degree, and to calculate a second loss function based on the second difference degree and the classification result prediction vector, wherein the fifth distance and the seventh distance are positively correlated with the second loss function, and the sixth distance and the eighth distance are negatively correlated with the second loss function.
[0053] In one embodiment, the content producer's category prediction model further includes a business prediction module, and the apparatus further includes:
[0054] The splicing unit is configured to perform splicing processing on the classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix to obtain a first comprehensive high-dimensional feature matrix, and to perform splicing processing on the classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix to obtain a second comprehensive high-dimensional feature matrix.
[0055] The prediction unit is configured to perform prediction on the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix through the business prediction module to obtain the predicted business value.
[0056] The third calculation unit is configured to calculate the third loss function based on the predicted business value and the sample business value corresponding to the content production feature.
[0057] The second computing unit is specifically used for:
[0058] Calculate the comprehensive loss function based on the first loss function, the second loss function, and the third loss function.
[0059] In one embodiment, the second calculation unit is specifically used to: perform weighted calculation based on the first loss function, the first weight corresponding to the first loss function, the second loss function, the second weight corresponding to the second loss function, the third loss function, and the third weight corresponding to the third loss function to obtain a comprehensive loss function.
[0060] In one embodiment, the device further includes:
[0061] The second acquisition unit is configured to acquire the target content production features of the target content producer.
[0062] The input unit is configured to input the target content production features into a trained content producer category prediction model to obtain the target category corresponding to the target content producer and determine the multiple content producers included in the target category.
[0063] The recommendation unit is configured to recommend multiple content producers included in the target category to the target user accounts corresponding to the target content producers.
[0064] According to a third aspect of the present disclosure, an electronic device is provided, comprising:
[0065] processor;
[0066] Memory used to store the processor's executable instructions;
[0067] The processor is configured to execute the instructions to implement the training method for the category prediction model of the content producer as described in any one of the first aspects.
[0068] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform a training method for a category prediction model of a content producer as described in any one of the first aspects.
[0069] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including instructions that, when executed by a processor of an electronic device, enable the electronic device to perform a training method for a category prediction model of a content producer as described in any one aspect.
[0070] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects:
[0071] By adopting this method, training data can be clustered adaptively to obtain clustering results that are not affected by subjective factors and clustering results that are combined with business needs. Through the dual learning of content production features and the corresponding content production augmentation features, more accurate clustering results can be obtained, avoiding the need to manually specify the number of cluster categories, realizing adaptive adjustment of cluster categories and extraction of complex features.
[0072] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0073] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0074] Figure 1 This is an application environment diagram illustrating a training method for a category prediction model for content producers, according to an exemplary embodiment.
[0075] Figure 2 This is a flowchart illustrating a method for training a category prediction model for content producers, according to an exemplary embodiment.
[0076] Figure 3 This is a flowchart illustrating a method for training a category prediction model for content producers, according to an exemplary embodiment.
[0077] Figure 4 This is a flowchart illustrating a method for training a category prediction model for content producers, according to an exemplary embodiment.
[0078] Figure 5 This is a flowchart illustrating a method for training a category prediction model for content producers, according to an exemplary embodiment.
[0079] Figure 6 This is a flowchart illustrating a method for training a category prediction model for content producers, according to an exemplary embodiment.
[0080] Figure 7 This is a schematic diagram illustrating the structure of a category prediction model for content producers according to an exemplary embodiment.
[0081] Figure 8 This is a block diagram illustrating a training apparatus for a category prediction model of a content producer, according to an exemplary embodiment.
[0082] Figure 9 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0083] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0084] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0085] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0086] Figure 1 This is a flowchart illustrating a training method for a category prediction model for content producers according to an exemplary embodiment. This training method is used in an electronic device, which may be, but is not limited to, various terminals (such as personal computers, laptops, smartphones, tablets) and portable wearable devices, etc. Figure 1 As shown, the training method for the category prediction model of the content producer may include the following steps.
[0087] In step S110, training data is acquired.
[0088] The training data includes content production features corresponding to content producers and augmented content production features obtained by data augmentation based on these features. The training data can be data used to train a category prediction model for the content producer to be trained. Electronic devices can have live streaming clients installed, allowing content producers to conduct live streams by creating virtual spaces on the client. For example, a content producer can be a streamer, and the virtual space can be a live streaming room. The content production features corresponding to the content producer can be pre-acquired feature data related to one or more content producers related to the live stream. For example, this feature data can include content producer profile feature data, content producer behavioral feature data, content producer duration feature data, and content producer resource feature data, etc.
[0089] Content production features can be sample feature data of content producers directly obtained by electronic devices. The content production augmentation features corresponding to the content production features can be data obtained by electronic devices after performing data augmentation processing on the content production features based on a preset data augmentation method. The data augmentation method can be an expansion method, such as adding random noise, adding an offset to the extraction time point of the feature data, etc. This disclosure does not limit it.
[0090] In one example, content creator profile feature data can characterize the attributes of the content creator, such as gender, age, city of residence, city tier, number of associated accounts (number of followers), number of associated account groups (number of fan clubs), number of actively associated accounts (number of followers), whether it is a new content creator, and the content creator's manual experience tags, etc.; content creator behavioral feature data can be data related to the content creator's virtual space, such as the number of times the virtual space was opened within multiple different preset time periods (number of live streams), the number of content consumers in the virtual space (number of views), and the number of first interaction operations (…). Content producer time-related data can include playback duration, effective viewing duration, and active days within multiple different preset time periods; content producer resource-related data can include the number of resource data interactions (number of times rewarded), the value of resource data interactions (amount of rewards received), the average value of resource data interactions (average value of a single reward), the average value of resource data interactions per person (average value of a single reward per person), etc.
[0091] In implementation, before training the category prediction model for content producers, the electronic device needs to acquire training data for the model. This training data may contain live-stream-related feature data for at least one content producer. Specifically, the acquisition process can be as follows: at the current moment, the electronic device can acquire data from multiple content producers corresponding to different preset time periods and use this data as content production features in the training data. Based on this, the electronic device can perform data augmentation on the content production features according to their extraction time, obtaining augmented content production features. In this way, the electronic device can determine the content production features and the augmented content production features as training data and input the training data into the category prediction model for content producers that have not yet met the preset training completion conditions, thus training the content producer's category prediction model.
[0092] In one example, the electronic device can randomly sample content production features from n content producers. These content production features include the identification information of each content producer, the feature data corresponding to that content producer, and the extraction time of the feature data. At the same time, the electronic device can also randomly determine a data augmentation method and perform data augmentation processing on the content production features based on the data augmentation method to obtain augmented content production features.
[0093] In one example, the category prediction model for content producers can be trained in an online incremental manner. That is, content production features are built in real time for model training, and then the content production features are input into the category prediction model for content producers. The category prediction model for content producers can be continuously trained incrementally based on the content production features built in real time.
[0094] In step S120, the content production features and the content production augmentation features are respectively input into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, so as to obtain the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer, as well as the classification result prediction vector, the second high-dimensional feature matrix of the content production features and the fourth high-dimensional feature matrix of the content production augmentation features output by the second fully connected layer.
[0095] The first and second high-dimensional feature matrices have different dimensions, as do the third and fourth high-dimensional feature matrices. The category prediction model for the content producer to be trained can be a neural network model or a deep model, etc., and the neural network model can include multiple computational layers. The classification result prediction vector is used to predict the type of content production features. This classification result prediction vector can be a vector used to represent the clustering prediction results of multiple content producers. The first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature are outputs of the same computational layer in the content producer's category prediction model. The second high-dimensional feature matrix corresponding to the content production feature and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature are outputs of the same computational layer in the content producer's category prediction model. The first high-dimensional feature matrix is the output corresponding to the content production feature, and the third high-dimensional feature matrix is the output of the content production augmentation feature corresponding to the content production feature.
[0096] In practice, electronic devices can input training data containing content production features and content production augmentation features into the category prediction model of content producers that have not yet met the training completion conditions. The category prediction model of the content producers to be trained can process the feature data of content producers contained in the content production features and the feature data contained in the content production augmentation features respectively to obtain the classification result prediction vector, the first high-dimensional feature matrix and the second high-dimensional feature matrix corresponding to the content production features, and the third high-dimensional feature matrix and the fourth high-dimensional feature matrix corresponding to the content production augmentation features.
[0097] In step S130, a first loss function is calculated based on the first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix, and a second loss function is calculated based on the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix and the classification result prediction vector.
[0098] The first degree of difference represents the difference between content production features and content production augmentation features, while the second degree of difference represents the difference between the classification results of content production features and the classification results of content production augmentation features.
[0099] In implementation, the electronic device can calculate the first difference between the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features, and calculate the first loss function based on the first difference. Similarly, the electronic device needs to calculate the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix, that is, calculate the difference between the clustering result (classification result) of the content production features and the clustering result of the content production augmentation features, and calculate the second loss function based on the classification result prediction vector and the calculated second difference.
[0100] In step S140, a comprehensive loss function is calculated based on the first loss function and the second loss function, and a trained category prediction model for content producers is obtained based on the comprehensive loss function.
[0101] The comprehensive loss function can be the loss function corresponding to the category prediction model of the content producer to be trained. The network parameters of the category prediction model of the content producer can include the weight parameters and network parameters corresponding to the multiple computational layers included in the category prediction model of the content producer. The preset training completion condition can be that the value of the calculated comprehensive loss function has converged, or the training time has reached a preset time threshold, or the number of training iterations has reached a preset target number. This disclosure does not limit the specific value of the preset time threshold and the specific value of the preset target number. Those skilled in the art can determine them according to the actual application scenario.
[0102] In implementation, the electronic device can update the network parameters of the content producer's category prediction model based on the comprehensive loss function, and then return to the step of acquiring training data until the value corresponding to the comprehensive loss function meets the preset training completion condition, thus obtaining the trained content producer's category prediction model. In one example, the electronic device can update the network parameters of the multiple computational layers included in the content producer's category prediction model based on the calculated loss value corresponding to the comprehensive loss function, and then return to the step 110 "acquire training data" mentioned above until the calculated comprehensive loss function meets the preset training completion condition. In this way, the electronic device can obtain the trained content producer's category prediction model.
[0103] In the training method of the above-mentioned content producer category prediction model, training data including content production features corresponding to the content producer and content production augmentation features obtained by data augmentation processing based on the content production features are input into the content producer category prediction model to be trained, to obtain the classification result prediction vector, the first high-dimensional feature matrix and the second high-dimensional feature matrix corresponding to the content production features, and the third high-dimensional feature matrix and the fourth high-dimensional feature matrix corresponding to the content production augmentation features; a first loss function is calculated based on the first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix, and a second loss function is calculated based on the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix and the classification result prediction vector; a comprehensive loss function is calculated based on the first loss function and the second loss function, and the trained content producer category prediction model is obtained based on the comprehensive loss function. By adopting this method, training data can be clustered adaptively to obtain clustering results that are not affected by subjective factors and clustering results that are combined with business needs. Through the dual learning of content production features and corresponding content production augmentation features, more accurate clustering results can be obtained, avoiding the need to manually specify the number of cluster categories, realizing adaptive adjustment of cluster categories and extraction of complex features.
[0104] In one exemplary embodiment, the category prediction model for content producers includes a feature extraction layer, a first fully connected layer, and a second fully connected layer.
[0105] The feature extraction layer can include a feature extraction module and one or more deep models. The feature extraction module can be a feature extractor, and the deep model can be any model. The feature extractor is used to extract meaningful features from the feature data, and the deep model is used to abstract these features to obtain the corresponding abstract features. The fully connected layer can be an MLP model, including one or more neural network layers, etc.
[0106] Accordingly, such as Figure 2As shown, in step S120, the content production features and content production augmentation features are respectively input into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, to obtain the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer, as well as the classification result prediction vector, the second high-dimensional feature matrix of the content production features, and the fourth high-dimensional feature matrix of the content production augmentation features output by the second fully connected layer. This can be achieved through the following steps:
[0107] In step S210, the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature are determined through the feature extraction layer.
[0108] The feature extraction layer may include a feature extractor and a deep model (denoted as M).
[0109] In implementation, electronic devices can input both the content production characteristics and the content augmentation characteristics of the content producer into a feature extractor. This feature extractor can process the content production characteristics and the content augmentation characteristics to obtain the content producer characteristics (denoted as X) and the corresponding data augmentation characteristics of the content producer (denoted as X). F Electronic devices can input content producer features corresponding to content production features into a deep model M. The first deep model can abstract the content producer features to obtain abstract features, i.e., the first feature vector (which can be denoted as H). Similarly, electronic devices can input data augmentation features X corresponding to content production augmentation features. F The input is fed into the deep model M to obtain the second feature vector (which can be denoted as H). F ).
[0110] In one example, the content production features may include live-related feature data from multiple content producers.
[0111] In step S220, the first feature vector and the second feature vector are input into the first fully connected layer to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature.
[0112] The first fully connected layer can be a multilayer perceptron (MLP) model or an artificial neural network (ANN). The first high-dimensional feature matrix can include multiple rows and columns, with each row representing an abstract feature of the same content production feature; similarly, the third high-dimensional feature matrix can include multiple rows and columns, with each row representing an abstract feature of the same content production augmentation feature.
[0113] In implementation, the electronic device can input the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature into the first fully connected layer. The first fully connected layer processes the first feature vector and the second feature vector respectively to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature.
[0114] In step S230, the first feature vector and the second feature vector are input into the second fully connected layer to obtain the classification result prediction vector, the second high-dimensional feature matrix corresponding to the content production feature, and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature.
[0115] The second fully connected layer can be a multilayer perceptron (MLP) model or an artificial neural network (ANN). The second high-dimensional feature matrix can include multiple rows and columns, with each row containing multiple values. Each row represents the clustering result (adaptive clustering) of the content production feature, and each specific value represents the probability (confidence or probability) that the content production feature belongs to the clustering category represented by that column. Similarly, the fourth high-dimensional feature matrix can also include multiple rows and columns, with each row containing multiple values. Each row represents the clustering result (adaptive clustering) of the content production feature, and each specific value represents the probability (confidence or probability) that the content production feature belongs to the clustering category represented by that column.
[0116] In implementation, electronic devices can input the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature into the second fully connected layer. The second fully connected layer processes the first feature vector and the second feature vector respectively to obtain the second high-dimensional feature matrix corresponding to the content production feature, the fourth high-dimensional feature matrix corresponding to the content production augmentation feature, and the classification result prediction vector representing the clustering category of the content production feature and the content production augmentation feature.
[0117] Based on the above approach, the model can be trained in depth using dual data to achieve adaptive clustering and ensure the accuracy of the clustering results.
[0118] In an exemplary embodiment, the first high-dimensional feature matrix includes multiple first row vectors, and the third high-dimensional feature matrix includes multiple second row vectors. The first high-dimensional feature matrix is the high-dimensional feature matrix corresponding to the content production feature, and it includes multiple row vectors (which can be denoted as first row vectors). Each first row vector represents an abstract representation of the data obtained after feature extraction and other processing of a content production feature. Similarly, the third high-dimensional feature matrix is the high-dimensional feature matrix corresponding to the content production augmentation feature, and each second row vector represents an abstract representation of the data obtained after feature extraction and other processing of the same content production augmentation feature.
[0119] Accordingly, such as Figure 3 As shown, in step S130, the first loss function is calculated based on the first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix. This can be achieved through the following steps:
[0120] In step S310, for the first row vector, the second row vector corresponding to the first row vector and other second row vectors besides the second row vector corresponding to the first row vector are determined in the third high-dimensional feature matrix. The first distance between the first row vector and the second row vector corresponding to the first row vector is calculated, and the second distance between the first row vector and other second row vectors is calculated.
[0121] Here, the first dissimilarity represents the distance between each row vector in the first high-dimensional feature matrix and each row vector in the third high-dimensional feature matrix. For example, it can be the distance between the first row vector in the i-th row of the first high-dimensional feature matrix and the second row vector in the i-th row of the third high-dimensional feature matrix; it can also be the distance between the first row vector in the i-th row of the first high-dimensional feature matrix and the second row vector in all other rows of the third high-dimensional feature matrix except for the i-th row; similarly, it can be the distance between the second row vector in the i-th row of the third high-dimensional feature matrix and the first row vector in the i-th row of the first high-dimensional feature matrix; and it can also be the distance between the second row vector in the i-th row of the third high-dimensional feature matrix and the first row vector in all other rows of the first high-dimensional feature matrix except for the i-th row. In one example, this distance can be any distance metric such as cosine distance, Eulerian distance, or Hamming distance. This disclosure does not specifically limit the type of distance.
[0122] In implementation, for a first row vector in a first high-dimensional feature matrix, the electronic device can determine the second row vector corresponding to the first row vector in a third high-dimensional feature matrix, as well as other second row vectors besides the second row vector corresponding to the first row vector. The second row vector corresponding to the first row vector in the third high-dimensional feature matrix can be a row vector located in the same row. For example, the first row vector can be a row vector located in the i-th row in the first high-dimensional feature matrix. Thus, the corresponding second row vector determined by the electronic device can also be a row vector located in the i-th row in the third high-dimensional feature matrix. Other second row vectors besides the second row vector corresponding to the first row vector can be row vectors from all rows in the third high-dimensional feature matrix except for the i-th row.
[0123] Based on this, the electronic device can calculate the first distance between the first row vector and the second row vector corresponding to the first row vector, and calculate the second distance between the first row vector and other second row vectors, and determine each first distance and each second distance as a first degree of difference.
[0124] In step S320, for the second row vector, the first row vector corresponding to the second row vector and other first row vectors besides the first row vector corresponding to the second row vector are determined in the first high-dimensional feature matrix. The third distance between the second row vector and the first row vector corresponding to the second row vector is calculated, and the fourth distance between the second row vector and other first row vectors is calculated.
[0125] In implementation, for the second row vector in the third high-dimensional feature matrix, the electronic device can determine the first row vector corresponding to the second row vector in the first high-dimensional feature matrix, as well as other first row vectors besides the first row vector corresponding to the second row vector. The first row vector corresponding to the second row vector in the first high-dimensional feature matrix can be a row vector located in the same row. For example, the second row vector can be a row vector located in the i-th row in the third high-dimensional feature matrix. In this way, the corresponding first row vector determined by the electronic device can also be a row vector located in the i-th row in the first high-dimensional feature matrix. Other first row vectors besides the first row vector corresponding to the second row vector can be row vectors in all other rows of the first high-dimensional feature matrix except for the i-th row.
[0126] Based on this, the electronic device can calculate the third distance between the second row vector and the first row vector corresponding to the second row vector, and calculate the fourth distance between the second row vector and other first row vectors, and determine each third distance and each fourth distance as the first difference degree.
[0127] In step S330, each first distance, each second distance, each third distance, and each fourth distance are used as a first difference degree, and a first loss function is calculated based on the first difference degree. The first and third distances are positively correlated with the first loss function, while the second and fourth distances are negatively correlated with the first loss function.
[0128] In implementation, the electronic device can use each first distance, each second distance, each third distance, and each fourth distance as a first difference degree, and calculate the first loss function corresponding to the category prediction model of the content producer used to train the content production features and the content production augmentation features based on multiple first difference degrees.
[0129] In one example, the electronic device can calculate the first loss function through the following process: The electronic device can calculate the first loss function (which can be denoted as L1) based on the number of content production features, a preset attenuation coefficient, and each first difference degree. Specifically, it can be calculated using the following formula:
[0130]
[0131] in, This represents the relationship between the i-th row of the first high-dimensional feature matrix (which can be denoted as Z) and Z. F The distance τ between the j-th rows of the matrix z This indicates the preset attenuation coefficient.
[0132] Based on the above scheme, the dual loss function is calculated using dual data composed of content production features and content production augmentation features. This enhances the feature learning ability of the unsupervised clustering content producer category prediction model. The first loss function can ensure that the same content production feature remains similar after data augmentation and is dissimilar to other data augmentation samples, thereby improving the feature extraction of the content producer category prediction model.
[0133] In one exemplary embodiment, the second high-dimensional feature matrix includes a plurality of first column vectors, and the fourth high-dimensional feature matrix includes a plurality of second column vectors.
[0134] The second high-dimensional feature matrix is the high-dimensional feature matrix corresponding to the content production features. It includes multiple column vectors (which can be denoted as the first column vector). Each first column vector represents an abstract representation of the data obtained after feature extraction and other processing of a content production feature. Similarly, the fourth high-dimensional feature matrix is the high-dimensional feature matrix corresponding to the content production augmentation features. Each second column vector represents an abstract representation of the data obtained after feature extraction and other processing of the same content production augmentation feature. Each column in both the second and fourth high-dimensional feature matrices represents a cluster category. Each value in the high-dimensional feature matrix specifically indicates the probability that the data in the row containing that value belongs to the cluster category corresponding to the column containing that value.
[0135] Accordingly, such as Figure 4 As shown, in step S130, the second loss function is calculated based on the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix, and the classification result prediction vector. This can be achieved through the following steps:
[0136] In step S410, for the first column vector, the second column vector corresponding to the first column vector is determined in the fourth high-dimensional feature matrix, as well as other second column vectors besides the second column vector corresponding to the first column vector. The fifth distance between the first column vector and the second column vector corresponding to the first column vector is calculated, and the sixth distance between the first column vector and other second column vectors is calculated.
[0137] The second dissimilarity represents the distance between each column vector in the second high-dimensional feature matrix and each column vector in the fourth high-dimensional feature matrix. For example, it could be the distance between the first column vector in the i-th column of the second high-dimensional feature matrix and the second column vector in the i-th column of the fourth high-dimensional feature matrix; it could also be the distance between the first column vector in the i-th column of the second high-dimensional feature matrix and the second column vectors of all other columns in the fourth high-dimensional feature matrix (excluding the i-th column); similarly, it could be the distance between the second column vector in the i-th column of the fourth high-dimensional feature matrix and the first column vector in the i-th column of the second high-dimensional feature matrix; or it could be the distance between the second column vector in the i-th column of the fourth high-dimensional feature matrix and the first column vectors of all other columns in the second high-dimensional feature matrix (excluding the i-th column). In one example, this distance could be any distance metric such as cosine distance, Eulerian distance, or Hamming distance; this disclosure does not specifically limit the type of distance.
[0138] In implementation, for the first column vector in the second high-dimensional feature matrix, the electronic device can determine the second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix, as well as other second column vectors besides the second column vector corresponding to the first column vector. The second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix can be a column vector located in the same column. For example, the first column vector can be a column vector located in the i-th column in the second high-dimensional feature matrix. Thus, the corresponding second column vector determined by the electronic device can also be a column vector located in the i-th column in the fourth high-dimensional feature matrix. Other second column vectors besides the second column vector corresponding to the first column vector can be column vectors from all columns in the fourth high-dimensional feature matrix except for the i-th column.
[0139] Based on this, the electronic device can calculate the fifth distance between the first column vector and the second column vector corresponding to the first column vector, and calculate the sixth distance between the first column vector and other second column vectors, and determine each fifth distance and each sixth distance as the second difference degree.
[0140] In step S420, for the second column vector, the first column vector corresponding to the second column vector and other first column vectors besides the first column vector corresponding to the second column vector are determined in the second high-dimensional feature matrix. The seventh distance between the second column vector and the first column vector corresponding to the second column vector is calculated, and the eighth distance between the second column vector and other first column vectors is calculated.
[0141] In implementation, for the second column vector in the fourth high-dimensional feature matrix, the electronic device can determine the first column vector corresponding to the second column vector, as well as other first column vectors besides the first column vector corresponding to the second column vector in the second high-dimensional feature matrix. The first column vector corresponding to the second column vector in the second high-dimensional feature matrix can be a column vector located in the same column. For example, the second column vector can be a column vector located in the i-th column in the fourth high-dimensional feature matrix. In this way, the corresponding first column vector determined by the electronic device can also be a column vector located in the i-th column in the second high-dimensional feature matrix. Other first column vectors besides the first column vector corresponding to the second column vector can be column vectors of all columns in the second high-dimensional feature matrix except for the i-th column.
[0142] Based on this, the electronic device can calculate the seventh distance between the second column vector and the corresponding first column vector, and calculate the eighth distance between the second column vector and other first column vectors, and determine each seventh distance and each eighth distance as the second difference degree.
[0143] In step S430, each fifth distance, each sixth distance, each seventh distance, and each eighth distance are used as the second dissimilarity, and the second loss function is calculated based on the second dissimilarity and the classification result prediction vector.
[0144] Among them, the fifth and seventh distances are positively correlated with the second loss function, while the sixth and eighth distances are negatively correlated with the second loss function.
[0145] In implementation, electronic devices can use each fifth distance, each sixth distance, each seventh distance, and each eighth distance as a second difference degree, and calculate the second loss function corresponding to the category prediction model of content producers used to train content production features and content production augmentation features based on multiple second difference degrees.
[0146] In one example, the electronic device can calculate the second loss function through the following process: The electronic device can calculate the second loss function (which can be denoted as L2) based on the classification result prediction vector, the number of content production features, the preset attenuation coefficient, and each second dissimilarity degree. Specifically, it can be calculated using the following formula:
[0147]
[0148] in, This represents the i-th column of the second high-dimensional characteristic matrix (which can be denoted as P) and the fourth high-dimensional characteristic matrix (which can be denoted as P). F The distance between the j-th columns of ) is τ p This represents the preset attenuation coefficient. Vector c is a matrix P and P F The column mask vector, c i ∈(0,1) is the i-th element of vector c, ∈ is a given regularization coefficient, and |c| represents the sparse regularization direction.
[0149] Based on the above scheme, the dual loss function is calculated using dual data composed of content production features and content production augmentation features. This enhances the learning ability of the category prediction model for unsupervised clustering of content producers for features and ensures the similarity between the clustering results of content production features and the clustering results of content production augmentation features.
[0150] In one exemplary embodiment, the content producer's category prediction model further includes a business prediction module, which can be a third MLP model, i.e., a third fully connected layer.
[0151] like Figure 5 As shown, the training method for this content producer category prediction model also includes:
[0152] In step S510, the classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix are concatenated to obtain the first comprehensive high-dimensional feature matrix. The classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix are concatenated to obtain the second comprehensive high-dimensional feature matrix.
[0153] In practice, the electronic device can directly concatenate the classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix to obtain the first comprehensive high-dimensional feature matrix. Similarly, the classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix can be concatenated to obtain the second comprehensive high-dimensional feature matrix.
[0154] In one example, the electronic device can calculate the first comprehensive high-dimensional feature matrix (which can be denoted as Q) and the second comprehensive high-dimensional feature matrix (which can be denoted as Q) using the following formulas. F ):
[0155] Q∈R n×(mz1+mp1) =[Z,P⊙c],
[0156] Q F ∈R n×(mz2+mp2) =[Z F ,P F ⊙c).
[0157] Where mz1 represents the row vector in the first high-dimensional feature matrix, mp1 represents the row vector in the second high-dimensional feature matrix, mz2 represents the row vector in the third high-dimensional feature matrix, and mp2 represents the row vector in the fourth high-dimensional feature matrix.
[0158] In step S520, the business prediction module predicts the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix to obtain the predicted business value.
[0159] In implementation, the electronic device can input both the first and second comprehensive high-dimensional feature matrices into the business prediction module. This module is used to predict business objectives, such as the amount of reward resources received by the content producer, the number of content consumers in the virtual space created by the content producer, or the viewing time of content consumers for that content producer. The predicted business value can be the numerical value of the predicted business objective obtained by the business prediction module based on the first and second comprehensive high-dimensional feature matrices. This value can be a specific predicted value of the reward resources received by the content producer, or a predicted value of the viewing time of content consumers for that content producer, etc.
[0160] In step S530, a third loss function is calculated based on the predicted business values and the sample business values corresponding to the content production features.
[0161] The third loss function can be a preset regression loss function.
[0162] In implementation, electronic devices can calculate a third loss function based on sample business values in the content production characteristics and predicted business values obtained by predicting the content production characteristics, using a preset regression loss function.
[0163] In step 140, the comprehensive loss function is calculated based on the first loss function and the second loss function. This can be achieved through the following steps:
[0164] Calculate the comprehensive loss function based on the first loss function, the second loss function, and the third loss function.
[0165] In practice, electronic devices can calculate the comprehensive loss function corresponding to the content producer's category prediction model based on the calculated first loss function, second loss function, and third loss function.
[0166] In one example, when the content producer's category prediction model is trained using an online incremental training method, the electronic device can calculate the comprehensive loss function of the content producer's category prediction model based on the first loss function and the second loss function.
[0167] Based on the above scheme, accurate prediction of business-related objectives can be achieved, and clustering results that conform to business objectives can be obtained, ensuring the adaptability of clustering results to business.
[0168] In an exemplary embodiment, the step of calculating a comprehensive loss function based on a first loss function, a second loss function, and a third loss function can be implemented through the following steps:
[0169] The comprehensive loss function is obtained by weighting the first loss function, the first weight corresponding to the first loss function, the second loss function, the second weight corresponding to the second loss function, the third loss function, and the third weight corresponding to the third loss function.
[0170] Wherein, the first weight corresponding to the first loss function can be a weight coefficient determined by the electronic device based on the actual application scenario; the second weight corresponding to the second loss function can be a weight coefficient determined by the electronic device based on the actual application scenario; and the third weight corresponding to the third loss function can be a weight coefficient determined by the electronic device based on the actual application scenario. The specific relationship between the first weight, the second weight, and the third weight can be determined based on the actual application scenario.
[0171] In one example, the second weight can be greater than the first weight, and the third weight can be greater than the first weight, to ensure the accuracy of the predicted business values obtained by the content producer's category prediction model, as well as the tight coupling between the clustering results of content production features and the business.
[0172] In implementation, the electronic device can determine the relationship between the first, second, and third weights based on the actual application scenario, and determine the specific values of the first, second, and third weights. Based on these values, it then performs a weighted calculation on the first, second, and third loss functions to obtain the comprehensive loss function corresponding to the content producer's category prediction model. Based on this, the electronic device can update the network parameters of each layer in the content producer's category prediction model using the comprehensive loss function.
[0173] Based on the above scheme, by calculating a comprehensive loss function through multiple loss functions, it is possible to take into account multiple dimensions of content production characteristics and content production augmentation characteristics, thereby ensuring the accuracy of clustering results.
[0174] In one exemplary embodiment, such as Figure 6 As shown, the training method for this content producer category prediction model also includes:
[0175] In step S610, the content production characteristics of the target content producer are obtained.
[0176] The target content producer can be a content producer that meets the screening criteria, or it can be selected from multiple content producers by the electronic device based on a preset screening strategy. Alternatively, the electronic device can select from multiple content consumers based on a preset screening strategy to determine the target content consumer. In this way, the electronic device can obtain the virtual space data corresponding to the target content consumer and determine the target content producer based on the virtual space data.
[0177] In one example, virtual space data could be resource consumption data of the target content consumer, or viewing time data for multiple virtual spaces, etc.
[0178] In practice, electronic devices can extract the target content production characteristics of a target content producer after identifying that producer. These target content production characteristics are feature data related to the virtual space of the target content producer.
[0179] In step S620, the target content production features are input into the trained content producer category prediction model to obtain the target category corresponding to the target content producer and determine the multiple content producers included in the target category.
[0180] The target category can be the category that the target content producer is predicted to belong to, as predicted by the content producer's category prediction model.
[0181] In implementation, the electronic device can input target data into a trained category prediction model for the content producer. The feature extraction module within this model extracts features from the target data, obtaining abstract features, which are then input into a second fully connected layer. The output of this second fully connected layer includes a high-dimensional feature matrix corresponding to the target data and a classification prediction vector. Based on these two vectors, the electronic device can calculate the target category to which the target content producer belongs. Furthermore, the electronic device can also identify multiple other content producers within that target category.
[0182] In step S630, multiple content producers included in the target category are recommended to the target user accounts corresponding to the target content producers.
[0183] Among them, the target user account corresponding to the target content producer can be a user account with a high willingness to interact with the target content producer, or a user account that interacts with the target content producer more than a preset threshold in the number of times and quantities of resource data interaction.
[0184] In practice, electronic devices can recommend multiple content creators within a target category to the target user accounts corresponding to that target content creator. In one example, the electronic device can identify multiple content creators within a target category that meet preset recommendation criteria and recommend these content creators to multiple user accounts.
[0185] Based on the above approach, multiple content producers similar to the target content producer can be identified efficiently and accurately, thereby improving the effectiveness of content producer recommendations.
[0186] The following describes in detail the structure of the content producer category prediction model and the specific execution process of its training method, using a specific embodiment as an example:
[0187] like Figure 7 As shown, the electronic device acquires content production features and content production augmentation features. The content production features can be obtained by random sampling by the electronic device, and can be n data pairs, each including <anchor ID, corresponding feature extraction time point>. Simultaneously, the electronic device can determine at least one data augmentation method based on a random strategy, and augment the content production features based on this data augmentation method to obtain content production augmentation features. In this way, the electronic device can input the content production features and content production augmentation features into the feature extractor respectively to obtain the content producer features corresponding to the content production features, and the data augmentation features corresponding to the content production augmentation features.
[0188] Electronic devices can input content producer features into a first deep model, which abstracts these features to obtain a first feature vector. Similarly, a second feature vector corresponding to the content production augmentation features is obtained. The electronic device can then input both the first and second feature vectors into a first fully connected layer for deep feature extraction, resulting in a first high-dimensional feature matrix corresponding to the content production features and a third high-dimensional feature matrix corresponding to the content production augmentation features. A first loss function is calculated based on these first and third high-dimensional feature matrices. Likewise, the first and second feature vectors can be input into a second fully connected layer for deep feature extraction, resulting in a classification result prediction vector, the first high-dimensional feature matrix corresponding to the content production features, and the third high-dimensional feature matrix corresponding to the content production augmentation features. A second loss function is calculated based on these three feature matrices.
[0189] The electronic device can concatenate the first high-dimensional feature matrix, the second high-dimensional feature matrix, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix with the classification result prediction vector to obtain the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix. The electronic device can input the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix into the third fully connected layer to predict the business target and obtain the predicted business value.
[0190] The training method for the content producer category prediction model disclosed herein can enhance the learning of the feature network in unsupervised clustering by utilizing dual data and dual loss functions; it avoids human supervisor input of cluster categories, requiring only a pre-defined maximum number of cluster categories, and the content producer category prediction model can adaptively adjust the number of clusters based on content production features; the clustering results of the data introduce specific business demand orientation, achieving a tight coupling between the clustering results and specific business objectives; it expands the application scenarios of the content producer category prediction model for clustering prediction, and is also suitable for online training and online incremental training for large-scale data; it can make the data clustering effect have a specific target tendency, and the model can bring better business clustering results, improving business objectives.
[0191] It should be understood that, although Figures 1-7 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 1-7At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0192] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.
[0193] Figure 8 This is a block diagram of a training apparatus 800 for a category prediction model of a content producer, according to an exemplary embodiment. (Refer to...) Figure 8 :
[0194] The first acquisition unit 802 is configured to acquire training data, which includes content production features corresponding to the content producers and content production augmentation features obtained by data augmentation processing based on the content production features.
[0195] The first determining unit 804 is configured to input the content production features and the content production augmentation features into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, respectively, to obtain the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer, as well as the classification result prediction vector, the second high-dimensional feature matrix of the content production features and the fourth high-dimensional feature matrix of the content production augmentation features output by the second fully connected layer. The classification result prediction vector is used to predict the type of the content production features. The dimensions of the first high-dimensional feature matrix and the second high-dimensional feature matrix are different, and the dimensions of the third high-dimensional feature matrix and the fourth high-dimensional feature matrix are different.
[0196] The first computing unit 806 is configured to perform calculation of a first loss function based on a first difference degree between a first high-dimensional feature matrix and a third high-dimensional feature matrix, and to calculate a second loss function based on a second difference degree between a second high-dimensional feature matrix and a fourth high-dimensional feature matrix and a classification result prediction vector. The first difference degree represents the difference between content production features and content production augmentation features, and the second difference degree represents the difference between the classification result of content production features and the classification result of content production augmentation features.
[0197] The second computing unit 808 is configured to perform calculation of a comprehensive loss function based on the first loss function and the second loss function, and to obtain a trained category prediction model for content producers based on the comprehensive loss function.
[0198] In one embodiment, the content producer category prediction model includes a feature extraction layer, a first fully connected layer, and a second fully connected layer;
[0199] The first defined unit includes:
[0200] The first determining subunit is configured to perform the process of determining a first feature vector corresponding to the content production feature and a second feature vector corresponding to the content production augmentation feature through the feature extraction layer.
[0201] The second determining subunit is configured to input the first feature vector and the second feature vector into the first fully connected layer to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature.
[0202] The third determining subunit is configured to input the first feature vector and the second feature vector into the second fully connected layer to obtain the classification result prediction vector, the second high-dimensional feature matrix corresponding to the content production feature, and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature.
[0203] In one embodiment, the first computing unit includes:
[0204] The first computational subunit is configured to perform the following operations for a first row vector: determine the second row vector corresponding to the first row vector in the third high-dimensional feature matrix, as well as other second row vectors besides the second row vector corresponding to the first row vector; calculate the first distance between the first row vector and the second row vector corresponding to the first row vector; and calculate the second distance between the first row vector and other second row vectors.
[0205] The second computational subunit is configured to perform the following operations for the second row vector: determine the first row vector corresponding to the second row vector in the first high-dimensional feature matrix, and other first row vectors besides the first row vector corresponding to the second row vector; calculate the third distance between the second row vector and the first row vector corresponding to the second row vector; and calculate the fourth distance between the second row vector and other first row vectors.
[0206] The third calculation subunit is configured to use each first distance, each second distance, each third distance, and each fourth distance as a first difference degree, and calculate a first loss function based on the first difference degree. The first distance and the third distance are positively correlated with the first loss function, and the second distance and the fourth distance are negatively correlated with the first loss function.
[0207] In one embodiment, the second computing unit includes:
[0208] The fourth computational subunit is configured to perform the following tasks for the first column vector: determining the second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix, as well as other second column vectors besides the second column vector corresponding to the first column vector; calculating the fifth distance between the first column vector and the second column vector corresponding to the first column vector; and calculating the sixth distance between the first column vector and other second column vectors.
[0209] The fifth computational subunit is configured to perform the following operations for the second column vector: determine the first column vector corresponding to the second column vector in the second high-dimensional feature matrix, and other first column vectors besides the first column vector corresponding to the second column vector; calculate the seventh distance between the second column vector and the first column vector corresponding to the second column vector; and calculate the eighth distance between the second column vector and other first column vectors.
[0210] The sixth calculation subunit is configured to use each fifth distance, each sixth distance, each seventh distance, and each eighth distance as a second dissimilarity, and to calculate a second loss function based on the second dissimilarity and the classification result prediction vector. The fifth and seventh distances are positively correlated with the second loss function, while the sixth and eighth distances are negatively correlated with the second loss function.
[0211] In one embodiment, the content producer's category prediction model further includes a business prediction module, and the apparatus further includes:
[0212] The concatenation unit is configured to perform concatenation processing on the classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix to obtain the first comprehensive high-dimensional feature matrix, and to perform concatenation processing on the classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix to obtain the second comprehensive high-dimensional feature matrix.
[0213] The prediction unit is configured to perform predictions on the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix through the business prediction module to obtain predicted business values.
[0214] The third calculation unit is configured to calculate the third loss function based on the sample business values corresponding to the predicted business values and the content production features.
[0215] The second calculation unit is specifically used for:
[0216] Calculate the comprehensive loss function based on the first loss function, the second loss function, and the third loss function.
[0217] In one embodiment, the second computing unit is specifically used for:
[0218] The comprehensive loss function is obtained by weighting the first loss function, the first weight corresponding to the first loss function, the second loss function, the second weight corresponding to the second loss function, the third loss function, and the third weight corresponding to the third loss function.
[0219] In one embodiment, the device further includes:
[0220] The second acquisition unit is configured to acquire the target content production features of the target content producer.
[0221] The input unit is configured to perform the operation of inputting the target content production features into the trained content producer category prediction model, obtain the target category corresponding to the target content producer, and determine the multiple content producers included in the target category;
[0222] The recommendation unit is configured to recommend multiple content producers within a target category to the target user accounts corresponding to the target content producers.
[0223] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0224] Figure 9 This is a block diagram of an electronic device 900 illustrating a training method for a category prediction model for content producers, according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0225] Reference Figure 9 The electronic device 900 may include one or more of the following components: processing component 902, memory 904, power supply component 906, multimedia component 908, audio component 910, input / output (I / O) interface 912, sensor component 914, and communication component 916.
[0226] Processing component 902 typically controls the overall operation of electronic device 900, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 902 may include one or more modules to facilitate interaction between processing component 902 and other components. For example, processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.
[0227] Memory 904 is configured to store various types of data to support the operation of electronic device 900. Examples of this data include instructions for any application or method operating on electronic device 900, contact data, phonebook data, messages, pictures, videos, etc. Memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, optical disk, or graphene memory.
[0228] Power supply component 906 provides power to various components of electronic device 900. Power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 900.
[0229] Multimedia component 908 includes a screen that provides an output interface between electronic device 900 and user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 908 includes a front-facing camera and / or a rear-facing camera. When electronic device 900 is in an operating mode, such as a shooting mode or video mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0230] Audio component 910 is configured to output and / or input audio signals. For example, audio component 910 includes a microphone (MIC) configured to receive external audio signals when electronic device 900 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 904 or transmitted via communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
[0231] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0232] Sensor assembly 914 includes one or more sensors for providing state assessments of various aspects of electronic device 900. For example, sensor assembly 914 can detect the on / off state of electronic device 900, the relative positioning of components such as the display and keypad of electronic device 900, changes in position of electronic device 900 or its components, the presence or absence of user contact with electronic device 900, orientation or acceleration / deceleration of device 900, and temperature changes of electronic device 900. Sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 914 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 914 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0233] Communication component 916 is configured to facilitate wired or wireless communication between electronic device 900 and other devices. Electronic device 900 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 916 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 916 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0234] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0235] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, which can be executed by a processor 920 of an electronic device 900 to perform the above-described method. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0236] In an exemplary embodiment, a computer program product is also provided, which includes instructions that can be executed by a processor 920 of an electronic device 900 to perform the above-described method.
[0237] It should be noted that the above-mentioned apparatus, electronic equipment, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.
[0238] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0239] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A training method for a category prediction model of content producers, characterized in that, include: Acquire training data, which includes content production features corresponding to content producers and content production augmentation features obtained by data augmentation processing based on the content production features. The content production features and the content production augmentation features are respectively input into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained. The results are: the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer; the classification result prediction vector output by the second fully connected layer; the second high-dimensional feature matrix of the content production features; and the fourth high-dimensional feature matrix of the content production augmentation features. The classification result prediction vector is used to predict the type of the content production features. The dimensions of the first high-dimensional feature matrix and the second high-dimensional feature matrix are different, and the dimensions of the third high-dimensional feature matrix and the fourth high-dimensional feature matrix are different. A first loss function is calculated based on the first difference between the first high-dimensional feature matrix and the third high-dimensional feature matrix, and a second loss function is calculated based on the second difference between the second high-dimensional feature matrix and the fourth high-dimensional feature matrix and the classification result prediction vector. The first difference represents the difference between the content production feature and the content production augmentation feature, and the second difference represents the difference between the classification result of the content production feature and the classification result of the content production augmentation feature. Based on the first loss function and the second loss function, a comprehensive loss function is calculated, and based on the comprehensive loss function, a trained category prediction model for content producers is obtained.
2. The training method for the content producer category prediction model according to claim 1, characterized in that, The content producer category prediction model includes a feature extraction layer, a first fully connected layer, and a second fully connected layer. The step of inputting the content production features and the content production augmentation features into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, respectively, to obtain the first high-dimensional feature matrix corresponding to the content production features and the third high-dimensional feature matrix corresponding to the content production augmentation features output by the first fully connected layer, and the classification result prediction vector, the second high-dimensional feature matrix of the content production features, and the fourth high-dimensional feature matrix of the content production augmentation features output by the second fully connected layer, includes: The feature extraction layer determines the first feature vector corresponding to the content production feature and the second feature vector corresponding to the content production augmentation feature. The first feature vector and the second feature vector are input into the first fully connected layer to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature. The first feature vector and the second feature vector are input into the second fully connected layer to obtain the classification result prediction vector, the second high-dimensional feature matrix corresponding to the content production feature, and the fourth high-dimensional feature matrix corresponding to the content production augmentation feature.
3. The training method for the content producer category prediction model according to claim 2, characterized in that, The first high-dimensional feature matrix includes multiple first row vectors, and the third high-dimensional feature matrix includes multiple second row vectors. The step of calculating the first loss function based on the first difference between the first and third high-dimensional feature matrices includes: For the first row vector, determine the second row vector corresponding to the first row vector and other second row vectors other than the second row vector corresponding to the first row vector in the third high-dimensional feature matrix, calculate the first distance between the first row vector and the second row vector corresponding to the first row vector, and calculate the second distance between the first row vector and the other second row vectors. For the second row vector, determine the first row vector corresponding to the second row vector and other first row vectors other than the first row vector corresponding to the second row vector in the first high-dimensional feature matrix, calculate the third distance between the second row vector and the first row vector corresponding to the second row vector, and calculate the fourth distance between the second row vector and the other first row vectors; Each of the first distance, each of the second distance, each of the third distance, and each of the fourth distance are used as the first difference degree, and a first loss function is calculated based on the first difference degree. The first distance and the third distance are positively correlated with the first loss function, and the second distance and the fourth distance are negatively correlated with the first loss function.
4. The training method for the content producer category prediction model according to claim 1, characterized in that, The second high-dimensional feature matrix includes multiple first column vectors, and the fourth high-dimensional feature matrix includes multiple second column vectors; the step of calculating the second loss function based on the second difference between the second and third high-dimensional feature matrices and the classification result prediction vector includes: For the first column vector, determine the second column vector corresponding to the first column vector and other second column vectors besides the second column vector corresponding to the first column vector in the fourth high-dimensional feature matrix, calculate the fifth distance between the first column vector and the second column vector corresponding to the first column vector, and calculate the sixth distance between the first column vector and the other second column vectors. For the second column vector, determine the first column vector corresponding to the second column vector and other first column vectors other than the first column vector corresponding to the second column vector in the second high-dimensional feature matrix, calculate the seventh distance between the second column vector and the first column vector corresponding to the second column vector, and calculate the eighth distance between the second column vector and the other first column vectors; The fifth distance, the sixth distance, the seventh distance, and the eighth distance are used as the second difference degree, and the second loss function is calculated based on the second difference degree and the classification result prediction vector. The fifth distance and the seventh distance are positively correlated with the second loss function, and the sixth distance and the eighth distance are negatively correlated with the second loss function.
5. The training method for the content producer category prediction model according to any one of claims 1-4, characterized in that, The content producer category prediction model also includes a business prediction module, and the method further includes: The classification result prediction vector, the first high-dimensional feature matrix, and the second high-dimensional feature matrix are concatenated to obtain the first comprehensive high-dimensional feature matrix. The classification result prediction vector, the third high-dimensional feature matrix, and the fourth high-dimensional feature matrix are concatenated to obtain the second comprehensive high-dimensional feature matrix. The business prediction module predicts the first comprehensive high-dimensional feature matrix and the second comprehensive high-dimensional feature matrix to obtain the predicted business value. Based on the predicted business values and the sample business values corresponding to the content production features, a third loss function is calculated. The step of calculating the comprehensive loss function based on the first loss function and the second loss function includes: Calculate the comprehensive loss function based on the first loss function, the second loss function, and the third loss function.
6. The training method for the content producer category prediction model according to claim 5, characterized in that, The step of calculating the comprehensive loss function based on the first loss function, the second loss function, and the third loss function includes: The comprehensive loss function is obtained by weighting the first loss function, the first weight corresponding to the first loss function, the second loss function, the second weight corresponding to the second loss function, the third loss function, and the third weight corresponding to the third loss function.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the target content production characteristics of the target content producer; The target content production features are input into the trained content producer category prediction model to obtain the target category corresponding to the target content producer, and to determine the multiple content producers included in the target category. The target category includes multiple content creators who are recommended to the target user accounts corresponding to the target content creators.
8. A training device for a category prediction model of content producers, characterized in that, include: The first acquisition unit is configured to acquire training data, the training data including content production features corresponding to the content producer and content production augmentation features obtained by data augmentation processing based on the content production features. The first determining unit is configured to input the content production feature and the content production augmentation feature into the first fully connected layer and the second fully connected layer of the category prediction model of the content producer to be trained, respectively, to obtain the first high-dimensional feature matrix corresponding to the content production feature and the third high-dimensional feature matrix corresponding to the content production augmentation feature output by the first fully connected layer, and the classification result prediction vector output by the second fully connected layer, the second high-dimensional feature matrix of the content production feature and the fourth high-dimensional feature matrix of the content production augmentation feature. The classification result prediction vector is used to predict the type of the content production feature. The dimensions of the first high-dimensional feature matrix and the second high-dimensional feature matrix are different, and the dimensions of the third high-dimensional feature matrix and the fourth high-dimensional feature matrix are different. The first computing unit is configured to perform calculation of a first loss function based on a first difference degree between a first high-dimensional feature matrix and a third high-dimensional feature matrix, and to calculate a second loss function based on a second difference degree between a second high-dimensional feature matrix and a fourth high-dimensional feature matrix and the classification result prediction vector. The first difference degree represents the difference between the content production feature and the content production augmentation feature, and the second difference degree represents the difference between the classification result of the content production feature and the classification result of the content production augmentation feature. The second computing unit is configured to calculate a comprehensive loss function based on the first loss function and the second loss function, and obtain a trained category prediction model for the content producer based on the comprehensive loss function.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the training method for the category prediction model of content producers as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the training method of the category prediction model of the content producer as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Speech classification model training method and device, equipment and storage medium
CN114360520A
Automatically generating targeting templates for content providers
US20200167821A1