A cold start recommendation method and device, a storage medium, and a computer device
By obtaining the attribute vectors of the cold start recommendation object and the object to be matched, and using the mapping vector to calculate the matching degree, the problem of poor cold start recommendation effect caused by single factor in the existing technology is solved, and accurate recommendation for new users or new projects is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PING AN TECH (SHENZHEN) CO LTD
- Filing Date
- 2023-04-17
- Publication Date
- 2026-06-26
Smart Images

Figure CN116467524B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of digital healthcare technology, and in particular to a cold start recommendation method and apparatus, storage medium, and computer equipment. Background Technology
[0002] With the continuous development of medical technology, various medical platforms and products have emerged. In large-scale recommendation scenarios, thousands of users register on medical platforms or new medical products and news appear every second. Therefore, how to recommend medical products and news to users with no interaction history, or recommend users to newly emerging medical products and news, has become an important research question.
[0003] In existing technologies, when recommending items to users with no interaction history, or when recommending users to items with no interaction history, the recommended objects are usually locked based solely on the attributes of the user or the item. However, this recommendation method considers only one factor, which affects the recommendation effect during cold starts. Summary of the Invention
[0004] In view of this, this application provides a cold start recommendation method, apparatus, storage medium, and computer equipment, which can comprehensively and fully consider multiple factors when recommending medical items to new users with no interaction history, or when recommending users to new medical items with no interaction history, thereby facilitating accurate recommendation of cold start recommendation targets.
[0005] According to one aspect of this application, a cold start recommendation method is provided, comprising:
[0006] Determine the cold start recommendation object and obtain the first attribute vector of the cold start recommendation object;
[0007] Obtain the second attribute vector corresponding to each of the multiple objects to be matched;
[0008] Based on the initial vector of the cold start recommendation object and the first attribute vector, a first mapping vector of the cold start recommendation object is determined, wherein the initial vector is a zero vector;
[0009] Based on the target vector of each object to be matched and the second attribute vector, a second mapping vector is determined for each object to be matched, wherein the target vector is obtained based on the interaction history of the object to be matched.
[0010] Based on the first mapping vector and the second mapping vector, the matching degree between the cold start recommendation object and each of the objects to be matched is determined. Based on the matching degree, the target matching object of the cold start recommendation object is determined, and the target matching object is recommended to the cold start recommendation object.
[0011] According to another aspect of this application, a cold start recommendation device is provided, comprising:
[0012] The first acquisition module is used to determine the cold start recommendation object and acquire the first attribute vector of the cold start recommendation object;
[0013] The second acquisition module is used to acquire the second attribute vector corresponding to each of the multiple objects to be matched;
[0014] The first determining module is used to determine the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector, wherein the initial vector is a zero vector;
[0015] The second determining module is used to determine a second mapping vector for each of the objects to be matched based on the target vector of each object to be matched and the second attribute vector, wherein the target vector is obtained based on the interaction history of the object to be matched.
[0016] The recommendation module is used to determine the matching degree between the cold start recommendation object and each of the objects to be matched based on the first mapping vector and the second mapping vector, determine the target matching object of the cold start recommendation object based on the matching degree, and recommend the target matching object to the cold start recommendation object.
[0017] According to another aspect of this application, a storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described cold start recommended method.
[0018] According to another aspect of this application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the program to implement the above-described cold start recommended method.
[0019] By employing the above technical solution, this application provides a cold start recommendation method, apparatus, storage medium, and computer device. Through a first mapping vector of the cold start recommendation object and a second mapping vector of the objects to be matched, the matching degree between the cold start recommendation object and each object to be matched is calculated. Then, target matching objects are determined according to the matching degree from high to low, and these target matching objects are recommended to the cold start recommendation object. The first mapping vector contains the attribute information of the cold start recommendation object, while the second mapping vector integrates the interaction information and attribute information of the objects to be matched. Therefore, when recommending medical items to new users with no interaction history, or when recommending users to new medical items with no interaction history, multiple factors can be comprehensively and fully considered, which is beneficial for achieving accurate cold start recommendation.
[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0022] Figure 1 A flowchart illustrating a cold start recommendation method provided in an embodiment of this application is shown;
[0023] Figure 2 A flowchart illustrating another cold start recommendation method provided in an embodiment of this application is shown;
[0024] Figure 3 A schematic diagram of a cold start recommendation device provided in an embodiment of this application is shown. Detailed Implementation
[0025] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0026] This embodiment provides a cold start recommendation method, such as... Figure 1 As shown, the method includes:
[0027] Step 101: Determine the cold start recommendation object and obtain the first attribute vector of the cold start recommendation object;
[0028] The cold start recommendation method provided in this application can be applied to scenarios where historical products, news articles, and other historical items are recommended to new users, as well as to scenarios where historical users are recommended to new products, news articles, and other new items. Specifically, it can be applied to the field of medical technology, where new users can be users newly registered on a medical platform, new items can be newly released medical products, medical news articles, etc., historical users can be users with historical search records and other historical data that already exist on a medical platform, and historical items can be items that have already been visited by users.
[0029] First, the cold start recommendation target can be determined. Here, the cold start recommendation target can be either a user or an item. Next, the first attribute vector of this cold start recommendation target can be obtained. This first attribute vector can be determined by the auxiliary information of the cold start recommendation target. Specifically, when the cold start recommendation target is a user, the auxiliary information can be information such as the user's gender, interests, geographical location, and occupation; when the cold start recommendation target is an item, the auxiliary information can be various tags of the item. For example, for a medical product item, the auxiliary information could be the color of the medical product, its purpose, etc. The auxiliary information can be obtained through user profiles or item profiles.
[0030] Step 102: Obtain the second attribute vector corresponding to each of the multiple objects to be matched;
[0031] In this embodiment, similarly, multiple objects to be matched that may have a recommendation relationship with the cold start recommendation object can be obtained, and a second attribute vector corresponding to each object to be matched can be obtained. Wherein, when the cold start recommendation object is a cold start recommended user, the object to be matched can be an item to be matched; when the cold start recommendation object is a cold start recommended item, the object to be matched can be a user to be matched. The second attribute vector can be determined by auxiliary information of the object to be matched.
[0032] Step 103: Based on the initial vector of the cold start recommendation object and the first attribute vector, determine the first mapping vector of the cold start recommendation object, wherein the initial vector is a zero vector;
[0033] In this embodiment, an initial vector for the cold-start recommendation object can be obtained. This initial vector indicates the historical interaction history of the cold-start recommendation object, and the first attribute vector indicates the auxiliary information of the cold-start recommendation object. Since the cold-start recommendation object has no interaction history, its initial vector can be set to zero. Then, based on the initial vector and the first attribute vector of the cold-start recommendation object, the corresponding first mapping vector can be obtained.
[0034] Step 104: Based on the target vector of each of the objects to be matched and the second attribute vector, determine the second mapping vector of each of the objects to be matched, wherein the target vector is obtained based on the interaction history of the objects to be matched;
[0035] In this embodiment, a target vector for each object to be matched can also be obtained. The target vector indicates the historical interaction of the object, and the second attribute vector indicates auxiliary information about the object. Since the object has a prior interaction history, its target vector is not zero and may contain information about the interaction history. The target vector can be obtained from a database. Once the object to be matched is determined, its unique identifier can be used to retrieve the corresponding target vector from the database. The target vector can be either a target user vector or a target item vector. When the object to be matched is an item, the target vector is the target item vector; when the object to be matched is a user, the target vector is the target user vector. Then, based on the target vector and the second attribute vector, a corresponding second mapping vector can be obtained. This second mapping vector integrates the interaction information and attribute information of the object to be matched.
[0036] Step 105: Based on the first mapping vector and the second mapping vector, determine the matching degree between the cold start recommendation object and each of the objects to be matched, determine the target matching object of the cold start recommendation object based on the matching degree, and recommend the target matching object to the cold start recommendation object.
[0037] In this embodiment, after determining the first mapping vector and the second mapping vector, the matching degree between the cold-start recommendation object and each object to be matched can be calculated based on the first and second mapping vectors. For example, when calculating the matching degree between the cold-start recommendation object and object A to be matched, the inner product of the first mapping vector of the cold-start recommendation object and the second mapping vector of object A to be matched can be calculated, and the result can be used as the matching degree between the two. After determining the matching degree between the cold-start recommendation object and each object to be matched, a preset number of objects with higher matching degrees can be selected as target matching objects in descending order of matching degree. Then, the target matching objects are recommended to the cold-start recommendation object, thereby achieving accurate recommendation of the cold-start recommendation object.
[0038] By applying the technical solution of this embodiment, the matching degree between the cold-start recommendation object and each object to be matched is calculated using the first mapping vector of the cold-start recommendation object and the second mapping vector of the object to be matched. Then, the target matching object can be determined in descending order of matching degree and recommended to the cold-start recommendation object. The first mapping vector contains the attribute information of the cold-start recommendation object, while the second mapping vector integrates the interaction information and attribute information of the object to be matched. Therefore, when recommending medical projects to new users with no interaction history, or when recommending users to new medical projects with no interaction history, multiple factors can be comprehensively and fully considered, which is beneficial for achieving accurate recommendations for cold-start recommendation objects.
[0039] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and to fully illustrate the specific implementation process of this embodiment, another recommended cold start method is provided, such as... Figure 2 As shown, the method includes:
[0040] Step 201: Obtain historical recommendation object samples, which include historical recommendation user samples and historical recommendation item samples;
[0041] In this embodiment, before recommending target matching objects to the cold-start recommended objects, a target recommendation model and a target completion model can be trained first. Subsequently, the target completion model can be used to determine the target matching objects of the cold-start recommended objects. First, historical recommended object samples can be obtained. Here, historical recommended object samples can include both historical recommended user samples and historical recommended item samples.
[0042] Step 202: Obtain the historical interaction graph corresponding to the historical recommended object sample, wherein the historical interaction graph includes the interaction relationship between the historical recommended user sample and the historical recommended item sample;
[0043] In this embodiment, after determining the historical recommendation object samples, a historical interaction graph corresponding to the historical recommendation object samples can also be obtained. This historical interaction graph can be a knowledge graph, recording each historical recommendation user sample and each historical recommendation item sample. Historical recommendation user samples and historical recommendation item samples with interactive relationships can be connected by a line. For example, historical recommendation user samples can be users who have used at least one of multiple medical software programs developed by a technology company, and historical recommendation item samples can be the aforementioned multiple medical software programs. Therefore, the historical interaction graph can show the usage of medical software for each user and which users have used each medical software program.
[0044] Step 203: Based on the historical recommended object samples and the historical interaction graph, determine the first model loss value of the initial recommendation model and the second model loss value of the initial completion model;
[0045] In this embodiment, an initial recommendation model and an initial completion model can be constructed. After determining the historical recommendation object samples and the historical interaction graph, the first model loss value of the initial recommendation model and the second model loss value of the initial completion model can be determined based on the historical recommendation object samples and the historical interaction graph.
[0046] Step 204: Determine the total model loss value based on the first model loss value and the second model loss value, and train the initial recommendation model and the initial completion model based on the total model loss value to obtain the target recommendation model and the target completion model. The target recommendation model is used for historical recommendation objects, and the target completion model is used for cold start recommendation objects.
[0047] In this embodiment, after obtaining the first model loss value and the second model loss value, they can be added together to obtain the total model loss value. Next, the total model loss value can be compared with a preset loss threshold. When the total model loss value is greater than the preset loss threshold, the model parameters of the initial recommendation model and the initial completion model can be adjusted until the total model loss value is less than or equal to the preset loss threshold, thus obtaining the target recommendation model and the target completion model.
[0048] It's important to note that the input to the initial recommendation model can be the initial user vector and initial user bias corresponding to historical recommended user samples, and the initial item vector and initial item bias corresponding to historical recommended item samples. The initial user vector, initial user bias, initial item vector, and initial item bias are all randomly initialized. When the target recommendation model is obtained, the corresponding output can be the target user vector and target user bias, as well as the target item vector and target item bias. This data can be stored in a database (the target vector for the object to be matched can be either the target user vector or the target item vector). The obtained target user vector and target item vector can be used for subsequent recommendations to historical recommended objects, such as recommending historical items to historical users or recommending historical users to historical items. For example, if we recommend historical medical software to historical user 1, since the information about historical user 1 and historical medical software has already been used when training the initial recommendation model, the database can store the target user vector corresponding to historical user 1, and the target item vectors corresponding to each historical medical software. Next, the target user vector corresponding to historical user 1 and the target item vectors corresponding to each historical medical software can be obtained from the database. The inner product of the target user vector corresponding to historical user 1 and the target item vector corresponding to each historical medical software can be calculated to obtain the score between historical user 1 and each historical medical software. Finally, the recommendation of historical medical software can be realized based on the score.
[0049] The target recommendation model consists of two parts: a first mapping module and a second mapping module. The first mapping module outputs a first mapping vector / second mapping vector, and the second mapping module outputs a second mapping vector / first mapping vector. Subsequently, when recommendations are needed for cold-start applications, the target matching object can be determined directly based on the first and second mapping vectors output by the target recommendation model.
[0050] Step 205: Determine the cold start recommendation object and obtain the first attribute vector of the cold start recommendation object;
[0051] Step 206: Obtain the second attribute vector corresponding to each of the multiple objects to be matched;
[0052] Step 207: Based on the initial vector of the cold start recommendation object and the first attribute vector, determine the first mapping vector of the cold start recommendation object, wherein the initial vector is a zero vector;
[0053] Step 208: Based on the target vector of each of the objects to be matched and the second attribute vector, determine the second mapping vector of each of the objects to be matched, wherein the target vector is obtained based on the interaction history of the objects to be matched;
[0054] Step 209: Based on the first mapping vector and the second mapping vector, determine the matching degree between the cold start recommendation object and each of the objects to be matched, determine the target matching object of the cold start recommendation object based on the matching degree, and recommend the target matching object to the cold start recommendation object.
[0055] This application's embodiment is based on a cold-start recommendation method using a complete graph neural network. It jointly trains the initial recommendation model and the initial completion model, combining historical users and historical items, new users and new items, as well as data such as knowledge graphs, user profiles, and item profiles. This combines hot recommendation and cold start, making recommendations for new users and new items more accurate.
[0056] Optionally, in this embodiment of the application, step 203, "determining the first model loss value of the initial recommendation model based on the historical recommendation object samples and the historical interaction graph," includes: determining a target interaction matrix based on the historical recommendation object samples and the historical interaction graph, wherein the target interaction matrix is used to indicate the interaction relationship between any historical recommendation user sample and any historical recommendation item sample; determining a user similarity matrix and an item similarity matrix based on the target interaction matrix; determining a first preset number of user random walk sequences and a second preset number of item random walk sequences based on the user similarity matrix and the item similarity matrix; and determining the first model loss value of the initial recommendation model based on the user random walk sequences and the item random walk sequences.
[0057] In this embodiment, after determining the historical recommendation object samples and the historical interaction graph, the target interaction matrix can be further determined. For example, if the historical interaction graph includes N historical recommended user samples and M historical recommended item samples, then the target interaction matrix can be an N-row, M-column matrix. The elements in the matrix can be used to indicate the interaction relationship between any historical recommended user sample and any historical recommended item sample; specifically, an interaction relationship is recorded as 1, and no interaction relationship is recorded as 0. Assuming the target interaction matrix is Y, then Y∈{0,1} N×M After obtaining the target interaction matrix, the user similarity matrix and the item similarity matrix can be further determined based on the target interaction matrix. Among them, the user similarity matrix S... U =Y·Y T ∈R N×N Item similarity matrix S I =Y T ·Y∈R M×M Then, based on the user similarity matrix, a first preset number of user random walk sequences can be determined. Specifically, the nth user random walk sequence of length K is defined. Given the k-th node Then the next node Using a random walk strategy, randomly select from... By selecting from the neighbors, a sequence of all K values can be obtained. The random walk strategy can be formulated as follows:
[0058]
[0059] in, The probabilities of the next random walk are represented by α1, α2, and α3, which can be predetermined. Using the above method, a second predetermined number of random walk sequences can also be determined based on the item similarity matrix.
[0060] Finally, the first model loss value of the initial recommendation model can be determined based on the user random walk sequence and the item random walk sequence.
[0061] In this embodiment of the application, optionally, the step of "determining the first model loss value of the initial recommendation model based on the user random walk sequence and the item random walk sequence" includes: initializing the user vector and user bias corresponding to each target user in the user random walk sequence, and the item vector and item bias corresponding to each target item in the item random walk sequence; determining a first sub-loss based on the user vector and user bias corresponding to each user random walk sequence, and determining a second sub-loss based on the item vector and item bias corresponding to each item random walk sequence; and determining the first sub-loss and the first sub-loss based on the user vector and user bias corresponding to each user random walk sequence. The second sub-loss determines the first model loss value of the initial recommendation model; correspondingly, when the total model loss value is greater than a preset loss threshold, the method further includes: adjusting the model parameters of the initial recommendation model, and inputting the user vector and the user bias into the initial recommendation model after adjusting the model parameters to obtain updated user vectors and user biases, and inputting the item vector and the item bias into the initial recommendation model after adjusting the model parameters to obtain updated item vectors and item biases; and updating the first model loss value based on the updated user vectors and user biases, and the updated item vectors and item biases.
[0062] In this embodiment, after obtaining the user random walk sequence and the item random walk sequence, the user random walk sequence can include multiple target users, and the item random walk sequence can include multiple target items. Each target user can be represented by a user vector. First, the user vector can be initialized, representing each target user with the application-initialized user vector, and the user bias can be initialized. Each target item can be represented by an item vector. First, the item vector can be initialized, representing each target item with the application-initialized item vector, and the item bias can be initialized. The initialization process can be a random generation process. In the first preset number of user random walk sequences, the initialized user vector and initialized user bias contained in each user random walk sequence are input into the initial recommendation model, which can output the first user vector and the first user bias. Then, according to the first user vector, the first user bias, and the first sub-loss calculation formula, the first sub-loss corresponding to each user random walk sequence can be calculated. Specifically, the co-occurrence relationship can be defined as follows: in For user bias, For user vectors, and The user vector and user bias of the target user appear twice in the formula. The actual co-occurrence relationship is... The loss of the first child is:
[0063]
[0064] Similarly, the second sub-loss of each item's random walk sequence can be calculated using the above process. Finally, the first sub-loss of the first preset number of user random walk sequences and the second sub-loss of the second preset number of item random walk sequences are added together to obtain the first model loss value of the initial recommendation model.
[0065] After determining the first model loss value, the total model loss value can be calculated based on it. If the total model loss value exceeds the preset loss threshold after this round of calculation, it indicates that the initial recommendation model has not yet met the standard. The model parameters of the initial recommendation model can then be adjusted. After adjusting the model parameters, the first user vector and first user bias can be input back into the adjusted initial recommendation model, resulting in updated user vectors and user biases. Similarly, the first item vector and first item bias can be input back into the adjusted initial recommendation model, again resulting in updated item vectors and item biases. Next, a new first sub-loss can be calculated using the updated user vectors and user biases, and a new second sub-loss can be calculated using the updated item vectors and item biases. Based on the new first and second sub-losses, the previously calculated first model loss value is updated.
[0066] Optionally, in this embodiment, step 203, "determining the second model loss value of the initial completion model based on the historical recommendation object samples and the historical interaction graph," includes: setting a random occlusion ratio; randomly occluding the user vector corresponding to the target user and the item vector corresponding to the target item based on the random occlusion ratio to obtain the randomly occluded user vector and item vector; obtaining the third attribute vector of the target user; inputting the third attribute vector of any target user and the randomly occluded user vector into the first mapping module of the initial completion model to obtain the third mapping vector; and obtaining the fourth attribute vector of the target item; inputting the fourth attribute vector of any target item and the randomly occluded item vector into the second mapping module of the initial completion model to obtain the fourth mapping vector. The method further includes: calculating the correlation prediction score between any target user and any target item based on the third mapping vector of any target user and the fourth mapping vector of any target item; obtaining the second model loss value of the initial completion model based on the correlation prediction score and the actual score; correspondingly, when the total model loss value is greater than a preset loss threshold, the method further includes: adjusting the model parameters of the first mapping module and the second mapping module in the initial completion model; occluding the updated user vector and the updated item vector according to the random occlusion ratio to obtain the updated randomly occluded user vector and item vector; and updating the second model loss value based on the updated randomly occluded user vector and item vector and the initial completion model after adjusting the model parameters.
[0067] In this embodiment, to train the initial completion model, the first user vectors corresponding to the target users included in the first preset number of user random walk sequences can be randomly occluded to obtain occluded first user vectors, and the second item vectors corresponding to the target items included in the second preset number of item random walk sequences can be randomly occluded to obtain occluded second item vectors. Here, when performing random occlusion, a random occlusion ratio can be used, which can be preset. For example, if each user vector in the first preset number of user random walk sequences or each item vector in the second preset number of item random walk sequences is x, then for a given random occlusion ratio τ, the probability p∈{0,1} can be obtained through Bernoulli(τ). Then, the randomly occluded user vector or the randomly occluded item vector can be expressed as D,τ)=p·0+(1-p)·, where 0 represents a zero vector with the same dimension as x.
[0068] Next, the third attribute vector of each target user in the above user random walk sequence can be obtained. This third attribute vector, along with the first user vector after random occlusion, can be input into the first mapping module of the initial completion model, which will output the corresponding third mapping vector. Similarly, the fourth attribute vector of each target item in the above item random walk sequence can be obtained. This fourth attribute vector, along with the first item vector after random occlusion, can be input into the second mapping module of the initial completion model, which will output the corresponding fourth mapping vector.
[0069] The first mapping module can be represented as follows:
[0070] x uc =f U (D(x u ,τ)||c u );
[0071] The second mapping module can be represented as follows:
[0072] x ui =f I (D(x i ,τ)||c i );
[0073] In the formula f U and f I Let c be the first mapping function and the second mapping function. u c represents the user's attribute vector. i The attribute vector of the project, x uc x represents the mapping vector between the corresponding output and the user. ui This represents the mapping vector between the output and the corresponding item. When the probability p is set to 1, it is a cold start recommendation problem, in which case the user vector or item vector is a zero vector.
[0074] Since the existence of an interaction between each target user and each target item is known, i.e., the true score is known, the predicted relevance score between each target user and each target item can be calculated based on the third and fourth mapping vectors. Then, based on the true score and the predicted relevance score, the second model loss value of the initial completion model is calculated. Specifically, when there is an interaction between the target user and the target item, the true score can be 1; when there is no interaction between the target user and the target item, the true score can be 0.
[0075] The formula for calculating the relevance prediction score is as follows:
[0076]
[0077] The second model sub-loss is L p =(y ui -φ(u,i;c u ,c i )) 2 ;
[0078] Among them, y ui To obtain the true score, the second model loss value is obtained by summing the second model sub-losses between all target users and each target item.
[0079] After determining the second model loss value, the total model loss value can be calculated based on it. If the total model loss value is found to be greater than the preset loss threshold after this round of calculation, it indicates that the initial completion model has not yet met the standard. The model parameters of the initial completion model can be adjusted. After adjusting the model parameters, the user vector and item vector output by the adjusted initial recommendation model (i.e., the updated user vector and updated item vector) can be occluded according to the random occlusion ratio mentioned above to obtain the updated randomly occluded user vector and item vector. Next, the updated randomly occluded user vector and item vector, along with the initial completion model after adjusting the model parameters, can be used to update the third and fourth mapping vectors. Then, the relevance prediction score is recalculated according to the above process. Finally, the second model loss value is updated using the recalculated relevance prediction score and the true score. It should be noted that during the training of the initial completion model, the third and fourth attribute vectors and the true score remain unchanged.
[0080] In this embodiment of the application, optionally, when the cold start recommendation object is a cold start recommendation user, step 207 includes: inputting the initial vector of the cold start recommendation object and the first attribute vector into the first mapping module in the target completion model to obtain the first mapping vector of the cold start recommendation object; correspondingly, step 208 includes: inputting the target vector of each object to be matched and the second attribute vector into the second mapping module in the target completion model to obtain the second mapping vector of each object to be matched.
[0081] In this embodiment, after the initial completion model training is completed, a target completion model can be obtained. The target completion model may include a first mapping module and a second mapping module after training. Specifically, when the cold start recommendation object is a cold start recommendation user, the initial vector and first attribute vector of the cold start recommendation object can be input into the first mapping module of the target completion model, and the first mapping vector can be output accordingly. Similarly, the target vector and second attribute vector of each object to be matched can be input into the second mapping module of the target completion model, and the second mapping vector can be output accordingly. When the cold start recommendation object is a cold start recommendation item, the initial vector and first attribute vector of the cold start recommendation object can be input into the second mapping module of the target completion model, and the first mapping vector can be output accordingly. Similarly, the target vector and second attribute vector of each object to be matched can be input into the first mapping module of the target completion model, and the second mapping vector can be output accordingly.
[0082] Optionally, in this embodiment, step 205, "obtaining the first attribute vector of the cold start recommendation object," includes: obtaining multiple first attribute tags of the cold start recommendation object; determining a first tag vector corresponding to each first attribute tag based on a preset vector dictionary; and concatenating the first tag vectors to obtain the first attribute vector. Step 206 includes: obtaining multiple second attribute tags of each object to be matched; determining a second tag vector corresponding to each second attribute tag based on the preset vector dictionary; and concatenating the second tag vectors to obtain the second attribute vector corresponding to each object to be matched.
[0083] In this embodiment, to obtain the first attribute vector, multiple first attribute tags corresponding to the cold-start recommendation object can be acquired. Here, the first attribute tags can be medical field tags, medical examination item tags, historical visit time tags, etc. These first attribute tags can reflect the historical preferences of the cold-start recommendation object to a certain extent. After obtaining the first attribute tags of the cold-start recommendation object, a preset vector dictionary can be used to find the tag vector corresponding to each first attribute tag. When the first attribute tag is a word, the one-dimensional vector corresponding to each character in each word can be determined from the preset vector dictionary, and then the one-dimensional vectors corresponding to each character in the word can be concatenated to obtain the word vector corresponding to the word, i.e., the first tag vector; when the first attribute tag is a single character, the one-dimensional vector corresponding to this character can be determined from the preset vector dictionary, i.e., the first tag vector. After determining the first tag vector corresponding to each first attribute tag, the first tag vectors corresponding to each first attribute tag can be concatenated and combined to finally obtain the first attribute vector. For example, a cold-start recommendation object might have 10 first attribute labels, including heart, coronary heart disease, angina pectoris, atorvastatin, rosuvastatin, heart rate, electrocardiogram, echocardiography, cardiac CT, and myocardium. The first label vectors corresponding to these 10 first attribute labels can be represented by letters A through J. Therefore, the first attribute vector could be [A, B, C, D, E, F, G, H, I, J]. It's important to note that the preset vector dictionary can pre-define the vector corresponding to each character; this vector can be pre-designed and directly usable. The vector corresponding to each character can be obtained through a BERT model. Similarly, the second attribute vector corresponding to each object to be matched can be determined.
[0084] Furthermore, as Figure 1 In terms of specific implementation of the method, this application provides a cold start recommendation device, such as... Figure 3 As shown, the device includes:
[0085] The first acquisition module is used to determine the cold start recommendation object and acquire the first attribute vector of the cold start recommendation object;
[0086] The second acquisition module is used to acquire the second attribute vector corresponding to each of the multiple objects to be matched;
[0087] The first determining module is used to determine the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector, wherein the initial vector is a zero vector;
[0088] The second determining module is used to determine a second mapping vector for each of the objects to be matched based on the target vector of each object to be matched and the second attribute vector, wherein the target vector is obtained based on the interaction history of the object to be matched.
[0089] The recommendation module is used to determine the matching degree between the cold start recommendation object and each of the objects to be matched based on the first mapping vector and the second mapping vector, determine the target matching object of the cold start recommendation object based on the matching degree, and recommend the target matching object to the cold start recommendation object.
[0090] Optionally, the device further includes:
[0091] The sample acquisition module is used to acquire historical recommendation object samples before determining the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector. The historical recommendation object samples include historical recommendation user samples and historical recommendation item samples.
[0092] The interaction graph acquisition module is used to acquire the historical interaction graph corresponding to the historical recommended object sample, wherein the historical interaction graph includes the interaction relationship between the historical recommended user sample and the historical recommended item sample.
[0093] The model loss value determination module is used to determine the first model loss value of the initial recommendation model and the second model loss value of the initial completion model based on the historical recommendation object samples and the historical interaction graph.
[0094] The model training module is used to determine the total model loss value based on the first model loss value and the second model loss value, and to train the initial recommendation model and the initial completion model based on the total model loss value to obtain the target recommendation model and the target completion model. The target recommendation model is used for historical recommendation objects, and the target completion model is used for cold start recommendation objects.
[0095] Optionally, the model loss value determination module is used for:
[0096] Based on the historical recommended object samples and the historical interaction graph, a target interaction matrix is determined, which indicates the interaction relationship between any historical recommended user sample and any historical recommended item sample. Based on the target interaction matrix, a user similarity matrix and an item similarity matrix are determined. Based on the user similarity matrix and the item similarity matrix, a first preset number of user random walk sequences and a second preset number of item random walk sequences are determined. Based on the user random walk sequences and the item random walk sequences, a first model loss value for the initial recommendation model is determined.
[0097] Optionally, the model loss value determination module is further configured to:
[0098] Initialize the user vector and user bias corresponding to each target user in the user random walk sequence, and the item vector and item bias corresponding to each target item in the item random walk sequence; determine the first sub-loss based on the user vector and user bias corresponding to each user random walk sequence, and determine the second sub-loss based on the item vector and item bias corresponding to each item random walk sequence; determine the first model loss value of the initial recommendation model based on the first sub-loss and the second sub-loss.
[0099] Accordingly, the device further includes:
[0100] The parameter adjustment module is used to adjust the model parameters of the initial recommendation model when the total loss value of the model is greater than a preset loss threshold, and input the user vector and the user bias into the initial recommendation model after adjusting the model parameters to obtain the updated user vector and user bias, and input the item vector and the item bias into the initial recommendation model after adjusting the model parameters to obtain the updated item vector and item bias.
[0101] The loss value update module is used to update the first model loss value based on the updated user vector and user bias, as well as the updated item vector and item bias.
[0102] Optionally, the model loss value determination module is further configured to:
[0103] A random occlusion ratio is set, and the user vector corresponding to the target user and the item vector corresponding to the target item are randomly occluded based on the random occlusion ratio to obtain the randomly occluded user vector and item vector; the third attribute vector of the target user is obtained, and the third attribute vector of any target user and the randomly occluded user vector are input into the first mapping module of the initial completion model to obtain the third mapping vector; the fourth attribute vector of the target item is obtained, and the fourth attribute vector of any target item and the randomly occluded item vector are input into the second mapping module of the initial completion model to obtain the fourth mapping vector; based on the third mapping vector of any target user and the fourth mapping vector of any target item, the correlation prediction score between any target user and any target item is calculated, and based on the correlation prediction score and the actual score, the second model loss value of the initial completion model is obtained;
[0104] Accordingly, the device further includes:
[0105] The parameter adjustment module is further configured to adjust the model parameters of the first mapping module and the second mapping module in the initial completion model when the total loss value of the model is greater than a preset loss threshold, and to perform occlusion according to the random occlusion ratio based on the updated user vector and the updated item vector to obtain the updated randomly occluded user vector and item vector, and update the second model loss value based on the updated randomly occluded user vector and item vector and the initial completion model after adjusting the model parameters.
[0106] Optionally, when the cold start recommendation target is a cold start recommendation user, the first determining module is further configured to:
[0107] The initial vector of the cold start recommendation object and the first attribute vector are input into the first mapping module in the target completion model to obtain the first mapping vector of the cold start recommendation object;
[0108] Accordingly, the second determining module is further configured to:
[0109] The target vector and the second attribute vector of each object to be matched are input into the second mapping module in the target completion model to obtain the second mapping vector of each object to be matched.
[0110] Optionally, the first acquisition module is further configured to:
[0111] Obtain multiple first attribute tags of the cold start recommendation object, determine the first tag vector corresponding to each first attribute tag based on a preset vector dictionary, and concatenate the first tag vectors to obtain the first attribute vector;
[0112] Accordingly, the second acquisition module is further configured to:
[0113] Obtain multiple second attribute tags for each of the objects to be matched. Based on the preset vector dictionary, determine the second tag vector corresponding to each second attribute tag. Concatenate the second tag vectors to obtain the second attribute vector corresponding to each of the objects to be matched.
[0114] It should be noted that other corresponding descriptions of the functional units involved in the cold start recommendation device provided in this application embodiment can be found in the following references. Figures 1 to 2 The corresponding descriptions in the method will not be repeated here.
[0115] Based on the above, Figures 1 to 2 Accordingly, this application also provides a storage medium storing a computer program, which, when executed by a processor, implements the above-described method. Figures 1 to 2 The recommended method for cold starts is shown below.
[0116] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This software product can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.
[0117] Based on the above, Figures 1 to 2 The method shown, and Figure 3 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a storage medium and a processor; the storage medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figures 1 to 2 The recommended method for cold starts is shown below.
[0118] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0119] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0120] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software within the physical device.
[0121] Through the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented in hardware. By using the first mapping vector of the cold-start recommendation object and the second mapping vector of the object to be matched, the matching degree between the cold-start recommendation object and each object to be matched is calculated. Then, the target matching object can be determined in descending order of matching degree, and the target matching object is recommended to the cold-start recommendation object. The first mapping vector contains the attribute information of the cold-start recommendation object, and the second mapping vector integrates the interaction information and attribute information of the object to be matched. Therefore, when recommending medical projects to new users with no interaction history, or when recommending users to new medical projects with no interaction history, multiple factors can be comprehensively and fully considered, which is beneficial to achieving accurate recommendations for cold-start recommendation objects.
[0122] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0123] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any variations conceived by those skilled in the art should fall within the protection scope of this application.
Claims
1. A cold start recommendation method, characterized in that, include: Determine the cold start recommendation object and obtain the first attribute vector of the cold start recommendation object; Obtain the second attribute vector corresponding to each of the multiple objects to be matched; Based on the initial vector of the cold start recommendation object and the first attribute vector, a first mapping vector of the cold start recommendation object is determined, wherein the initial vector is a zero vector; Based on the target vector of each object to be matched and the second attribute vector, a second mapping vector is determined for each object to be matched, wherein the target vector is obtained based on the interaction history of the object to be matched. Based on the first mapping vector and the second mapping vector, the matching degree between the cold start recommendation object and each of the objects to be matched is determined, the target matching object of the cold start recommendation object is determined based on the matching degree, and the target matching object is recommended to the cold start recommendation object; Before determining the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector, the method further includes: Obtain a historical recommendation object sample, which includes a historical recommendation user sample and a historical recommendation item sample; Obtain the historical interaction graph corresponding to the historical recommended object sample, the historical interaction graph including the interaction relationship between the historical recommended user sample and the historical recommended item sample; Based on the historical recommended object samples and the historical interaction graph, determine the first model loss value of the initial recommendation model and the second model loss value of the initial completion model; Based on the first model loss value and the second model loss value, the total model loss value is determined, and based on the total model loss value, the initial recommendation model and the initial completion model are trained to obtain the target recommendation model and the target completion model. The target recommendation model is used for historical recommendation objects, and the target completion model is used for cold start recommendation objects. When the cold start recommendation object is a cold start recommendation user, determining the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector includes: The initial vector of the cold start recommendation object and the first attribute vector are input into the first mapping module in the target completion model to obtain the first mapping vector of the cold start recommendation object; Accordingly, determining the second mapping vector for each of the objects to be matched based on the target vector of each object and the second attribute vector includes: The target vector and the second attribute vector of each object to be matched are input into the second mapping module in the target completion model to obtain the second mapping vector of each object to be matched.
2. The method according to claim 1, characterized in that, The step of determining the first model loss value of the initial recommendation model based on the historical recommended object samples and the historical interaction graph includes: Based on the historical recommended object samples and the historical interaction graph, a target interaction matrix is determined, which is used to indicate the interaction relationship between any historical recommended user sample and any historical recommended item sample. Based on the target interaction matrix, determine the user similarity matrix and the item similarity matrix; Based on the user similarity matrix and the item similarity matrix, a first preset number of user random walk sequences and a second preset number of item random walk sequences are determined respectively. Based on the user random walk sequence and the item random walk sequence, determine the first model loss value of the initial recommendation model.
3. The method according to claim 2, characterized in that, The step of determining the first model loss value of the initial recommendation model based on the user random walk sequence and the item random walk sequence includes: Initialize the user vector and user bias corresponding to each target user in the user random walk sequence, and the item vector and item bias corresponding to each target item in the item random walk sequence; Based on the user vector and user bias corresponding to each user's random walk sequence, a first sub-loss is determined, and based on the item vector and item bias corresponding to each item's random walk sequence, a second sub-loss is determined. Based on the first sub-loss and the second sub-loss, determine the first model loss value of the initial recommendation model; Accordingly, when the total loss value of the model exceeds a preset loss threshold, the method further includes: Adjust the model parameters of the initial recommendation model, and input the user vector and the user bias into the initial recommendation model after adjusting the model parameters to obtain the updated user vector and user bias; and input the item vector and the item bias into the initial recommendation model after adjusting the model parameters to obtain the updated item vector and item bias. The loss value of the first model is updated based on the updated user vector and user bias, as well as the updated item vector and item bias.
4. The method according to claim 3, characterized in that, The step of determining the second model loss value of the initial completion model based on the historical recommended object samples and the historical interaction graph includes: Set a random occlusion ratio, and randomly occlude the user vector corresponding to the target user and the item vector corresponding to the target item based on the random occlusion ratio to obtain the randomly occluded user vector and item vector; Obtain the third attribute vector of the target user, input the third attribute vector of any target user and the user vector after random occlusion into the first mapping module of the initial completion model to obtain the third mapping vector, and obtain the fourth attribute vector of the target item, input the fourth attribute vector of any target item and the item vector after random occlusion into the second mapping module of the initial completion model to obtain the fourth mapping vector; Based on the third mapping vector of any target user and the fourth mapping vector of any target item, calculate the correlation prediction score between the target user and the target item, and obtain the second model loss value of the initial completion model based on the correlation prediction score and the actual score. Accordingly, when the total loss value of the model exceeds a preset loss threshold, the method further includes: The model parameters of the first mapping module and the second mapping module in the initial completion model are adjusted, and occlusion is performed according to the random occlusion ratio based on the updated user vector and the updated item vector to obtain the updated randomly occluded user vector and item vector. Based on the updated randomly occluded user vector and item vector, and the initial completion model after adjusting the model parameters, the loss value of the second model is updated.
5. The method according to claim 1, characterized in that, The step of obtaining the first attribute vector of the cold start recommendation object includes: Obtain multiple first attribute tags of the cold start recommendation object, determine the first tag vector corresponding to each first attribute tag based on a preset vector dictionary, and concatenate the first tag vectors to obtain the first attribute vector; Accordingly, obtaining the second attribute vector corresponding to each of the multiple objects to be matched includes: Obtain multiple second attribute tags for each of the objects to be matched. Based on the preset vector dictionary, determine the second tag vector corresponding to each second attribute tag. Concatenate the second tag vectors to obtain the second attribute vector corresponding to each of the objects to be matched.
6. A cold start recommendation device, characterized in that, include: The first acquisition module is used to determine the cold start recommendation object and acquire the first attribute vector of the cold start recommendation object; The second acquisition module is used to acquire the second attribute vector corresponding to each of the multiple objects to be matched; The first determining module is used to determine the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector, wherein the initial vector is a zero vector; The second determining module is used to determine a second mapping vector for each of the objects to be matched based on the target vector of each object to be matched and the second attribute vector, wherein the target vector is obtained based on the interaction history of the object to be matched. The recommendation module is used to determine the matching degree between the cold start recommendation object and each of the objects to be matched based on the first mapping vector and the second mapping vector, determine the target matching object of the cold start recommendation object based on the matching degree, and recommend the target matching object to the cold start recommendation object; The device further includes: The sample acquisition module is used to acquire historical recommendation object samples before determining the first mapping vector of the cold start recommendation object based on the initial vector of the cold start recommendation object and the first attribute vector. The historical recommendation object samples include historical recommendation user samples and historical recommendation item samples. The interaction graph acquisition module is used to acquire the historical interaction graph corresponding to the historical recommended object sample, wherein the historical interaction graph includes the interaction relationship between the historical recommended user sample and the historical recommended item sample. The model loss value determination module is used to determine the first model loss value of the initial recommendation model and the second model loss value of the initial completion model based on the historical recommendation object samples and the historical interaction graph. The model training module is used to determine the total model loss value based on the first model loss value and the second model loss value, and to train the initial recommendation model and the initial completion model based on the total model loss value to obtain the target recommendation model and the target completion model. The target recommendation model is used for historical recommendation objects, and the target completion model is used for cold start recommendation objects. When the cold start recommendation target is a cold start recommendation user, the first determining module is further configured to: The initial vector of the cold start recommendation object and the first attribute vector are input into the first mapping module in the target completion model to obtain the first mapping vector of the cold start recommendation object; Accordingly, the second determining module is further configured to: The target vector and the second attribute vector of each object to be matched are input into the second mapping module in the target completion model to obtain the second mapping vector of each object to be matched.
7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.
8. A computer device, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.