Vehicle-mounted APP recommendation method based on user comment emotion elements

Through the recommendation method based on the emotional elements of user comments, analyzing the comment data and building portraits of users and APPs, the problem of not being able to recommend APPs that meet users' personalized needs in the prior art is solved, and higher recommendation accuracy and user satisfaction are achieved.

CN119622091APending Publication Date: 2025-03-14重庆中科汽车软件创新中心
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411693904.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing vehicle APP recommendation system cannot effectively recommend APPs that meet users' personalized needs, mainly because they ignore the emotional elements and personalized needs of users when using the APP.

Method used

The recommendation method based on the emotional elements of user comments is adopted, and classification tables and emotional dictionaries are constructed, comment data is analyzed to obtain the portraits of users and APPs, and matrix decomposition and ablation experimental methods are used for recommendation.

Benefits of technology

It realizes more accurately reflecting users' preferences and preferences for APP, improves recommendation accuracy and user satisfaction, better capture user needs and provide personalized APP recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622091A_ABST
    Figure CN119622091A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of recommendation systems, and discloses a user comment emotion element-based vehicle-mounted APP recommendation method, which comprises the following steps of S1, constructing a classification table by adopting manual definition and obtaining comment data, and storing a corresponding relationship between a plurality of classification tags and feature words in the classification table, the comment data comprises scores, downloading times and corresponding comment texts of the used vehicle-mounted APPs by the users; s2, obtaining each vehicle-mounted APP portrait and each user portrait by analyzing the comment data based on the classification table and the emotion dictionary; s3, using the vehicle-mounted APP portrait and the user portrait to recommend unused vehicle-mounted APPs to each user through matching calculation; the problem that in the prior art, vehicle-mounted APPs meeting personalized requirements of users cannot be recommended is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recommendation systems, and in particular to a method for recommending in-vehicle APPs based on emotional elements of user comments. Background Art

[0002] In the modern automobile industry, with the rapid development and popularization of Internet of Vehicles technology, in-vehicle applications (APPs) have become an important bridge and key medium connecting drivers, passengers and vehicles. Internet of Vehicles technology has not only greatly enriched the way of information interaction during driving and riding, but also significantly improved the driving experience and safety by integrating various in-vehicle APPs. Compared with conventional mobile APPs, in-vehicle APPs need to be more suitable for the driving environment in design and application, so users' demands for mobile APPs are different from those for in-vehicle APPs.

[0003] The in-vehicle APP can provide a series of personalized services and functions through deep integration with the vehicle's hardware system, including but not limited to real-time traffic updates, automatic parking assistance, intelligent navigation, entertainment information flow, and vehicle health monitoring. These services not only enhance the convenience and comfort of driving, but also provide users with a more customized experience that meets their needs through data analysis and intelligent algorithms. Therefore, different users have very different feelings about the same in-vehicle APP.

[0004] Most of the in-car APP recommendation systems on the current market adopt a recommendation strategy based on the project (APP) itself, that is, they mainly make recommendations based on objective indicators such as public ratings, download volume or popularity. Although this "one-size-fits-all" recommendation method is simple and direct, it often ignores the emotional factors and personalized needs of users when using in-car APPs. For example, some users who drive long distances frequently prefer relaxing music APPs, while some users who drive short distances frequently need more efficient navigation services. In addition, different users have different preferences, which will also affect their preference for in-car APPs. Therefore, it is often difficult to achieve the best user satisfaction and driving experience by making recommendations based solely on public preferences. Summary of the invention

[0005] The present invention aims to provide a method for recommending in-vehicle APPs based on emotional factors of user comments, so as to solve the problem that the prior art cannot recommend in-vehicle APPs that meet the personalized needs of users.

[0006] To achieve the above object, the present invention adopts the following technical solution: a method for recommending in-vehicle APPs based on the emotional elements of user comments, comprising the following steps:

[0007] S1. Use manual definition to construct a classification table and obtain comment data. The classification table is used to store the correspondence between multiple classification labels and feature words. The comment data includes the ratings, download times and corresponding comment texts of each user for the in-vehicle APP used;

[0008] S2, obtaining the portraits of each in-vehicle APP and each user by analyzing the comment data based on the classification table and sentiment dictionary;

[0009] S3, using the in-vehicle APP portrait and user portrait, recommending unused in-vehicle APPs to each user through matching calculation;

[0010] Among them, S2 also includes: S201, using the constructed classification table, using the TF-IDF algorithm to extract feature words and calculate the feature word weights of each comment text, and based on the correspondence between the feature words and the classification labels, matching the corresponding classification labels for each in-vehicle APP to form the feature labels of the in-vehicle APP, and then constructing a matrix A of each in-vehicle APP and its corresponding feature labels as an APP portrait;

[0011] S202, based on the ratings of the in-vehicle apps used by each user, construct a matrix R of users and in-vehicle apps and their corresponding ratings; at the same time, based on the sentiment dictionary, analyze the sentiment words and their corresponding sentiment scores in the comment text, construct a sentiment score matrix G0 of the in-vehicle apps used by the users, assign the sentiment scores of the users to the in-vehicle apps in G0 to the feature labels corresponding to the in-vehicle apps, and use the average of the sentiment scores assigned to the feature labels as the sentiment score of the feature labels, and finally obtain the sentiment score matrix G of the feature labels used by each user;

