Project recommendation method and device, storage medium and computer equipment
By generating local corpus data sets and predicting user scores using project scoring models, the problem of low accuracy of project recommendations in the prior art is solved, and more accurate user preference analysis and project recommendations are achieved.
Patent Information
- Application Number
- CN202411676495.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-18
AI Technical Summary
The prior art relies solely on the similarity of user comments for project recommendations, resulting in lower accuracy.
By obtaining user comments from multiple projects, information extraction is performed, a local corpus data set corresponding to the target user is generated, and a prediction score of the user's treatment of recommended items is predicted based on the trained project scoring model.
In the case of insufficient user review data or insufficient comments, accurately analyze user preferences and recommend projects that are more in line with your needs.
Smart Images

Figure CN119646292A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a project recommendation method and device, a storage medium, and a computer device. Background Art
[0002] With the development of Internet technology, the speed of information dissemination has been greatly improved, and the technology of recommending items that users are expected to pay attention to has been widely used in various fields such as e-commerce, online advertising, and action guidance services.
[0003] Currently, the most widely used approach in project recommendation is to perform similarity analysis on user comments to determine user preferences, and then recommend projects that match user preferences. However, user comments on projects are often not accurate enough to represent each user's preferences, and project recommendations based solely on user comments are not very accurate. Summary of the invention
[0004] In view of this, the present invention provides a project recommendation method and device, a storage medium, and a computer device, the main purpose of which is to solve the problem of low accuracy caused by the prior art of only using user evaluation similarity to recommend projects.
[0005] According to one aspect of the present invention, a method for recommending an item is provided, comprising:
[0006] Obtain user comments on multiple projects to obtain a user comment set; the user comments carry a user ID and a project ID;
[0007] Performing information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user;
[0008] Analyzing the preferences of the target user based on the local corpus data set, and determining a to-be-recommended item that satisfies the user's preferences from the plurality of items;
[0009] The predicted score of the target user for the item to be recommended is predicted based on the trained item rating model, and the target recommended item is determined based on the predicted score.
[0010] Furthermore, the information extraction process is performed based on the user comment set and the preset comment corpus to obtain a local corpus data set corresponding to the target user, including:
[0011] Acquire target user comments corresponding to the target user from the user comment set, and perform context extraction and vector representation on the target user comments to obtain a target context vector;
[0012] Based on the target user's comments, similarity retrieval is performed on the comment corpus to obtain at least one target comment corpus that meets the similarity requirement; and encoding processing is performed on the target comment corpus to obtain target comment corpus features;
[0013] The target context vector and the target comment corpus features are integrated to obtain a local corpus dataset corresponding to the target user.
[0014] Furthermore, the step of obtaining a target user comment corresponding to the target user from the user comment set, and performing context extraction and vector representation on the target user comment to obtain a target context vector includes:
[0015] Obtaining the target user's favorite items based on the target user ID;
[0016] Acquire the focused item ID of the focused item, and acquire all target user comments of the target user from the user comment set based on the target user ID and the focused item ID;
[0017] Contexts are extracted from the target user comments respectively to obtain target user contexts; and vector representation is performed on the target user contexts to obtain target context vectors.
[0018] Furthermore, analyzing the preferences of the target user based on the local corpus data set and determining the recommended items that meet the user preferences from the multiple items includes:
[0019] Based on the project ID, obtain the user comment data set to be analyzed corresponding to each project from the user comment set;
[0020] Performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets similarity requirements;
[0021] The ID of the item to be recommended corresponding to the target user comment data set is obtained, and the item to be recommended is determined based on the ID of the item to be recommended.
[0022] Furthermore, the performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets the similarity requirement includes:
[0023] Vectorizing the user comment data set to be analyzed to obtain a vector representation data set to be analyzed corresponding to each item;
[0024] Performing averaging processing on each of the vector-represented data sets to be analyzed to obtain an average vector to be analyzed corresponding to each item;
[0025] The similarities between the local corpus dataset and each of the average vectors to be analyzed are calculated respectively, and based on the similarities, a target user comment dataset that meets the similarity requirement is determined from each of the user comment datasets to be analyzed.
[0026] Furthermore, before predicting the predicted score of the target user for the to-be-recommended item based on the trained item rating model, the method further includes:
[0027] Performing language learning based on the local corpus data set to obtain an explanatory text;
[0028] Associating the explanatory text with a target user ID corresponding to the target user and with the focused item ID;
[0029] The project scoring model is trained based on the target user ID, the concerned project ID and the explanatory text to obtain the trained project scoring model.
[0030] Furthermore, the item scoring model includes a multi-layer Transformer architecture, and the loss of the model is calculated based on the output of the last layer of the Transformer architecture, including output text loss, square error loss of the linearized mapping scalar, and negative log similarity loss of text generation.
[0031] According to another aspect of the present invention, there is provided a project recommendation device, comprising:
[0032] An acquisition module is used to acquire user comments on multiple projects to obtain a user comment set; the user comments carry a user ID and a project ID;
[0033] An extraction module, used to perform information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user;
[0034] A preference analysis module, used to analyze the preferences of the target user based on the local corpus data set, and determine a to-be-recommended item that satisfies the user's preferences from the plurality of items;
[0035] The target determination module is used to predict the predicted score of the target user for the to-be-recommended item based on the trained item rating model, and determine the target recommended item based on the predicted score.
[0036] Furthermore, the extraction module includes:
[0037] A context extraction unit, configured to obtain a target user comment corresponding to the target user from the user comment set, and perform context extraction and vector representation on the target user comment to obtain a target context vector;
[0038] A corpus extraction unit is used to perform similarity retrieval on the comment corpus based on the target user's comments to obtain at least one target comment corpus that meets the similarity requirement; and to perform encoding processing on the target comment corpus to obtain target comment corpus features;
[0039] The integration unit is used to integrate the target context vector and the target comment corpus features to obtain a local corpus data set corresponding to the target user.
[0040] Furthermore, the context extraction unit is also used for:
[0041] Obtaining the target user's favorite items based on the target user ID;
[0042] Acquire the focused item ID of the focused item, and acquire all target user comments of the target user from the user comment set based on the target user ID and the focused item ID;
[0043] Contexts are extracted from the target user comments respectively to obtain target user contexts; and vector representation is performed on the target user contexts to obtain target context vectors.
[0044] Furthermore, the preference analysis module is also used to:
[0045] Based on the project ID, obtain the user comment data set to be analyzed corresponding to each project from the user comment set;
[0046] Performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets similarity requirements;
[0047] The ID of the item to be recommended corresponding to the target user comment data set is obtained, and the item to be recommended is determined based on the ID of the item to be recommended.
[0048] Furthermore, the preference analysis module is also used to:
[0049] Vectorizing the user comment data set to be analyzed to obtain a vector representation data set to be analyzed corresponding to each item;
[0050] Performing averaging processing on each of the vector-represented data sets to be analyzed to obtain an average vector to be analyzed corresponding to each item;
[0051] The similarities between the local corpus dataset and each of the average vectors to be analyzed are calculated respectively, and based on the similarities, a target user comment dataset that meets the similarity requirement is determined from each of the user comment datasets to be analyzed.
[0052] Furthermore, the device also includes a model training module, which is used to:
[0053] Performing language learning based on the local corpus data set to obtain an explanatory text;
[0054] Associating the explanatory text with a target user ID corresponding to the target user and with the focused item ID;
[0055] The project scoring model is trained based on the target user ID, the concerned project ID and the explanatory text to obtain the trained project scoring model.
[0056] Furthermore, the project scoring model in the target determination module and the model training module includes a multi-layer Transformer architecture, and the loss of the model is calculated based on the output of the last layer of the Transformer architecture, including output text loss, square error loss of the linearized mapping scalar, and text generation negative log similarity loss.
[0057] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored in the storage medium, and the executable instruction enables a processor to execute an operation corresponding to the recommended method of the above item.
[0058] According to another aspect of the present invention, there is provided a computer device, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus;
[0059] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the recommended method of the above item.
[0060] By means of the above technical solution, the technical solution provided by the embodiment of the present invention has at least the following advantages:
[0061] The present invention provides a project recommendation method and device, storage medium, and computer equipment. Compared with the prior art, the present invention obtains user comments on multiple projects to obtain a user comment set; performs information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to a target user; analyzes the preferences of the target user based on the local corpus data set, and determines a to-be-recommended project that meets the user's preferences from multiple projects; predicts the target user's predicted score for the to-be-recommended project based on a trained project scoring model, and determines the target recommended project based on the predicted score. In the case where the amount of user comment data is small or the user comments are not sufficient to accurately represent the user's preferences, the user's preferences can be accurately analyzed, and projects that better meet the user's needs can be recommended to the user.
[0062] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0064] Figure 1 A schematic diagram showing a flow chart of a project recommendation method provided by an embodiment of the present invention;
[0065] Figure 2 A schematic diagram showing a flow chart of another project recommendation method provided by an embodiment of the present invention;
[0066] Figure 3 A schematic diagram showing a flow chart of another project recommendation method provided by an embodiment of the present invention;
[0067] Figure 4 A schematic diagram showing a flow chart of another project recommendation method provided by an embodiment of the present invention;
[0068] Figure 5 A schematic diagram showing the structure of a project recommendation device provided by an embodiment of the present invention;
[0069] Figure 6 A schematic structural diagram of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0070] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0071] The embodiment of the present invention provides a method for recommending a project. Figure 1 As shown, the method includes:
[0072] 101. Obtain user comments on multiple projects to obtain a user comment set;
[0073] In an embodiment of the present invention, the current execution end obtains user comments on multiple projects to obtain a user comment set. Among them, the projects include tangible goods, intangible goods and services in scenarios such as digital medical scenarios, smart home scenarios, and digital financial scenarios, which are not specifically limited in the embodiment of the present invention. Each user comment in the user comment set carries a user ID and a project ID; the user ID is used to represent the unique identity of the user; the project ID is used to represent the unique identity of the project.
[0074] 102. Perform information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user;
[0075] In the embodiment of the present invention, the current execution end extracts information based on the user comment set. For example, if there is a user comment in the user comment set that "the camera pixel of this mobile phone is too low", "(camera, low pixel)" can be extracted, and the embodiment of the present invention does not make specific limitations. In addition, the current execution end also extracts information from a preset comment corpus, such as from the comment corpus (S u,1 , ..., S u,n ) to extract the most important sentence S u,j After all the extracted information is integrated, a local corpus data set corresponding to the target user is obtained.
[0076] 103. Analyze the preferences of the target user based on the local corpus data set, and determine a to-be-recommended item that satisfies the user's preferences from the multiple items;
[0077] In an embodiment of the present invention, the current execution end analyzes the preferences of the target user based on a local corpus dataset. For example, if the analysis based on the local corpus dataset shows that the user prefers mobile phones with high camera pixels and large memory, then multiple mobile phones to be recommended that meet the user's preferences are determined from a large number of mobile phones; if the analysis based on the local corpus dataset shows that the user prefers accompaniment music with a slow rhythm and no lyrics, then multiple music to be recommended that meet the user's preferences are determined from a large number of music, etc., and the embodiment of the present invention does not make specific limitations.
[0078] 104. Predict the target user's predicted rating for the to-be-recommended item based on the trained item rating model, and determine a target recommended item based on the predicted rating.
[0079] In the embodiment of the present invention, the current execution end performs prediction and scoring processing based on the trained project scoring model to obtain the predicted score of the target user for the recommended project. The recommended project with the highest predicted score can be selected as the target recommended project; the predicted scores can also be sorted, and the top n recommended projects with higher scores can be selected as the target recommended projects, etc., which are not specifically limited in the embodiment of the present invention.
[0080] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to make up for the defects of few user comments and unclear semantic expressions, the technical means of context enhancement and corpus expansion are used to extract corpus information that is more in line with the preferences of the target users, providing another project recommendation method, such as Figure 2 As shown, the step of performing information extraction processing based on the user comment set and the preset comment corpus to obtain a local corpus data set corresponding to the target user includes:
[0081] 201. Acquire target user comments corresponding to the target user from the user comment set, and perform context extraction and vector representation on the target user comments to obtain a target context vector;
[0082] In the embodiment of the present invention, the current execution end determines the target user ID corresponding to the target user, and obtains the target user's attention items based on the target user ID. The attention items can be the target user's favorite items, like items, attention items, frequently browsed items, etc., which are not specifically limited in the embodiment of the present invention. The number of the attention items can be one, two or more, which are not specifically limited in the embodiment of the present invention.
[0083] In the embodiment of the present invention, after obtaining the target user's concerned items, the current execution end obtains the concerned item ID of the concerned item, and extracts the user comment data carrying both the target user ID and the concerned item ID from the user comment set to obtain all target user comments of the target user. For example, if the target user with ID user1 follows item A, then based on the target user ID "user1" and the ID "itemA" of the concerned item A, the user comment data carrying both "user1" and "itemA" is obtained from the user comment set to obtain the target user comments of the target user.
[0084] In an embodiment of the present invention, after obtaining the target user's comments, the current execution end extracts contexts from the target user's comments to obtain the target user context; for example, the context "(camera, low pixel)" is extracted from "the camera pixel of this mobile phone is too low" as the target user context, etc. The embodiment of the present invention does not make specific limitations.
[0085] It should be noted that, in order to facilitate the calculation of similarity and model calculation in the later stage, the current execution end vectorizes all target user contexts after obtaining the target user context to obtain the target context vector. Among them, the methods that can be used to vectorize the target user context include the Bag-of-Words model, the N-gram model, the word embedding model Word2Vec based on the neural network, etc., which are not specifically limited in the embodiment of the present invention.
[0086] 202. Perform similarity search on the comment corpus based on the target user comments to obtain at least one target comment corpus that meets the similarity requirement; and perform encoding processing on the target comment corpus to obtain target comment corpus features;
[0087] In an embodiment of the present invention, in view of the fact that there is less comment data on the project from the target user, in order to further improve the accuracy of the user preference analysis, the current execution end performs a similarity search on a preset comment corpus based on the target user's comments, obtains at least one target comment corpus that meets the similarity requirements, and uses the target comment corpus to supplement the target user's comments. Among them, the methods that can be used for similarity retrieval include sentence-BERT model retrieval method, cosine distance similarity calculation method, Euclidean distance similarity calculation method, Manhattan distance similarity calculation method, etc., which are not specifically limited in the embodiment of the present invention. The similarity requirement can be the requirement of taking the highest similarity, or the requirement of meeting a similarity threshold, etc., which are not specifically limited in the embodiment of the present invention.
[0088] It should be noted that, in order to facilitate the subsequent model calculation, the current execution end needs to encode the target comment corpus after obtaining the target comment corpus to obtain the target comment corpus features. Among them, the method of encoding the target comment corpus includes ASCII encoding, Unicode encoding, UTF-8 encoding, etc., which is not specifically limited in the embodiment of the present invention.
[0089] 203. Integrate the target context vector and the target comment corpus features to obtain a local corpus dataset corresponding to the target user.
[0090] In the embodiment of the present invention, the current execution end integrates the target context vector and the target comment corpus features to obtain a local corpus data set corresponding to the target user. Since the local corpus data set contains the corpus features retrieved from the preset comment corpus, the features in the local corpus data set in the implementation of the present invention are more comprehensive, and the user preference analysis based on the local corpus data is more accurate.
[0091] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to quickly and accurately analyze user preferences, another project recommendation method is provided, such as Figure 3 As shown, the step of analyzing the preferences of the target user based on the local corpus data set and determining the recommended items that meet the user preferences from the multiple items includes:
[0092] 301. Acquire a user comment data set to be analyzed corresponding to each project from the user comment set based on the project ID;
[0093] In an embodiment of the present invention, the current execution end obtains the user comment data set to be analyzed corresponding to each project from the user comment data set based on the project ID. For example, if the project ID of project A is "itemA", all user comments carrying "itemA" are extracted from the user comment data set to form a user comment data set A to be analyzed corresponding to project A; if the project ID of project B is "itemB", all user comments carrying "itemB" are extracted from the user comment data set to form a user comment data set B to be analyzed corresponding to project B, etc. The embodiment of the present invention does not make specific limitations.
[0094] 302. Perform similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets similarity requirements;
[0095] In an embodiment of the present invention, the current execution end performs vectorization processing on the user comment data sets to be analyzed respectively to obtain the vector representation data sets to be analyzed corresponding to each project; for example, the user comment data set A to be analyzed in the above step 301 is vectorized to obtain the vector representation data set A to be analyzed corresponding to project A; the user comment data set B to be analyzed in the above step 301 is vectorized to obtain the vector representation data set B to be analyzed corresponding to project B, etc., which is not specifically limited in the embodiment of the present invention.
[0096] In the embodiment of the present invention, after obtaining the vector representation data set to be analyzed corresponding to each project, the current execution end performs average processing on each vector representation data set to be analyzed to obtain the average vector to be analyzed corresponding to each project. For example, the vector representations of each user comment to be analyzed in the above-mentioned vector representation data set A to be analyzed are averaged to obtain the average vector to be analyzed corresponding to project A; the vector representations of each user comment to be analyzed in the above-mentioned vector representation data set B to be analyzed are averaged to obtain the average vector to be analyzed corresponding to project B, etc., which is not specifically limited in the embodiment of the present invention.
[0097] In an embodiment of the present invention, the current execution end calculates the similarity between the local corpus data set and each average vector to be analyzed, and determines the target user comment data set that meets the similarity requirement from each of the user comment data sets to be analyzed based on the similarity. Among them, the similarity calculation method includes the cosine distance similarity calculation method, the Euclidean distance similarity calculation method, the Manhattan distance similarity calculation method, etc., which are not specifically limited in the embodiment of the present invention. The similarity requirement can be the requirement of meeting the similarity threshold, etc., which are not specifically limited in the embodiment of the present invention.
[0098] 303. Obtain the ID of the item to be recommended corresponding to the target user comment data set, and determine the item to be recommended based on the ID of the item to be recommended.
[0099] In the embodiment of the present invention, the current execution end obtains the ID of the to-be-recommended item corresponding to the target user comment data set. Since the item ID is an identifier that represents the uniqueness of the item, the current execution end can determine the to-be-recommended item based on the to-be-recommended item ID.
[0100] Furthermore, as a refinement and extension of the above-mentioned specific implementation method, in order to further make up for the shortcomings of user comments and generate accurate and interpretable text, another project recommendation method is provided, such as Figure 4 As shown, before the step of predicting the predicted score of the target user for the to-be-recommended item based on the trained item rating model, the method further includes:
[0101] 401. Perform language learning based on the local corpus data set to obtain an explanatory text;
[0102] In the embodiment of the present invention, the current execution end performs language learning based on the local corpus data set to obtain an explanatory text. Among them, the methods that can be used for language learning include NLP models, GPT series models, etc., which are not specifically limited in the embodiment of the present invention.
[0103] 402. Associating the explanatory text with the target user ID corresponding to the target user and with the concerned item ID;
[0104] In the embodiment of the present invention, the current execution end associates the generated explanatory text with the target user, including associating with the target user ID and associating with the concerned item ID.
[0105] 403. Perform a training operation on the project scoring model based on the target user ID, the concerned project ID and the explanatory text to obtain the trained project scoring model.
[0106] In an embodiment of the present invention, the current execution end performs a training operation on the project scoring model based on the target user ID, the concerned project ID and the explanatory text. The project scoring model includes a multi-layer Transformer architecture, and the loss of the model is calculated based on the output of the last layer of the Transformer architecture during the training process. The loss of the model includes the output text loss, the square error loss of the linearized mapping scalar and the negative log similarity loss of the text generation.
[0107] In the embodiment of the present invention, the output text loss L c The calculation formula is as follows:
[0108]
[0109] Among them, u represents the user, v represents the project, M represents the training set, and g ti Indicates that only the hidden layer vector H is used v The i-th word generated, i∈1,2,...,t len , t len Indicates the total number of generated words.
[0110] In the embodiment of the present invention, in order to combine the ID information and the hidden layer vector H v , use the multi-layer perception mechanism to map the input to a scalar, and then calculate the square error loss L of the linearized mapping scalar r , the specific calculation formula is as follows:
[0111] r u,v =ReLU([H v ,uid , v id ]W l,1 )W l,2
[0112]
[0113] Among them, r u,v Represents user ID, project ID and hidden layer vector H v The scalar mapped after combination, ReLU is the linear rectification function used for mapping, W l,1 and W l,2 are weight parameters, Score the truth value.
[0114] In the embodiment of the present invention, the text generates a negative log similarity loss L g The calculation formula is as follows:
[0115]
[0116] Among them, 7+t represents the hidden vector of the user at the current time step 7+t position to generate the i-th word.
[0117] Finally, sum up the losses and calculate the total loss L. The formula is as follows:
[0118] L=L c +L r +L g
[0119] After the total loss L is calculated, back propagation is used to calculate the gradient and update the model parameters.
[0120] The embodiment of the present invention provides a project recommendation method. Compared with the prior art, the present invention obtains user comments on multiple projects to obtain a user comment set; performs information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to a target user; analyzes the preferences of the target user based on the local corpus data set, and determines a to-be-recommended project that meets the user's preferences from multiple projects; predicts the predicted score of the target user for the to-be-recommended project based on a trained project scoring model, and determines the target recommended project based on the predicted score. In the case where the amount of user comment data is small or the user comments are not sufficient to accurately represent the user's preferences, the user's preferences can be accurately analyzed, and projects that better meet the user's needs can be recommended to the user.
[0121] As the above Figure 1 The implementation of the method shown in the figure, the embodiment of the present invention provides a project recommendation device, such as Figure 5 As shown, the device comprises:
[0122] An acquisition module 51 is used to acquire user comments on multiple projects to obtain a user comment set; the user comments carry a user ID and a project ID;
[0123] An extraction module 52, configured to perform information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to a target user;
[0124] A preference analysis module 53, configured to analyze the preferences of the target user based on the local corpus data set, and determine a to-be-recommended item that satisfies the user's preferences from among the multiple items;
[0125] The target determination module 54 is used to predict the predicted score of the target user for the to-be-recommended item based on the trained item rating model, and determine the target recommended item based on the predicted score.
[0126] Furthermore, the extraction module 52 includes:
[0127] A context extraction unit, configured to obtain a target user comment corresponding to the target user from the user comment set, and perform context extraction and vector representation on the target user comment to obtain a target context vector;
[0128] A corpus extraction unit is used to perform similarity retrieval on the comment corpus based on the target user's comments to obtain at least one target comment corpus that meets the similarity requirement; and to perform encoding processing on the target comment corpus to obtain target comment corpus features;
[0129] The integration unit is used to integrate the target context vector and the target comment corpus features to obtain a local corpus data set corresponding to the target user.
[0130] Furthermore, the context extraction unit is also used for:
[0131] Obtaining the target user's favorite items based on the target user ID;
[0132] Acquire the focused item ID of the focused item, and acquire all target user comments of the target user from the user comment set based on the target user ID and the focused item ID;
[0133] Contexts are extracted from the target user comments respectively to obtain target user contexts; and vector representation is performed on the target user contexts to obtain target context vectors.
[0134] Furthermore, the preference analysis module 53 is also used for:
[0135] Based on the project ID, obtain the user comment data set to be analyzed corresponding to each project from the user comment set;
[0136] Performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets similarity requirements;
[0137] The ID of the item to be recommended corresponding to the target user comment data set is obtained, and the item to be recommended is determined based on the ID of the item to be recommended.
[0138] Furthermore, the preference analysis module 53 is also used for:
[0139] Vectorizing the user comment data set to be analyzed to obtain a vector representation data set to be analyzed corresponding to each item;
[0140] Performing averaging processing on each of the vector-represented data sets to be analyzed to obtain an average vector to be analyzed corresponding to each item;
[0141] The similarities between the local corpus dataset and each of the average vectors to be analyzed are calculated respectively, and based on the similarities, a target user comment dataset that meets the similarity requirement is determined from each of the user comment datasets to be analyzed.
[0142] Furthermore, the device also includes a model training module, which is used to:
[0143] Performing language learning based on the local corpus data set to obtain an explanatory text;
[0144] Associating the explanatory text with a target user ID corresponding to the target user and with the focused item ID;
[0145] The project scoring model is trained based on the target user ID, the concerned project ID and the explanatory text to obtain the trained project scoring model.
[0146] Furthermore, the target determination module 54 and the item scoring model in the model training module include a multi-layer Transformer architecture, and the loss of the model is calculated based on the output of the last layer of the Transformer architecture, including output text loss, square error loss of the linearized mapping scalar, and text generation negative log similarity loss.
[0147] The embodiment of the present invention provides a project recommendation device. Compared with the prior art, the present invention obtains user comments on multiple projects to obtain a user comment set; performs information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to a target user; analyzes the preferences of the target user based on the local corpus data set, and determines a to-be-recommended project that meets the user's preferences from multiple projects; predicts the target user's predicted score for the to-be-recommended project based on a trained project scoring model, and determines the target recommended project based on the predicted score. In the case where the amount of user comment data is small or the user comments are not sufficient to accurately represent the user's preferences, the user's preferences can be accurately analyzed, and projects that better meet the user's needs can be recommended to the user.
[0148] According to an embodiment of the present invention, a storage medium is provided, wherein the storage medium stores at least one executable instruction, and the computer executable instruction can execute the project recommendation method in any of the above method embodiments.
[0149] Figure 6 A schematic diagram of the structure of a computer device provided according to an embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the computer device.
[0150] like Figure 6 As shown, the computer device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0151] The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0152] The communication interface 604 is used to communicate with other devices such as clients or other servers.
[0153] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps of the recommendation method of the above project.
[0154] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0155] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The one or more processors included in the computer device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0156] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0157] The program 610 may be specifically configured to enable the processor 602 to perform the following operations:
[0158] Obtain user comments on multiple projects to obtain a user comment set; the user comments carry a user ID and a project ID;
[0159] Performing information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user;
[0160] Analyzing the preferences of the target user based on the local corpus data set, and determining a to-be-recommended item that satisfies the user's preferences from the plurality of items;
[0161] The predicted score of the target user for the item to be recommended is predicted based on the trained item rating model, and the target recommended item is determined based on the predicted score.
[0162] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0163] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A project recommendation method, characterized in that: include: Obtain user reviews of multiple projects to obtain a user review set; The user comment carries the user ID and the project ID; Performing information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user; Analyzing the preferences of the target user based on the local corpus data set, and determining a to-be-recommended item that satisfies the user's preferences from the plurality of items; The predicted score of the target user for the item to be recommended is predicted based on the trained item rating model, and the target recommended item is determined based on the predicted score.
2. The method according to claim 1, characterized in that The information extraction process is performed based on the user comment set and the preset comment corpus to obtain a local corpus data set corresponding to the target user, including: Acquire target user comments corresponding to the target user from the user comment set, and perform context extraction and vector representation on the target user comments to obtain a target context vector; Based on the target user's comments, similarity retrieval is performed on the comment corpus to obtain at least one target comment corpus that meets the similarity requirement; and encoding processing is performed on the target comment corpus to obtain target comment corpus features; The target context vector and the target comment corpus features are integrated to obtain a local corpus dataset corresponding to the target user.
3. The method according to claim 2, characterized in that The step of acquiring a target user comment corresponding to the target user from the user comment set, and performing context extraction and vector representation on the target user comment to obtain a target context vector comprises: Acquire the focused item ID of the focused item, and acquire all target user comments of the target user from the user comment set based on the target user ID and the focused item ID; Contexts are extracted from the target user comments respectively to obtain target user contexts; and vector representation is performed on the target user contexts to obtain target context vectors.
4. The method according to claim 1, characterized in that: The analyzing the preferences of the target user based on the local corpus data set and determining the recommended items that meet the user preferences from the multiple items includes: Based on the project ID, obtain the user comment data set to be analyzed corresponding to each project from the user comment set; Performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets similarity requirements; The ID of the item to be recommended corresponding to the target user comment data set is obtained, and the item to be recommended is determined based on the ID of the item to be recommended.
5. The method according to claim 4, characterized in that The performing similarity analysis on the local corpus dataset and the user comment dataset to be analyzed to determine a target user comment dataset that meets the similarity requirement comprises: Vectorizing the user comment data set to be analyzed to obtain a vector representation data set to be analyzed corresponding to each item; Performing averaging processing on each of the vector-represented data sets to be analyzed to obtain an average vector to be analyzed corresponding to each item; The similarities between the local corpus dataset and each of the average vectors to be analyzed are calculated respectively, and based on the similarities, a target user comment dataset that meets the similarity requirement is determined from each of the user comment datasets to be analyzed.
6. The method according to claim 4, characterized in that Before predicting the predicted score of the target user for the to-be-recommended item based on the trained item rating model, the method further includes: Performing language learning based on the local corpus data set to obtain an explanatory text; Associating the explanatory text with a target user ID corresponding to the target user and with the focused item ID; The project scoring model is trained based on the target user ID, the concerned project ID and the explanatory text to obtain the trained project scoring model.
7. The method according to any one of claims 1 to 6, characterized in that: The item scoring model includes a multi-layer Transformer architecture, and the loss of the model is calculated based on the output of the last layer of the Transformer architecture, including output text loss, square error loss of linearized mapping scalar, and text generation negative log similarity loss.
8. A project recommendation device, characterized in that: include: An acquisition module is used to obtain user comments on multiple projects and obtain a user comment set; The user comment carries the user ID and the project ID; An extraction module, used to perform information extraction processing based on the user comment set and a preset comment corpus to obtain a local corpus data set corresponding to the target user; A preference analysis module, used to analyze the preferences of the target user based on the local corpus data set, and determine a to-be-recommended item that satisfies the user's preferences from the plurality of items; The target determination module is used to predict the predicted score of the target user for the to-be-recommended item based on the trained item rating model, and determine the target recommended item based on the predicted score.
9. A storage medium, wherein at least one executable instruction is stored in the storage medium, and the executable instruction executes an operation corresponding to the project recommendation method according to any one of claims 1 to 7.
10. A computer device, comprising a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the recommendation method of the project as described in any one of claims 1-7.