Interest data recommendation method and device, computer device, and storage medium
By integrating sentiment category recognition models and preference data, the problem of mismatch between recommended content and user interests has been solved, achieving higher matching accuracy and better user experience, especially in financial product recommendations.
Patent Information
- Application Number
- CN202310971186.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-08-02
AI Technical Summary
Existing technologies in the recommendation field suffer from incomplete factors and weak correlation between factors, leading to improper handling of users' emotional states and mismatch between recommended content and user interests, thus affecting user experience, especially in the recommendation of financial products where the matching degree is not high.
By encoding and decoding user image data using a pre-defined emotion category recognition model, and combining it with preference data, multiple algorithm models are fused to predict the user's current emotion category and preferences, and to recommend content or products that match the user's interests.
The recommendation matching accuracy has been improved, the user experience has been significantly enhanced, and the recommended content or products are more accurate and diverse, meeting user needs.
Smart Images

Figure CN117056574B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and financial technology, and in particular discloses a method, apparatus, computer device, and storage medium for recommending interest data. Background Technology
[0002] Machine learning is a field of artificial intelligence that uses algorithms and statistical models to automatically infer patterns and rules from data. Its applications in computer vision and recommender systems help computers better understand and process image information, providing personalized recommendations to users. Within machine learning, sentiment classification and recognition is a technique that uses machine learning and natural language processing to analyze and process text data. Sentiment classification and recognition have wide applications, helping researchers better understand human emotions and behaviors and generate greater value, and helping people better understand human behavior and thought processes, thus producing better results in practical applications, such as social media analysis, news recommendation, and financial product recommendation (e.g., insurance and wealth management product recommendations).
[0003] However, in the aforementioned recommendation areas, there are currently few factors to consider, the connections between these factors are weak, and the user's emotional state is not well handled. As a result, the new content or products recommended to users do not match their interests, that is, the recommendation matching degree is not high, which in turn affects the user experience. For example, in the recommendation of insurance and wealth management products in financial products, because the various recommendable factors, such as the user's emotions, are not considered, the generated product recommendation content does not match the user's interests well.
[0004] Therefore, those skilled in the art urgently need to find a new technical solution to address the aforementioned problems. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for recommending interest data to address the aforementioned technical problems, which can improve the recommendation matching degree and user experience.
[0006] A recommendation method based on interest data, the method comprising:
[0007] Acquire image data of the user's emotion category to be identified, and input the image data into a preset emotion category recognition model;
[0008] The image data is encoded using multiple network layers in the preset emotion category recognition model to obtain an image feature vector.
[0009] The image feature vector is decoded by the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector. The emotion category probability corresponding to the feature vector is calculated by the preset classifier, and the emotion category corresponding to the first value of the emotion category probability is determined as the target emotion category of the image data.
[0010] Obtain the user's preference data, and recommend interest data to the user based on the target sentiment category and the preference data.
[0011] A recommendation device for interest data, the device comprising:
[0012] The input module is used to acquire image data of the user's emotion category to be identified and input the image data into a preset emotion category recognition model;
[0013] The encoding module is used to encode the image data through multiple network layers in the preset emotion category recognition model to obtain image feature vectors;
[0014] The determination module is used to decode the image feature vector through the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and calculate the emotion category probability corresponding to the feature vector through a preset classifier, and determine the emotion category corresponding to the first value of the emotion category probability as the target emotion category of the image data.
[0015] The recommendation module is used to obtain the user's preference data and recommend interest data to the user based on the target sentiment category and the preference data.
[0016] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the aforementioned method for recommending interest data.
[0017] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method for recommending interest data.
[0018] The aforementioned recommendation methods, devices, computer equipment, and storage media for interest data can predict a user's current emotional category through a predictive model based on artificial intelligence. This allows for the recommendation of content or products that better match the user's current emotional category and preferences. Consequently, the recommendation matching is high, and the user experience is significantly improved. By combining multiple algorithm models and predicting at each stage, more accurate recommended content or products are ultimately generated, resulting in more diverse outputs compared to traditional single-model approaches. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of an application environment for a method for recommending interest data according to an embodiment of the present invention;
[0021] Figure 2 This is a flowchart illustrating a method for recommending interest data according to an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of the structure of an interest data recommendation device according to an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] This invention provides a method for recommending interest data, which can be applied to, for example... Figure 1 In this application environment, the client communicates with the server via a network. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be a standalone server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0026] In one embodiment, such as Figure 2 As shown, a recommendation method based on interest data is provided, which is then applied to... Figure 1 Taking the server as an example, the following steps S10-S40 are used for illustration:
[0027] S10, acquire image data of the user's emotion category to be identified, and input the image data into a preset emotion category recognition model;
[0028] Understandably, image data can come from various sources, such as photos taken by devices, screenshots from web pages, and images imported by users. The fields corresponding to image data can include social media information recommendation, news recommendation, and financial product recommendation. The pre-set emotion category recognition model is a pre-trained model, whose main components include an input layer, a multi-branch network layer (a network layer obtained by optimizing the VGG network), a multi-dense layer, and an output layer.
[0029] S20, the image data is encoded through multiple network layers in the preset emotion category recognition model to obtain the image feature vector;
[0030] Understandably, the multi-branch network layer is obtained by optimizing a single-branch VGG network. Branches are added between different layers in the VGG network to achieve the multi-branch network layer. The image feature vector is obtained through visual semantic feature encoding, which aims to better utilize image features for sentiment classification. The encoding process is performed using deep learning layers based on the VGG network structure. The VGG network is a relatively common structure in the image domain. Its implementation involves building convolutional and fully connected layers to extract the original image feature information and convert it into a final one-dimensional vector (image feature vector). In this embodiment, the VGG network has depth and complexity, which can effectively extract the image feature vector from the image data. Furthermore, optimizing the single-branch VGG network into a multi-branch network layer improves image recognition performance.
[0031] In addition, by choosing to use a pre-trained VGG network, the parameters in the network can be fine-tuned for specific tasks to adapt to various tasks. This fine-tuning is achieved by adjusting hyperparameters, including the learning rate and regularization parameters, to minimize the model's evaluation metric loss.
[0032] S30, the image feature vector is decoded by the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and the emotion category probability corresponding to the feature vector is calculated by the preset classifier, and the emotion category corresponding to the first value of the emotion category probability is determined as the target emotion category of the image data.
[0033] Understandably, the decoding layer can be a multi-dense layer, which is a multi-layer perceptron (MLP). In other embodiments, multi-label classification and multi-class classification from other classification algorithms can also be used to construct the decoding layer. The preset classifier can be a softmax classifier. In other embodiments, Naive Bayes classifiers and logistic regression classifiers can also be used. The sentiment category probability refers to the probability value of the input image data belonging to a sentiment category. Among the multiple output sentiment category probabilities, the first value can be the maximum value among the multiple sentiment category probabilities, or it can be an intermediate value among the multiple sentiment category probabilities. In this embodiment, the sentiment category corresponding to the sentiment category probability of the first value is determined from the multiple output sentiment category probabilities as the target sentiment category, thereby improving the accuracy of determining the sentiment category.
[0034] S40, obtain the user's preference data, and recommend interest data to the user based on the target sentiment category and the preference data.
[0035] In essence, preference data refers to a user's past preferences, such as their browsing history, click history, and settings history in the aforementioned areas. Interest data, on the other hand, is new content or products recommended to users based on target sentiment categories and preference data. Interest data is generated based on multiple considerations and is more aligned with user needs.
[0036] Furthermore, taking the online recommendation of insurance products in a fintech scenario as a specific example, the system platform determines that it needs to recommend insurance products to the current user. First, it obtains the user's current photo and inputs it into a preset emotion category recognition model to identify the user's target emotion category. Based on the user's information, it obtains the user's browsing history, click history, and settings history, and analyzes these data to generate a recommendation list containing interest scores (that is, scoring each insurance product to be recommended in the recommendation list; the user's joy-satisfaction emotion category indicates that the user has a high interest in the insurance product, and the score of the relevant insurance product can be appropriately increased). The system then selects insurance products with high interest scores from the recommendation list and finally recommends these insurance products to the user as interest data. The recommended interest data is displayed on the visual terminal and has a high degree of matching with the user's interests.
[0037] In the embodiments of steps S10 to S40, the current emotional category of the user can be predicted by the prediction model under the artificial intelligence model, and then more suitable content or products can be recommended for different users based on their current emotional categories and preference data. It can be seen that the recommendation matching degree is high and the user experience is significantly improved. By combining multiple algorithm models and predicting each step, more accurate recommended content or products are finally generated, and the output results are more diversified compared to the traditional single model.
[0038] Furthermore, before inputting the image data into the preset emotion category recognition model, the method further includes:
[0039] Obtain sample image data labeled with sentiment categories;
[0040] The sample image data is input into a first network, and the first network is used to encode the sample image data to obtain a first visual semantic feature vector.
[0041] The first network is optimized into a multi-branch second network through an attention mechanism, and multiple second visual semantic feature vectors are obtained after the sample image data is input into the second network.
[0042] The first visual semantic feature vector and multiple second visual semantic feature vectors are merged into a whole output vector;
[0043] The output vector is decoded using a third network to obtain a decoded vector, and the loss value calculated by a preset classifier based on the decoded vector is obtained.
[0044] If the loss value matches the preset loss value corresponding to the emotion category, the preset emotion category recognition model is determined to be trained using the first network, the second network, and the third network.
[0045] Understandably, the sample image data corresponds to the image data, and the corresponding data content will be inconsistent in different fields. Among them, the sample image data is labeled according to fine-grained sentiment classification. The labeled data can be further subdivided, such as further dividing the "anger" image sample data into subcategories such as "anger-disappointment" and "anger-helplessness". The first network can be a single-branch VGG network, and the encoding process is the same as S20 above. The second network can be a multi-branch VGG network formed by the single-branch VGG network. Specifically, chip technology is used to optimize the single-branch VGG network. The third network can be a decoding layer-multi-dense layer, and the decoding process is the same as S30 above. The preset classifier is used as the loss function during training. The loss value of the model is calculated through this loss function. When the loss value is less than or equal to the preset loss value, the model training is considered complete. When the loss value is greater than the preset loss value, the hyperparameters of the model need to be adjusted until the model loss value is less than or equal to the preset loss value. Only then can the training of the preset sentiment category recognition model be considered complete.
[0046] This embodiment describes the model training process. In the initial stage, the model learns using labeled image sample data. Once the model's learning accuracy meets the requirements, it can be used to identify the sentiment category of actual image data, improving the recognition accuracy. The introduction of an attention mechanism is to improve the accuracy of sentiment classification. This mechanism can dynamically allocate attention among different feature subsets, thereby increasing the weight of different feature subsets. It can also optimize the single-branch VGG into a multi-branch network architecture, improving the recognition performance of image data and the accuracy of sentiment classification. The introduction of the principle of merging the output vector into a whole (merger principle) allows the model to better process information in the multi-branch network, thereby improving the recognition performance of image data.
[0047] Furthermore, the acquisition of sample image data labeled with emotion categories includes:
[0048] Obtain sample image data labeled with the first sentiment category;
[0049] Based on the relationship corresponding to the preset emotion categories, the sample image data that has been labeled with the first emotion category is further labeled with the second emotion category, resulting in sample image data with labeled emotion categories.
[0050] Understandably, the first emotion category can be a label pre-labeled by the user, such as labeling sample image data with tags like "anger" and "joy"; the second emotion category is a label based on the first emotion category, and can be labeled based on the second emotion category corresponding to the first emotion category, such as further dividing "anger" into subcategories like "anger-disappointment" and "anger-helplessness", and dividing "joy" into subcategories like "joy-excitement" and "joy-satisfaction"; the above is labeling the dataset corresponding to the sample image data, that is, labeling the emotional state and emotion category corresponding to each sample image data in the dataset;
[0051] In order to improve the accuracy of emotion classification, this embodiment further divides the emotion classification into more granular categories, and further divides the emotional state labels into subcategories. This can more accurately distinguish different emotional states, thereby improving the accuracy of emotion classification.
[0052] Furthermore, the optimization of the first network into a multi-branch second network through an attention mechanism includes:
[0053] By adding multiple branched network layers between different network layers of the first network, a second network is obtained;
[0054] The attention mechanism is used to calculate the weight values of each branch in the second network, resulting in a second network with multiple branches containing weight values; the weight values are used to characterize the importance of the branches.
[0055] Understandably, the second network is added between different layers of the first network, that is, a network structure is added between the layers before and after the first network; the attention mechanism can use the Softmax attention mechanism to calculate the weights between different branches, thereby making the model pay more attention to the important branches. The calculation formula of the Softmax attention mechanism is as follows:
[0056]
[0057] Where ai represents the attention weight of the i-th branch, zi represents the feature vector of the i-th branch (first visual semantic feature vector and second visual semantic feature vector), n represents the number of hidden layer units, the hidden layer is the added branch, and j is the j-th hidden layer unit.
[0058] Further, the step of merging the first visual semantic feature vector and multiple second visual semantic feature vectors into a unified output vector includes:
[0059] Use a preset window function to extract the first visual semantic feature vector and multiple second visual semantic feature vectors from the first network and the second network;
[0060] The merger principle is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors in the first network and the second network into the overall output vector.
[0061] Understandably, the preset window function can be the max_pool window function, which is used to extract the second visual semantic feature vector from the output of each branch layer; the feature vectors of multiple branches are merged by introducing the max-pooling or mean-pooling method in the merger principle, so as to obtain the overall output vector.
[0062] Further, the step of decoding the image feature vector through the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and calculating the emotion category probability corresponding to the feature vector through a preset classifier, includes:
[0063] The output vector is nonlinearly transformed by the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector; wherein, the formula for the nonlinear transformation is: fi represents the decoding vector of the i-th layer in a multi-branch network, Wi and bi represent the weights and biases of the i-th layer in a multi-branch network, and ReLU represents the modified linear function;
[0064] The probability of the sentiment category corresponding to the feature vector is calculated using the calculation formula in the preset classifier; where the calculation formula is: P(y=i|x) represents the probability of sentiment being classified as i given the feature vector x, wi represents the weight vector of the i-th class in the preset classifier, K represents the number of sentiment categories, and wj represents the j-th layer in the multi-branch network.
[0065] Understandably, the output vector is decoded using the decoding layer in the preset emotion category recognition model. Specifically, in the preset emotion category recognition model, multiple fully connected layers are connected, similar to using a ReLU function to activate the output vector passed from the previous network layers. This is done through the formula for the aforementioned nonlinear transformation. The decoding can convert complex multidimensional vectors into predictions of emotion categories. Therefore, this method can improve the accuracy of emotion classification. For example, it can be determined that the emotion category of the user currently seeking to recommend an insurance product is joy-satisfaction, with a corresponding emotion category probability of 90%.
[0066] Further, recommending interest data to the user based on the target sentiment category and the preference data includes:
[0067] The target sentiment category and the preference data are input into a preset interest model to generate an interest score for the user on new content. The interest content corresponding to the second interest score is then selected, and the interest data is recommended to the user based on the interest content.
[0068] In a understandable and specific way, by viewing preference data as user ratings of content or products, a pre-defined interest model is trained using algorithms such as regression prediction or random forest (which uses the log-likelihood ratio formula to calculate the similarity value between users and performs scoring based on the similarity value). After analyzing the target sentiment category and preference data using this model, the user's interest score for new content or products is predicted. Based on the user's interest score, a recommendation list is generated. Interest content corresponding to the second-value interest score is selected from the recommendation list. Interest data is generated based on the interest content. Here, the preference data is represented as a vector (the historical behavior records of each user are stored in the form of a list as a behavior sequence result, such as a user click behavior sequence). Each element of the vector represents the user's rating of different products or content. The vector is composed of content products as i, and a total of N products are represented as (i1, i2, ..., iN). Each item represents the user's rating situation. For example, if N insurance products are generated, each insurance product has a corresponding score. The interest content is the insurance product that meets a certain score. The pre-defined interest model is trained using algorithms such as regression prediction or random forest to predict the user's rating of new content or products.
[0069] This embodiment uses regression prediction and PCA (principal component analysis) methods to predict user preferences and sentiment categories, and then recommends content or products that the user is most interested in. This embodiment needs to combine multiple factors for analysis to improve the analysis effect.
[0070] In summary, the above provides a recommendation method based on interest data. It can predict a user's current emotional category using a predictive model under an artificial intelligence model, and then recommend content or products that better match the user's current emotional category and preference data. This results in high recommendation matching accuracy and a significantly improved user experience. By combining multiple algorithm models and predicting at each stage, more accurate recommended content or products are generated, and the output results are more diverse compared to traditional single-model methods. Furthermore, statistical analysis of multiple factors yields interest scores, and recommendations are made based on these interest scores, improving the model's applicability.
[0071] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] In one embodiment, the present invention also provides an interest data recommendation device, which corresponds one-to-one with the interest data recommendation method described in the above embodiments. For example... Figure 3 As shown, this interest data recommendation device includes an input module 11, an encoding module 12, a determination module 13, and a recommendation module 14. Detailed descriptions of each functional module are as follows:
[0073] Input module 11 is used to acquire image data of the user's emotion category to be identified and input the image data into a preset emotion category recognition model;
[0074] Encoding module 12 is used to encode the image data through multiple network layers in the preset emotion category recognition model to obtain image feature vectors;
[0075] The determination module 13 is used to decode the image feature vector through the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and calculate the emotion category probability corresponding to the feature vector through a preset classifier, and determine the emotion category corresponding to the first value of the emotion category probability as the target emotion category of the image data.
[0076] Recommendation module 14 is used to obtain the user's preference data and recommend interest data to the user based on the target sentiment category and the preference data.
[0077] Furthermore, the recommendation device for the interest data also includes:
[0078] The acquisition module is used to acquire sample image data labeled with sentiment categories;
[0079] The encoding processing module is used to input the sample image data into the first network, and use the first network to encode the sample image data to obtain a first visual semantic feature vector;
[0080] The input module is used to optimize the first network into a multi-branch second network through an attention mechanism, and to obtain multiple second visual semantic feature vectors obtained after the sample image data is input into the second network;
[0081] The merging module is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors into a whole output vector.
[0082] The calculation module is used to decode the output vector using a third network to obtain a decoded vector, and to obtain the loss value calculated by a preset classifier based on the decoded vector.
[0083] The determination module is used to determine, when the loss value matches the preset loss value corresponding to the emotion category, the preset emotion category recognition model trained with the first network, the second network, and the third network.
[0084] Furthermore, the acquisition module includes:
[0085] The acquisition submodule is used to acquire sample image data that has been labeled with the first sentiment category;
[0086] The annotation submodule is used to continue annotating the sample image data that has been annotated with the first emotion category with the second emotion category based on the relationship corresponding to the preset emotion category, so as to obtain the sample image data with the annotated emotion category.
[0087] Furthermore, the input module includes:
[0088] Add a submodule to add multiple branched network layers between different network layers of the first network to obtain the second network;
[0089] The first calculation submodule is used to calculate the weight values of each branch in the second network through the attention mechanism, so as to obtain a second network with multiple branches containing the weight values; the weight values are used to characterize the importance of the branches.
[0090] Furthermore, the merging module includes:
[0091] An extraction submodule is used to extract a first visual semantic feature vector and multiple second visual semantic feature vectors from the first network and the second network using a preset window function;
[0092] The merging submodule is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors in the first network and the second network into the overall output vector using the merger principle.
[0093] Furthermore, the determining module includes:
[0094] The transformation submodule is used to perform a nonlinear transformation on the output vector through the decoding layer of the preset emotion category recognition model to obtain the decoded feature vector; wherein, the formula for the nonlinear transformation is: fi represents the decoding vector of the i-th layer in a multi-branch network, Wi and bi represent the weights and biases of the i-th layer in a multi-branch network, and ReLU represents the modified linear function;
[0095] The second calculation submodule is used to calculate the probability of the sentiment category corresponding to the feature vector using the calculation formula in the preset classifier; wherein, the calculation formula is: P(y=i|x) represents the probability of sentiment being classified as i given the feature vector x, wi represents the weight vector of the i-th class in the preset classifier, K represents the number of sentiment categories, and wj represents the j-th layer in the multi-branch network.
[0096] Furthermore, the recommendation module includes:
[0097] The recommendation submodule is used to input the target sentiment category and the preference data into a preset interest model to generate an interest score for the user on new interest content, filter out the interest content corresponding to the second interest score, and recommend the interest data to the user based on the interest content.
[0098] For specific limitations regarding the interest data recommendation device, please refer to the limitations of the interest data recommendation method described above, which will not be repeated here. Each module in the aforementioned interest data recommendation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0099] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 4 As shown, the computer device includes a processor, memory, interface, and database connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data involved in a method for recommending interest data. The interface is used for communication with external terminals. The computer program, when executed by the processor, implements a method for recommending interest data.
[0100] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of a method for recommending interest data as described in the above embodiments. Figure 2 Steps S10 to S40 are shown. Alternatively, when the processor executes a computer program, it implements the functions of each module / unit of the interest data recommendation device in the above embodiments, for example... Figure 3 The functions of modules 11 to 14 are shown. To avoid repetition, they will not be described again here.
[0101] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the steps of a method for recommending interest data as described in the above embodiments, for example... Figure 2 Steps S10 to S40 are shown. Alternatively, when a computer program is executed by a processor, it implements the functions of each module / unit of an interest data recommendation device as described in the above embodiments, for example... Figure 3 The functions of modules 11 to 14 are shown. To avoid repetition, they will not be described again here.
[0102] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0103] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0104] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for recommending interest data, characterized in that, The method includes: Acquire image data of the user's emotion category to be identified, and input the image data into a preset emotion category recognition model; The image data is encoded using multiple network layers in the preset emotion category recognition model to obtain image feature vectors; The image feature vector is decoded by the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector. The emotion category probability corresponding to the feature vector is calculated by the preset classifier, and the emotion category corresponding to the first value of the emotion category probability is determined as the target emotion category of the image data. Obtain the user's preference data, and recommend interest data to the user based on the target sentiment category and the preference data; Before inputting the image data into the preset emotion category recognition model, the method further includes: Obtain sample image data labeled with sentiment categories; The sample image data is input into a first network, and the first network is used to encode the sample image data to obtain a first visual semantic feature vector. The first network is optimized into a multi-branch second network through an attention mechanism, and multiple second visual semantic feature vectors are obtained after the sample image data is input into the second network. The first visual semantic feature vector and multiple second visual semantic feature vectors are merged into a whole output vector; The output vector is decoded using a third network to obtain a decoded vector, and the loss value calculated by a preset classifier based on the decoded vector is obtained. If the loss value matches the preset loss value corresponding to the emotion category, it is determined that the preset emotion category recognition model is trained using the first network, the second network, and the third network. The optimization of the first network into a multi-branch second network through an attention mechanism includes: By adding multiple branched network layers between different network layers of the first network, a second network is obtained; The attention mechanism is used to calculate the weight values of each branch in the second network, resulting in a second network with multiple branches containing weight values; the weight values are used to characterize the importance of the branches. The step of merging the first visual semantic feature vector and multiple second visual semantic feature vectors into a unified output vector includes: Use a preset window function to extract the first visual semantic feature vector and multiple second visual semantic feature vectors from the first network and the second network; The merger principle is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors in the first network and the second network into the overall output vector.
2. The method for recommending interest data according to claim 1, characterized in that, The acquisition of sample image data labeled with emotion categories includes: Obtain sample image data labeled with the first sentiment category; Based on the relationship corresponding to the preset emotion categories, the sample image data that has been labeled with the first emotion category is further labeled with the second emotion category, resulting in sample image data with labeled emotion categories.
3. The method for recommending interest data according to claim 1, characterized in that, The step of decoding the image feature vector through the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and calculating the emotion category probability corresponding to the feature vector through a preset classifier, includes: The output vector is nonlinearly transformed by the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector; wherein, the formula for the nonlinear transformation is: fi represents the decoding vector of the i-th layer in a multi-branch network, Wi and bi represent the weights and biases of the i-th layer in a multi-branch network, and ReLU represents the modified linear function; The probability of the sentiment category corresponding to the feature vector is calculated using the calculation formula in the preset classifier; where the calculation formula is: P(y=i|x) represents the probability of sentiment being classified as i given the feature vector x, wi represents the weight vector of the i-th class in the preset classifier, K represents the number of sentiment categories, and wj represents the j-th layer in the multi-branch network.
4. The method for recommending interest data according to claim 1, characterized in that, The step of recommending interest data to the user based on the target sentiment category and the preference data includes: The target sentiment category and the preference data are input into a preset interest model to generate an interest score for the user on new content. The interest content corresponding to the second interest score is then selected, and the interest data is recommended to the user based on the interest content.
5. A recommendation device for interest data, characterized in that, include: The input module is used to acquire image data of the user's emotion category to be identified and input the image data into a preset emotion category recognition model; The encoding module is used to encode the image data through multiple network layers in the preset emotion category recognition model to obtain image feature vectors; The determination module is used to decode the image feature vector through the decoding layer in the preset emotion category recognition model to obtain the decoded feature vector, and calculate the emotion category probability corresponding to the feature vector through a preset classifier, and determine the emotion category corresponding to the first value of the emotion category probability as the target emotion category of the image data. The recommendation module is used to obtain the user's preference data and recommend interest data to the user based on the target sentiment category and the preference data; The recommendation device for the interest data further includes: The acquisition module is used to acquire sample image data labeled with sentiment categories; The encoding processing module is used to input the sample image data into the first network, and use the first network to encode the sample image data to obtain a first visual semantic feature vector; The input module is used to optimize the first network into a multi-branch second network through an attention mechanism, and to obtain multiple second visual semantic feature vectors obtained after the sample image data is input into the second network; The merging module is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors into a whole output vector. The calculation module is used to decode the output vector using a third network to obtain a decoded vector, and to obtain the loss value calculated by a preset classifier based on the decoded vector. The determination module is used to determine, when the loss value conforms to the preset loss value corresponding to the emotion category, to determine that the preset emotion category recognition model is trained by the first network, the second network, and the third network; The input module includes: Add a submodule to add multiple branched network layers between different network layers of the first network to obtain the second network; The first calculation submodule is used to calculate the weight values of each branch in the second network through the attention mechanism, so as to obtain a second network with multiple branches containing the weight values; the weight values are used to characterize the importance of the branches. The merging module includes: An extraction submodule is used to extract a first visual semantic feature vector and multiple second visual semantic feature vectors from the first network and the second network using a preset window function; The merging submodule is used to merge the first visual semantic feature vector and multiple second visual semantic feature vectors in the first network and the second network into the overall output vector using the merger principle.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements a method for recommending interest data as described in any one of claims 1 to 4.
7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements a method for recommending interest data as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Facial expression recognition method based on joint learning identity information and emotion information
CN109359599A
Emotion labeling method, device, equipment for speaking content and storage medium
CN111164589A