[0012] S203, performing the first matrix decomposition inference on the matrix A and the matrix R to obtain the score matrix B of each user for the feature labels involved;

[0013] S204, using an ablation experiment method, fusing the matrix B and the matrix G to form a comprehensive scoring matrix S of each user's feature labels involved as a user profile;

[0014] Then, in S3, through the secondary matrix decomposition reasoning of matrix A and matrix S, the predicted comprehensive score matrix of each user for each in-vehicle APP to be used is obtained; the scores in the matrix are sorted, and the in-vehicle APP to be used with the highest score is selected to be recommended to the corresponding user.

[0015] The principle and advantage of this solution are as follows: In the prior art, the classification of APPs is usually customized by the developer, resulting in non-standard classification and different classification emphasis from that after actual use by users. This solution adopts a unified standard in the form of a classification table to ensure the accuracy and consistency of APP classification. By extracting feature words and calculating weights from the comment text, and combining the classification table to match classification labels for the in-vehicle APP, the attribute definition of the APP is more accurate, reflecting the user's classification of the APP based on the user experience.

[0016] This solution not only considers the actual ratings of the in-car APP by users, but also analyzes the sentiment words and their corresponding sentiment scores in the review text through the sentiment dictionary, thus realizing the evaluation of the potential sentiment polarity of the APP. This dual rating mechanism is more in line with the personalized needs of users and can more accurately reflect the user's preferences and preferences for the APP.

[0017] Through two matrix decompositions and one matrix fusion, the multi-dimensional potential relationship between users and apps is constructed. This method can deeply explore the relationship between data and improve the accuracy of recommendations. The process of matrix decomposition and fusion controls the dimension, row and column consistency, and interpretability, making the recommendation results more reliable and easy to understand.

[0018] This solution comprehensively considers multiple factors such as user ratings of in-car apps, download times, and sentiment words and sentiment scores in comment texts, achieving a comprehensive and accurate capture of user needs. Through precise portrait construction and recommendation algorithms, it can recommend in-car apps that better meet users' personalized needs, and as new comment data is added, each matrix is ​​dynamically updated to improve user satisfaction and driving experience.

[0019] Preferably, as an improvement, the classification labels and feature words in the classification table are in a multi-dimensional relationship.

[0020] The beneficial effect of this improvement is that the multi-dimensional relationship makes the relationship between classification labels and feature words more flexible and rich, and can more comprehensively describe the characteristics of in-vehicle apps and user needs. Feature labels are no longer one-dimensional correspondences, but form a complex multi-dimensional space between users and apps, thereby improving the accuracy and diversity of recommendations. Through multi-dimensional relationships, the potential connection between users and apps can be better explored, and in-vehicle apps that better suit users' interests and needs can be recommended to users.

[0021] Preferably, as an improvement, in S201, the TF-IDF algorithm is used to extract keywords contained in the comment text, and a keyword set contained in each in-vehicle APP is obtained respectively, the keyword set includes feature words, and then the extracted keywords are weighted by the TF-IDF algorithm. According to the keyword weight, the keywords contained in each in-vehicle APP are sorted from large to small, and the first 2N keywords are selected as feature words for corresponding classification labels, and the classification labels corresponding to the first 2N feature words are used as feature labels for the in-vehicle APP.

[0022] The beneficial effects of this improvement are: N is a value greater than 0, and the value of N is set according to actual needs to control the amount of calculation and response speed; through the TF-IDF algorithm, the keywords in the comment text can be accurately extracted, and these keywords can reflect the user's main views and feelings about the in-vehicle APP. By calculating the weights and sorting the keywords, the most representative feature words can be screened out, and these feature words can better express the characteristics of the APP and improve the accuracy of subsequent recommendations. Controlling the number of feature words (the first 2N) can balance the amount of calculation and the recommendation effect, ensuring the response speed and accuracy of the recommendation system.

[0023] Preferably, as an improvement, in S204, a matrix S is created, and initially, the element values ​​are all set to 0, and the matrix B and the matrix G are input; the two matrices are traversed and looped to assign values ​​to the corresponding matrix S;

[0024] S = x*B+y*G;

[0025] Among them, x and y represent the weights of matrix B and matrix G respectively, and (x+y)=1. The weight ratio of matrix B and matrix G is dynamically adjusted by using the correlation between the actual ratings and sentiment ratings in the review data.

[0026] The beneficial effect of this improvement is that by dynamically adjusting the weight ratio of matrix B (based on actual ratings) and matrix G (based on sentiment ratings), users' rational comments and emotional evaluations of in-car apps can be comprehensively considered, making the recommendation results more comprehensive and accurate. This dynamic adjustment mechanism can make personalized recommendations based on the needs and preferences of different users, improving user satisfaction.

[0027] Preferably, as an improvement, in S204, the weights of the matrix B and the matrix G obtained through ablation experiments are respectively: x=0.75, y=0.25.

