Object recommendation method and device, electronic equipment and readable storage medium
By using the multi -encoder structure in the recommendation system, the user and object characteristics are coded, and the problem of low efficiency and accuracy of the existing recommendation model is solved, and the more efficient and personalized recommendation effect is achieved.
Patent Information
- Application Number
- CN202411310738.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-24
AI Technical Summary
The existing recommendation model is not efficient when processing user portrait content, and a single encoder is difficult to fully capture user interests and preferences, resulting in insufficient accuracy of recommendation results.
Using a multi-encoder structure, the user encoder and the object encoder are used to encode the user feature data and the feature data of the object to be recommended to obtain a more comprehensive and detailed user feature vector and object feature vector, and then determine the user feature vector and object Similarity between feature vectors to achieve more accurate identification of user preferences and interests.
It has improved the accuracy and degree of personalization of the recommendation system, can more accurately match users and objects, provide personalized recommendations that meet the needs of user needs, and improve the efficiency of user experience and recommendation systems.
Smart Images

Figure CN119357463A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of object recommendation, and in particular to an object recommendation method, device, electronic device and readable storage medium. Background Art
[0002] With the rapid development of Internet technology, users can easily obtain diversified content provided by various applications, such as news, commodities, etc. through terminal devices. In order to improve user experience, many applications use recommendation systems to recommend relevant objects to users based on user profile content. However, there are some problems with the current recommendation model: only a single encoder is used to process user profile content, resulting in low efficiency; at the same time, the recommendation accuracy based on a single encoding result is not satisfactory. Under the current technical background, the recommendation model with a single encoder is not efficient when processing user profile content. Due to the complexity and diversity of information, it is difficult for a single encoder to fully capture the interests and preferences of users, resulting in insufficient accuracy of recommendation results. Therefore, a more effective recommendation model is needed to improve the performance and user experience of the recommendation system. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure provide an object recommendation method, device, electronic device and computer-readable storage medium to solve the technical problem that the recommendation model in the prior art is inefficient in processing user portrait content. Due to the complexity and diversity of information, a single encoder is difficult to fully capture the interests and preferences of users, resulting in insufficient accuracy of recommendation results.
[0004] According to a first aspect of an embodiment of the present disclosure, a method for object recommendation is provided, comprising: obtaining user feature data, inputting the user feature data into a recommendation model, wherein the recommendation model comprises a user encoder and an object encoder; encoding the user feature data by the user encoder to obtain a plurality of user feature vectors; encoding the feature data of each object to be recommended in a set of objects to be recommended by the object encoder to obtain a feature vector of each object to be recommended; determining a similarity set between each user feature vector and a feature vector of each object to be recommended; determining a target similarity between each user feature vector and a feature vector of each object to be recommended based on the similarity set between each user feature vector and a feature vector of each object to be recommended; and determining at least one target object from the set of objects to be recommended based on the target similarity between each user feature vector and a feature vector of each object to be recommended.
[0005] According to a second aspect of an embodiment of the present disclosure, there is provided an object recommendation device, comprising: an acquisition module, for acquiring user feature data, and inputting the user feature data into a recommendation model, wherein the recommendation model comprises a user encoder and an object encoder; a first encoding module, for encoding the user feature data through the user encoder to obtain a plurality of user feature vectors; a second encoding module, for encoding the feature data of each to-be-recommended object in a to-be-recommended object set through the object encoder to obtain a feature vector of each to-be-recommended object; a first determination module, for determining a similarity set between each user feature vector and a feature vector of each to-be-recommended object; a second determination module, for determining a target similarity between each user feature vector and a feature vector of each to-be-recommended object based on the similarity set between each user feature vector and a feature vector of each to-be-recommended object; and a third determination module, for determining at least one target object from the to-be-recommended object set based on the target similarity between each user feature vector and a feature vector of each to-be-recommended object.
[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0007] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0008] Compared with the prior art, the disclosed embodiment has the following beneficial effects: the disclosed embodiment can adopt a multi-encoder structure, and encode the user feature data and the feature data of the object to be recommended by the user encoder and the object encoder to obtain a more comprehensive and detailed user feature vector and object feature vector. By determining the similarity between the user feature vector and the object to be recommended, the user's preferences and interests can be determined more accurately, thereby improving the accuracy of the recommendation system. By determining the target object based on the similarity between the user feature vector and the feature vector of the object to be recommended, a more personalized recommendation result can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0010] Figure 1A schematic diagram showing an exemplary system architecture to which the technical solution of an embodiment of the present invention can be applied;
[0011] Figure 2 is a flowchart of an object recommendation method provided by an embodiment of the present disclosure;
[0012] Figure 3 is a flowchart of another object recommendation method provided by an embodiment of the present disclosure;
[0013] Figure 4 This is a flowchart of another object recommendation method provided by the embodiment of the present disclosure.
[0014] Figure 5 is a block diagram of an object recommendation device provided by an embodiment of the present disclosure;
[0015] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0016] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0017] It should be noted that the user information (including but not limited to terminal device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0018] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of an embodiment of the present invention can be applied.
[0019] like Figure 1 As shown, the system architecture 100 may include one or more of a first terminal device 101, a second terminal device 102, and a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0020] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
[0021] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send data, etc. The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
[0022] The server 105 may be a server that provides various services. For example, the server 105 may obtain user feature data from the first terminal device 103 (or the second terminal device 102 or the third terminal device 103), and input the user feature data into the recommendation model, which includes a user encoder and an object encoder; the user feature data is encoded by the user encoder to obtain a plurality of user feature vectors; the feature data of each object to be recommended is encoded by the object encoder to obtain a feature vector of each object to be recommended; a similarity set between each user feature vector and a feature vector of each object to be recommended is determined; based on the similarity set between each user feature vector and a feature vector of each object to be recommended, a target similarity between each user feature vector and a feature vector of each object to be recommended is determined; based on the target similarity between each user feature vector and a feature vector of each object to be recommended, at least one target object is determined from the set of objects to be recommended. The present invention can significantly improve the accuracy of the recommendation system.
[0023] In some embodiments, the object recommendation method provided in the embodiments of the present invention is generally executed by the server 105, and accordingly, the object recommendation device is generally set in the server 105. In other embodiments, some terminal devices may have functions similar to those of the server to execute the method. Therefore, the object recommendation method provided in the embodiments of the present invention is not limited to being executed on the server side.
[0024] The object recommendation method and device according to the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0025] Figure 2 is a flowchart of an object recommendation method provided by an embodiment of the present disclosure. The method provided by an embodiment of the present disclosure can be executed by any electronic device with computer processing capabilities, for example, the electronic device can be Figure 1 The server is shown.
[0026] like Figure 2As shown, the object recommendation method includes steps S210 to S260.
[0027] In step S210, user feature data is obtained and input into a recommendation model, wherein the recommendation model includes a user encoder and an object encoder.
[0028] Step S220: encoding the user feature data by a user encoder to obtain a plurality of user feature vectors.
[0029] In step S230, the feature data of each object to be recommended in the set of objects to be recommended is encoded by an object encoder to obtain a feature vector of each object to be recommended.
[0030] In step S240, a similarity set between each user feature vector and each feature vector of an object to be recommended is determined.
[0031] In step S250, a target similarity between each user feature vector and each feature vector of each object to be recommended is determined based on a similarity set between each user feature vector and each feature vector of each object to be recommended.
[0032] In step S260, at least one target object is determined from the set of objects to be recommended based on the target similarity between each user feature vector and the feature vector of each object to be recommended.
[0033] The method can adopt a multi-encoder structure, and encode the user feature data and the feature data of the object to be recommended by the user encoder and the object encoder to obtain a more comprehensive and detailed user feature vector and object feature vector. By determining the similarity between the user feature vector and the object to be recommended, the user's preferences and interests can be determined more accurately, and the accuracy of the recommendation system can be improved. By determining the target object according to the similarity between the user feature vector and the feature vector of the object to be recommended, a more personalized recommendation result can be achieved. According to the user's characteristics and preferences, the recommendation system can more accurately match the user and the object, and provide personalized recommendations that meet the user's needs. Since the present disclosure can more accurately understand the user's interests and preferences, the recommended objects are more in line with the user's expectations, thereby improving the user experience. The user can find content or goods that meet their needs more quickly and accurately, and enhance the user's satisfaction and loyalty to the application. By introducing a multi-encoder structure and a method for determining the target object by a similarity set, the present disclosure can improve the efficiency of the recommendation system. The multi-encoder model can more effectively capture user characteristics and object characteristics, improve the processing speed and efficiency of the recommendation algorithm, and enable the recommendation system to provide personalized recommendations to users more quickly. The target object can be determined based on the similarity between the user feature vector and the object feature vector, thereby achieving more real-time and diversified recommendation results. The recommendation system can quickly adjust the recommendation results based on the user's current preferences and behaviors, provide more diverse and novel recommendation content, and increase the user's exploration and use of the application.
[0034] In some embodiments of the present disclosure, when a user logs into an application, a series of data related to the user's identity and behavior is generated. These data include the user's account information (such as user name, email address), login time, login device information (such as device model, operating system version), login location, etc. This information can be used to identify the user's identity and establish a user portrait. The behavioral data generated when the user interacts with the display object (such as news articles, goods, videos, etc.) in the application is also important user feature data. These behavioral data include the user's clicks, browsing, collections, purchases, ratings, comments and other behaviors, reflecting the user's interests and preferences for different objects. The user's search records and historical behavior data in the application are also important user feature data. Information such as search keywords, search result clicks, and search frequency can reveal the user's preferences and needs, helping the recommendation system to better understand the user's interests. If the application has a social function, the interaction data between users is also important user feature data. This includes social interaction behaviors such as following, liking, sharing, and commenting between users, which can reflect the user's social circle, influence, and social preferences. The user's usage habits on the terminal device, device performance data, etc. can also be used as part of the user feature data. For example, information such as the user's device type, operating system version, and network environment can affect the user's experience and behavior patterns when using an application. User feature data is a variety of data generated when a user uses an application, covering multiple aspects such as the user's identity information, behavior data, and preference information. This data is crucial for the recommendation system, and can help the system better understand user needs and provide personalized and accurate recommendation services.
[0035] In some embodiments of the present disclosure, each object to be recommended has its own attribute characteristics, which describe the basic information, content characteristics and attributes of the object. For example, for a news article, its attribute characteristics may include title, author, release time, content summary, label, category, etc.; for a commodity, the attribute characteristics may include commodity name, brand, price, description, picture, etc. For some objects with content (such as articles, videos, music, etc.), their content characteristics are also important data. Content characteristics may include media data such as text content, pictures, videos, audio, etc., which describe the specific content and form of the object. The interactive characteristics of the object reflect the interaction between the user and the object. For example, the interactive data such as the sales volume, number of likes, number of comments, etc. of the commodity can reflect the popularity of the object and user feedback. The objects to be recommended are usually marked with different labels or assigned to different categories so that the recommendation system can classify and recommend according to the interests and preferences of the user. Label and category information can help the system better understand the content and attributes of the object. According to the specific application scenario and object type, various other feature data may also be included, such as geographic location information, time information, sentiment analysis results, user evaluation, etc. The feature data of each object in the set of recommended objects covers multiple aspects such as the object's attributes, content, interaction, and tags. These data are important bases for the recommendation system to understand and describe the object. By analyzing and utilizing these feature data, the recommendation system can more accurately match the user's needs and interests, provide users with personalized and accurate recommendation results, and improve the user experience.
[0036] In some embodiments of the present disclosure, the recommendation model may include a user encoder and an object encoder. The user encoder is a module for converting user feature data into a vector representation. This vector representation captures the user's features, preferences, and behaviors, and can be used to measure the degree of match between the user and the object to be recommended. The user encoder may be one or more pre-trained encoding models, such as CLIP (Contrastive Language-Image Pretraining) or XLM-Encoder (Cross-lingual Language Model Encoder). These encoding models are pre-trained with large-scale data and can learn rich semantic representations. The user encoder receives user feature data as input and outputs a vector representation of user features after being processed by the encoding model. This vector representation contains the user's semantic information and can be used for matching calculations with the object vector in the object encoder. The object encoder is a module for converting the feature data of the object to be recommended into a vector representation. This vector representation captures the attributes, content, and features of the object and can be used to measure the degree of match between the object and the user. Similar to the user encoder, the object encoder may also be one or more pre-trained encoding models, such as CLIP, XLM-Encoder, etc. These encoding models can map the multi-dimensional features of the object into a continuous vector space. The object encoder receives the feature data of the object to be recommended as input, and outputs a vector representation of the object features after being processed by the encoding model. This vector representation contains the semantic information of the object and can be used to match the user vector in the user encoder. Through the processing of the user encoder and the object encoder, the recommendation system can convert user features and object features into vector representations, and then calculate the similarity or matching degree between them. This vector representation-based method can better capture the semantic relationship between users and objects, and improve the accuracy and personalization of the recommendation system.
[0037] In some embodiments of the present disclosure, user feature data is encoded by a user encoder to obtain multiple user feature vectors. For example, the user's feature information is first extracted from various data sources of the user. This information may include the user's basic information (such as gender, age, region, etc.), historical behavior data (such as clicks, purchase records, etc.), social relationship data (such as friend relationships, follow-up lists, etc.), interest tags, etc. The extracted feature data is preprocessed, such as data cleaning, missing value processing, feature encoding, etc., to ensure data quality and availability. The processed feature data is mapped to a multidimensional vector space using a user encoder, and each feature is converted into a real-valued vector. These feature vectors can capture the relationship and importance between different features of the user. Finally, after processing by the user encoder, each user will be represented as a vector set containing multiple feature vectors, each feature vector representing a feature information of the user, such as age, gender, interests, etc. Such a representation can describe the user more comprehensively and provide the recommendation system with richer user information, thereby improving the personalization and accuracy of the recommendation.
[0038] In some embodiments of the present disclosure, the feature data of each object to be recommended in the set of recommended objects is encoded by an object encoder to obtain a feature vector of each object to be recommended. For example, feature information of each object is first extracted from the set of recommended objects. These features may include attribute features of the object (such as price, category, label, etc.), content features (such as text content, picture features, etc.), interaction features (such as user behavior data, user evaluation data, etc.), etc. The extracted feature data is preprocessed, including data cleaning, feature encoding, normalization, etc., to ensure the quality and consistency of the data. The object encoder is used to map the processed feature data into a multidimensional vector space, and the features of each object are converted into a real value vector. These feature vectors can capture the relationship and importance between different features of the object. After being processed by the object encoder, each object to be recommended will be represented as a feature vector, which contains various feature information of the object. Such a representation can describe the object more comprehensively and provide the recommendation system with richer object information, thereby helping the system to better understand and compare different objects to achieve more accurate personalized recommendations.
[0039] In some embodiments of the present disclosure, determining a similarity set between each user feature vector and a feature vector of each object to be recommended includes: calculating the similarity between each user feature vector and a feature vector of each object to be recommended, and obtaining multiple similarities between each user feature vector and a feature vector of each object to be recommended; and determining multiple similarities between each user feature vector and a feature vector of each object to be recommended as a similarity set between each user feature vector and a feature vector of each object to be recommended. For example, first, for each user feature vector and a feature vector of each object to be recommended, various similarity measurement methods (such as cosine similarity, Euclidean distance, Jaccard similarity, etc.) can be used to calculate the similarity between them. These similarity measurement methods can help measure the degree of correlation between users and objects. Through calculation, multiple similarity values between each user feature vector and a feature vector of each object to be recommended are obtained. These similarity values reflect the degree of similarity or correlation between users and objects in different feature dimensions. Multiple similarity values between each user feature vector and a feature vector of each object to be recommended are combined together to form a similarity set. This set contains the similarity information between users and objects in various feature dimensions, which can be used to measure the user's preference or matching degree for each object. By integrating the information in the similarity set, the final similarity between each user's feature vector and the feature vector of each object to be recommended can be determined. These final similarity values can help the recommendation system determine which objects are most suitable for recommendation to which users, thereby improving the personalization and accuracy of the recommendations.
[0040] In some embodiments of the present disclosure, according to the similarity set between each user feature vector and the feature vector of each object to be recommended, determining the target similarity between each user feature vector and the feature vector of each object to be recommended includes: comparing each similarity in each similarity set, obtaining the maximum similarity in each similarity set; determining the maximum similarity in each similarity set as the target similarity between each user feature vector and the feature vector of each object to be recommended. For example, first, according to the similarity set between each user feature vector and the feature vector of each object to be recommended, each similarity value in each similarity set is compared. For each user, it is necessary to find the object to be recommended that is most similar to their feature vector. After comparing the similarity values in each similarity set, the maximum similarity in each similarity set is determined. This maximum similarity represents the highest similarity between each user feature vector and the feature vector of the object to be recommended, that is, the best matching degree between the user and the object. The maximum similarity in each similarity set is determined as the target similarity between each user feature vector and the feature vector of each object to be recommended. This target similarity can help the recommendation system determine the most suitable recommended object for each user, thereby providing more personalized and accurate recommendation results. By determining the target similarity between each user's feature vector and the feature vector of each recommended object, the recommendation system can better understand the user's preferences and needs, thereby providing recommended content that is more in line with the user's interests, improving the user experience and the accuracy of the recommendation system.
[0041] In some embodiments of the present disclosure, according to the target similarity between each user feature vector and the feature vector of each object to be recommended, determining at least one target object from the set of objects to be recommended includes: comparing the target similarity between each user feature vector and the feature vector of each object to be recommended with a preset threshold; when the target similarity is greater than or equal to the preset threshold, extracting the corresponding object to be recommended from the set of objects to be recommended as the target object. For example, for each user, the target similarity between its feature vector and the feature vector of the object to be recommended is compared with a preset similarity threshold. This similarity threshold can be set according to the specific situation and is used to determine when it is considered that the user and an object are sufficiently matched and can be recommended to the user. When the target similarity between a user feature vector and a feature vector of an object to be recommended is greater than or equal to the preset threshold, the object to be recommended is determined as the target object of the user. In this case, the corresponding object to be recommended can be extracted from the set of objects to be recommended and recommended to the user as the target object. Through this process, the recommendation system can determine which objects are most suitable for recommendation to which users based on the similarity between the user's feature vector and the feature vector of the object to be recommended, combined with the preset similarity threshold. This personalized recommendation method can improve user satisfaction and enhance the effect of the recommendation system and user experience.
[0042] Figure 3 FIG. 1 is a flow chart of another object recommendation method provided by an embodiment of the present disclosure. Figure 3 As shown, before determining the contrast loss, the method further includes step S310 and step S320.
[0043] In step S310, the terminal device identification in the user characteristic data is obtained.
[0044] In step S320, the terminal device identifier is authenticated, and when the authentication result indicates a pass, at least one target object is sent to the terminal device.
[0045] The method can obtain the terminal device identification in the user feature data, perform authentication processing on the terminal device identification, and when the authentication result indicates that it is passed, send at least one of the target objects to the terminal device, so that when the authentication is passed, at least one of the target objects is sent to the user's terminal device. In this way, it can be ensured that the device used by the user is legal, and the recommended target object is sent to the user's device to provide personalized recommendation content and enhance user experience and satisfaction.
[0046] In some embodiments of the present disclosure, a terminal device identifier is obtained from user feature data. For example, user feature data generally includes user personal information, behavior data, preferences, etc. Among these data, the terminal device identifier refers to a unique identifier of a specific device used by a user, such as a device ID, IMEI number, MAC address, etc. The terminal device identifier can be a hardware identifier (such as IMEI, MAC address), a software identifier (such as an identifier generated by an application), or other types of identifiers. Each type of identifier has its specific purpose and acquisition method. The obtained terminal device identifier is usually stored in the database of the system for subsequent authentication processing and personalized recommendations. Since the user may replace or add a new terminal device, the user's terminal device identifier needs to be updated regularly to ensure that the recommended content can be accurately sent to the device currently used by the user. By obtaining the terminal device identifier in the user feature data, the personalized recommendation system can more accurately identify the user's device and provide the user with customized recommended content, thereby improving the user experience and recommendation effect.
[0047] In some embodiments of the present disclosure, the terminal device identifier is authenticated, and when the authentication result indicates that it is passed, at least one of the target objects is sent to the terminal device. For example, after receiving the user terminal device identifier, these identifiers are authenticated. The purpose of the authentication process is to verify the validity and legitimacy of the device identifier to ensure that the user is using an authorized device. The authentication process may include operations such as encrypting, decrypting, and verifying the signature of the device identifier. The authentication process may adopt various authentication mechanisms, such as key-based authentication, digital certificate authentication, and two-factor authentication. These mechanisms can ensure that only authorized devices can pass the authentication, thereby improving the security of the system. After the authentication process is completed, an authentication result is generated. If the authentication result indicates that the device identifier is authenticated, that is, the authentication is successful, the subsequent operation will continue; if the authentication fails, the target object may be refused to be sent or other necessary security measures may be taken. In the case of passing the authentication, at least one target object is sent to the user's terminal device to ensure the accuracy and timeliness of the pushed content. This target object can be a recommended content determined according to a personalized recommendation algorithm, such as an article, video, product, etc. When sending the target object to the terminal device, it is necessary to ensure the security of the transmission process. Technical means such as encrypted transmission and security protocols can be used to prevent information leakage or tampering. By authenticating the terminal device identification, the personalized recommendation system can ensure the security and reliability of the pushed content, improve the user experience and increase the credibility of the system.
[0048] Figure 4 FIG. 1 is a flow chart of another object recommendation method provided by an embodiment of the present disclosure. Figure 4 As shown, before obtaining the user characteristic data, the method further includes steps S410 to S460.
[0049] In step S410, training data is obtained, wherein the training data includes feature data of multiple historical users and feature data of multiple historical objects, and the feature data of each historical user includes the feature data of the historical user and a recommendation object label corresponding to the feature data of the historical user;
[0050] In step S420, the historical user feature data is encoded by a user encoder to obtain a plurality of historical user feature vectors;
[0051] In step S430, the feature data of each historical object is encoded by an object encoder to obtain a feature vector of each historical object;
[0052] In step S440, a similarity set between each historical user feature vector and each historical object feature vector is determined;
[0053] In step S450, the target loss is determined according to the similarity set between each user feature vector and the feature vector of each to-be-recommended object and the recommended object label corresponding to each historical feature data;
[0054] In step S460, the parameters in the recommendation model are updated according to the target loss.
[0055] The method can obtain training data, wherein the training data includes feature data of multiple historical users and feature data of multiple historical objects, and the feature data of each historical user includes historical user feature data and recommendation object labels corresponding to the historical feature data; the historical user feature data is encoded by the user encoder to obtain multiple historical user feature vectors; the feature data of each historical object is encoded by the object encoder to obtain a feature vector of each historical object; a similarity set between each historical user feature vector and a feature vector of each historical object is determined; a target loss is determined based on a similarity set between each user feature vector and a feature vector of each object to be recommended and a recommendation object label corresponding to each historical feature data; and parameters in the recommendation model are updated based on the target loss. Through the above steps, the personalized recommendation system can use historical data to train the model so that it can better understand the relationship between users and objects and provide more accurate recommendation results.
[0056] In some embodiments of the present disclosure, training data is obtained, wherein the training data includes feature data of multiple historical users and feature data of multiple historical objects, and the feature data of each historical user includes the feature data of the historical user and the recommended object label corresponding to the feature data of the historical user. For example, training data is a key component for training a personalized recommendation model. These data include feature data of multiple historical users and feature data of multiple historical objects. The feature data of historical users describes information such as attributes and behaviors of users, and the feature data of historical objects describes the attribute information of recommended objects (such as commodities, articles, videos, etc.). The feature data of each historical user not only includes features such as personal information and behavior data of the user, but also includes label information of the historical recommended objects corresponding to the user. These label information can be user ratings, click behaviors, purchase behaviors, etc. of objects, which are used to indicate user preferences or behaviors for objects. The feature data of historical objects describes the attribute characteristics of each historical object, such as the category, label, description, etc. of commodities. These feature data help the recommendation system better understand the characteristics of the object, thereby providing more accurate recommendations. Training data usually exists in the form of a table or a data set, each row represents a sample, and includes user feature data, object feature data, and corresponding recommended object labels. This data is used to train the model so that it can learn the association between users and objects, thereby making personalized recommendations. By using a training set containing historical user feature data and historical object feature data, the personalized recommendation system can learn the user's interests and preferences through machine learning algorithms, thereby providing recommendation results that better meet user needs.
[0057] In some embodiments of the present disclosure, the historical user feature data is encoded by a user encoder to obtain multiple historical user feature vectors; the feature data of each historical object is encoded by an object encoder to obtain a feature vector of each historical object; and a similarity set between each historical user feature vector and the feature vector of each historical object is determined. For example, the user encoder is a model component for converting the feature data of a historical user into a user feature vector. This encoder can be a neural network model, which receives the feature data of the user as input, and finally outputs a vector representing the user feature after a series of neural network layer processing. This vector is usually a low-dimensional numerical representation that captures the characteristic information of the user. Similar to the user encoder, the object encoder is also a model component for converting the feature data of a historical object into an object feature vector. The object encoder receives the feature data of each historical object as input, and after a similar processing process, outputs a vector representing the object feature. After obtaining the historical user feature vector and the historical object feature vector, the similarity between the historical user feature vector and the historical object feature vector can be calculated by different similarity measurement methods (such as cosine similarity, Euclidean distance, etc.). These similarity values constitute a similarity set for measuring the degree of association between users and objects. Through the above steps, the personalized recommendation system can convert the feature data of historical users and historical objects into vector representations and calculate the similarity between them, thereby providing important information for the subsequent recommendation process. These feature vectors and similarity values will help the model better understand the relationship between users and objects, thereby providing more accurate personalized recommendations.
[0058] In some embodiments of the present disclosure, according to the similarity set between each user feature vector and the feature vector of each object to be recommended and the recommended object label corresponding to each historical feature data, determining the target loss includes: determining the maximum similarity in each similarity set; summing the maximum similarity in each similarity set, and calculating the target loss according to the summation result and the recommended object label corresponding to each historical feature data. For example, for the similarity set between each user feature vector and the feature vector of the object to be recommended, first determine the maximum similarity value therein. This maximum similarity value represents the object most similar to the user feature vector among all the objects to be recommended. Then sum the maximum similarity value of each user. For all users, add up their maximum similarity values with the object to be recommended to form a summary similarity value. Finally, calculate the target loss according to the summation result and the recommended object label corresponding to each historical feature data. The calculation of this target loss can use different loss functions, such as mean square error (MeanSquared Error) or cross entropy loss (Cross Entropy Loss). By comparing the difference between the similarity value predicted by the model and the actual label, the loss in the model training process can be determined, and then the model parameters can be optimized to improve the accuracy of recommendations. Through the above steps, the personalized recommendation system can use the similarity information between the user feature vector and the object feature vector as well as the historical label data to calculate the target loss, thereby guiding the model training process, enabling it to better predict the user's preferences for the recommended object, and improve the accuracy and personalization of the recommendation.
[0059] Figure 5 It is a block diagram of an object recommendation device provided by an embodiment of the present disclosure.
[0060] like Figure 5 As shown, the object recommendation device 500 includes an acquisition module 510 , a first encoding module 520 , a second encoding module 530 , a first determination module 540 , a second determination module 550 and a third determination module 560 .
[0061] Specifically, the acquisition module 510 is used to acquire user feature data and input the user feature data into the recommendation model, which includes a user encoder and an object encoder.
[0062] The first encoding module 520 is used to encode the user feature data through a user encoder to obtain multiple user feature vectors.
[0063] The second encoding module 530 is used to encode the feature data of each object to be recommended in the set of objects to be recommended by using an object encoder to obtain a feature vector of each object to be recommended.
[0064] The first determination module 540 is used to determine a similarity set between each user feature vector and each feature vector of the object to be recommended.
[0065] The second determination module 550 is used to determine the target similarity between each user feature vector and the feature vector of each to-be-recommended object according to the similarity set between each user feature vector and the feature vector of each to-be-recommended object.
[0066] The third determination module 560 is used to determine at least one target object from the set of objects to be recommended according to the target similarity between each user feature vector and the feature vector of each object to be recommended.
[0067] The object recommendation device 500 can adopt a multi-encoder structure, and encode the user feature data and the feature data of the object to be recommended by the user encoder and the object encoder to obtain a more comprehensive and detailed user feature vector and object feature vector. By determining the similarity between the user feature vector and the object to be recommended, the user's preferences and interests can be determined more accurately, and the accuracy of the recommendation system can be improved. By determining the target object according to the similarity between the user feature vector and the feature vector of the object to be recommended, a more personalized recommendation result can be achieved. According to the user's characteristics and preferences, the recommendation system can more accurately match the user and the object, and provide personalized recommendations that meet the user's needs. Since the present disclosure can more accurately understand the user's interests and preferences, the recommended objects are more in line with the user's expectations, thereby improving the user experience. Users can find content or products that meet their needs more quickly and accurately, and enhance the user's satisfaction and loyalty to the application. By introducing a multi-encoder structure and a method for determining the target object by a similarity set, the present disclosure can improve the efficiency of the recommendation system. The multi-encoder model can more effectively capture user characteristics and object characteristics, improve the processing speed and efficiency of the recommendation algorithm, and enable the recommendation system to provide personalized recommendations to users more quickly. The target object can be determined based on the similarity between the user feature vector and the object feature vector, thereby achieving more real-time and diversified recommendation results. The recommendation system can quickly adjust the recommendation results based on the user's current preferences and behaviors, provide more diverse and novel recommendation content, and increase the user's exploration and use of the application.
[0068] In some embodiments of the present disclosure, the first determination module 540 is configured to: calculate the similarity between each user feature vector and the feature vector of each object to be recommended, and obtain multiple similarities between each user feature vector and the feature vector of each object to be recommended; and determine the multiple similarities between each user feature vector and the feature vector of each object to be recommended as a similarity set between each user feature vector and the feature vector of each object to be recommended.
[0069] In some embodiments of the present disclosure, the second determination module 550 is configured to: compare the similarities in each similarity set to obtain the maximum similarity in each similarity set; determine the maximum similarity in each similarity set as the target similarity between each user feature vector and the feature vector of each object to be recommended.
[0070] In some embodiments of the present disclosure, the third determination module 560 is configured to: compare the target similarity between each user feature vector and the feature vector of each object to be recommended with a preset threshold; when the target similarity is greater than or equal to the preset threshold, extract the corresponding object to be recommended from the set of objects to be recommended as the target object.
[0071] In some embodiments of the present disclosure, the object recommendation device 500 is further used to: obtain a terminal device identifier in user feature data; perform authentication processing on the terminal device identifier, and when the authentication result indicates that it passes, send at least one target object to the terminal device.
[0072] In some embodiments of the present disclosure, before obtaining user feature data, the object recommendation device 500 is also used to: obtain training data, the training data including feature data of multiple historical users and feature data of multiple historical objects, the feature data of each historical user including historical user feature data and recommendation object labels corresponding to the historical feature data; encode the historical user feature data through a user encoder to obtain multiple historical user feature vectors; encode the feature data of each historical object through an object encoder to obtain a feature vector of each historical object; determine a similarity set between each historical user feature vector and a feature vector of each historical object; determine a target loss based on a similarity set between each user feature vector and a feature vector of each object to be recommended and a recommendation object label corresponding to each historical feature data; and update parameters in the recommendation model based on the target loss.
[0073] In some embodiments of the present disclosure, determining the target loss based on the similarity sets between each user feature vector and the feature vector of each object to be recommended and the recommendation object label corresponding to each historical feature data includes: determining the maximum similarity in each similarity set; summing the maximum similarities in each similarity set, and calculating the target loss based on the summation result and the recommendation object label corresponding to each historical feature data.
[0074] Figure 6 Schematic diagram of an electronic device 6 provided in an embodiment of the present disclosure. Figure 6As shown, the electronic device 6 of this embodiment includes: a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 601 executes the computer program 603, the functions of the modules in the above-mentioned device embodiments are implemented.
[0075] The electronic device 6 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 6 may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The electronic device 6 is merely an example and does not limit the electronic device 6 . The electronic device 6 may include more or less components than those shown in the figure, or different components.
[0076] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0077] The memory 602 may be an internal storage unit of the electronic device 6, for example, a hard disk or memory of the electronic device 6. The memory 602 may also be an external storage device of the electronic device 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 6. The memory 602 may also include both an internal storage unit of the electronic device 6 and an external storage device. The memory 602 is used to store computer programs and other programs and data required by the electronic device.
[0078] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0079] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0080] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. An object recommendation method, characterized in that: include: Acquire user feature data, and input the user feature data into a recommendation model, wherein the recommendation model includes a user encoder and an object encoder; The user characteristic data is encoded by the user encoder to obtain a plurality of user characteristic vectors; The object encoder encodes the feature data of each object to be recommended in the set of objects to be recommended to obtain a feature vector of each object to be recommended; Determine a similarity set between each user feature vector and each feature vector of the object to be recommended; Determine the target similarity between each user feature vector and each feature vector of each object to be recommended based on the similarity set between each user feature vector and each feature vector of each object to be recommended; At least one target object is determined from the set of objects to be recommended according to the target similarity between each user feature vector and the feature vector of each object to be recommended.
2. The method according to claim 1, characterized in that Determining the similarity set between each user feature vector and each feature vector of the object to be recommended includes: Calculate the similarity between each user feature vector and the feature vector of each object to be recommended, and obtain multiple similarities between each user feature vector and the feature vector of each object to be recommended; A plurality of similarities between each user feature vector and each feature vector of the object to be recommended is determined as a similarity set between each user feature vector and each feature vector of the object to be recommended.
3. The method according to claim 1, characterized in that Determining the target similarity between each user feature vector and each feature vector of each object to be recommended according to the similarity set between each user feature vector and each feature vector of each object to be recommended includes: Comparing the similarities in the similarity sets to obtain the maximum similarity in the similarity sets; The maximum similarity in each of the similarity sets is determined as the target similarity between each user feature vector and each feature vector of the object to be recommended.
4. The method according to claim 1, characterized in that: Determining at least one target object from the set of objects to be recommended according to the target similarity between each user feature vector and each feature vector of the object to be recommended comprises: Compare the target similarity between each user feature vector and each feature vector of the recommended object with a preset threshold; When the target similarity is greater than or equal to the preset threshold, the corresponding object to be recommended is extracted from the set of objects to be recommended as the target object.
5. The method according to claim 1, characterized in that The method further comprises: Obtaining a terminal device identifier from the user characteristic data; The terminal device identifier is authenticated, and when the authentication result indicates a pass, the at least one target object is sent to the terminal device.
6. The method according to claim 1, characterized in that Before obtaining the user characteristic data, the method further includes: Acquire training data, wherein the training data includes feature data of multiple historical users and feature data of multiple historical objects, wherein the feature data of each historical user includes historical user feature data and a recommended object label corresponding to the historical feature data; The historical user feature data is encoded by the user encoder to obtain a plurality of historical user feature vectors; The feature data of each historical object is encoded by the object encoder to obtain a feature vector of each historical object; Determine a similarity set between each historical user feature vector and each historical object feature vector; Determine the target loss according to a similarity set between each user feature vector and each feature vector of the object to be recommended and a recommended object label corresponding to each of the historical feature data; According to the target loss, parameters in the recommendation model are updated.
7. The method according to claim 6, characterized in that The determining of the target loss according to the similarity set between each user feature vector and each feature vector of the to-be-recommended object and the recommended object label corresponding to each of the historical feature data comprises: Determine the maximum similarity among each similarity set; The maximum similarities in each similarity set are summed up, and the target loss is calculated according to the summed result and the recommended object label corresponding to each of the historical feature data.
8. An object recommendation device, characterized in that: include: An acquisition module, used for acquiring user feature data, and inputting the user feature data into a recommendation model, wherein the recommendation model includes a user encoder and an object encoder; A first encoding module, configured to encode the user feature data through the user encoder to obtain a plurality of user feature vectors; A second encoding module, configured to encode feature data of each object to be recommended in the set of objects to be recommended by using the object encoder to obtain a feature vector of each object to be recommended; A first determination module is used to determine a similarity set between each user feature vector and each feature vector of an object to be recommended; A second determination module is used to determine a target similarity between each user feature vector and each feature vector of each object to be recommended based on a similarity set between each user feature vector and each feature vector of each object to be recommended; The third determination module is used to determine at least one target object from the set of objects to be recommended according to the target similarity between each user feature vector and the feature vector of each object to be recommended.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
E-commerce business data processing method and system based on artificial intelligence
CN120163623A