Article recommendation method, electronic equipment, storage medium and program product
By using the sequence recommendation model to screen and update the item recommendation sequence in the recommendation system, the problem of lack of diversity in item recommendations in the prior art is solved, and higher user browsing interests and recommendation diversity are achieved.
Patent Information
- Application Number
- CN202411495382.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-02-07
AI Technical Summary
In the existing recommendation system, the lack of diversity of items pushed to users, which affects users' interest in browsing items.
By obtaining the item feature vectors of the first item that has been displayed to the user and the plurality of second items waiting to be displayed, the target items are filtered out from the plurality of second items using the sequence recommendation model, and the item recommendation sequence is updated based on the target items, so as to Improve the diversity of recommendations.
While ensuring the correlation between the target item and the first item, fully consider the degree of influence of the previously recommended first item on the subsequent recommended target item, avoid repeated recommendations, and improve the diversity of the target item recommended to the user, thereby Increase users' browsing interest.
Smart Images

Figure CN119398871A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of large model technology and data recommendation, and more specifically, to an item recommendation method, electronic device, storage medium and program product. Background Art
[0002] Recommendation systems are an important part of modern information retrieval and personalized services. By analyzing user behaviors and preferences, recommendation systems can provide users with personalized recommendations such as goods, news, music, and movies. However, since user behaviors and preferences are usually actively selected by users or obtained by analyzing user browsing history, when recommending items to users based on user behaviors and preferences, the recommended items are usually too simple, affecting the user's interest in browsing the recommended content. Summary of the invention
[0003] The embodiments of the present application provide an item recommendation method, an electronic device, a storage medium, and a program product to at least solve the technical problem in the related art that the items pushed to users lack diversity, which affects the user's interest in browsing items.
[0004] According to one aspect of an embodiment of the present application, a method for recommending an item is provided, comprising: in response to detecting an item recommendation instruction, obtaining an item feature vector of a recommended item, wherein the recommended item comprises: a first item that has been displayed to a user, and a plurality of second items waiting to be displayed to the user; inputting a combination of feature vectors corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to a first item in the item feature vector, and second feature vectors corresponding to different second items; updating an item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; and outputting the target recommendation sequence.
[0005] According to one aspect of an embodiment of the present application, there is also provided an item recommendation method, comprising: in response to an input instruction acting on an operation interface, displaying an item recommendation sequence on the operation interface, wherein the item recommendation sequence is used to display a first item to a user, and the first item is used to characterize an item that has been displayed to the user; in response to an item recommendation instruction acting on the operation interface, displaying a target recommendation sequence on the operation interface, wherein the target recommendation sequence is obtained by updating the item recommendation sequence by a target item, and the target item is used to characterize an item selected from a plurality of second items by inputting a combination of feature vectors corresponding to a plurality of second items into a sequence recommendation model, and using the sequence recommendation model to select items, the plurality of second items are used to characterize items waiting to be displayed to the user, and the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item, and second feature vectors corresponding to different second items.
[0006] According to one aspect of an embodiment of the present application, a method for recommending an item is also provided, comprising: obtaining an item feature vector of a recommended item by calling a first interface, wherein the recommended item includes: a first item that has been displayed to a user, and a plurality of second items waiting to be displayed to the user; inputting a feature vector combination corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item in the item feature vector, and second feature vectors corresponding to different second items; updating an item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; and outputting the target recommendation sequence by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter includes the target recommendation sequence.
[0007] According to another aspect of an embodiment of the present application, there is also provided an item recommendation device, comprising: a first acquisition module, for acquiring an item feature vector of a recommended item in response to detecting an item recommendation instruction, wherein the recommended item comprises: a first item that has been displayed to a user, and a plurality of second items waiting to be displayed to the user; a first screening module, for inputting a feature vector combination corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to screen out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item in the item feature vector, and second feature vectors corresponding to different second items; a first update module, for updating the item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; and a first output module, for outputting the target recommendation sequence.
[0008] According to one aspect of an embodiment of the present application, there is also provided an item recommendation device, comprising: a first display module, for responding to an input instruction acting on an operation interface, and displaying an item recommendation sequence on the operation interface, wherein the item recommendation sequence is used to display a first item to a user, and the first item is used to characterize an item that has been displayed to the user; a second display module, for responding to an item recommendation instruction acting on the operation interface, and displaying a target recommendation sequence on the operation interface, wherein the target recommendation sequence is obtained by updating the item recommendation sequence by a target item, and the target item is used to characterize an item selected from a plurality of second items by inputting a combination of feature vectors corresponding to a plurality of second items into a sequence recommendation model, and using the sequence recommendation model to select items, the plurality of second items are used to characterize items waiting to be displayed to the user, and the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item, and second feature vectors corresponding to different second items.
[0009] According to one aspect of an embodiment of the present application, there is also provided an item recommendation device, including: a second acquisition module, used to acquire an item feature vector of a recommended item by calling a first interface, wherein the recommended item includes: a first item that has been displayed to a user, and a plurality of second items waiting to be displayed to the user; a second screening module, used to input a feature vector combination corresponding to the plurality of second items into a sequence recommendation model, and use the sequence recommendation model to screen out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item in the item feature vector, and second feature vectors corresponding to different second items; a second update module, used to update an item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; a second output module, used to output the target recommendation sequence by calling a second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter includes the target recommendation sequence.
[0010] According to another aspect of the embodiments of the present application, a computer terminal is further provided, including: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present application is executed when the program is running.
[0011] According to another aspect of an embodiment of the present application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in each embodiment of the present application.
[0012] According to another aspect of the embodiments of the present application, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0013] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present application is implemented.
[0014] According to another aspect of the embodiments of the present application, a computer program is also provided, and when the computer program is executed by a processor, the methods in the various embodiments of the present application are implemented.
[0015] In an embodiment of the present application, in response to detecting an item recommendation instruction, an item feature vector of a recommended item is obtained; a combination of feature vectors corresponding to a plurality of second items is input into a sequence recommendation model, and a target item is screened out from the plurality of second items using the sequence recommendation model; the item recommendation sequence is updated based on the target item to obtain a target recommendation sequence; and the target recommendation sequence is output in a manner that, based on a first item that has been recommended to a user, a plurality of feature vector combinations are constructed for different second items, and the plurality of feature vector combinations are processed using a sequence recommendation model to screen out the target item from the plurality of second items. This can ensure the correlation between the selected target item and the first item while fully considering the degree of influence of the previously recommended first item on the subsequently recommended target item, thereby avoiding duplication due to excessive similarity between the target item and the first item, so as to increase the diversity of target items recommended to the user, thereby solving the technical problem in the related art that items pushed to the user lack diversity, thereby affecting the user's interest in browsing items.
[0016] It is easy to notice that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present application, and do not constitute a limitation of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 is a schematic diagram of an application scenario of an item recommendation method according to an embodiment of the present application;
[0019] Figure 2 is a flow chart of an item recommendation method according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an item recommendation process according to an embodiment of the present application;
[0021] Figure 4 is a flow chart of another item recommendation method according to an embodiment of the present application;
[0022] Figure 5 is a flow chart of another item recommendation method according to an embodiment of the present application;
[0023] Figure 6 is a structural block diagram of an item recommendation device according to an embodiment of the present application;
[0024] Figure 7 is a structural block diagram of another item recommendation device according to an embodiment of the present application;
[0025] Figure 8 is a structural block diagram of another item recommendation device according to an embodiment of the present application;
[0026] Fig. 9 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] The technical solution provided in this application is mainly implemented by large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions or even more than 10 trillion model parameters. The large model can also be called a cornerstone model / foundation model (Foundation Model). The large model is pre-trained through large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as large-scale language model (Large Language Model, LLM), multi-modal pre-training model (multi-modal pre-training model), etc.
[0030] It should be noted that when the large model is actually applied, the pre-trained model can be fine-tuned through a small number of samples, so that the large model can be applied to different tasks. For example, the large model can be widely used in natural language processing (NLP), computer vision, speech processing and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, etc. It can also be widely used in natural language processing tasks such as text-based sentiment classification, text summary generation, machine translation, etc. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc. In the embodiment of the present application, the data processing through the sequence recommendation model in the scenario where the recommendation system recommends more items to users is taken as an example for explanation,
[0031] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0032] CTR: Click-Through Rate, click-through rate, can refer to the probability that a user clicks on a product after seeing it.
[0033] CVR: Conversion Rate, purchase rate, can refer to the probability that a user will purchase a product after browsing it.
[0034] Ranking model: A neural network model that ranks candidate products in a search system and generally outputs predicted CTR and CVR values.
[0035] Features: data input into the ranking model, which may include various statistics and attributes of products, users, queries, characterization vectors, etc.
[0036] Embedding: Embedding refers to the process of converting input data (such as item features, user context, etc.) into a low-dimensional continuous vector representation. This representation can capture the inherent structure and relationships in the data, allowing the model to better understand and process the data.
[0037] LayerNorm: Layer Normalization is a normalization technique used in deep learning models. It can reduce internal covariate shift by normalizing the activation values of each layer of the neural network, thereby improving the training speed and generalization ability of the model.
[0038] Softmax function: A function for probability distribution that converts a set of real numbers into a probability distribution through an exponential function. In machine learning and deep learning, the Softmax function is often used for multi-classification problems, such as text classification in natural language processing or image classification in computer vision.
[0039] NDCG: Normalized Discounted Cumulative Gain, a metric used to evaluate the performance of a recommendation system. It can measure the performance of a recommendation system by considering the relevance of each item in the recommendation list and giving different weights according to its position.
[0040] Deep Networks: Deep learning networks based on multi-layer perceptrons are popular today.
[0041] Learning to rank: Learning to rank, or LTR for short, is a subfield in machine learning that focuses on learning a model that can rank instances based on importance, relevance, or any other meaningful metric.
[0042] Position Embedding: When processing sequence data, position embedding is used to encode the position information of each element in the sequence. In the recommendation system, it is usually used to consider the impact of the position of the item in the page layout on the recommendation results.
[0043] Self-Correcting Process: In statistics, the self-correcting process describes the probability of an event occurring in time and / or space. In recommendation systems, it is often used to describe how user responses to recommended items affect future recommendations.
[0044] Reinforcement Learning: Reinforcement Learning is a machine learning method that can learn execution strategies by allowing the agent to interact with the environment and adjust its behavior based on feedback. In recommendation systems, it is often used to optimize recommendation strategies.
[0045] Collective Recommendation: Collective Recommendation is a recommendation system technology that aims to optimize the overall attractiveness of recommendation results by considering the interaction dynamics between users and items, as well as the mutual influence between items.
[0046] According to an embodiment of the present application, a method for recommending an item is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0047] Considering the huge number of model parameters of the large model and the limited computing resources of the mobile terminal, the above-mentioned item recommendation method provided in the embodiment of the present application can be applied to the following: Figure 1 The application scenarios shown are not limited to these. Figure 1 is a schematic diagram of an application scenario of an item recommendation method according to an embodiment of the present application. Figure 1 In the application scenario shown, the large model is deployed in the server 10, and the server 10 can be connected to one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client device 20 here may include but is not limited to: a smart phone, a tablet computer, a laptop computer, a PDA, a personal computer, a smart home device, a vehicle-mounted device, etc. The client device 20 can interact with the user through a graphical user interface to implement the call of the large model, thereby implementing the method provided in the embodiment of the present application.
[0048] In the embodiment of the present application, the system composed of the client device and the server can perform the following steps: the client device performs steps such as displaying the item recommendation sequence to the user, sending the item recommendation instruction, and displaying the target recommendation sequence to the user. The server performs steps such as obtaining the item feature vector of the recommended item, inputting the feature vector combination corresponding to the multiple second items into the sequence recommendation model, using the sequence recommendation model to filter out the target item from the multiple second items, updating the item recommendation sequence based on the target item, and obtaining the target recommendation sequence. It should be noted that the embodiment of the present application can be performed in the client device when the operating resources of the client device can meet the deployment and operation conditions of the large model.
[0049] Under the above operating environment, this application provides Figure 2 The recommended method for the items shown. Figure 2 FIG. 1 is a flowchart of an item recommendation method according to an embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0050] Step S202, in response to detecting an item recommendation instruction, obtaining an item feature vector of the recommended item.
[0051] The recommended items include: a first item that has been displayed to the user, and a plurality of second items waiting to be displayed to the user.
[0052] The above-mentioned item recommendation instruction may be an instruction triggered according to user needs and used to recommend a series of items to the user. The above-mentioned recommended items may refer to items that can be displayed to the user, and may include but are not limited to: commodities, audio, video, articles and other items. The above-mentioned item feature vector may refer to a feature vector that can reflect the characteristics of the recommended item and the relevance between the user and the recommended item, wherein the relevance between the user and the recommended item can be reflected in the user's demand for the recommended item and the degree of satisfaction, for example, it can be determined based on the relevance and similarity between the user's historical browsing records and the recommended item.
[0053] In an optional scheme of the present embodiment, considering that when the recommendation system detects an item recommendation instruction, in order to ensure that the items recommended to the user can meet the user's needs and preferences, the recommendation system usually selects the target items from multiple items that are not currently displayed to the user based on the user's historical browsing history to display to the user. However, since the user's historical browsing history generally only records the information of items that the user has clicked on, and does not record the items that have been displayed to the user but the user has not viewed in detail, the multiple items directly selected based on the user's historical browsing history usually have a high degree of similarity and duplication, resulting in the items actually recommended to the user may be too single, and the user may also lose interest in browsing items due to the lack of diversity in the items viewed.
[0054] Therefore, in order to ensure the diversity of items recommended to users, the recommendation system can further consider the association between items currently displayed to users and items waiting to be displayed to users when selecting target items to be displayed to users based on the user's historical browsing history, so as to avoid the selected target items being too similar to the items currently displayed to users. Based on this, when an item recommendation instruction is detected, the recommendation system can first obtain the recommended items, that is, the item features of the first item that has been displayed to users and multiple second items waiting to be displayed to users, and at the same time combine the recommended items with the features of the user's historical browsing history to avoid the situation where the selected target items cannot meet the user's needs and preferences. Correspondingly, the recommendation system can obtain an item feature vector that can reflect the features of the recommended items and the correlation between the user and the recommended items.
[0055] Step S204: input the feature vector combinations corresponding to the plurality of second items into a sequence recommendation model, and use the sequence recommendation model to filter out a target item from the plurality of second items.
[0056] The plurality of feature vector combinations are composed of a first feature vector corresponding to a first item in the item feature vectors, and a second feature vector corresponding to a different second item.
[0057] The above sequence recommendation model can be a deep network, which can be used to learn and rank different recommended items to ensure the rationality and diversity of the selected target items.
[0058] In an optional solution of the present embodiment, in order to improve the efficiency of screening target items, the recommendation system may use a pre-trained sequence recommendation model to process the obtained item recommendation vectors to quickly screen the above-mentioned target items from multiple second items. In order to ensure the accuracy of the selected target items, before inputting the item feature vector into the sequence recommendation model, the recommendation system may construct different feature vector combinations for the second feature vectors of different second items based on the first feature vector of the first item in the item feature vector, and then input the feature vector combinations into the sequence recommendation model to use the sequence recommendation model to determine the degree of association between different second items and the first item, as well as the needs and preferences of the user, so as to select suitable target items, so as to avoid the situation where the second feature vectors affect each other when processing multiple second feature vectors simultaneously using the sequence recommendation model, and ignore the association between the first feature vector and the second feature vector, resulting in the screened target items still lacking diversity.
[0059] Step S206: Update the item recommendation sequence based on the target item to obtain a target recommendation sequence.
[0060] The item recommendation sequence is used to display the first item to the user.
[0061] The above-mentioned item recommendation sequence may refer to the item sequence currently displayed to the user, and the above-mentioned first item may be included in the item recommendation sequence.
[0062] In an optional scheme of the present embodiment, in order to intuitively display the filtered target items and avoid the target items appearing abruptly, after filtering the target items from the second items, the recommendation system can use the target items to update the item recommendation sequence to which the first item belongs, for example, directly adding the target items after the first items according to the order of appearance of the first items, or inserting the filtered target items according to the display position of the item recommendation sequence in the operation interface to obtain a new target recommendation sequence. At this time, the filtered target items can be regarded as the first items that have been displayed to the user. Correspondingly, when a new recommendation instruction is detected, the recommendation system can apply the item feature vector of the target item to the subsequent process of selecting a new target item.
[0063] Step S208: output the target recommendation sequence.
[0064] In an optional solution of this embodiment, after the item recommendation sequence is updated, the recommendation system may output a target recommendation sequence to display the target item to the user.
[0065] In an embodiment of the present application, in response to detecting an item recommendation instruction, an item feature vector of a recommended item is obtained; a combination of feature vectors corresponding to a plurality of second items is input into a sequence recommendation model, and a target item is screened out from the plurality of second items using the sequence recommendation model; the item recommendation sequence is updated based on the target item to obtain a target recommendation sequence; and the target recommendation sequence is output in a manner that, based on a first item that has been recommended to a user, a plurality of feature vector combinations are constructed for different second items, and the plurality of feature vector combinations are processed using a sequence recommendation model to screen out the target item from the plurality of second items. This can ensure the correlation between the selected target item and the first item while fully considering the degree of influence of the previously recommended first item on the subsequently recommended target item, thereby avoiding duplication due to excessive similarity between the target item and the first item, so as to increase the diversity of target items recommended to the user, thereby solving the technical problem in the related art that items pushed to the user lack diversity, thereby affecting the user's interest in browsing items.
[0066] In an embodiment of the present application, a combination of feature vectors corresponding to a plurality of second items is input into a sequence recommendation model, and a target item is screened out from the plurality of second items using the sequence recommendation model, including: obtaining an item recommendation index of the recommended item, wherein the item recommendation index is used to characterize an index obtained by summarizing parameters generated when different users view the recommended item; constructing a feature association matrix corresponding to different second items based on the first feature vector and the second feature vector, wherein the feature association matrix is used to characterize the association relationship between the first item and the corresponding second item; determining the target recommendation probability of different second items based on the feature association matrix and the item recommendation index; and determining the target item from the plurality of second items based on the target recommendation probability.
[0067] The above-mentioned item recommendation indicators can be used to reflect the browsing conditions of different users on different recommended items, and can be obtained by summarizing the parameters generated when different users view recommended items. Among them, the parameters generated when users view recommended items may include but are not limited to: CTR, CVR, browsing time, number of views and other parameters. These parameters can be predicted by the recommendation system through a ranking model.
[0068] In an optional scheme of the present embodiment, the recommendation system may construct a feature association matrix corresponding to different second items for the first feature vector of the first item and the second feature vectors of different second items, so as to use the feature association matrix to express the association relationship between the first item and the second item, that is, to reflect whether there is diversity between different second items and the first item, and then determine the recommendation probabilities of different second items based on the constructed feature association matrix to ensure the rationality of the determined recommendation probabilities. For example, if the feature association matrix shows that the similarity between the first item and the second item is too high or too low, for example, outside a preset similarity range, it means that there may be a lack of diversity or correlation between the second item and the first item, resulting in the second item appearing too abruptly, and accordingly, it can be determined that the recommendation probability of the second item is low; if the feature association matrix shows that the similarity between the first item and the second item is within a preset similarity range, it means that there is no lack of diversity or correlation between the second item and the first item, and accordingly, it can be determined that the recommendation probability of the item is high.
[0069] Considering that the probability of the second item being recommended is determined directly based on the first eigenvector and the second eigenvector, the browsing data of the second item with a higher probability of being recommended may be poor, resulting in the second item actually failing to meet the user's needs. For example, assuming that the second item currently recommended is a piece of bread, but the bread has a low purchase rate due to quality issues, if the bread is recommended to the user, it is very likely to affect the user's shopping experience. Therefore, the recommendation index of the recommended item can also be introduced into the process of determining the probability of the second item being recommended. Correspondingly, in the process of determining the probability of the corresponding second item being recommended based on the determined feature association matrix, the recommendation system can also introduce the item recommendation index of the recommended item to determine whether different second items can meet the actual needs of the user, and at the same time, according to the determined feature association matrix and the corresponding item recommendation index, determine the probability of the corresponding second item being recommended through collective recommendation, that is, the above-mentioned target recommendation probability, to ensure the accuracy of the determined target recommendation probability. After determining the target recommendation probabilities of different second items, the recommendation system can determine the target item that can currently be displayed to the user from multiple second items based on the determined target recommendation probabilities. For example, the second item corresponding to the largest target recommendation probability can be determined as the target item, thereby ensuring the rationality of the determined target item and avoiding the situation where the target item displayed to the user is too single, affecting the user experience.
[0070] In an embodiment of the present application, based on the first feature vector and the second feature vector, feature association matrices corresponding to different second items are constructed, including: obtaining the cosine similarity between the first feature vector and the second feature vector; and constructing different feature association matrices based on the cosine similarity and the item recommendation index.
[0071] In an optional scheme of the present embodiment, in order to avoid the determined target recommendation probability being abnormal, resulting in the lack of diversity and correlation of the target items determined according to the target recommendation probability, when constructing the feature association matrix, the recommendation system can first obtain the cosine similarity between the first feature vector and the second feature vector, and then construct the feature association matrix corresponding to different second items based on the cosine similarity and the item recommendation index.
[0072] In an embodiment of the present application, different feature association matrices are constructed based on cosine similarity and item recommendation index, including: constructing an initial association matrix based on cosine similarity according to a preset matrix format; determining the matrix element positions of elements of a preset type from the initial association matrix; and updating the initial association matrix based on the matrix element positions using the item recommendation index to obtain a feature association matrix.
[0073] The element of the above preset type may refer to a matrix with the same row vector and column vector, that is, the position of the cosine similarity between the recommended item and itself in the initial association matrix. The order of the row vector and column vector of the matrix of the above preset format may be determined according to the position order of the recommended items in the item recommendation sequence.
[0074] In an optional scheme of the present embodiment, considering that the correlations between different second items and the first item may be the same, the values of the feature association matrix constructed directly based on the first eigenvector and the second eigenvector may also be the same, which in turn leads to the situation that the target recommendation index corresponding to the second item may be the same when the recommendation system determines the target recommendation index corresponding to the second item based on the value of the feature association matrix. It can be seen from the item recommendation indexes of different second items that the higher the item recommendation index, the higher the target recommendation probability corresponding to the second item should be. The feature association matrix constructed only based on the cosine similarity between the first eigenvector and the second eigenvector cannot reflect this. Although the item recommendation indexes of different recommended items can also be combined when determining the target recommendation probability, in order to more clearly reflect the difference between different second items, the item recommendation indexes of different recommended items can also be introduced into the process of constructing the feature association matrix to further ensure the accuracy of the target recommendation probability determined based on the feature association matrix and the item recommendation index. Correspondingly, when constructing the feature association matrix, the recommendation system can directly construct the above-mentioned initial association matrix according to the determined cosine similarity, and at the same time determine the position of the above-mentioned preset type of elements in the initial association matrix, that is, determine the above-mentioned matrix element position, and then use the corresponding item recommendation index to update the elements at the matrix element position to obtain a feature association matrix that can simultaneously reflect the browsing conditions of different users for different recommended items. In order to facilitate the calculation of the probability of different second items being recommended according to the association feature matrix, the initial association matrix and the feature association matrix can also be constructed according to the above-mentioned preset matrix format, so that the lower the correlation between the second item and the first item, the higher the item recommendation index, the higher the value of the corresponding feature association matrix, thereby ensuring the diversity between the recommended items displayed to the user, while ensuring that the selected target items can better meet the actual needs of the user.
[0075] For ease of understanding, assuming that there are first items A1 and A2, the corresponding item recommendation indicators are C1 and C2, and the second item B1, the corresponding item recommendation indicator is C3, then the corresponding initial association matrix can be:
[0076]
[0077] The feature association matrix obtained by updating the initial association matrix according to the item recommendation index can be:
[0078]
[0079] In an embodiment of the present application, a target recommendation probability is determined based on a feature association matrix and an item recommendation index, including: obtaining item weight coefficients corresponding to different second items based on a user portrait of the user, wherein the item weight coefficient is used to reflect the degree of influence of the second item on the user; adjusting the value of the feature association matrix based on the item weight coefficient and the item recommendation index to obtain initial recommendation probabilities of different second items being recommended; and normalizing the initial recommendation probability to obtain a target recommendation probability.
[0080] In an optional scheme of the present embodiment, considering that the value of the constructed feature association matrix will increase as the correlation between the second item and the first item decreases and the item recommendation index increases, the recommendation system can directly determine the target recommendation probability of the corresponding second item being recommended based on the value of the feature association matrix and the corresponding item recommendation index to ensure the rationality of the determined target recommendation probability. However, the target recommendation probability determined at this time reflects the browsing situation of different users on the second item corresponding to the feature association matrix, and it is actually difficult to reflect the demand situation of the user who is currently browsing the second item for the second item. Therefore, when determining the target recommendation probability based on the feature association matrix and the item recommendation index, in order to ensure the rationality of the determined target recommendation probability, the recommendation system can first obtain the item weight coefficient that can reflect the degree of influence of different second items on the user, that is, the user's demand situation for the second item, based on the user portrait of the user. The larger the item weight coefficient, the greater the probability of the corresponding second item being recommended. After obtaining the item weight coefficient, the recommendation system can use the item weight coefficient and the item recommendation index to adjust the value of the constructed feature association matrix to preliminarily express the initial recommendation probability that the corresponding second item will be recommended. Finally, the LayerNorm technology is used to normalize the initial recommendation probabilities corresponding to different second items, and the target recommendation probabilities corresponding to different second items can be obtained.
[0081] In an embodiment of the present application, obtaining an item feature vector of a recommended item includes: obtaining a position parameter of the recommended item and a historical browsing sequence of a user, wherein the position parameter of a first item is the position of the first item in the item recommendation sequence, the position parameter of a second item is a preset parameter, and the historical browsing sequence is used to characterize a sequence generated when a user browses different items; performing feature extraction on the recommended item to obtain a feature matrix of the recommended item; and performing vector conversion on the feature matrix based on the position parameter and the historical browsing sequence to obtain an item feature vector.
[0082] In an optional solution of this embodiment, in order to ensure the rationality of the obtained item recommendation vector and reflect the user's demand for different recommended items, when obtaining the item feature vector of the recommended item, the recommendation system can first obtain the sequence generated by the user when browsing different items, that is, the historical browsing sequence, to determine the user's demand and preference for different recommended items. In order to ensure that the sequence recommendation model can effectively perceive the spatial information of the layout of different recommended items in the item recommendation sequence according to the item feature vectors of different recommended items, the recommendation system can also obtain the position parameters of different recommended items. For example, the position parameter of the first item can be the specific position of the first item in the item recommendation sequence, and the position parameter of the second item can be a preset value, or the position of adding the target item in the item recommendation sequence. While obtaining the position parameters of the recommended items and the user's historical browsing sequence, the recommendation system can also extract features of the recommended items to preliminarily construct a feature matrix of different recommended items, and then use the obtained position parameters and historical browsing sequence to perform vector conversion on the preliminarily constructed feature matrix to obtain the item feature vector that can reflect the spatial information of different recommended items and the user's demand and preference, thereby ensuring the rationality of the determined item feature vector.
[0083] In an embodiment of the present application, a feature matrix is vectorized based on position parameters and a historical browsing sequence to obtain an item feature vector, including: encoding the position parameters to obtain a position code of the recommended item; performing feature extraction on the historical browsing sequence to obtain a user's contextual features, wherein the contextual features are used to characterize the user's demand for different recommended items; and fusing the feature matrix, contextual features, and position codes to obtain an item feature vector.
[0084] The above-mentioned contextual features can reflect the environment and personal characteristics of the user when browsing products, and may include but are not limited to: the user's geographic location, device information, browsing history, purchase history, interests and hobbies, etc., which can be determined by the Softmax function to ensure the accuracy of the obtained contextual features.
[0085] In an optional scheme of the present embodiment, when performing vector conversion on the feature matrix of recommended items using the acquired position parameters and historical browsing sequences, the recommendation system may first encode the position parameters of different recommended items to obtain the position codes of the recommended items, and simultaneously perform feature extraction on the user's historical browsing sequence to obtain contextual features that can reflect the user's needs and preferences for different recommended items, and then use the obtained position codes and contextual features to fuse the feature matrix to obtain the above-mentioned item feature vector, thereby improving the accuracy of the obtained item feature vector through reinforcement learning.
[0086] In an embodiment of the present application, the feature matrix, context features and position codes are fused to obtain an item feature vector, including: splicing the feature matrix and context features to obtain spliced features; embedding the position code into the spliced features to obtain an initial feature vector; performing self-attention processing on the initial feature vector to obtain self-attention features; and normalizing the self-attention features to obtain an item feature vector.
[0087] In an optional solution of this embodiment, in order to ensure the rationality of the fused item feature vector, the recommendation system can first splice the feature matrix of the recommended item with the user's contextual features to obtain the corresponding spliced features, and then cut the corresponding position code into the spliced features of the recommended item to preliminarily obtain an initial feature vector that can reflect the user's demand for the recommended item and the spatial information of different recommended items. Finally, the obtained initial feature vector is self-attention processed to obtain the corresponding self-attention feature, and the self-attention feature is normalized to obtain the corresponding item feature vector.
[0088] In an embodiment of the present application, feature extraction is performed on the recommended items to obtain a feature matrix of the recommended items, including: feature extraction is performed on the recommended items to obtain continuous features and discrete features of the recommended items, wherein the value range of the continuous features is continuous and the value range of the discrete features is limited; and a feature matrix is constructed based on the continuous features and the discrete features.
[0089] The above continuous features can be features that can take any real value, usually quantitative features, such as price, weight, volume, etc. The above discrete features can refer to features that can take a finite number of values or categories, such as color, size, brand, etc.
[0090] In an optional scheme of the present embodiment, in order to ensure the rationality of the extracted feature matrix, when extracting features for recommended items, the recommendation system may first extract features from the continuous features and discrete features of the recommended items, where the value range of the corresponding continuous features is continuous and the value range of the discrete features is limited, and then construct the corresponding feature matrix based on the continuous features and discrete features.
[0091] In an embodiment of the present application, the method further includes: obtaining a training feature vector and a training recommendation index of a training item, as well as an actual feature vector of an actual recommended item, wherein the training item includes: a first training item that has been displayed, and a second training item waiting to be displayed, and the training recommendation index is used to characterize an index obtained by summarizing parameters generated when different users view the training recommended items; inputting a training vector combination corresponding to a plurality of second training items into an initial recommendation model, and using the initial recommendation model to screen out a target training item from the second training items, wherein the plurality of training vector combinations are composed of a first training vector corresponding to a first training item in the training feature vector, and second training vectors corresponding to different second training items; determining a cross entropy of a target training item based on the training feature vector and the actual feature vector of the target training item; performing a weighted summation of the cross entropies of different target training items based on preset weights to obtain a cross entropy loss function, wherein the preset weight decreases as the position value of the target training item increases; adjusting the initial recommendation model based on the cross entropy loss function to obtain a sequence recommendation model.
[0092] In an optional solution of this embodiment, similar to the aforementioned process of screening target items, when training the sequence recommendation model, the recommendation system may first obtain the training feature vector and training recommendation index of the training items, as well as the actual feature vector of the actual recommended items, wherein the training items may include the first training items that have been displayed, and the second training items waiting to be displayed, and the training recommendation index may refer to an index obtained by summarizing the parameters generated when different users view the training recommended items, corresponding to the aforementioned item recommendation index. After obtaining the training feature vector and the training recommendation index, the recommendation system may construct different training vector combinations for different second items, that is, according to multiple training vector combinations, the first training vector corresponding to the first training item in the training feature vector, and the second training vectors corresponding to different second training items, construct training vector combinations corresponding to different second items, and then input the training vector combinations corresponding to the multiple second training items into the initial recommendation model, so as to use the initial recommendation model to screen out the target training items from the second training items. After screening out the target training items, the recommendation system can match the training feature vector input of the target training items with the actual feature vector of the actual recommended items to determine the cross entropy of the target training items, and then use the preset weights to weight the sum of the cross entropies of different target training items to construct the above-mentioned cross entropy loss function. Referring to the NDCG method, the value of the preset weight can be set to decrease as the position value of the target training items increases to measure the performance of the initial recommendation model. Finally, the recommendation system can adjust the initial recommendation model according to the constructed cross entropy loss function to realize the self-correction process to obtain the above-mentioned sequence recommendation model, thereby ensuring the efficiency of the training sequence recommendation model and the robustness of the trained sequence recommendation model.
[0093] In an embodiment of the present application, the above method also includes: obtaining a training association matrix between the target training item and the first training item, wherein the feature association matrix is used to characterize the association relationship between the target training item and the first training item; determining the position parameters of the target training item based on the recommended sequence in which the first training item is located; and constructing preset weights based on the position parameters and the training association matrix.
[0094] In an optional scheme of the present embodiment, in order to ensure the accuracy of the constructed cross loss function, the recommendation system can first obtain the training association matrix between the target training item and the first training item to clarify the association relationship between the target training item and the first training item, and then use the recommendation sequence to which the first training item belongs to determine the position parameters of the target training item, and finally determine the corresponding preset weights based on the position parameters and the training association matrix. The determined preset weights can reflect the spatial information of the target training item while further reflecting the correlation between the target training item and different first training items, thereby further ensuring the rationality of the determined preset weights to improve the accuracy of the constructed cross loss function.
[0095] For ease of understanding, Figure 3 It is a schematic diagram of an item recommendation process according to an embodiment of the present application. The item recommendation process can be divided into two parts, namely 301 and 302. 301 represents the process of constructing an item feature vector of a recommended item, and 302 represents the process of selecting a target item using a sequence recommendation model based on the item feature vector. In 301, 3011 represents the first item, 3012 represents the second item, I1, I2, I3, I4, I5, I6 represent the feature matrix of the recommended item, U represents the context feature of the user, Z1, Z2, Z3, Z4, Z5, Z6 represent the position encoding of the recommended item, X1, X2, X3, X4, X5, X6 represent the initial feature vector, and H1, H2, H3, H4, H5, H6 represent the item feature vector. In 302, 3021 represents the item recommendation sequence, in which the item feature vectors corresponding to the first item are H3, H2, H1, and H4, respectively; 3022 represents the second item to be displayed, and the corresponding item feature vectors are H5 and H6; 3023 represents the item recommendation index; 3024 represents the feature association matrix constructed based on the first feature vector H3, H2, H1, and H4 of the first item and the second feature vector H5 or H6 corresponding to the second item; 3025 represents the target recommendation probability of different second items being recommended; and 3026 represents the target item selected based on the target recommendation probability.
[0096] pass Figure 3It can be seen that the recommendation system can first use the feature matrix of the recommended items, the contextual features of the user, and the feature codes of different recommended items to determine the initial feature vectors of different recommended items, and then perform self-attention feature processing and normalization processing on the initial feature vectors according to the aforementioned process to determine the item feature vectors corresponding to the different recommended items. After determining the item feature vector, the corresponding feature association matrix can be constructed for the second feature vectors of different second items based on the first feature vectors of different first items and the item recommendation indexes of different recommended items, and then the target recommendation probability of different second items being recommended can be determined using the feature association matrix and the item recommendation index, and finally the target item can be determined from the second items based on the determined target recommendation probability to ensure the diversity of the target item. The specific process can be referred to as shown in the previous text and will not be repeated here.
[0097] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0098] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0100] According to an embodiment of the present application, a method for recommending items is also provided. Figure 4 is a flow chart of another item recommendation method according to an embodiment of the present application. Figure 4As shown, the method may include the following steps:
[0101] Step S402, in response to an input instruction on the operation interface, displaying a recommended item sequence on the operation interface.
[0102] The item recommendation sequence is used to display the first item to the user, and the first item is used to represent the item that has been displayed to the user.
[0103] Step S404, in response to the item recommendation instruction on the operation interface, the target recommendation sequence is displayed on the operation interface.
[0104] Among them, the target recommendation sequence is obtained by updating the item recommendation sequence by the target item, the target item is used to represent the item selected from the multiple second items by inputting the feature vector combination corresponding to the multiple second items into the sequence recommendation model, the multiple second items are used to represent the items waiting to be displayed to the user, and the multiple feature vector combinations are composed of the first feature vector corresponding to the first item, and the second feature vectors corresponding to different second items.
[0105] In an optional scheme of this embodiment, when an input instruction acting on the operation interface is detected, the recommendation system can first display the item recommendation sequence on the operation interface to facilitate the user to view the first item that has been displayed. When the item recommendation instruction acting on the operation interface is detected, the recommendation system can construct multiple feature vector combinations for different second items through the first feature vector of the first item and the second feature vector of the second item waiting to be displayed to the user, and use the sequence recommendation model to process the feature vector combination to filter out the target item from the multiple second items to ensure the diversity of the target items, and then use the target item to update the item recommendation sequence to obtain the target recommendation sequence. Finally, the recommendation system can display the target recommendation sequence on the operation interface to facilitate the user to view the currently recommended target item. The specific recommendation process can be referred to as shown in the previous text and will not be repeated here.
[0106] According to an embodiment of the present application, a method for recommending items is also provided. Figure 5 is a flow chart of another item recommendation method according to an embodiment of the present application. Figure 5 As shown, the method may include the following steps:
[0107] Step S502: Acquire the item feature vector of the recommended item by calling the first interface.
[0108] The recommended items include: a first item that has been displayed to the user, and a plurality of second items waiting to be displayed to the user.
[0109] Step S504: input the feature vector combinations corresponding to the plurality of second items into a sequence recommendation model, and use the sequence recommendation model to filter out a target item from the plurality of second items.
[0110] The plurality of feature vector combinations are composed of a first feature vector corresponding to a first item in the item feature vectors, and a second feature vector corresponding to a different second item.
[0111] Step S506: Update the item recommendation sequence based on the target item to obtain a target recommendation sequence.
[0112] The item recommendation sequence is used to display the first item to the user.
[0113] Step S508: output the target recommendation sequence by calling the second interface.
[0114] The second interface includes a second parameter, and a parameter value of the second parameter includes a target recommendation sequence.
[0115] In an optional scheme of this embodiment, when recommending a target item to a user, the recommendation system may first obtain the first feature vector of the first item that has been displayed to the user, and the second feature vector of the second item that is waiting to be displayed to the user, and then, based on the first feature vectors of all the first items, construct a feature vector combination for the second feature vectors of different second items, and input the feature vector combination into the sequence recommendation model, which has been used to filter out the target item from multiple second items, so as to improve the diversity of the target items while ensuring the relevance of the filtered target items to the first items. Finally, after the target item is used to update the item recommendation sequence to obtain the target recommendation sequence, the recommendation system can output the target recommendation sequence to display the target item to the user. The specific process can refer to the above content and will not be repeated here.
[0116] According to an embodiment of the present application, there is also provided an item recommendation device for implementing the above-mentioned item recommendation method. Figure 6 is a structural block diagram of an item recommendation device according to an embodiment of the present application. Figure 6 As shown, the device includes: a first acquisition module 602 , a first screening module 604 , a first updating module 606 and a first output module 608 .
[0117] Among them, the first acquisition module 602 is used to obtain the item feature vector of the recommended item in response to detecting the item recommendation instruction, wherein the recommended items include: a first item that has been displayed to the user, and multiple second items waiting to be displayed to the user; the first screening module 604 is used to input the feature vector combination corresponding to the multiple second items into the sequence recommendation model, and use the sequence recommendation model to filter out the target item from the multiple second items, wherein the multiple feature vector combinations are composed of the first feature vector corresponding to the first item in the item feature vector, and the second feature vectors corresponding to different second items; the first update module 606 is used to update the item recommendation sequence based on the target item to obtain the target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; the first output module 608 is used to output the target recommendation sequence.
[0118] It should be noted that the first acquisition module 602, the first screening module 604, the first update module 606 and the first output module 608 correspond to steps S202 to S208 in the above embodiment, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server 10 provided in the above embodiment as part of the device.
[0119] According to one aspect of the embodiments of the present application, a device for recommending items is also provided. Figure 7 is a structural block diagram of another item recommendation device according to an embodiment of the present application, such as Figure 7 As shown, the device includes: a first display module 702 and a second display module 704 .
[0120] Among them, the first display module 702 is used to respond to the input instruction acting on the operation interface, and display the item recommendation sequence on the operation interface, wherein the item recommendation sequence is used to display the first item to the user, and the first item is used to represent the item that has been displayed to the user; the second display module 704 is used to respond to the item recommendation instruction acting on the operation interface, and display the target recommendation sequence on the operation interface, wherein the target recommendation sequence is obtained by updating the item recommendation sequence by the target item, and the target item is used to represent the items selected from the multiple second items by inputting the multiple feature vector combinations corresponding to the second items into the sequence recommendation model using the sequence recommendation model, and the multiple second items are used to represent the items waiting to be displayed to the user, and the multiple feature vector combinations are composed of the first feature vector corresponding to the first item, and the second feature vectors corresponding to different second items.
[0121] It should be noted that the first display module 702 and the second display module 704 correspond to steps S402 to S404 in the above embodiment, and the two modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run as part of the device in the server 10 provided in the above embodiment.
[0122] According to one aspect of the embodiments of the present application, a device for recommending items is also provided. Figure 8 is a structural block diagram of another item recommendation device according to an embodiment of the present application, such as Figure 8 As shown, the device includes: a second acquisition module 802 , a second screening module 804 , a second updating module 806 and a second output module 808 .
[0123] Among them: the second acquisition module 802 is used to obtain the item feature vector of the recommended item by calling the first interface, wherein the recommended item includes: a first item that has been displayed to the user, and multiple second items waiting to be displayed to the user; the second screening module 804 is used to input the feature vector combination corresponding to the multiple second items into the sequence recommendation model, and use the sequence recommendation model to filter out the target item from the multiple second items, wherein the multiple feature vector combinations are composed of the first feature vector corresponding to the first item in the item feature vector, and the second feature vectors corresponding to different second items; the second update module 806 is used to update the item recommendation sequence based on the target item to obtain the target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; the second output module 808 is used to output the target recommendation sequence by calling the second interface, wherein the second interface includes a second parameter, and the parameter value of the second parameter includes the target recommendation sequence.
[0124] It should be noted that the second acquisition module 802, the second screening module 804, the second update module 806 and the second output module 808 correspond to steps S502 to S508 in the above embodiment, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules or units can be hardware components or software components stored in a memory and processed by one or more processors, and the above modules can also be run in the server 10 provided in the above embodiment as part of the device.
[0125] It should be noted that the preferred implementation scheme involved in the above embodiments of the present application is the same as the scheme provided in the above embodiments, as well as the application scenario and implementation process, but is not limited to the scheme provided in the above embodiments.
[0126] The embodiment of the present application may provide an electronic device, which may be any electronic device in a group of electronic devices. Optionally, in this embodiment, the electronic device may also be replaced by a terminal device such as a mobile terminal.
[0127] Optionally, in this embodiment, the electronic device may be located in multiple network devices among multiple network devices of a computer network.
[0128] In this embodiment, the computer terminal can execute the program code in the method.
[0129] Optionally, Fig. 9 1 is a structural block diagram of an electronic device according to an embodiment of the present application. Fig. 9 As shown, the electronic device A may include: one or more (only one is shown in the figure) processors 902, a memory 904, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0130] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implementing the methods in the above embodiments. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0131] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: in response to detecting an item recommendation instruction, obtain an item feature vector of the recommended item, wherein the recommended item includes: a first item that has been displayed to the user, and a plurality of second items waiting to be displayed to the user; input the feature vector combination corresponding to the plurality of second items into the sequence recommendation model, and use the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item in the item feature vector, and second feature vectors corresponding to different second items; update the item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; and output the target recommendation sequence.
[0132] Those skilled in the art will appreciate that the structure shown in the figure is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Fig. 9 It does not limit the structure of the above electronic device. For example, the electronic device A may also include Fig. 9 More or fewer components (such as network interfaces, display devices, etc.) shown in the figure, or having Fig. 9 Different configurations shown.
[0133] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0134] The embodiment of the present application further provides a computer-readable storage medium. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the method provided in the above embodiment.
[0135] Optionally, in this embodiment, the above storage medium may be located in any electronic device in a group of electronic devices in a computer network, or in any mobile terminal in a group of mobile terminals.
[0136] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for executing the following steps: in response to detecting an item recommendation instruction, obtaining an item feature vector of the recommended item, wherein the recommended item includes: a first item that has been displayed to the user, and a plurality of second items waiting to be displayed to the user; inputting a combination of feature vectors corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item in the item feature vector, and second feature vectors corresponding to different second items; updating the item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; and outputting the target recommendation sequence.
[0137] The embodiment of the present application further provides a computer program product. Optionally, in this embodiment, the computer program product may include a computer program, and the computer program implements the method provided in the embodiment when executed by a processor.
[0138] The embodiments of the present application also provide a computer program product. Optionally, the computer program product may include a non-volatile computer-readable storage medium, which may be used to store a computer program, and when the computer program is executed by a processor, the method provided in the embodiments is implemented.
[0139] The embodiment of the present application further provides a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the method provided in the above embodiment is implemented.
[0140] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0141] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0142] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0144] If the integrated unit 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 technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0145] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An item recommendation method, characterized in that: include: In response to detecting an item recommendation instruction, obtaining an item feature vector of a recommended item, wherein the recommended item includes: a first item that has been displayed to a user, and a plurality of second items that are waiting to be displayed to the user; Inputting the feature vector combinations corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to a first item in the item feature vectors, and second feature vectors corresponding to different second items; updating an item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; The target recommendation sequence is output.
2. The method according to claim 1, characterized in that: The step of inputting the feature vector combinations corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items includes: Acquire an item recommendation index of the recommended item, wherein the item recommendation index is used to represent an index obtained by summarizing parameters generated when different users view the recommended item; Based on the first feature vector and the second feature vector, construct a feature association matrix corresponding to different second items, wherein the feature association matrix is used to represent the association relationship between the first item and the corresponding second item; Determining target recommendation probabilities of different second items based on the feature association matrix and the item recommendation index; The target item is determined from the plurality of second items based on the target recommendation probability.
3. The method according to claim 2, characterized in that The constructing, based on the first feature vector and the second feature vector, feature association matrices corresponding to different second items includes: Obtaining the cosine similarity between the first feature vector and the second feature vector; Based on the cosine similarity and the item recommendation index, different feature association matrices are constructed.
4. The method according to claim 3, characterized in that The constructing different feature association matrices based on the cosine similarity and the item recommendation index includes: Constructing an initial correlation matrix based on the cosine similarity according to a preset matrix format; Determining matrix element positions of elements of a preset type from the initial incidence matrix; Based on the positions of the matrix elements, the initial association matrix is updated using the item recommendation index to obtain the feature association matrix.
5. The method according to claim 2, characterized in that: The determining the target recommendation probability based on the feature association matrix and the item recommendation index includes: acquiring, based on the user portrait of the user, item weight coefficients corresponding to different second items, wherein the item weight coefficients are used to reflect the influence of the second item on the user; Based on the item weight coefficient and the item recommendation index, the value of the feature association matrix is adjusted to obtain different initial recommendation probabilities of the second item being recommended; The initial recommendation probability is normalized to obtain a target recommendation probability.
6. The method according to claim 1, characterized in that The step of obtaining the item feature vector of the recommended item includes: Acquire the position parameter of the recommended item and the historical browsing sequence of the user, wherein the position parameter of the first item is the position of the first item in the item recommendation sequence, the position parameter of the second item is a preset parameter, and the historical browsing sequence is used to represent the sequence generated when the user browses different items; Extracting features of the recommended items to obtain a feature matrix of the recommended items; The feature matrix is vector-converted based on the position parameter and the historical browsing sequence to obtain the item feature vector.
7. The method according to claim 6, characterized in that The performing vector conversion on the feature matrix based on the position parameter and the historical browsing sequence to obtain the item feature vector includes: Encoding the position parameter to obtain a position code of the recommended item; Extracting features from the historical browsing sequence to obtain context features of the user, wherein the context features are used to characterize the user's needs for different recommended items; The feature matrix, the context feature and the position code are fused to obtain the item feature vector.
8. The method according to claim 7, characterized in that The step of fusing the feature matrix, the context feature and the position code to obtain the item feature vector includes: Concatenating the feature matrix and the context feature to obtain a concatenated feature; Embedding the position code into the concatenated feature to obtain an initial feature vector; Performing self-attention processing on the initial feature vector to obtain a self-attention feature; The self-attention feature is normalized to obtain the item feature vector.
9. The method according to claim 6, characterized in that The extracting features of the recommended items to obtain a feature matrix of the recommended items includes: Extracting features of the recommended items to obtain continuous features and discrete features of the recommended items, wherein the value range of the continuous features is continuous, and the value range of the discrete features is limited; The feature matrix is constructed based on the continuous features and the discrete features.
10. The method according to claim 1, characterized in that The method further comprises: Acquire a training feature vector and a training recommendation index of a training item, and an actual feature vector of an actual recommended item, wherein the training item includes: a first training item that has been displayed, and a second training item that is waiting to be displayed, and the training recommendation index is used to represent an index obtained by summarizing parameters generated when different users view the training recommendation item; Inputting a plurality of training vector combinations corresponding to the second training items into an initial recommendation model, and using the initial recommendation model to screen out a target training item from the second training items, wherein the plurality of training vector combinations are composed of a first training vector corresponding to a first training item in the training feature vector, and second training vectors corresponding to different second training items; Determining a cross entropy of the target training object based on the training feature vector of the target training object and the actual feature vector; Performing weighted summation of the cross entropies of different target training items based on preset weights to obtain a cross entropy loss function, wherein the preset weights decrease as the position values of the target training items increase; The initial recommendation model is adjusted based on the cross entropy loss function to obtain the sequence recommendation model.
11. The method according to claim 9, characterized in that The method further comprises: Acquire a training association matrix between the target training item and the first training item, wherein the feature association matrix is used to characterize the association relationship between the target training item and the first training item; Determining a position parameter of the target training object based on the recommended sequence in which the first training object is located; The preset weights are constructed based on the position parameters and the training association matrix.
12. An item recommendation method, characterized in that: include: In response to an input instruction acting on an operation interface, displaying an item recommendation sequence on the operation interface, wherein the item recommendation sequence is used to display a first item to a user, and the first item is used to represent an item that has been displayed to the user; In response to an item recommendation instruction on the operation interface, a target recommendation sequence is displayed on the operation interface, wherein the target recommendation sequence is obtained by updating the item recommendation sequence with a target item, the target item is used to represent an item selected from a plurality of second items by inputting a feature vector combination corresponding to the plurality of second items into a sequence recommendation model, the plurality of second items are used to represent items waiting to be displayed to the user, and the plurality of feature vector combinations are composed of a first feature vector corresponding to the first item, and second feature vectors corresponding to different second items.
13. An item recommendation method, characterized in that: include: The item feature vector of the recommended item is obtained by calling the first interface, wherein the recommended item includes: a first item that has been displayed to a user, and a plurality of second items that are waiting to be displayed to the user; Inputting the feature vector combinations corresponding to the plurality of second items into a sequence recommendation model, and using the sequence recommendation model to filter out a target item from the plurality of second items, wherein the plurality of feature vector combinations are composed of a first feature vector corresponding to a first item in the item feature vectors, and second feature vectors corresponding to different second items; updating an item recommendation sequence based on the target item to obtain a target recommendation sequence, wherein the item recommendation sequence is used to display the first item to the user; The target recommendation sequence is output by calling a second interface, wherein the second interface includes a second parameter, and a parameter value of the second parameter includes the target recommendation sequence.
14. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 13 when running.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 13.
16. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 13.
Citation Information
Cited By
Information recommendation method, model training method, equipment, storage medium and program product
CN120163622A