[0028] The beneficial effect of this improvement is that the weight value setting can make the matrix S fit the actual situation of users' evaluation of the APP and achieve the best recommendation effect.

[0029] Preferably, as an improvement, in S202, the comment text is used for feature word filtering for feature tag matching to obtain the filtered comment text, the filtered comment text is analyzed based on the sentiment dictionary, and each sentence in a single comment text is taken as a unit to traverse and query all sentiment words and the degree words before and after the comment text, and the sum of the products of the sentiment value of the sentiment word multiplied by the weight of the corresponding degree word is taken as the sentiment score of the sentence, and then the average sentiment score of all sentences in the single comment text is calculated as the sentiment score of the comment text, that is, the sentiment score of the user to the in-vehicle APP;

[0030] According to the emotion score, each in-vehicle APP is graded for its emotion tendency, including positive emotion score, medium emotion score, and negative emotion score. Each user grades the emotion tendency of each in-vehicle APP, and finally obtains the matrix G0.

[0031] The beneficial effect of this improvement is that sentiment analysis can deeply understand the user's sentiment tendency and satisfaction with the in-vehicle APP, and provide richer information for the recommendation system. By grading the sentiment tendency (positive sentiment score, medium score, negative sentiment score), the user's emotional attitude towards the APP can be more carefully portrayed, and the accuracy of the recommendation can be improved; at the same time, it is convenient for subsequent unified assignment, and also reduces the computational complexity and improves the efficiency of recommendation.

[0032] Preferably, as an improvement, in said S202, an emotional score value is assigned to each emotional tendency classification, with a positive emotional score of 1, a medium score of 1 / 2, and a negative emotional score of 0;

[0033] The user's sentiment score for the in-vehicle APP is assigned to its corresponding feature label. When a single feature label is assigned multiple sentiment scores, the mean of the sentiment scores of the feature label is calculated as the user's sentiment score for the feature label, and the matrix G is constructed.

[0034] The beneficial effect of this improvement is that by constructing the matrix G, the user's emotional rating of the APP can be converted into the emotional rating of the feature label, thereby achieving a more detailed characterization and recommendation of user needs. And assigning emotional rating values ​​to the emotional tendency classification can quantify the user's emotional attitude towards the in-vehicle APP, providing a computable basis for the recommendation system.

[0035] Preferably, as an improvement, S3 further includes: introducing a square loss function, adding a regularization term, using a gradient descent method and cyclically calculating the value of the square loss function, and finally updating the matrix S to S l .

[0036] The beneficial effects of this improvement are: the introduction of the square loss function can measure the difference between the recommended results and the actual results, providing a basis for optimizing the recommendation algorithm. Adding regularization terms can prevent the model from overfitting and improve the generalization ability of the recommendation system. By cyclically calculating the value of the square loss function and updating the matrix S through the gradient descent method, the recommendation algorithm can be continuously optimized to improve the accuracy and stability of the recommendation results.

[0037] Preferably, as an improvement, the recommendation method further includes: performing a time series analysis on the matrix G to capture the long-term trend and periodic changes of each user's emotion respectively, and providing a service for in-vehicle APP recommendation of S3 based on the analysis results.

[0038] The beneficial effects of this improvement are: time series analysis can capture the long-term trends and periodic changes of user emotions, providing a more in-depth user portrait for the recommendation system. By analyzing the dynamic changes of user emotions, it is possible to predict the user's future needs and preferences, and provide a more forward-looking recommendation strategy for the recommendation system. Time series analysis can also help developers and operators understand the evolution trend of user needs and provide a basis for product iteration and upgrade.

[0039] Preferably, as an improvement, in the matrix decomposition inference process, the setting of hyperparameters is adjusted, and the adjustment of hyperparameters includes the learning rate, the regularization coefficient and the dimension of the factor vector.

[0040] The beneficial effect of this improvement is that the adjustment of hyperparameters can optimize the matrix decomposition reasoning process and improve the performance and accuracy of the recommendation system. By adjusting hyperparameters such as learning rate, regularization coefficient, and dimension of factor vector, the convergence speed of the model and the recommendation effect can be balanced to avoid overfitting or underfitting. The adjustment of hyperparameters can also be personalized according to the actual application scenario and data to achieve the best recommendation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 is a flow chart of an embodiment of the present invention.

[0042] Figure 2 A framework diagram of an embodiment of the present invention.

[0043] Figure 3 This is a one-to-many binary relationship diagram between users and in-vehicle APPs according to an embodiment of the present invention.

[0044] Figure 4 This is a multi-relationship diagram between the user and the in-vehicle APP according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is further described in detail through specific implementation methods:

[0046] Example

[0047] Basically as attached Figure 1 and attached Figure 2 As shown, a method for recommending in-vehicle APPs based on the emotional elements of user comments includes the following steps:

[0048] S1. Use manual definition to construct a classification table and obtain comment data. The classification table is used to store the correspondence between multiple classification labels and feature words. The comment data includes the ratings of each user on the used in-vehicle APP and the corresponding comment text;

