Article representation model training method and device, article recommendation method and device and electronic equipment
Through the method of loop iterative training and feature similarity adjustment, it is possible to quickly learn item embedding representations in heterogeneous information networks, solve the problems of model complexity and low computational efficiency in the existing technology, and provide a method suitable for a variety of recommendations. The lightweight item representation model of the scene improves the efficiency and accuracy of the recommendation system.
Patent Information
- Application Number
- CN202310184357.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-21
- Publication Date
- 2024-08-23
AI Technical Summary
Existing recommendation systems rely on meta-path prior information in heterogeneous information networks, resulting in complex models, low computational efficiency, lack of universality, and difficulty in quickly learning item feature representation.
A lightweight item representation model training method is proposed. The target features of items are obtained through loop iterative training, and the model parameters are adjusted using the difference between feature similarity and actual similarity to achieve rapid learning of item embedded representations without relying on meta-path first. Verification information is suitable for a variety of recommendation scenarios.
It achieves efficient calculation of item feature representation, provides a universal model, can quickly learn item embedding representations, improves the accuracy and efficiency of item recommendation, and solves the item cold start problem.
Smart Images

Figure CN118535908A
Abstract
Description
Background Art
[0002] As the amount of data continues to increase, recommendation systems play an increasingly important role in various Internet products, because they can help objects (such as users) find items of interest (such as movies, commodities, etc.) in huge amounts of data and solve the problem of information overload.
[0003] In related technologies, the recommendation system can be regarded as a heterogeneous information network composed of different types of nodes (such as objects, items, various attributes of items, etc.) and interactive relationships. In a heterogeneous information network, it is necessary to obtain a node sequence based on a meta-path random walk, and then regard the nodes in the sequence as words, the entire sequence as a sentence, and use the word vector algorithm to learn the embedded representation of the (word) node.
[0004] However, the above method needs to rely on meta-path as prior information and needs to learn embedded representations of various nodes. The model is often heavyweight and has low computational efficiency. In addition, different models need to be built for different application backgrounds, which lacks universality.
[0005] Therefore, how to propose a lightweight and universal item representation model to improve the computational efficiency of item feature representation is an urgent problem to be solved. Summary of the invention
[0006] The embodiments of the present application provide a method, device and electronic device for training an item representation model and recommending items, so as to improve the computational efficiency of item feature representation.
[0007] The present invention provides a method for training an object representation model, including:
[0008] Acquire a training sample set; each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0009] The item representation model to be trained is subjected to cyclic iterative training based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps:
[0010] For the training sample pairs selected from the training sample set, based on the object identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain target features of the corresponding objects;
[0011] Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two objects, parameters of the object representation model to be trained are adjusted.
[0012] An item recommendation method provided in an embodiment of the present application includes:
[0013] Obtaining the item identifiers and attribute sequence sets corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0014] Inputting the object identification and attribute sequence set of the target object into the trained object representation model to obtain the target feature corresponding to the target object, and respectively inputting the object identification and attribute sequence set of each candidate object into the trained object representation model to obtain the target feature corresponding to each candidate object;
[0015] Based on the feature similarity between the target feature of each candidate item and the target feature of the target item, a recommended item determined based on the target item is screened out from the candidate items.
[0016] An embodiment of the present application provides a training device for an object representation model, comprising:
[0017] A sample acquisition unit is used to acquire a training sample set; each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0018] The model training unit is used to perform cyclic iterative training on the item representation model to be trained based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps:
[0019] For the training sample pairs selected from the training sample set, based on the object identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain target features of the corresponding objects;
[0020] Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two objects, parameters of the object representation model to be trained are adjusted.
[0021] Optionally, the sample acquisition unit:
[0022] According to the interaction behavior between at least one object and the item within a preset time period, construct an interaction sequence corresponding to each object, each interaction sequence includes an identifier of an item that generates an interaction behavior with the corresponding object;
[0023] Obtain the attribute sequence set of each item associated with each interaction sequence;
[0024] The training sample set is constructed based on the obtained interaction sequences and attribute sequence sets.
[0025] Optionally, the item identifiers in each interaction sequence are arranged according to the interaction time between the object and the item; the training sample set includes positive sample pairs and negative sample pairs; the training sample pairs are positive sample pairs or negative sample pairs;
[0026] The sample acquisition unit:
[0027] Taking each item identifier in each interaction sequence and the attribute sequence set of the corresponding item as a training sample;
[0028] The training samples corresponding to the two adjacent item identifiers in the interaction sequence are taken as a positive sample pair, and the actual similarity representations between the two items corresponding to each positive sample pair are associated;
[0029] The training samples corresponding to the identifiers of two non-adjacent items in the interaction sequence are taken as a negative sample pair, and the actual similarity representations between the two items corresponding to each negative sample pair are irrelevant.
[0030] Optionally, the item representation model includes two parameter-sharing sub-networks;
[0031] The model training unit is specifically used for:
[0032] Input the item identification and attribute sequence set contained in each training sample into one of the sub-networks in the item representation model, where different training samples correspond to different sub-networks; for each sub-network, perform the following operations respectively:
[0033] Based on the sub-network, the input item identification and attribute sequence set are respectively mapped into embedded features;
[0034] The obtained embedded features are subjected to feature fusion and semantic learning to obtain the target features of the corresponding objects.
[0035] Optionally, the sub-network includes a plurality of embedding layers;
[0036] The model training unit is specifically used for:
[0037] Based on one of the embedding layers in the sub-network, the item identification is mapped into a low-dimensional dense embedding feature, and based on other embedding layers in the sub-network, each attribute sequence in the attribute sequence set is mapped into a low-dimensional dense embedding feature, and each attribute sequence corresponds to an embedding layer.
[0038] Optionally, the subnetwork includes a global average pooling layer, a concatenation layer, and a representation layer;
[0039] The model training unit is specifically used for:
[0040] Based on the global average pooling layer, average pooling is performed on each embedded feature to obtain pooling features corresponding to each embedded feature;
[0041] Based on the splicing layer, each pooling feature is spliced to obtain a fusion feature;
[0042] Based on the representation layer, semantic learning is performed on the fused features to obtain corresponding target features.
[0043] Optionally, the model training unit is specifically used for:
[0044] Based on the edge relationship between the object node and the item node in the pre-constructed heterogeneous information network, and the corresponding interaction time between the object node and the item node with the edge relationship, the interaction behavior between each object and the item within the preset time length is determined; wherein the object node and the item node with the edge relationship represent the existence of the interaction behavior between the corresponding object and the item;
[0045] For each object, the item identifiers of items that interact with the object are arranged according to corresponding interaction times to obtain an interaction sequence corresponding to the object.
[0046] Optionally, the model training unit is specifically used for:
[0047] According to the edge relationship between the item nodes and the item attribute nodes in the pre-constructed heterogeneous information network, the attribute identifiers of the same type of item attributes associated with each item are randomly combined into a corresponding attribute sequence;
[0048] The attribute sequences corresponding to the same item node are combined into an attribute sequence set of the item corresponding to the item node.
[0049] Optionally, the device further comprises:
[0050] The network construction unit is used to discretize the continuous data to obtain corresponding item attribute nodes when constructing the heterogeneous information network if the item attribute is continuous data.
[0051] An item recommendation device provided in an embodiment of the present application includes:
[0052] A data acquisition unit, used to acquire the item identifiers and attribute sequence sets corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0053] a feature extraction unit, configured to input the object identification and attribute sequence set of the target object into the trained object representation model to obtain the target feature corresponding to the target object, and to input the object identification and attribute sequence set of each candidate object into the trained object representation model to obtain the target feature corresponding to each candidate object;
[0054] The analyzing unit is used to screen out recommended items determined based on the target item from the candidate items based on the feature similarity between the target feature of each candidate item and the target feature of the target item.
[0055] An electronic device provided by an embodiment of the present application includes a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the above methods.
[0056] An embodiment of the present application provides a computer-readable storage medium, which includes a computer program. When the computer program is executed on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the above methods.
[0057] An embodiment of the present application provides a computer program product, which includes a computer program, and the computer program is stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device performs the steps of any one of the above methods.
[0058] The beneficial effects of this application are as follows:
[0059] The embodiment of the present application provides a method, device and electronic device for training and recommending an item representation model. The item representation model in the present application focuses on the learning of the embedded representation (i.e., target feature) of an item. The item representation model obtained based on this training is a very lightweight model; and the input of the model of the present application is the item identification and various item attributes contained in the training sample pairs, and finally the embedded representation of the item can be obtained, and the embedded representation is obtained based on a supervised learning method. In the learning process, the correlation between items is fully considered. Based on the model, the embedded representation of the item can be quickly learned, which does not depend on the prior information of meta-path, and is not limited to specific fields. The applicable fields include but are not limited to commodity recommendation, music recommendation, video recommendation, etc., and it has universality. That is, the item representation model obtained by training the item identification and attribute sequence set contained in the training sample pairs as input and the embedded representation of the item as output is a lightweight and more universal model. Based on the lightweight model, the embedded representation of the item can be directly extracted without obtaining the meta-path prior information in advance, which can effectively improve the computational efficiency of the item feature representation.
[0060] In addition, since the model learning process fully considers the correlation between items, the embedded representations of related items are more similar, while the embedded representations of unrelated items are quite different. Based on the similarity between the embedded representations of different items, the recommendation of items can be directly realized. As in the present application, the target item and each candidate item's corresponding item identification and attribute sequence set are used as the input of the trained item representation model, and the target features of each item (including the target item and each candidate item) can be extracted respectively. On this basis, the more similar the target features between the target item and a candidate item are, the more related the two items are. Based on the obtained similarities of each feature, the recommended items determined based on the target item can be directly screened out from each candidate item to achieve fast and accurate item recommendation. Moreover, the present application only uses various attribute information of items to obtain relatively accurate embedded representations of items, so it can effectively solve the problem of cold start of items.
[0061] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] 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:
[0063] Figure 1 A schematic diagram of an application scenario provided for an embodiment of the present application;
[0064] Figure 2 A flowchart of an implementation method of a training method for an object representation model provided in an embodiment of the present application;
[0065] Figure 3 A schematic diagram of the structure of a heterogeneous information network provided in an embodiment of the present application;
[0066] Figure 4 A schematic diagram of the structure of a heterogeneous information network for a video recommendation scenario provided in an embodiment of the present application;
[0067] Figure 5 A schematic diagram of the structure of an item representation model provided in an embodiment of the present application;
[0068] Figure 6 A logical schematic diagram of object feature extraction provided in an embodiment of the present application;
[0069] Figure 7 A flowchart of an implementation method of an item recommendation method provided in an embodiment of the present application;
[0070] Figure 8 A schematic diagram of a video recommendation page provided in an embodiment of the present application;
[0071] Fig. 9 A schematic diagram of a product recommendation page provided in an embodiment of the present application;
[0072] Fig.10 A schematic diagram of a specific implementation process of a video representation model training and item recommendation method provided in an embodiment of the present application;
[0073] Fig.11 A schematic diagram of the interaction logic between a server and a terminal device provided in an embodiment of the present application;
[0074] Fig.12 A schematic diagram of the composition structure of a training device for an object representation model provided in an embodiment of the present application;
[0075] Fig.13 A schematic diagram of the structure of an item recommendation device provided in an embodiment of the present application;
[0076] Fig.14 A schematic diagram of a hardware structure of an electronic device to which an embodiment of the present application is applied;
[0077] Fig.15 A schematic diagram of the hardware structure of an electronic device to which an embodiment of the present application is applied. DETAILED DESCRIPTION
[0078] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution 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 part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.
[0079] The following is an introduction to some concepts involved in the embodiments of the present application.
[0080] Homogeneous Network: Also known as a single-type network, it refers to a network that contains only one type of nodes.
[0081] Heterogeneous Network: Also known as Heterogeneous Information Network (HIN), it is defined as a directed graph. Unlike homogeneous networks that contain only one type of node, heterogeneous information networks contain multiple types of nodes or edges, each node belongs to a specific type, and each edge belongs to a specific edge type.
[0082] Attribute sequence set: contains one or more attribute sequences, each of which includes attribute identifiers of a class of item attributes associated with the item. Taking the item as a video as an example, there can be many categories of video attributes, such as country, city, release time, actor, video type, video duration, etc., where each type of video attribute has one or more tags, such as countries can include country A, country B, country C..., cities can include: city a, city b, city c..., release time (for example, divided by year) can include: xx1, xx2, xx3..., and so on. Each tag can correspond to an attribute identifier. If the item meets several tags under a certain type of item attribute, the attribute identifiers corresponding to these tags can form an attribute sequence.
[0083] Target feature: refers to the embedded representation of an item, which is a feature obtained by extracting features based on the item identifier and its corresponding attribute sequence set through the item representation model proposed in this application (a graph neural network model). The feature can be in the form of a vector or other representation forms, which is not specifically limited in this article.
[0084] Embedding Representation: Generates a distributed representation of the input "item" based on a neural network model. The main function of embedding representation is to convert the high-dimensional sparse vector of the original item into a low-dimensional, dense vector, so that these low-dimensional, dense vectors can express certain characteristics of the corresponding item. At the same time, the distance between vectors can reflect the similarity between items, which is convenient for downstream models, especially deep learning models.
[0085] Graph embedding representation: This type of method is also called vertex representation learning. Generally speaking, graph embedding is a method of mapping nodes in a graph into low-dimensional, dense embedded representations. Graph embedding needs to capture the topological structure characteristics of the graph, such as the relationship between nodes, and the relationship between subgraphs and edges. At present, in most studies, the process of graph embedding representation is equivalent to the learning process of embedding representations of nodes in the graph. It should be noted that when the graph composed of nodes and edges mentioned in this application is often referred to as a network, the two are universal.
[0086] Among them, graph embedding algorithms can be roughly divided into three categories, namely matrix decomposition, random walk-based and deep learning-based methods.
[0087] Graph embedding method based on random walk: First, a node sequence is obtained through random walk, and then the nodes in the sequence are regarded as words, and the entire sequence is regarded as a sentence. The word vector algorithm, such as word2vec, is used to learn the embedding representation of the word (node).
[0088] Graph embedding method based on deep learning: The method of applying graph data to deep learning models, also known as Graph Neural Networks (GNN), is a method of learning node embedding representations through deep learning models.
[0089] The embodiments of the present application relate to artificial intelligence (AI) and machine learning (ML) technology, and are designed based on computer vision technology and machine learning in artificial intelligence.
[0090] Artificial intelligence technology mainly includes computer vision technology, natural language processing technology, as well as machine learning / deep learning, autonomous driving, smart transportation and other major directions. With the research and progress of artificial intelligence technology, artificial intelligence has been studied and applied in many fields, such as common smart homes, smart customer service, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, robots, smart medical care, etc. It is believed that with the development of technology, artificial intelligence will be applied in more fields and play an increasingly important role. The training method of the item representation model in the embodiment of the present application can be widely used in various recommendation services, such as video recommendation, e-commerce recommendation, music recommendation, e-book recommendation, etc.
[0091] In addition, the object representation model in the embodiment of the present application is obtained by training with machine learning or deep learning technology. Machine Learning (ML) is a multi-disciplinary cross-disciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching.
[0092] After obtaining the item representation model based on the above technical training, the item representation model can be applied to embed each item into a representation and obtain the corresponding target features. Thus, item recommendations can be made on this basis.
[0093] A recommendation system is an information filtering system that is used to predict the "rating" or "preference" of an object for an item. Based on the recall method of the recommendation system, it can be divided into the following two categories:
[0094] One type is object-item recommendation, which is a recall method that directly recommends items to objects, which can be called U2I (user-to-item);
[0095] The other type is item-to-item recommendation, which is a recall method that uses items to recommend similar items, which can be called I2I (item-to-item). I2I methods are simple to implement and deploy, highly interpretable, and good at capturing the proximity relationship of items in vector space, thus having high accuracy, and therefore have a wide range of application prospects.
[0096] In general, the recommendation system can be viewed as a heterogeneous information network composed of different types of nodes and interaction relationships. By performing random walks in the heterogeneous information network of the recommendation system through the prior information of meta-path, the embedded representation of the node is obtained, thereby realizing the recommendation of items for the object node.
[0097] However, current graph embedding representation algorithms for heterogeneous information networks are highly dependent on prior information of meta-paths. At the same time, when such algorithms are applied to recommendation services, the algorithms need to learn the embedding representations of all nodes in the heterogeneous information network. This will bring about a very obvious problem: the number of nodes in many heterogeneous information networks representing recommendation systems is often very large, especially the number of object nodes may reach hundreds of millions or even larger. Such a large node scale will undoubtedly pose a huge challenge to the practical application of these algorithms. Therefore, using existing graph algorithms to learn the embedding representations of all nodes in heterogeneous information networks will undoubtedly bring about huge consumption of computing power and storage. In addition, when performing large-scale real-time recommendations, the models often have specific application backgrounds and lack universality.
[0098] Therefore, how to design a more efficient, more general and lightweight model remains one of the main challenges in this field.
[0099] In view of this, the present application proposes a method, device and electronic device for training and recommending an item representation model. The item representation model in the present application only focuses on the learning of the embedded representation (i.e., target feature) of the item. The item representation model obtained based on this training is a very lightweight model; and the input of the model of the present application is the item identification and various attributes contained in the training sample pairs, and finally the embedded representation of the item can be obtained, and the embedded representation is obtained based on a supervised learning method. In the learning process, the correlation between items is fully considered. Based on the model, the embedded representation of the item can be quickly learned, which does not depend on the prior information of meta-path, and is not limited to specific fields. The applicable fields include but are not limited to commodity recommendation, music recommendation, video recommendation, etc., and it has universality. That is, the present application uses the item identification and attribute sequence set contained in the training sample pairs as input, and the embedded representation of the item as output to train the obtained item representation model, which is a lightweight and more universal model. Based on the lightweight model, the embedded representation of the item can be directly extracted without obtaining the meta-path prior information in advance, which can effectively improve the computational efficiency of the item feature representation.
[0100] In addition, since the model learning process fully considers the correlation between items, the embedded representations of related items are more similar, while the embedded representations of unrelated items are quite different. Based on the similarity between the embedded representations of different items, the recommendation of items can be directly realized. As in the present application, the target item and each candidate item's corresponding item identification and attribute sequence set are used as the input of the trained item representation model, and the target features of each item (including the target item and each candidate item) can be extracted respectively. On this basis, the more similar the target features between the target item and a candidate item are, the more related the two items are. Based on the obtained similarities of each feature, the recommended items determined based on the target item can be directly screened out from each candidate item to achieve fast and accurate item recommendation. Moreover, the present application only uses various attribute information of items to obtain relatively accurate embedded representations of items, so it can effectively solve the problem of cold start of items.
[0101] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0102] like Figure 1 As shown, it is a schematic diagram of an application scenario provided by an embodiment of the present application. The application scenario diagram includes two terminal devices 110 and a server 120.
[0103] In the embodiment of the present application, the terminal device 110 includes but is not limited to mobile phones, tablet computers, laptop computers, desktop computers, e-book readers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals and other devices; the terminal device may be installed with a client related to item representation model training and item recommendation, which may be software (such as a browser, video software, shopping software, music software, etc.), or a web page, a small program, etc. The server 120 is a background server corresponding to the software or web page, small program, etc., or a server specifically used for item representation model training or item recommendation, which is not specifically limited in the present application. The server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0104] It should be noted that the training method of the object representation model or the object recommendation method in each embodiment of the present application can be executed by an electronic device, which may be a terminal device 110 or a server 120, that is, the method can be executed by the terminal device 110 or the server 120 alone, or can be executed jointly by the terminal device 110 and the server 120.
[0105] When training the object representation model, taking server 120 as the execution body as an example, a training sample set can be constructed through server 120, and on this basis, cyclic iterative training is performed based on the training sample set, such as executing the following steps in each iteration process: first, a training sample pair is selected from the training sample set, and then the target feature of the object (that is, the embedded representation of the object) is extracted based on the information contained in the training sample pair (such as the object identification, the attribute sequence set); then, the feature similarity between the target features of the two objects corresponding to the training sample pair is compared with the actual similarity of the annotation, and the parameters of the model are adjusted according to the comparison results until the number of iterations reaches the upper limit, or the model converges, etc.
[0106] After the model training is completed, the target features of each item can be extracted based on the trained item representation model, and item recommendations can be implemented based on this. The item recommendation process can take the terminal device 110 and the server 120 as the execution subjects as an example. For example, the server 120 can obtain the item identification and attribute sequence set of the target item and each candidate item stored locally, or it can be obtained from the terminal device 110 side; then, the item identification and attribute sequence set of the target item are input into the trained item representation model to obtain the target feature corresponding to the target item, and the item identification and attribute sequence set of each candidate item are respectively input into the trained item representation model to obtain the target feature corresponding to each candidate item; then, based on the feature similarity between the target feature of each candidate item and the target feature of the target item, the recommended item determined based on the target item is screened out from each candidate item, and fed back to the terminal device 110, and displayed to the object through the terminal device 110.
[0107] In an optional implementation, the terminal device 110 and the server 120 may communicate with each other via a communication network.
[0108] In an optional implementation, the communication network is a wired network or a wireless network.
[0109] It should be noted that Figure 1 The figure is only an example. In fact, the number of terminal devices and servers is not limited and is not specifically limited in the embodiments of the present application.
[0110] In the embodiment of the present application, when there are multiple servers, the multiple servers can form a blockchain, and the servers are nodes on the blockchain; such as the training method of the item representation model or the item recommendation method disclosed in the embodiment of the present application, the relevant data involved can be stored on the blockchain, for example, item identification, attribute sequence set, heterogeneous information network, model parameters, target characteristics of items, etc.
[0111] In addition, the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving and other scenarios.
[0112] The following describes the item recommendation method provided by the exemplary embodiment of the present application in combination with the application scenarios described above and with reference to the accompanying drawings. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present application, and the implementation methods of the present application are not limited in this regard.
[0113] See also Figure 2 As shown, it is an implementation flow chart of a training method for an item representation model provided in an embodiment of the present application. Taking the server as the execution subject as an example, the specific implementation process of the method is as follows SS21-S22:
[0114] S21: Acquire a training sample set; each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item.
[0115] In the embodiment of the present application, the item representation model is a lightweight model that can be used to learn the correlation between items and obtain an embedded representation model of the items on this basis.
[0116] Among them, items can be virtual digital products, such as videos, music, news information, etc., or physical products, such as goods (e-commerce), etc.
[0117] Each training sample corresponds to an item, including the item identifier of the item and the attribute sequence corresponding to the item. In the embodiment of the present application, an item can have multiple categories of item attributes, each category of item attributes can correspond to one or more tags, and each tag corresponds to an attribute identifier.
[0118] For example, when the item is a video, there are many types of video attributes, such as country, city, release time, actor, video type, etc., where each type of video attribute has one or more tags, such as country A, country B, country C..., city A, city B, city C..., release time (for example, divided by year) can include: xx1, xx2, xx3..., actor A, actor B, actor C, actor D, actor E..., video type can include: comedy, suspense, reasoning, horror, youth idol, campus, costume, drama, history..., video duration can include: less than 5 minutes, 5 to 10 minutes, less than half an hour, less than 1 hour, 1 to 2 hours, 2 to 3 hours..., and so on. If the item meets one or more tags under a certain type of item attribute, the attribute identifiers corresponding to these tags can form an attribute sequence.
[0119] For example, when the item is news information, there are many types of news information attributes, such as release time, information type, publisher, etc., where each type of news information attribute has one or more tags. For example, the release time (based on year and month) can include: September xx2, October xx3, November xx3, December xx3, January xx3, February xx3, March xx3, April xx3..., the information type can include: entertainment, economy, current affairs..., the publisher can include: x1 self-media, x2 self-media, x3 news agency..., and so on. If the item meets one or more tags under a certain type of item attribute, the attribute identifiers corresponding to these tags can form an attribute sequence.
[0120] For example, when the item is a commodity, there can be many types of commodity attributes, such as commodity type, applicable population, commodity color, etc., where each type of commodity attribute has one or more tags, such as commodity type can include electrical appliances, clothing, food, accessories, books, cosmetics..., applicable population can include: all, infants, teenagers, boys, girls, middle-aged and elderly..., commodity color can include: red, green, yellow, black, white, multi-color..., and so on. Each tag can correspond to an attribute identifier. If the item meets one or more tags under a certain type of item attribute, the attribute identifiers corresponding to these tags can form an attribute sequence.
[0121] It should be noted that the above are just simple examples, and any type of item and the classification of its item attributes are applicable to the embodiments of the present application and are not specifically limited here.
[0122] In the embodiment of the present application, the interaction relationship between objects and items, the structure and semantic information associated with items and their attributes can be fully utilized to establish an item representation model, and the model can be iteratively trained for multiple rounds based on a pre-constructed training sample set.
[0123] In an optional implementation, the training sample set is constructed in the following manner, specifically including the following sub-steps S211-S213 ( Figure 2 Not shown):
[0124] S211: constructing an interaction sequence corresponding to each object according to the interaction behavior between at least one object and the object within a preset time period, wherein each interaction sequence includes an identifier of the object that generates an interaction behavior with the corresponding object.
[0125] In the embodiment of the present application, each object may correspond to an interaction sequence, which represents the items that interact with the object within a preset time period. The interaction between the object and the item refers to the object's certain communication and interaction with the item, such as the object browsing, liking or forwarding a video, the object browsing or purchasing a product, the object listening to or sharing music, etc.
[0126] Specifically, the preset duration can be determined according to the medium- and long-term interests of the subject, and can reflect the medium- and long-term interests of the subject, such as being set to a few weeks or months, which is not specifically limited here.
[0127] Taking the object as a video as an example, if it is set according to one month, the video identifiers of the videos browsed by each object in the last month can be combined to form the interaction sequence corresponding to the object.
[0128] Specifically, the video identifiers in the interaction sequence may be sorted in order according to the corresponding interaction time.
[0129] Considering that heterogeneous information networks can model the complex interactions between objects and items in recommendation systems and various auxiliary information, many actual recommendation services can be abstracted as heterogeneous information networks. There are many types of nodes in heterogeneous information networks, and different connection relationships between nodes can represent different semantic information. They have more information than traditional recommendation systems, and can therefore improve the accuracy of recommendations.
[0130] For example, items, objects, and various item attributes can all be used as nodes in a heterogeneous information network, and the interaction between items and objects, and between items and various item attributes can be used to characterize whether there is an edge between the corresponding nodes. The present application can fuse attributes and various auxiliary information to model the complex interaction between objects and items.
[0131] See also Figure 3As shown, it is a structural schematic diagram of a heterogeneous information network provided by an embodiment of the present application. Among them, dots with different filling patterns represent nodes of different categories. The nodes in the heterogeneous information network are divided into n+2 categories, including n types of item attribute nodes, and two types of object nodes and item nodes. Among them, the existence of edges between nodes indicates that there is an interactive relationship between the two parties, and different forms of connecting lines indicate edge relationships between different types of nodes. For example, when there is an edge relationship between an object node and an item node, it indicates that there is an interactive behavior between the corresponding object and the item. For another example, when there is an edge relationship between an item node and an item attribute node, it indicates that the corresponding item has specific item attributes of this type.
[0132] Based on this, a heterogeneous information network can also be pre-constructed in the present application, and on this basis, the nodes and edges in the heterogeneous information network are used to obtain various interaction sequences and attribute sequence sets.
[0133] When constructing an interaction sequence, an optional implementation is:
[0134] Firstly, based on the edge relationship between object nodes and item nodes in a pre-constructed heterogeneous information network, and the corresponding interaction time between object nodes and item nodes with edge relationships, the interaction behavior between each object and item within a preset time length is determined; wherein, object nodes and item nodes with edge relationships represent the existence of interaction behavior between the corresponding objects and items.
[0135] Then, for each object, the item identifiers of the items that interact with the object are arranged according to the corresponding interaction time to obtain the interaction sequence corresponding to the object.
[0136] Take the video of an object as an example, Figure 4 As shown, it is a schematic diagram of the structure of a heterogeneous information network for a video recommendation scenario provided by an embodiment of the present application. In the video recommendation scenario, the nodes in the heterogeneous information network can be divided into the following categories: objects, videos, and various video attributes. If an object has browsed a video, that is, it indicates that there is an interactive behavior between the object and the video, then there is an edge between the corresponding object node and the video node. If a video has a certain video attribute, that is, it indicates that there is an association between the video and a certain video attribute, then there is also an edge between the corresponding video node and the video attribute node.
[0137] For example, the heterogeneous information network is denoted as G, G = (U, V, A1, ..., A n ,E,E1,…,E n), where U represents the object node set, V represents the video node set, and E∈U×V represents the interaction relationship between the object and the video. (u, v)∈E, where nodes u∈U and v∈V represent an edge where the object (node) u interacts with the video (node) v. The word node can be omitted in the following, and the nodes are referred to as object u, video v, etc. It should be noted that in this application, each edge in E will record the time when the object and the video interact (i.e., the interaction time). Edge set E i , where i∈{1,…,n}, represents the video node set V and the i-th attribute A i The set of associated edges. (v,a)∈E i , where nodes v∈V and a∈A i , which means that the video node v∈V is in the i-th attribute set A i Has the attribute value a.
[0138] For a simple example, Figure 4 Different categories of nodes are represented by unified dots. Based on this, the videos that interact with each object within a preset time can be screened out according to the object nodes and video nodes with edge relationships in the heterogeneous information network and the corresponding interaction time, such as Figure 4 In the video, object u1 interacts with video v2 and video v4, object u2 interacts with video v1 and video v3, object u3 interacts with video v4, object u4 interacts with video v4 and video v5, and object u5 interacts with video v5 and video v6.
[0139] Subsequently, the interaction sequence of each object can be constructed according to the time when the object and the video interact with each other as recorded on each E edge.
[0140] For example, the interaction sequence s of object u u ∈S is defined as: the sequence of video nodes V connected to the graph G where the object node u∈U is located, that is, s u =v u,1 ,v u,2 ,…,v u,N , where N = |s u | is the sequence s u It should be noted that the order of the video nodes (i.e., video identifiers) in the sequence is arranged in order from early to late according to the interaction time between the object and the video. For example, for object u1, its corresponding interaction sequence s u =v2,v4, where v2 is v u,1 , v4 is v u,2 .
[0141] The interaction sequence s of each object node U uCombined together, they can form the set S of interaction sequences of all objects U (also referred to as interaction sequence set).
[0142] S212: Obtaining the attribute sequence set of each item associated with each interaction sequence.
[0143] When constructing an attribute sequence set, an optional implementation is:
[0144] According to the edge relationship between item nodes and item attribute nodes in the pre-constructed heterogeneous information network, the attribute identifiers of the same type of item attributes associated with each item are randomly combined into a corresponding attribute sequence, and then the attribute sequences corresponding to the same item node are combined into an attribute sequence set of the item corresponding to the item node. Among them, the item nodes and item attribute nodes with edge relationships represent that the corresponding items have the attributes of this type of items.
[0145] In the present application, the set S of interaction sequences of objects is a set of sequences composed of a set of video nodes V. According to the sequence set of V, attribute node sets A1, ..., A n The n independent node sequences are composed of the following methods:
[0146] First, the interaction sequence s of each object in the object interaction sequence S is u =v u,1 ,v u,2 ,…,v u,N ∈S, according to each video node in the set A i The associated attributes are replaced to obtain a new attribute set A i The attribute sequence in in Here N(v u,j, A i ),j∈{1,…,n} represents the video node v u,1 In A i A random subsequence of adjacent nodes in . Among them, the adjacent nodes or neighbors of a video node are the video attribute nodes connected to it through edges.
[0147] It should be noted that if v u,1, In A i When there are multiple neighbors, these neighbors are randomly arranged into subsequences. That is, the attribute set A i The behavior sequence N(v u,1, A i ),N(v u,2, A i ),…,N(v u,N, A i ) is through v u,1 ,v u,2 ,…,vu,N These N nodes are in A i The subsequences composed of neighbors in the sequence are spliced together.
[0148] Then, each object interaction sequence Merge together to get all objects in the attribute set A i The upper behavior is a sequence Thus, in this application, the attribute sequence set of an item v refers to N(v , A1), N(v , A2),…,N(v , A n ).
[0149] Finally, in the interaction sequence set S and each attribute set A i sequence After that, we can run word embedding algorithms on these data to obtain the embedding representations of these discrete attributes. In the following, the learning of the embedding representations of these discrete attributes is still explained using the object representation model as an example.
[0150] S213: Construct a training sample set based on the obtained interaction sequences and attribute sequence sets.
[0151] For example, each item identifier in each interaction sequence and the attribute sequence set of the corresponding item are taken as a training sample.
[0152] It should be noted that as long as there is interactive information between objects and items in the heterogeneous information network, the item nodes can be mapped to the same embedding representation space through this application to obtain the corresponding target features. On this basis, this application can be widely used in various recommendation services, such as video recommendation, e-commerce recommendation, music recommendation, e-book recommendation, etc. Here we only take video recommendation as an example for a simple explanation. Other recommendation services are similar and will not be described one by one here.
[0153] Considering that the object representation model in the present application can be used to learn the correlation between objects, for this purpose, the training samples can be grouped in pairs according to the interaction behavior between the object and the object. The training samples corresponding to a group of related objects can be used as a positive sample pair, and the training samples corresponding to a group of unrelated objects can be used as a negative sample pair.
[0154] In an optional implementation, the item identifiers in each interaction sequence are arranged according to the interaction time between the object and the item; the training sample set includes positive sample pairs and negative sample pairs; and the positive and negative sample pairs are constructed in the following manner:
[0155] First, each item identifier in each interaction sequence and the corresponding item attribute sequence set are taken as a training sample;
[0156] Furthermore, considering that items browsed at similar times are generally more similar / related, we can select positive and negative sample pairs based on the order of items in the interaction sequence:
[0157] Specifically, the training samples corresponding to two adjacent item identifiers in the interaction sequence are taken as a positive sample pair, and the training samples corresponding to two non-adjacent item identifiers in the interaction sequence are taken as a negative sample pair; in the positive and negative sample pairs obtained in this way, the actual similarity representations between the two items corresponding to each positive sample pair are associated (which can be recorded as the actual similarity is 1), and the actual similarity representations between the two items corresponding to each negative sample pair are unrelated (which can be recorded as the actual similarity is 0).
[0158] For example, in the sequence of the set S of interaction sequences, adjacent items in the sequence are randomly selected as positive examples with certain correlation. For example, for the sequence s in S u =v u,1 ,v u,2 ,…,v u,N Any adjacent pair of nodes in v u,l ,v u,l+1 can all be regarded as relevant positive examples (i.e., positive sample pairs).
[0159] Negative examples (i.e. negative sample pairs) are obtained through negative sampling. Specifically, the ratio of positive examples to negative examples is set for extraction. For example, a positive to negative ratio of 1 to 5 is used, that is, for each v extracted u,l ,v u,l+1 For a positive example, then anywhere there are 5 item nodes and v u,l Generate negative examples, such as v u,l ,v u,l+2 , v u,l ,v u,l-2 , v u,l ,v u,l+5 , v u,l ,v u,l-4 , v u,l ,v u,l+4 .
[0160] In the present application, binary classification training data is constructed by marking the actual similarity of positive examples in the training sample set as 1 and the actual similarity of negative examples as 0.
[0161] It should be noted that the above-mentioned methods of constructing the positive and negative examples are only simple examples for illustration, and other methods are also applicable to the embodiments of the present application, which will not be described in detail here.
[0162] In addition, the item attributes considered in this application are all nodes of heterogeneous information networks, that is, these attributes are all discrete variables. If the item nodes involve continuous variables, try to discretize them first.
[0163] An optional implementation is that when constructing a heterogeneous information network, if the attributes of an item are continuous data, the continuous data is discretized to obtain corresponding item attribute nodes.
[0164] For example, if a certain type of video attribute is the duration of the video, and the duration of the video is generally continuous data, such as 0.5 hours, 1.3 hours, 2.5 hours, etc., it can be discretized into labels, such as: less than 5 minutes, 5 to 10 minutes, less than half an hour, less than 1 hour, 1 to 2 hours, 2 to 3 hours, etc., and each label corresponds to a video attribute node. In other words, the floating point number is converted into a discrete label. The specific discretization method can be determined based on business experience and is not specifically limited in this article.
[0165] Based on the above implementation methods, heterogeneous information networks can be effectively applied to the modeling of recommendation services, which can effectively improve the accuracy of the recommendation system.
[0166] S22: Performing cyclic iterative training on the item representation model to be trained based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps:
[0167] S221: For the training sample pairs selected from the training sample set, based on the item identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain target features of the corresponding items.
[0168] S222: Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two items, adjust the parameters of the item representation model to be trained.
[0169] Unlike traditional graph neural network algorithms, this application does not need to learn the embedded representation of all nodes in the heterogeneous information network, but only focuses on learning the embedded representation of the object nodes. Therefore, this application is a very lightweight graph neural network model, and does not need to store the embedded representation of all nodes in the graph like many traditional graph neural networks. In other words, this application does not need to solve the embedded representation of the object node, so it can handle large-scale heterogeneous information networks and is almost not limited by the size of the network.
[0170] In addition, this application uses the item identification and attribute sequence sets contained in each training sample as input to learn the embedded representation of the item. This process does not rely on the prior information of meta-path. Moreover, this application is not limited to items, and can be goods, music, videos, etc. Based on this, the application can be applied to fields including but not limited to product recommendations, music recommendations, video recommendations, etc. The item representation model obtained in this way is universal and is not limited to specific fields. The applicable fields include but are not limited to product recommendations, music recommendations, video recommendations, etc., and it is universal.
[0171] Specifically, in order to learn the correlation between items and realize subsequent item recommendations, a loss function can be constructed based on the difference between the feature similarity and the actual similarity between the target features of two items, and the item representation model can be trained. Based on this, it can be effectively ensured that the embedded representations of related items are closer, while the embedded representations of unrelated items are more different.
[0172] An optional implementation is that the item representation model includes two parameter-sharing sub-networks (the two sub-networks have the same structure, share parameters during training, and are updated synchronously). In step S221, each training sample in the selected training sample pair can be input into a sub-network, and target features of items corresponding to different training samples can be extracted simultaneously based on different sub-networks. The specific implementation is as follows:
[0173] The item identification and attribute sequence set contained in each training sample are input into one of the sub-networks in the item representation model. Different training samples correspond to different sub-networks. Then, feature extraction is performed on the input training samples based on the sub-networks, that is, for each sub-network, the following operations are performed:
[0174] In summary, first, based on this sub-network, the input object identification and attribute sequence set need to be mapped into embedded features respectively; then, the obtained embedded features are subjected to feature fusion and semantic learning to obtain the target features of the corresponding objects.
[0175] In order to obtain an embedded representation of an object that combines multiple attributes and object behaviors, this application uses Figure 5 The correlation model structure is trained, which is a schematic diagram of the structure of an item representation model provided in an embodiment of the present application. First, the embedding representation of the node itself and the embedding representation of various attributes are obtained through the embedding layer and the average pooling layer. Then, Figure 5 The "concatenation layer" in the above example obtains the comprehensive embedding representation of the node. Finally, the representation layer obtains the optimized embedding representation after model training.
[0176] in, Figure 5The input layer in the subnetwork shown mainly includes two types: the input layer of item ID and the input layer of item attribute neighbors. This layer mainly inputs the item nodes and their attributes after IDization, so that the relevant features can obtain the embedding vector in the embedding layer.
[0177] It is important to note that these two types of input layers are slightly different:
[0178] The input layer of the item ID only inputs the ID of the item node itself;
[0179] Attribute set A of the item attribute neighbors i The input layer, where i∈{1,…,n}, needs to input each item node v∈V and the i-th attribute node set A i The number of adjacent nodes N(v , A i ) of the ID sequence, where N(v , A i ) indicates that item node v is in A i Middle neighbors (i.e. attribute nodes that have an edge relationship with item node v).
[0180] If node u has too many neighbors, you can also perform non-repetitive random sampling through the dimensions of the output layer, for example, randomly select some dimensions and input them into the embedding layer.
[0181] Optionally, the subnetwork includes multiple embedding layers (also called node embedding layers), and also includes a global average pooling layer, a concatenation layer, and a representation layer; when extracting target features of items based on the subnetwork, an optional implementation is as follows:
[0182] Based on one of the embedding layers in the sub-network, the item identification is mapped to a low-dimensional dense embedding feature, and based on the other embedding layers in the sub-network, each attribute sequence in the attribute sequence set is mapped to a low-dimensional dense embedding feature, and each attribute sequence corresponds to an embedding layer.
[0183] In the embodiment of the present application, the role of the embedding layer is to map the input ID into a low-dimensional, dense embedding representation, thereby providing it to the subsequent deep learning network as a feature.
[0184] Corresponding to the above input layer, the embedding layer of this application also has two types: one is the embedding layer of the item node set V, and the other is the embedding layer of the item attribute set A i embedding layer, where i∈{1,…,n}.
[0185] like Figure 5As shown, each subnetwork includes n+1 embedding layers, of which one is the embedding layer of the item node set V, which is used to map the item identifier to a low-dimensional dense embedding feature, and n is the item attribute set A. i The embedding layers are used to map the corresponding attribute sequences into low-dimensional dense embedding features.
[0186] After obtaining the embedding features corresponding to the item identification and attribute sequence, the obtained embedding features can be fused and semantically learned. The specific process is as follows:
[0187] First, based on the global average pooling layer, each embedded feature is averagely pooled to obtain the pooling features corresponding to each embedded feature;
[0188] Then, based on the splicing layer, each pooling feature is spliced to obtain the fusion feature;
[0189] Finally, semantic learning of the fused features is performed based on the representation layer to obtain the corresponding target features.
[0190] Still Figure 5 Taking the example shown in the figure, the role of the global pooling layer is to average pool the embedding vectors of each input node, so as to obtain the pooled representation of the node and neighbor attributes respectively, that is, the pooled features corresponding to each embedded feature.
[0191] The function of the splicing layer is to splice the pooled features of the item node with the pooled features of various item attributes, so as to obtain a complete embedded representation of the item node, which is the fusion feature in this application.
[0192] The representation layer is used to learn the semantics of the complete embedded representation (i.e., fused features) of the item node and its associated attribute splicing in the item representation model, thereby outputting the target features of the item node. The representation layer is generally implemented by stacking multiple layers of fully connected layers.
[0193] It should be noted that after constructing the interaction sequence of the item node and the attribute sequence of the attribute node, the present application can use any method of learning the node embedding representation in the sequence, without being limited to the method of average pooling of the input embedding vector mentioned in this article. The main reason for taking this type of algorithm as an example here is that the algorithm is widely used, fast and can process large-scale data, but the present application is not limited to this type of method, and other methods are also applicable, and this article does not make specific limitations.
[0194] See also Figure 6As shown, it is a logical schematic diagram of item feature extraction provided by an embodiment of the present application. Among them, for the items A and B corresponding to the training sample pair, first, the embedded features of the respective identifications of the two items and their corresponding attribute sequence sets are obtained based on the embedding layer, such as embedded features a0~an(n+1), embedded features b0~bn(n+1). Then, the pooling features corresponding to each embedded feature are obtained based on the global average pooling layer, such as pooling features a0~an(n+1), pooling features b0~bn(n+1). Furthermore, based on the splicing layer, the obtained n+1 pooling features are simply spliced to obtain the fused feature A corresponding to item A and the fused feature B corresponding to item B. On this basis, semantic learning is performed through the representation layer to obtain the target feature A corresponding to item A and the target feature B corresponding to item B.
[0195] It should be noted that if a certain Ai attribute sequence of an item is empty, it can be filled with a vector of all zeros, or all missing Ai can share the same random vector. This type of method has a consensus in industry and academia, so it will not be repeated here.
[0196] Based on the above method, each sub-network (also called semantic tower) can output the target features of the corresponding item node, and then, based on Figure 5 The matching layer shown can calculate the semantic relevance of the semantic towers on the left and right sides.
[0197] Specifically, in order to calculate the correlation of the embedded representations of the two item nodes output by the representation layer, the present application uses the cosine function to calculate the correlation of the cosine similarities of the two vectors as the feature similarity of the two item nodes. Combined with the actual similarities annotated by the two item nodes, a binary cross entropy can be constructed as a loss function, and the loss function is used for model training.
[0198] It should be noted that the above-listed methods for calculating item feature similarity and loss function are only examples, and other methods are also applicable to the embodiments of the present application and are not specifically limited here.
[0199] Obviously, compared with the related art that requires random walks based on meta-path prior information to obtain node adjacency relationships and then learn the node embedding representation through word vector methods, this application does not rely on meta-path prior information and also requires heuristic random walks in the graph. The node embedding representation of this application is obtained based on a supervised learning method. The input of the model is the embedding representation of the item node and its various attributes. Finally, the final embedding representation of the node can be obtained in the representation layer in the twin towers. The embedding representation will fuse the behavior information of the object with the attribute information of the node.
[0200] In this application, in order to obtain an embedded representation of an item that integrates multiple attributes and object behaviors, feature extraction is performed based on the item identifier and its corresponding attribute sequence set. Based on this, the item representation model in this application is a very lightweight graph neural network model, and the embedded representation of the item nodes learned based on this model can directly realize item-item recommendations. This application can make full use of the interactive relationship between objects and items, the structure and semantic information associated with items and their attribute nodes to establish an I2I recommendation model. The I2I model can greatly alleviate the storage and calculation problems of ultra-large-scale data that traditional U2I recommendation algorithms based on heterogeneous information networks need to face.
[0201] Therefore, after the above-mentioned item representation model is trained, the embedding representation of the nodes in the item set can be extracted using the semantic tower on either side to implement I2I recommendation based on this. The item recommendation method proposed in this application is described in detail below:
[0202] See also Figure 7 As shown, it is an implementation flow chart of an item recommendation method provided in an embodiment of the present application. Taking the terminal device as the execution subject as an example, the specific implementation process of the method is as follows S71-S73:
[0203] S71: Obtaining the item identifiers and attribute sequence sets corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item.
[0204] S72: Input the object identification and attribute sequence set of the target object into the trained object representation model to obtain the target feature corresponding to the target object, and input the object identification and attribute sequence set of each candidate object into the trained object representation model to obtain the target feature corresponding to each candidate object.
[0205] S73: based on the feature similarity between the target feature of each candidate item and the target feature of the target item, selecting a recommended item determined based on the target item from each candidate item.
[0206] Compared with traditional recommendation algorithms based on heterogeneous information networks, which are mostly concentrated on the U2I type, the item representation model in this application is a lightweight graph neural network model. The embedded representation of item nodes learned based on this model can be directly applied to I2I type recommendations (item-item recommendations).
[0207] If the target item is the item most recently browsed by subject X, each candidate item is an item that has not been recommended to subject X (or has not been browsed by subject X). Each item corresponds to an item ID (i.e., item identifier), and each item corresponds to an attribute sequence set. The specific acquisition method can refer to the above embodiment, and the repeated parts will not be repeated.
[0208] After obtaining the above information of each item, it can be input into the trained item representation model, and the target features (i.e., embedded representation) of the target item and each candidate item can be extracted based on the model.
[0209] Finally, according to the feature similarity between each candidate item and the target item, one or more items can be selected from each candidate item as recommended items. For example, items with a corresponding feature similarity greater than a preset similarity threshold can be selected as recommended items, items with the highest corresponding feature similarity ranking can be selected as recommended items, and so on.
[0210] Among them, the preset similarity threshold can be set according to experience, and the preset similarity thresholds corresponding to different items can be the same or different, depending on actual needs, and this article does not make specific limitations.
[0211] In simple terms, the target features of each item node in the item set in the heterogeneous information network can also be extracted based on any side semantic tower in the trained item representation model. When recommending related items, vector retrieval tools such as Annoy can be used to recall related items adjacent to each item vector, thereby achieving I2I recommendation.
[0212] In the above implementation, the target features of the items can be extracted only based on the item identification and attribute sequence set of the items. On this basis, based on the feature similarity between the target features of the items, the recommended items determined based on the target items can be directly screened out from the candidate items. This process is simple and convenient, and can effectively improve the rate of item recommendation. Furthermore, the model learning process in the present application fully considers the correlation between items. The embedded representations of related items are more similar, while the embedded representations of unrelated items are quite different. Based on the similarity between the embedded representations of different items, this can directly and effectively improve the accuracy of item recommendation.
[0213] In addition, the present application can obtain relatively accurate embedding representation of item nodes by only using various attribute information of item nodes, thus effectively solving the problem of item cold start.
[0214] Specifically, for newly added items, it is impossible to learn the embedded representation of the item node through the object's behavior sequence. However, since most of the input in the item representation model is the attribute information of the item, in the absence of the embedding vector of the item node in the sequence as input, the item representation model can still obtain the embedded representation of the item node more accurately through the attributes associated with the item node. That is, for newly added items that do not have an object behavior sequence, the present application can obtain relatively accurate item embedding representations based only on the various attribute information of the item, thereby effectively solving the problem of item cold start.
[0215] In addition, this application does not limit the specific application field of item recommendation. The following is a simple example of item recommendation in this application in conjunction with the accompanying drawings:
[0216] See also Figure 8 As shown, it is a schematic diagram of a video recommendation page provided by an embodiment of the present application. Taking the object as a video as an example, if the target video is the video most recently viewed by object X, each candidate video is a video in the video content pool that has not been recommended to object X (or a video that object X has not viewed yet), based on the above Figure 7 The method listed above calculates the feature similarity between the target video and each candidate video based on the trained object representation model. It can also use a vector retrieval tool to query the pre-stored target features of the target video and each candidate video, and then by calculating the feature similarity, recall relevant videos that are close to the target features of the target video from each candidate video as recommended videos for the target video.
[0217] like Figure 8 As shown in , when the X subject opens a certain video software, some videos can be recommended to the X subject on the homepage / recommendation page of the video software, and these recommended videos can be obtained by the above method.
[0218] In addition, the item may also be a short video. For example, based on the short video currently browsed by subject X, one or more short videos that have not been exposed to subject X are selected from the short video content pool and recommended to subject X, and so on.
[0219] See also Fig. 9 As shown, it is a schematic diagram of a product recommendation page provided by an embodiment of the present application. Taking the items as products as an example, if the target product is the product most recently browsed by object X, each candidate product is a product in the product library that has not been recommended to object X (or a product that object X has not browsed yet), and the candidate products can also be based on Figure 7 The method shown or the method of querying through a vector search tool is to recall related products close to the target features of the target product from each candidate product as recommended products for the target product.
[0220] like Fig. 9 As shown in , when an X object opens a shopping software, some commodities can be recommended to the X object on the homepage / recommendation page of the shopping software, and these recommended commodities can be obtained by the above method.
[0221] It should be noted that the examples of recommendation services listed above are just simple illustrations, and any I2I recommendation can apply the item recommendation method proposed in this application, which will not be described one by one here.
[0222] See also Fig.10 As shown, it is a schematic diagram of a specific implementation process of a video representation model training and item recommendation method provided in an embodiment of the present application. The specific implementation process of the method is as follows:
[0223] S1001: The server obtains historical browsing records and video details of multiple objects from the X video software;
[0224] S1002: The server constructs an interaction sequence for each object and a property sequence set corresponding to each video therein based on the acquired historical browsing records and video detail information;
[0225] S1003: The server constructs a training sample set based on each interaction sequence and attribute sequence set obtained;
[0226] S1004: The server divides each training sample in the training sample set into multiple positive sample pairs and negative sample pairs according to a ratio of 1:5, and marks the corresponding actual similarities;
[0227] S1005: The server selects training sample pairs from the training sample set and inputs the training sample pairs into the video representation model to be trained;
[0228] Among them, one training sample pair or multiple training sample pairs can be selected each time, and the feature similarity of each training sample pair can be calculated based on the following method, which is not specifically limited in this article.
[0229] S1006: The server extracts features from the video identifiers and attribute sequence sets contained in the selected training samples based on the video representation model to obtain target features of the corresponding videos;
[0230] S1007: the server adjusts parameters of the video representation model based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two videos;
[0231] S1008: The server determines whether the model has converged, if so, executes step S1009, otherwise, returns to step S1005;
[0232] S1009: The server obtains a trained video representation model;
[0233] S1010: The server extracts target features of each item node in the item set in the heterogeneous information network based on any one side semantic tower in the trained item representation model;
[0234] S1011: After receiving the recommendation request from the terminal device, the server uses a vector search tool to recall related items that are close to the target item vector, and feeds them back to the terminal device, which then recommends it to the object.
[0235] It is understandable that in the specific implementation of the present application, when the above embodiments of the present application are applied to specific products or technologies, the object's permission or consent is required, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0236] Next, taking an actual scenario as an example, if the subject uses a video software in a terminal device to watch a video and then returns to the homepage, a video recommendation can be made to the subject. Fig.11 As shown, it is a schematic diagram of the interaction logic between a server and a terminal device provided by an embodiment of the present application. For example, the terminal device takes the video watched by the object as the target video, and sends the target video ID and attribute sequence set to the server. Then, the server searches for multiple candidate videos from the video library, and obtains the video ID and attribute sequence set of each candidate video, and then predicts the target features corresponding to each video (including the target video and the candidate video) based on the trained video representation model deployed on the server side; then, the feature similarity between each video and the target video can be calculated respectively, and a number of recommended videos can be selected from each candidate video according to the feature similarity and sorted (such as the higher the corresponding feature similarity, the higher the sorting); finally, the server transmits the ID and sorting result of the recommended video back to the terminal device, and displays the recommended video to the object on the homepage through the terminal device.
[0237] The recommendation method proposed in this application is not targeted at applications in specific fields. In addition to the video recommendation fields listed above, it can also be applied to product recommendation, music recommendation and other fields. Among them, the specific recommendation methods in other fields are similar to the video recommendation process listed above, and will not be repeated here.
[0238] Based on the same inventive concept, the present application also provides a training device for an object representation model. Fig.12 As shown, it is a schematic diagram of the structure of a training device 1200 for an object representation model, which may include:
[0239] The sample acquisition unit 1201 is used to acquire a training sample set; each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0240] The model training unit 1202 is used to perform cyclic iterative training on the item representation model to be trained based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps:
[0241] For the training sample pairs selected from the training sample set, based on the item identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain the target features of the corresponding items;
[0242] Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two items, parameters of the item representation model to be trained are adjusted.
[0243] Optionally, the sample acquisition unit 1201:
[0244] According to the interaction behavior between at least one object and the item within a preset time period, construct an interaction sequence corresponding to each object, each interaction sequence includes an identifier of an item that generates an interaction behavior with the corresponding object;
[0245] Obtain the attribute sequence set of each item associated with each interaction sequence;
[0246] Based on the obtained interaction sequences and attribute sequence sets, a training sample set is constructed.
[0247] Optionally, the item identifiers in each interaction sequence are arranged according to the interaction time between the object and the item; the training sample set includes positive sample pairs and negative sample pairs; the training sample pairs are positive sample pairs or negative sample pairs;
[0248] Sample acquisition unit 1201:
[0249] Take each item identifier in each interaction sequence and the corresponding item attribute sequence set as a training sample;
[0250] The training samples corresponding to the two adjacent item identifiers in the interaction sequence are taken as a positive sample pair, and the actual similarity representations between the two items corresponding to each positive sample pair are associated;
[0251] The training samples corresponding to the identifiers of two non-adjacent items in the interaction sequence are taken as a negative sample pair, and the actual similarity representations between the two items corresponding to each negative sample pair are irrelevant.
[0252] Optionally, the item representation model includes two parameter-sharing sub-networks;
[0253] The model training unit 1202 is specifically used for:
[0254] Input the item identification and attribute sequence set contained in each training sample into one of the sub-networks in the item representation model, where different training samples correspond to different sub-networks; for each sub-network, perform the following operations:
[0255] Based on the sub-network, the input item identification and attribute sequence set are mapped into embedded features respectively;
[0256] The obtained embedded features are subjected to feature fusion and semantic learning to obtain the target features of the corresponding objects.
[0257] Optionally, the sub-network includes multiple embedding layers;
[0258] The model training unit 1202 is specifically used for:
[0259] Based on one of the embedding layers in the sub-network, the item identification is mapped to a low-dimensional dense embedding feature, and based on the other embedding layers in the sub-network, each attribute sequence in the attribute sequence set is mapped to a low-dimensional dense embedding feature, and each attribute sequence corresponds to an embedding layer.
[0260] Optionally, the subnetwork includes a global average pooling layer, a concatenation layer, and a representation layer;
[0261] The model training unit 1202 is specifically used for:
[0262] Based on the global average pooling layer, each embedded feature is averagely pooled to obtain the pooling features corresponding to each embedded feature;
[0263] Based on the splicing layer, each pooling feature is spliced to obtain the fusion feature;
[0264] Based on the representation layer, semantic learning is performed on the fused features to obtain the corresponding target features.
[0265] Optionally, the model training unit 1202 is specifically used for:
[0266] Based on the edge relationship between the object node and the item node in the pre-constructed heterogeneous information network, and the corresponding interaction time between the object node and the item node with the edge relationship, the interaction behavior between each object and the item within the preset time length is determined; wherein the object node and the item node with the edge relationship represent the existence of the interaction behavior between the corresponding object and the item;
[0267] For each object, the item identifiers of the items that interact with the object are arranged according to the corresponding interaction time to obtain the interaction sequence corresponding to the object.
[0268] Optionally, the model training unit 1202 is specifically used for:
[0269] According to the edge relationship between the item nodes and the item attribute nodes in the pre-constructed heterogeneous information network, the attribute identifiers of the same type of item attributes associated with each item are randomly combined into a corresponding attribute sequence;
[0270] The attribute sequences corresponding to the same item node are combined into an attribute sequence set of the item corresponding to the item node.
[0271] Optionally, the device further comprises:
[0272] The network construction unit 1203 is used to discretize the continuous data to obtain corresponding item attribute nodes when constructing a heterogeneous information network if the item attributes are continuous data.
[0273] The item representation model in this application focuses on the learning of the embedded representation (i.e., target features) of items. The item representation model obtained based on this training is a very lightweight model. Moreover, the input of the model in this application is the item identification and various item attributes contained in the training sample pairs, and finally the embedded representation of the item can be obtained. The embedded representation is obtained based on a supervised learning method. In this learning process, the correlation between items is fully considered. Based on this model, the embedded representation of the item can be quickly learned, which does not depend on the prior information of meta-path and is not limited to specific fields. The applicable fields include but are not limited to commodity recommendation, music recommendation, video recommendation, etc., and it has universality. That is, the item representation model obtained by training the item identification and attribute sequence set contained in the training sample pairs as input and the embedded representation of the item as output is a lightweight and more universal model. Based on this lightweight model, the embedded representation of the item can be directly extracted without obtaining the prior information of meta-path in advance, which can effectively improve the computational efficiency of the item feature representation. Moreover, the present application can obtain relatively accurate embedding representation of the object by only using various attribute information of the object, thus effectively solving the problem of cold start of the object.
[0274] Based on the same inventive concept, the present application also provides an item recommendation device. Fig.13 As shown, it is a schematic diagram of the structure of the item recommendation device 1300, which may include:
[0275] The data acquisition unit 1301 is used to acquire the item identifier and attribute sequence set corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item;
[0276] The feature extraction unit 1302 is used to input the item identification and attribute sequence set of the target item into the trained item representation model to obtain the target feature corresponding to the target item, and to input the item identification and attribute sequence set of each candidate item into the trained item representation model to obtain the target feature corresponding to each candidate item;
[0277] The analyzing unit 1303 is configured to filter out recommended items determined based on the target item from the candidate items based on the feature similarity between the target feature of each candidate item and the target feature of the target item.
[0278] Since the model learning process fully considers the correlation between items, the embedded representations of related items are more similar, while the embedded representations of unrelated items are quite different. Based on the similarity between the embedded representations of different items, item-to-item recommendations can be directly implemented. As in the present application, the target item and each candidate item's corresponding item identifier and attribute sequence set are used as the input of the trained item representation model, and the target features of each item (including the target item and each candidate item) can be extracted respectively. On this basis, the more similar the target features between the target item and a candidate item are, the more related the two items are. Based on the obtained similarities of each feature, the recommended items determined based on the target item can be directly screened out from each candidate item to achieve fast and accurate item recommendations.
[0279] For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.
[0280] After introducing the item recommendation method and device according to the exemplary embodiment of the present application, next, an electronic device according to another exemplary embodiment of the present application is introduced.
[0281] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0282] Based on the same inventive concept as the above method embodiment, an electronic device is also provided in the embodiment of the present application. In one embodiment, the electronic device may be a server, such as Figure 1 In this embodiment, the structure of the electronic device can be as follows: Fig.14 As shown, it includes a memory 1401 , a communication module 1403 and one or more processors 1402 .
[0283] The memory 1401 is used to store computer programs executed by the processor 1402. The memory 1401 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0284] The memory 1401 may be a volatile memory, such as a random-access memory (RAM); the memory 1401 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1401 may be any other medium that can be used to carry or store a desired computer program in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1401 may be a combination of the above memories.
[0285] The processor 1402 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 1402 is used to implement the above-mentioned item recommendation method when calling the computer program stored in the memory 1401 .
[0286] The communication module 1403 is used to communicate with terminal devices and other servers.
[0287] The specific connection medium between the memory 1401, the communication module 1403 and the processor 1402 is not limited in the embodiment of the present application. Fig.14 In the embodiment, the memory 1401 and the processor 1402 are connected via a bus 1404. Fig.14 The connections between the other components are only for illustration and are not intended to be limiting. The bus 1404 can be divided into an address bus, a data bus, a control bus, etc. For ease of description, Fig.14The diagram shows that only one thick line is used, but this does not mean that there is only one bus or only one type of bus.
[0288] The memory 1401 stores a computer storage medium, and the computer storage medium stores computer executable instructions, and the computer executable instructions are used to implement the training of the item representation model and the item recommendation method of the embodiment of the present application. The processor 1402 is used to execute the training of the item representation model and the item recommendation method, such as Figure 2 or Figure 7 shown.
[0289] In another embodiment, the electronic device may also be other electronic devices, such as Figure 1 The terminal device 110 shown in FIG. 1 is a terminal device 110 shown in FIG. 1 . In this embodiment, the structure of the electronic device can be as follows: Fig.15 As shown, it includes: a communication component 1510, a memory 1520, a display unit 1530, a camera 1540, a sensor 1550, an audio circuit 1560, a Bluetooth module 1570, a processor 1580 and other components.
[0290] The communication component 1510 is used to communicate with the server. In some embodiments, a wireless fidelity (WiFi) module may be included. The WiFi module belongs to a short-range wireless transmission technology. The electronic device can help the object to send and receive information through the WiFi module.
[0291] The memory 1520 can be used to store software programs and data. The processor 1580 executes various functions and data processing of the terminal device 110 by running the software programs or data stored in the memory 1520. The memory 1520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory 1520 stores an operating system that enables the terminal device 110 to run. In the present application, the memory 1520 can store an operating system and various application programs, and can also store a computer program for executing the item recommendation method of the embodiment of the present application.
[0292] The display unit 1530 may also be used to display information input by the object or information provided to the object and a graphical user interface (GUI) of various menus of the terminal device 110. Specifically, the display unit 1530 may include a display screen 1532 disposed on the front of the terminal device 110. The display screen 1532 may be configured in the form of a liquid crystal display, a light emitting diode, etc. The display unit 1530 may be used to display any one of the recommendation pages in the embodiments of the present application, etc.
[0293] The display unit 1530 can also be used to receive input digital or character information, and generate signal input related to the object setting and function control of the terminal device 110. Specifically, the display unit 1530 may include a touch screen 1531 set on the front of the terminal device 110, which can collect touch operations of objects on or near it, such as clicking a button, dragging a scroll box, etc.
[0294] The touch screen 1531 can be covered on the display screen 1532, or the touch screen 1531 and the display screen 1532 can be integrated to realize the input and output functions of the terminal device 110, and the integrated display screen can be referred to as a touch display screen. In this application, the display unit 1530 can display the application program and the corresponding operation steps.
[0295] The camera 1540 can be used to capture static images, and the object can publish the image taken by the camera 1540 through the application. The camera 1540 can be one or more. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the processor 1580 to convert it into a digital image signal.
[0296] The terminal device may further include at least one sensor 1550, such as an acceleration sensor 1551, a distance sensor 1552, a fingerprint sensor 1553, and a temperature sensor 1554. The terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, a light sensor, and a motion sensor.
[0297] The audio circuit 1560, the speaker 1561, and the microphone 1562 can provide an audio interface between the object and the terminal device 110. The audio circuit 1560 can transmit the electrical signal converted from the received audio data to the speaker 1561, which is converted into a sound signal for output. The terminal device 110 can also be configured with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 1562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1560 and converted into audio data, and then the audio data is output to the communication component 1510 to be sent to, for example, another terminal device 110, or the audio data is output to the memory 1520 for further processing.
[0298] The Bluetooth module 1570 is used to exchange information with other Bluetooth devices having Bluetooth modules through the Bluetooth protocol. For example, the terminal device can establish a Bluetooth connection with a wearable electronic device (such as a smart watch) that also has a Bluetooth module through the Bluetooth module 1570 to exchange data.
[0299] The processor 1580 is the control center of the terminal device. It uses various interfaces and lines to connect various parts of the entire terminal. It executes various functions of the terminal device and processes data by running or executing software programs stored in the memory 1520 and calling data stored in the memory 1520. In some embodiments, the processor 1580 may include one or more processing units; the processor 1580 may also integrate an application processor and a baseband processor, wherein the application processor mainly processes the operating system, object interface, and application programs, and the baseband processor mainly processes wireless communications. It is understandable that the above-mentioned baseband processor may not be integrated into the processor 1580. In the present application, the processor 1580 can run the operating system, application programs, object interface display and touch response, and the item recommendation method of the embodiment of the present application. In addition, the processor 1580 is coupled to the display unit 1530.
[0300] In some possible implementations, various aspects of the item recommendation method provided by the present application may also be implemented in the form of a program product, which includes a computer program. When the program product is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of the item recommendation method according to various exemplary embodiments of the present application described above in this specification. For example, the electronic device may execute the following steps: Figure 2 or Figure 7 Follow the steps shown in .
[0301] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0302] The program product of the embodiment of the present application may adopt a portable compact disk read-only memory (CD-ROM) and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, apparatus, or device.
[0303] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.
[0304] The computer program embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0305] Computer programs for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages. The computer program may be executed entirely on the subject electronic device, partially on the subject electronic device, as a separate software package, partially on the subject electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device may be connected to the subject electronic device via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0306] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0307] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0308] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain a computer-usable computer program.
[0309] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program commands. These computer program commands can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the commands executed by the processor of the computer or other programmable data processing device generate commands for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0310] These computer program commands may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the commands stored in the computer readable memory produce an article of manufacture comprising a command device, the command device implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0311] These computer program commands can also be loaded onto a computer or other programmable data processing device so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the commands executed on the computer or other programmable device provide the instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0312] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0313] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A training method for an item representation model, It is characterized in that The method comprises: Acquire a training sample set; each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item; The item representation model to be trained is subjected to cyclic iterative training based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps: For the training sample pairs selected from the training sample set, based on the object identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain target features of the corresponding objects; Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two objects, parameters of the object representation model to be trained are adjusted.
2. The method according to claim 1, It is characterized in that The step of obtaining a training sample set includes: According to the interaction behavior between at least one object and the item within a preset time period, construct an interaction sequence corresponding to each object, each interaction sequence includes an identifier of an item that generates an interaction behavior with the corresponding object; Obtain the attribute sequence set of each item associated with each interaction sequence; The training sample set is constructed based on the obtained interaction sequences and attribute sequence sets.
3. The method according to claim 2, It is characterized in that The item identifiers in each interaction sequence are arranged according to the interaction time between the object and the item; the training sample set includes positive sample pairs and negative sample pairs; the training sample pairs are positive sample pairs or negative sample pairs; The step of constructing a training sample set based on each interaction sequence and each attribute sequence set obtained includes: Taking each item identifier in each interaction sequence and the attribute sequence set of the corresponding item as a training sample; The training samples corresponding to the two adjacent item identifiers in the interaction sequence are taken as a positive sample pair, and the actual similarity representations between the two items corresponding to each positive sample pair are associated; The training samples corresponding to the identifiers of two non-adjacent items in the interaction sequence are taken as a negative sample pair, and the actual similarity representations between the two items corresponding to each negative sample pair are irrelevant.
4. The method according to any one of claims 1 to 3, It is characterized in that The item representation model includes two parameter-sharing sub-networks; The step of extracting features based on the item identifier and attribute sequence set contained in each training sample in the training sample pair to obtain target features of the corresponding item includes: Input the item identification and attribute sequence set contained in each training sample into one of the sub-networks in the item representation model, where different training samples correspond to different sub-networks; for each sub-network, perform the following operations respectively: Based on the sub-network, the input item identification and attribute sequence set are respectively mapped into embedded features; The obtained embedded features are subjected to feature fusion and semantic learning to obtain the target features of the corresponding objects.
5. The method according to claim 4, It is characterized in that The sub-network includes a plurality of embedding layers; Based on the sub-network, the input item identification and attribute sequence set are respectively mapped into embedded features, including: Based on one of the embedding layers in the sub-network, the item identification is mapped into a low-dimensional dense embedding feature, and based on other embedding layers in the sub-network, each attribute sequence in the attribute sequence set is mapped into a low-dimensional dense embedding feature, and each attribute sequence corresponds to an embedding layer.
6. The method according to claim 4, It is characterized in that The sub-network includes a global average pooling layer, a concatenation layer and a representation layer; The obtained embedded features are subjected to feature fusion and semantic learning to obtain target features of corresponding objects, including: Based on the global average pooling layer, average pooling is performed on each embedded feature to obtain pooling features corresponding to each embedded feature; Based on the splicing layer, each pooling feature is spliced to obtain a fusion feature; Based on the representation layer, semantic learning is performed on the fused features to obtain corresponding target features.
7. The method according to claim 2 or 3, It is characterized in that The step of constructing an interaction sequence corresponding to each object according to the interaction behavior between at least one object and the object within a preset time period includes: Based on the edge relationship between the object node and the item node in the pre-constructed heterogeneous information network, and the corresponding interaction time between the object node and the item node with the edge relationship, the interaction behavior between each object and the item within the preset time length is determined; wherein the object node and the item node with the edge relationship represent the existence of the interaction behavior between the corresponding object and the item; For each object, the item identifiers of items that interact with the object are arranged according to corresponding interaction times to obtain an interaction sequence corresponding to the object.
8. The method according to claim 2 or 3, It is characterized in that The step of obtaining the attribute sequence set of each item associated with each interaction sequence includes: According to the edge relationship between the item nodes and the item attribute nodes in the pre-constructed heterogeneous information network, the attribute identifiers of the same type of item attributes associated with each item are randomly combined into a corresponding attribute sequence; The attribute sequences corresponding to the same item node are combined into an attribute sequence set of the item corresponding to the item node.
9. The method according to claim 8, It is characterized in that The method further comprises: When constructing the heterogeneous information network, if the item attribute is continuous data, the continuous data is discretized to obtain corresponding item attribute nodes.
10. A method for recommending items. It is characterized in that The method comprises: Obtaining the item identifiers and attribute sequence sets corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item; Inputting the object identification and attribute sequence set of the target object into the trained object representation model to obtain the target feature corresponding to the target object, and respectively inputting the object identification and attribute sequence set of each candidate object into the trained object representation model to obtain the target feature corresponding to each candidate object; Based on the feature similarity between the target feature of each candidate item and the target feature of the target item, a recommended item determined based on the target item is screened out from the candidate items.
11. A training device for an object representation model, It is characterized in that include: A sample acquisition unit, used to acquire a training sample set; Each training sample in the training sample set includes: an item identifier and its corresponding attribute sequence set; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item; The model training unit is used to perform cyclic iterative training on the item representation model to be trained based on the training sample set to obtain a trained item representation model; wherein each iteration process performs the following steps: For the training sample pairs selected from the training sample set, based on the object identification and attribute sequence set contained in each training sample in the training sample pair, feature extraction is performed to obtain target features of the corresponding objects; Based on the difference between the obtained feature similarity between the two target features and the actual similarity between the corresponding two objects, parameters of the object representation model to be trained are adjusted.
12. An item recommendation device, It is characterized in that include: A data acquisition unit, used to acquire the item identifiers and attribute sequence sets corresponding to the target item and each candidate item; each attribute sequence in the attribute sequence set includes an attribute identifier of a class of item attributes associated with the corresponding item; a feature extraction unit, configured to input the object identification and attribute sequence set of the target object into the trained object representation model to obtain the target feature corresponding to the target object, and to input the object identification and attribute sequence set of each candidate object into the trained object representation model to obtain the target feature corresponding to each candidate object; The analyzing unit is used to screen out recommended items determined based on the target item from the candidate items based on the feature similarity between the target feature of each candidate item and the target feature of the target item.
13. An electronic device, It is characterized in that The method comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the methods of claims 1 to 10.
14. A computer-readable storage medium, It is characterized in that The method comprises a computer program. When the computer program is run on an electronic device, the computer program is used to enable the electronic device to execute the steps of any one of the methods of claims 1 to 10.
15. A computer program product, It is characterized in that The method comprises a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, so that the electronic device executes the steps of any one of the methods described in claims 1 to 10.