[0049] S2, obtaining the portraits of each in-vehicle APP and each user by analyzing the comment data based on the classification table and sentiment dictionary;

[0050] S3. Use the in-vehicle APP portrait and user portrait to recommend unused in-vehicle APPs to each user through matching calculation.

[0051] Among them, S2 also includes: S201, using the constructed classification table, using the TF-IDF algorithm to extract feature words and calculate the feature word weights of each comment text, and based on the correspondence between the feature words and the classification labels, matching the corresponding classification labels for each in-vehicle APP to form the feature labels of the in-vehicle APP, and then constructing a matrix A of each in-vehicle APP and its corresponding feature labels as an APP portrait;

[0052] S202, based on the ratings of the in-vehicle apps used by each user, construct a matrix R of users and in-vehicle apps and their corresponding ratings; at the same time, based on the sentiment dictionary, analyze the sentiment words and sentiment scores in the comment text, construct a sentiment score matrix G0 of the in-vehicle apps used by the users, assign the sentiment scores of the users to the in-vehicle apps in G0 to the feature labels corresponding to the in-vehicle apps, and use the average of the sentiment scores assigned to the feature labels as the sentiment score of the feature labels, and finally obtain the sentiment score matrix G of the feature labels used by each user;

[0053] S203, performing the first matrix decomposition inference on the matrix A and the matrix R to obtain the score matrix B of each user for the feature labels involved;

[0054] S204, using an ablation experiment method, fusing the matrix B and the matrix G to form a comprehensive scoring matrix S of each user's feature labels involved as a user profile;

[0055] Then, from S3, through the secondary matrix decomposition reasoning of matrix A and matrix S, the predicted comprehensive score matrix R of each user for each in-vehicle APP to be used is obtained: ∧ ; According to the matrix R ∧ The ratings in the list are sorted, and the highest-rated in-vehicle APP to be used is selected and recommended to the corresponding user.

[0056] A method for recommending in-vehicle APPs based on sentiment factors of user comments also includes S4: performing time series analysis on the matrix G to capture the long-term trend and periodic changes of each user's sentiment, and providing in-vehicle APP recommendation services in S3 based on the analysis results, so that users can obtain more personalized in-vehicle APP recommendation services.

[0057] There is a multi-to-multi-correspondence relationship between classification labels and feature words, such as Figure 3 and attached Figure 4 As shown, feature tags can convert the one-to-one corresponding function relationship between users and in-vehicle apps into a one-to-many to many-to-many spatial refraction correspondence relationship. A single in-vehicle app contains multiple feature tags, and multiple users have multiple common feature tags. Therefore, each user is deeply connected to multiple categories of in-vehicle apps.

[0058] The feature label extraction and the construction of the in-vehicle APP feature matrix A further include using association rule learning to determine the interdependencies between feature labels to more comprehensively describe the characteristics of the in-vehicle APP and the user's preferences for these characteristics.

[0059] Matrix R ∧ The calculation further includes applying a cross-validation method to evaluate and improve the generalization ability of the prediction model on new users or new in-vehicle apps.

[0060] In the process of matrix decomposition, by adjusting the setting of hyperparameters, it can further adapt to different user behavior characteristics and emotional polarity expressions. The adjustment of hyperparameters includes but is not limited to the learning rate, regularization coefficient, and dimension of factor vector, etc.

[0061] S1 obtains the review data of multiple users on multiple APPs they have used to form a review data set. The review data includes review text, number of downloads, actual ratings and other data.

[0062] To facilitate the description of each matrix and each score, the score directly given by the user for the in-vehicle APP is called the actual score, and the sentiment score analyzed based on the sentiment dictionary of the comment text written by the user is called the sentiment score; and each matrix is ​​named differently in turn: the matrix R of the actual score of the user and the APP, the matrix A of the APP and the feature label, the sentiment score G0 of the user and the APP, the matrix B of the actual score of the user and the label, the matrix G of the sentiment score of the user and the label, and the comprehensive score G of the user and the label.

[0063] In S202, the specific method of constructing the matrix R is:

[0064] Based on the review data set, the user set is defined as X = {x1, x2, x μ , ..., x m}, in set X, x μ is any user in the comment dataset; define the APP set as Y = {y1, y2, y ε , ..., y n},y ε is any APP in the review dataset.

[0065] According to any user x μ The historical download records and their actual ratings of the APP are used to construct the user-APP actual rating vector j μ (j μ1 , j μ2 , j μτ , ..., j μn ), where, because a single user may download a single APP multiple times and give a rating and comment each time, i.e., a single user gives multiple ratings to a single APP, it is necessary to calculate the average of the multiple ratings given by the single user to the single APP as the actual rating of the user for the APP. n represents the number of APPs downloaded and used by the user (n>=1), j μτ Represents the average value of the actual rating given to a single APP by a single user.

[0066] j μτ The calculation formula is as follows:

[0067] (where i = 1, 2, 3, ..., k);

[0068] In the formula, K represents any user x μ Download any APPy ε The total number of times, and q μεi represents any user x μ After the i-th download, the APPy ε The actual rating value of each user is calculated from the review data set. μ , and then construct the matrix R of the actual ratings of users and APPs; R = {j1, j2, j3, ..., j m}.

[0069] The practical method of constructing the matrix R of actual ratings of users and apps is:

[0070] Input: m apps, n users, L comments;

[0071] Output: A sparse matrix of m rows and n columns, which contains L actual rating values. Create a two-dimensional array R[m][n], and initially set all element values ​​to 0.

[0072] Read the review dataset rating.date through the defread_csv method; loop through the entire rating.date review dataset and insert the actual rating values ​​in the review dataset into the two-dimensional array R[m][n].

[0073] In S1, the classification table is constructed as follows:

[0074] Manually define classification labels and their corresponding feature words, and then define the corresponding relationship between each classification label and each feature word. Each classification label corresponds to multiple feature words, and construct a classification table, namely a "classification label-feature word" table. Among them, the classification label and the feature word are a multi-dimensional relationship. A single classification label corresponds to multiple feature words, and a single feature word may also have a corresponding relationship with multiple classification labels. All feature words corresponding to all classification labels form a feature word set. In this embodiment, in the definition classification table, the total number of classification labels is less than or equal to 128.

[0075] In S201, the specific method of constructing matrix A is:

[0076] The TF-IDF algorithm is used to extract the keywords contained in the comment texts in the comment dataset and calculate the weight of each keyword. First, all comment texts are preprocessed. The data preprocessing methods include Chinese word segmentation and stop word processing, which aims to convert the original comment data into a form that is easier to analyze and process, and obtain each comment text in an ideal state.

[0077] Then, the TF-IDF algorithm is used to extract the keywords contained in each comment text, and the keyword set contained in each APP is obtained respectively. The keyword set includes feature words, and then the extracted keywords are weighted. According to the keyword weight, the keywords contained in each APP are sorted from large to small, and the first 2N keywords are selected as feature words for corresponding classification labels. The classification labels corresponding to the first 2N feature words are used as the feature labels of the APP.

[0078] The first 2N feature words finally extracted by the TF-IDF algorithm are put into the "classification label-feature word" table for matching, and the feature words recorded in the classification table and the classification labels with corresponding relationships with the feature words are found. The classification labels are used as the feature labels of the APP, and a matrix A of the APP and the feature labels is constructed.

[0079] Traverse all the feature words of a single APP and the established classification table. If the feature word is or belongs to the feature word set assigned by a certain classification label after the traversal, then this APP is defined to contain this feature label. If the extracted feature word has no corresponding classification label in the classification table, then this APP has no feature label.

[0080] For example, for the APP set Y = {y1, y2, y3, ..., y n Any APPy in} ε , construct its APP-classification label vector k v (k v1 , k v2 , k v3 , ..., k vh ), any one of which k vδ Value method:

[0081]

[0082] In the above formula, m represents the number of classification labels (128>m>1), k vδ Indicates APPy ε Contains the value of the classification label δ (01 determines whether the APP contains the classification label). For all APP sets Y = {y1, y2, y3, ..., y n}, calculate the corresponding APP-classification label vector, and finally get the matrix A of APP and feature labels.

[0083] A={p1,p2,p3,…,p n};

[0084] The TF-IDF algorithm extracts and calculates the weights of feature words in each comment text, including:

[0085] After reading the comment text in the comment data set, extract the feature words contained in each comment text, and calculate the word frequency (TF) of each feature word. The calculation formula of the TF value of the feature word is as follows:

[0086]

[0087] in, The total number of comment texts in the comment dataset λ is a feature word, and F(λ) represents the sum of the number of times the feature word λ appears in all comment texts.

[0088] Then the inverse document frequency (IDF) of each feature word is calculated. In this embodiment, a public text phrase corpus is preset. The public text phrase corpus is a pre-collected text collection, which contains a variety of documents, such as news reports, books, web page content, social media posts, etc. It is used to simulate the use environment of language communication in real life.

[0089] Detailed calculation formula of IDF value:

[0090]

[0091] α represents the number of documents in all document data in the public text phrase corpus, β represents the number of documents containing the characteristic word λ in the document data, and the base of log in this embodiment is 10;

[0092] For example, the more common the feature word is, the more frequently it appears in daily language communication, that is, the larger the β value is, the lower the inverse document frequency is. Adding 1 to the denominator is to avoid the situation where the denominator is 0, that is, no document contains the feature word. After the calculation, store the IDF value of each feature word and the number of documents containing the word.

[0093] Calculate the TF*IDF value (weight) of each feature word λ. The detailed calculation formula is:

[0094]

[0095] The practical method of using the TF-IDF algorithm to calculate the weight of each feature word is:

[0096] Use def loadDataSet(): method, where Returns: dataset represents the entries of the experimental sample segmentation, that is, the comment text data after word segmentation and stop word processing; classVec represents the category label vector, and deffeature_select(list_words) is defined for total word frequency statistics.

[0097] The next step is to calculate the TF value of each word and use word_tf={} to store the TF value of each word;

[0098] word_tf[i]=doc_f[i] / sum(doc_f.values());

[0099] Next, calculate the IDF value of each word, doc_num = len(list_words), use word_idf = {} to store the idf value of each word, and word_doc = defaultdict(int) to store the number of documents containing the word;

[0100] Finally, calculate the TF*IDF value of each word, word_tf_idf = {};

[0101] word_tf_idf[i]=word_tf[i]*word_idf[i].

[0102] In S202, the specific method of constructing the matrix G is:

[0103] The feature words used to match the feature tags in the comment text are filtered to obtain a small amount of comment text, which contains the user's potential comments on the APP. The filtered comment text is analyzed based on the sentiment dictionary, the user's sentiment score for the APP he has used is calculated, and the matrix G0 of the user and APP sentiment scores is constructed.

[0104] The sentiment dictionary contains sentiment words and their corresponding sentiment polarity, and the sentiment polarity is used as the basic unit for calculating the sentiment score of the text. This embodiment uses the integration of various existing basic sentiment dictionaries as a basis, and then removes low-frequency words in various basic sentiment dictionaries based on high- and low-frequency dictionaries, and finally forms a sentiment dictionary for calculating the sentiment score of the comment text.

[0105] The sentiment polarity strength analysis of user comments further includes analyzing the context of user comments to capture the implicit emotions in the user comments, such as by detecting modal particles and emphasized sentences in the comments to improve the depth and accuracy of the sentiment polarity analysis.

[0106] Taking each sentence in a single comment text as a unit, we traverse and query all the degree words before and after the sentiment words in the comment text. Different degree words correspond to different weights. Finally, different sentiment values ​​are multiplied by the sum of different weights as the sentiment score of the sentence.

[0107] Then calculate the average sentiment score of all sentences in a single comment text as the sentiment score of the comment text; if a single user downloads and comments on a single APP multiple times, then the average sentiment score of the user's multiple comments on the APP is used as the user's sentiment score for the APP.

[0108] According to the emotion score, each APP is graded into emotional tendencies, including positive emotion score, medium score, and negative emotion score; the emotion score range corresponding to each tendency is greater than 0, equal to 0, and less than 0. Based on the emotion rating of each APP by each user, the emotion score matrix G0 of each user's used in-vehicle APP is finally obtained.

[0109]

[0110] In the above formula, E(Sentence) is defined as the polarity strength of a sentence whose length is more than three phrases, and E(S i ) represents the sentiment polarity of each sentiment word or phrase in the sentence. After weighted averaging, the average sentiment polarity value of the sentence represents the polarity value of the entire comment sentence.

[0111] The practical operation method of calculating the emotion intensity is:

[0112] Definition method def sentiment_score_list(self, dataset): score each type of word; need to forward scan the degree words before and after the sentiment words, and end the search after finding them.

[0113] Among them, the search for degree words and their weight settings are as follows:

[0114] Next, scan the number of negative words before the sentiment word if tool.is_odd(c) == 'odd'. After finding it, continue searching so that multiple negative words can affect the result until all negative words are found. The weight of the negative word can be set as follows: if the number is an odd number, multiply it by -1 to change the sentiment polarity; if the number is an even number, multiply it by 1 and the sentiment polarity remains unchanged.

[0115] Next, scan the sentiment word before the exclamation mark, if words[-1]in['! ', '! ']: after finding it, multiply the weight by 2, that is, the sentiment score corresponding to the sentiment word by 2; (the same applies to the following)

[0116] Next, scan the sentiment words after the transition words, for w_imin['but', 'but']:, and after finding them, the weight is * 5.

[0117] Next, scan the entire sentence to see if there is a question mark if words[-1]in['? ','? ']: If there is a question mark, it means that its original meaning is opposite to the meaning, and it has negative sentiment. If it is found, it is multiplied by -1.

[0118] Repeatedly calculate the sentiment scores of all vocabulary segments in each comment text, [positive sentiment score, medium score, negative sentiment score], and record them in an array (list).

[0119] Finally, the average of all the polarity phrase sentiment scores in a comment text is used as the sentiment polarity value of the entire sentence. The positive sentiment mean and negative sentiment mean of each sentence in each comment are calculated, and then the sum of positive sentiment and negative sentiment are compared. The larger one is the obtained sentiment tendency; the sentiment tendency of each user towards each APP is traversed to create the user and APP sentiment score matrix G0.

[0120] By constructing the matrix G0 of user and APP sentiment ratings and the matrix A of APP and feature labels, the user's sentiment rating of the APP he has used is assigned to the feature label corresponding to the APP. Different APPs may contain the same feature label. In the case where a single feature label is assigned multiple sentiment ratings, the mean of the sentiment rating of the feature label is calculated as the user's sentiment rating score for the feature label.

[0121] Define user set V = {v1, v2, v3, ..., vn Any user v in} ω , construct the user-label sentiment score vector k * {k *1 , k *2 k *3 , ..., k *h}, where the user-label sentiment score vector k *z Value method:

[0122]

[0123] Where Z represents the classification label set, k *z Represents user v ω The sentiment score value of feature label z. For all APP sets Y = {y1, y2, y3, ..., y n} and the set of all feature labels Z, and construct the matrix G of user and label sentiment scores through calculation.

[0124] In S203, the specific method of constructing matrix B is:

[0125] By constructing the matrix R of users and actual APP ratings and the matrix A of APPs and feature labels, machine learning is used to calculate the ratings of each user for each feature label of the APP he has used, and to construct the matrix B of users and actual label ratings to represent the user's interest in each feature label.

[0126] The matrix B of the actual ratings of users and tags is constructed as follows:

[0127] Construct a blank matrix of users and feature labels, adjust the appropriate learning rate and maximum number of iterations, and randomly initialize the entire matrix B of actual user and label ratings through machine learning methods. Combine the matrix R of actual user and APP ratings with the matrix decomposition algorithm R = B * AT (AT is the transpose of the matrix A of APP and feature labels), and use the random gradient descent method to train the matrix B of actual user and label ratings preset in the middle, and use the value of this matrix B as the user's interest in the feature labels of all APPs he has used.

[0128] The practical method of constructing the matrix B of the actual ratings of users and tags is:

[0129] Through machine learning and a matrix decomposition model with regularization factors, a rating matrix class LFM(object) of the user for the feature label is calculated:

[0130] F: number of latent factors; alpha: learning rate; 1mbd: regularization; max_iter: maximum number of iterations; randomly initialize matrix B.

[0131] Stochastic gradient descent method training B, for step in range(self.max_iter): the number of traversals is max_iter

[0132] hat_rui = self.predict(user, item) prediction score;

[0133] err_ui = rui - hat_rui calculation error;

[0134] for f in range(self.F): gradient descent update;

[0135] self.alpha*=0.9The step size should be gradually reduced for each iteration;

[0136] def predict(self, user, label), predict the user user’s preference for the APP feature label label.

[0137] In S204, the method for constructing the matrix S is:

[0138] By integrating the constructed matrix B of actual user and tag scores with the matrix G of user and tag sentiment scores, a new matrix S of comprehensive user and tag scores is formed.

[0139] Create a two-dimensional array S[m][n], set the element value to 0 initially, input the trained matrix B of actual user and label scores and the matrix G of user and label sentiment scores; loop through the two matrices and assign values ​​to the corresponding matrix S;

[0140] S = x*B+y*G;

[0141] Among them, x and y represent the weights of the actual rating matrix B of users and tags and the sentiment rating matrix G, respectively, and (x+y)=1. By continuously controlling the variable method to conduct experiments, (the fusion of the matrix S further includes using the correlation between historical behavior data and sentiment polarity intensity to dynamically adjust the weight ratio of the matrix B and the matrix G in the recommendation algorithm.), by continuously controlling the variable method to conduct experiments, taking x=0.75 and y=0.25 can more realistically describe the user's comments on each feature label, and finally obtain the matrix S of the comprehensive score of users and tags.

[0142] In S3, construct the matrix R ∧ The specific method is:

[0143] By constructing the matrix S of comprehensive ratings of users and tags, we predict the comprehensive ratings of users for unused apps and form the matrix R of predicted ratings of users and apps. ∧ .

[0144] Create a new matrix R of users and APP predicted ratings ∧ , using the fused matrix S of user and label comprehensive scores and the trained matrix A T , and then use the gradient descent method to model the matrix R of users and APP prediction scores ∧ .

[0145] Define the original matrix R ∧ The value of με , define a new matrix R ∧ The value of and However, there will be errors between the predicted results and the actual results, so the square loss function L is introduced με 2 .

[0146] L(Y|f(x))=∑ n (Yf(x)) 2 ;

[0147]

[0148] In order to achieve higher accuracy and avoid overfitting, a regularization term ω(||S|| 2 +||A|| 2 ); Next, update the matrix S of the comprehensive score of users and tags, and use the gradient descent method to update the matrix:

[0149] S l =S+2γ(L με *A-ω*S)

[0150] Among them, γ represents the step size, S is the comprehensive score matrix of users and tags that needs to be iteratively calculated, and S l To update the comprehensive rating matrix of users and labels after training;

[0151] Loop iterative calculation training: loop calculation L με 2 The value of and update the matrix S.

[0152] When an APP needs to be recommended to a user, the matrix R of the user and APP predicted ratings ∧ Get the predicted scores of each unused APP by the user, sort the predicted scores from high to low, and recommend APPs with higher predicted scores to the user.

[0153] When new review data is obtained, each matrix is ​​updated to more accurately predict user interests.

[0154] The above is only an embodiment of the present invention, and the common knowledge such as the known specific technical solutions and / or characteristics in the solution is not described in detail here. It should be pointed out that for those skilled in the art, without departing from the technical solution of the present invention, several modifications and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the effect of the implementation of the present invention and the practicality of the patent. The scope of protection required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.

Claims

1. A method for recommending in-vehicle APPs based on the emotional elements of user comments, characterized in that: The following steps are involved: S1. Use manual definition to construct a classification table and obtain comment data. The classification table is used to store the correspondence between multiple classification labels and feature words. The comment data includes the ratings, download times and corresponding comment texts of each user for the in-vehicle APP used; S2, obtaining the portraits of each in-vehicle APP and each user by analyzing the comment data based on the classification table and sentiment dictionary; S3, using the in-vehicle APP portrait and user portrait, recommending unused in-vehicle APPs to each user through matching calculation; Among them, S2 also includes: S201, using the constructed classification table, using the TF-IDF algorithm to extract feature words and calculate the feature word weights of each comment text, and based on the correspondence between the feature words and the classification labels, matching the corresponding classification labels for each in-vehicle APP to form the feature labels of the in-vehicle APP, and then constructing a matrix A of each in-vehicle APP and its corresponding feature labels as an APP portrait; S202, based on the ratings of the in-vehicle apps used by each user, construct a matrix R of users and in-vehicle apps and their corresponding ratings; at the same time, based on the sentiment dictionary, analyze the sentiment words and their corresponding sentiment scores in the comment text, construct a sentiment score matrix G0 of the in-vehicle apps used by the users, assign the sentiment scores of the users to the in-vehicle apps in G0 to the feature labels corresponding to the in-vehicle apps, and use the average of the sentiment scores assigned to the feature labels as the sentiment score of the feature labels, and finally obtain the sentiment score matrix G of the feature labels used by each user; S203, performing the first matrix decomposition inference on the matrix A and the matrix R to obtain the score matrix B of each user for the feature labels involved; S204, using an ablation experiment method, fusing the matrix B and the matrix G to form a comprehensive scoring matrix S of each user's feature labels involved as a user profile; Then, from S3, through the secondary matrix decomposition reasoning of matrix A and matrix S, the predicted comprehensive score matrix R of each user for each in-vehicle APP to be used is obtained: ∧ ; According to the matrix R ∧ The ratings in the list are sorted, and the highest-rated in-vehicle APP to be used is selected and recommended to the corresponding user.

2. According to claim 1, a method for recommending in-vehicle APPs based on emotional factors of user comments is characterized by: In the classification table, the classification labels and feature words are in a multi-dimensional relationship.

3. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 2, characterized in that: In S201, the TF-IDF algorithm is used to extract keywords contained in the comment text, and a keyword set contained in each in-vehicle APP is obtained respectively. The keyword set includes feature words, and then the extracted keywords are weighted by the TF-IDF algorithm. According to the keyword weight, the keywords contained in each in-vehicle APP are sorted from large to small, and the first 2N keywords are selected as feature words for corresponding classification labels. The classification labels corresponding to the first 2N feature words are used as feature labels of the in-vehicle APP.

4. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 3 is characterized by: In S204, a matrix S is created, and the element values ​​are initially set to 0, and the matrix B and the matrix G are input; Traverse the two matrices and assign values ​​to the corresponding matrix S; S = x*B+y*G; Among them, x and y represent the weights of matrix B and matrix G respectively, and (x+y)=1. The weight ratio of matrix B and matrix G is dynamically adjusted by using the correlation between the actual ratings and sentiment ratings in the review data.

5. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 4, characterized in that: In S204, the weights of the matrix B and the matrix G are obtained through ablation experiments as follows: x=0.75, y=0.

25.

6. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 5, characterized in that: In the S202, the comment text is used for feature word filtering for feature tag matching to obtain the filtered comment text, and the filtered comment text is analyzed based on the sentiment dictionary. Taking each sentence in a single comment text as a unit, all sentiment words and the degree words before and after the sentiment words in the comment text are traversed and queried. The sum of the products of the sentiment value of the sentiment word multiplied by the weight of the corresponding degree word is used as the sentiment score of the sentence, and then the average sentiment score of all sentences in the single comment text is calculated as the sentiment score of the comment text, that is, the sentiment score of the user for the in-vehicle APP; According to the emotion score, each in-vehicle APP is graded for its emotion tendency, including positive emotion score, medium emotion score, and negative emotion score. Each user grades the emotion tendency of each in-vehicle APP, and finally obtains the matrix G0.

7. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 6, characterized in that: In S202, each emotional tendency is graded and assigned an emotional score value, where a positive emotional score is 1, a medium emotional score is 1 / 2, and a negative emotional score is 0; The user's sentiment score for the in-vehicle APP is assigned to its corresponding feature label. When a single feature label is assigned multiple sentiment scores, the mean of the sentiment scores of the feature label is calculated as the user's sentiment score for the feature label, and the matrix G is constructed.

8. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 7, characterized in that: The S3 also includes: introducing a square loss function, adding a regularization term, using a gradient descent method and cyclically calculating the value of the square loss function, and finally updating the matrix S to S l .

9. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 8, characterized in that: The recommendation method further includes: performing a time series analysis on the matrix G to capture the long-term trend and periodic changes of each user's emotion respectively, and providing a service for S3's in-vehicle APP recommendation based on the analysis results.

10. The method for recommending in-vehicle APPs based on the emotional elements of user comments according to claim 9, characterized in that: During the matrix decomposition inference process, the setting of hyperparameters is adjusted, and the adjustment of hyperparameters includes the learning rate, the regularization coefficient and the dimension of the factor vector.

Citation Information

Cited By

  • Remote communication-based on-hook message adaptive pushing system

    CN120508645A