Object recommendation method, device, electronic device and storage medium

By performing feature analysis and interest analysis on candidate objects in the knowledge graph, and matching the historical interaction information of the target account, the problem of low accuracy of object recommendation based on the knowledge graph is solved, and more efficient object recommendation is achieved.

CN114297475BActive Publication Date: 2025-02-18新奥新智科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111476524.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-02-18
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

There is a problem that the recommendation accuracy of the object based on the knowledge graph is relatively low.

Method used

When the object recommendation conditions of the target account are met, the candidate object is obtained, and the nodes with connection relationships with the nodes corresponding to the candidate object in the constructed knowledge graph are analyzed to obtain the feature description information. At the same time, interest analysis is performed based on the path information between the nodes corresponding to the historical interaction object of the target account to the nodes corresponding to the candidate object, and interest information of the target account for the candidate object is obtained. The feature description information of the candidate object is matched with the interest information of the target account, and the matching result between the candidate object and the target account is obtained, and the object recommendation is performed based on this.

Benefits of technology

Through more comprehensive feature analysis and more accurate interest analysis, the matching accuracy between candidates and target accounts is improved, thereby improving the accuracy of object recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114297475B_ABST
    Figure CN114297475B_ABST
Patent Text Reader

Abstract

The present application discloses an object recommendation method, device, electronic device and storage medium, belonging to the field of Internet technology, the method comprising: when the object recommendation condition of the target account is met, obtaining at least one candidate object, performing feature analysis based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, obtaining feature description information of the candidate object, performing interest analysis based on the path information between the node corresponding to the historical interaction object of the target account in the knowledge graph and the node corresponding to the candidate object, obtaining the target account's interest information on the candidate object, matching the feature description information of the candidate object with the target account's interest information on the candidate object, and performing object recommendation based on the matching results of each candidate object and the target account. In this way, the feature description of the candidate object is more comprehensive, and the target account's interest analysis on the candidate object is more accurate, so the recommendation accuracy is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Knowledge graphs are used in recommendation systems because they contain rich entities and relationships that can discover users' potential preferences, thereby helping to improve the accuracy of recommendation systems.

[0003] In the related technology, object recommendation based on knowledge graph mainly includes: meta-path based recommendation and embedding based recommendation. Among them, meta-path based recommendation requires experts to predefine domain knowledge, and the predefined domain knowledge is limited, so the recommendation accuracy is relatively low. Embedding based recommendation actually realizes the association representation between users and objects in an implicit way, and is not a direct user interest recommendation, so the recommendation accuracy is also relatively low. Summary of the invention

[0004] The embodiments of the present application provide an object recommendation method, device, electronic device and storage medium to solve the problem of relatively low recommendation accuracy in object recommendation schemes based on knowledge graphs in related technologies.

[0005] In a first aspect, an embodiment of the present application provides an object recommendation method, comprising:

[0006] When the object recommendation condition of the target account is met, obtaining at least one candidate object;

[0007] Based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object;

[0008] Perform interest analysis based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object to obtain interest information of the target account for the candidate object;

[0009] Matching the feature description information of the candidate object with the interest information of the target account in the candidate object to obtain a matching result between the candidate object and the target account;

[0010] Based on the matching results between each candidate object and the target account, an object recommendation is performed for the target account.

[0011] In some embodiments, based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object, including:

[0012] Taking the node corresponding to the candidate object as a reference node, searching the knowledge graph for a node that has a direct connection relationship with the reference node;

[0013] Based on the found node, the current feature description information of the candidate object is updated, and the initial feature description information of the candidate object is generated in advance;

[0014] Taking the found node as a new reference node, the step of searching for a node directly connected to the reference node in the knowledge graph is executed until no node is found or the number of searches reaches a preset value, and the current feature description information of the candidate object is determined as the final feature description information.

[0015] In some embodiments, updating the current feature description information of the candidate object based on the found node includes:

[0016] The preset feature description information corresponding to each found node is fused to obtain fused information;

[0017] Attenuating the fusion information based on a preset attenuation coefficient corresponding to the current number of searches;

[0018] The attenuated fusion information is fused with the current feature description information of the candidate object to obtain updated feature description information of the candidate object.

[0019] In some embodiments, interest analysis is performed based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object to obtain interest information of the target account for the candidate object, including:

[0020] In the knowledge graph, searching for a path from a node corresponding to a historical interaction object of the target account to a node corresponding to the candidate object, the path passing through a number of nodes that is less than a set value;

[0021] Performing association analysis on each path and the candidate object to obtain the weight of the path;

[0022] Based on the weight of each path, the feature description information of each path is fused to obtain the interest information of the target account for the candidate object.

[0023] In some embodiments, performing association analysis on each path and the candidate object to obtain the weight of the path includes:

[0024] Encoding the path information of each path to obtain feature description information of the path;

[0025] The feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path.

[0026] In a second aspect, an embodiment of the present application provides an object recommendation device, including:

[0027] An acquisition module, used to acquire at least one candidate object when an object recommendation condition of a target account is met;

[0028] An object analysis module, configured to perform feature analysis on each candidate object based on nodes in the constructed knowledge graph that have a connection relationship with nodes corresponding to each candidate object, to obtain feature description information of the candidate object;

[0029] An interest analysis module, configured to perform interest analysis based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object, to obtain interest information of the target account on the candidate object;

[0030] A matching module, used to match the feature description information of the candidate object with the interest information of the target account in the candidate object, to obtain a matching result between the candidate object and the target account;

[0031] The recommendation module is used to recommend objects to the target account based on the matching results between each candidate object and the target account.

[0032] In some embodiments, the object analysis module is specifically used to:

[0033] Taking the node corresponding to the candidate object as a reference node, searching the knowledge graph for a node that has a direct connection relationship with the reference node;

[0034] Based on the found node, the current feature description information of the candidate object is updated, and the initial feature description information of the candidate object is generated in advance;

[0035] Taking the found node as a new reference node, the step of searching for a node directly connected to the reference node in the knowledge graph is executed until no node is found or the number of searches reaches a preset value, and the current feature description information of the candidate object is determined as the final feature description information.

[0036] In some embodiments, the object analysis module is specifically used to:

[0037] The preset feature description information corresponding to each found node is fused to obtain fused information;

[0038] Attenuating the fusion information based on a preset attenuation coefficient corresponding to the current number of searches;

[0039] The attenuated fusion information is fused with the current feature description information of the candidate object to obtain updated feature description information of the candidate object.

[0040] In some embodiments, the interest analysis module is specifically used to:

[0041] In the knowledge graph, searching for a path from a node corresponding to a historical interaction object of the target account to a node corresponding to the candidate object, the path passing through a number of nodes that is less than a set value;

[0042] Performing association analysis on each path and the candidate object to obtain the weight of the path;

[0043] Based on the weight of each path, the feature description information of each path is fused to obtain the interest information of the target account for the candidate object.

[0044] In some embodiments, the interest analysis module is specifically used to:

[0045] Encoding the path information of each path to obtain feature description information of the path;

[0046] The feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path.

[0047] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein:

[0048] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned object recommendation method.

[0049] In a fourth aspect, an embodiment of the present application provides a storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the above-mentioned object recommendation method.

[0050] In an embodiment of the present application, when the object recommendation condition of the target account is met, at least one candidate object is obtained, and based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object, and interest analysis is performed based on the path information between the node corresponding to the historical interaction object of the target account in the knowledge graph and the node corresponding to the candidate object to obtain the target account's interest information on the candidate object, and the feature description information of the candidate object is matched with the target account's interest information on the candidate object to obtain the matching result of the candidate object and the target account, and object recommendation is performed based on the matching result of each candidate object and the target account. In this way, the feature description of the candidate object is more comprehensive, and the target account's interest analysis on the candidate object is more accurate, so the recommendation accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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:

[0052] Figure 1 A schematic diagram of an application scenario of an object recommendation method provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of an object recommendation method provided in an embodiment of the present application;

[0054] Figure 3 A flow chart of a method for performing feature analysis on a candidate object provided in an embodiment of the present application;

[0055] Figure 4 A flow chart of a method for a target account to perform interest analysis on a candidate object provided in an embodiment of the present application;

[0056] Figure 5 A schematic diagram of expanding a candidate object provided in an embodiment of the present application;

[0057] Figure 6 A schematic diagram of a graph relationship provided in an embodiment of the present application;

[0058] Figure 7 A schematic diagram of a process for predicting user interests provided in an embodiment of the present application;

[0059] Figure 8 A schematic diagram of the structure of an object recommendation device provided in an embodiment of the present application;

[0060] Fig. 9A schematic diagram of the hardware structure of an electronic device for implementing an object recommendation method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to solve the problem of low recommendation accuracy in object recommendation solutions based on knowledge graphs in related technologies, the embodiments of the present application provide an object recommendation method, device, electronic device and storage medium.

[0062] 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.

[0063] In order to facilitate the understanding of this application, the technical terms involved in this application are:

[0064] Knowledge graphs are designed to describe various entity concepts and their relationships. They are generally composed of triplets of "entity-relationship-entity" and "entity-attribute-attribute value", and each entity has its corresponding "attribute". Large-scale knowledge graphs often contain hundreds of millions of entities, tens of billions of attributes, and hundreds of billions of relationships, mined from large amounts of structured and unstructured data.

[0065] Entity refers to something that exists objectively and can be distinguished from each other. For example, in a knowledge graph, a node represents an entity, and the edges between nodes represent the associations between entities. Entities in a knowledge graph can be accounts, objects, etc., and relationships in a knowledge graph can be purchase relationships and browsing relationships between accounts and objects.

[0066] A recurrent neural network (RNN) is a type of recurrent neural network that takes sequence data as input, performs recursion in the direction of sequence evolution, and all nodes (recurrent units) are connected in a chain.

[0067] Long Short-Term Memory (LSTM) is a deep learning neural network model. Specifically, LSTM is a time recurrent neural network that is specially designed to solve the long-term dependency problem of general RNN (recurrent neural network). It is also a special RNN.

[0068] Figure 1 An application scenario diagram of an object recommendation method provided in an embodiment of the present application includes a terminal 100 and a server 200.

[0069] The terminal 100 may be any smart device such as a smart phone, a tablet computer, a portable personal computer, etc., and various APPs may be installed on the terminal 100. For example, in the embodiment of the present application, the APP installed on the terminal 100 may be an APP for purchasing objects such as goods, and the user may browse and purchase goods through the APP. For another example, in the embodiment of the present application, the APP installed on the terminal 100 may be an APP for browsing objects such as videos, and the user may browse and upload videos through the APP.

[0070] The server 200 can provide various network services for the terminal 100. For different applications on the terminal 100, the server 200 can be considered as a background server that provides corresponding network services. For example, in the embodiment of the present application, the server 200 can receive a product browsing request sent by the terminal 100, return a product details page, and provide product purchase services for the terminal 100. For another example, in the embodiment of the present application, the server 200 can receive a video browsing request and a video upload request sent by the terminal 100, and return a video review result.

[0071] The server 200 may be a single server, a server cluster consisting of several servers, or a cloud computing center.

[0072] Specifically, the server 200 may include a processor 210 (Center Processing Unit, CPU), a memory 220, an input device 230 and an output device 240, etc. The input device 230 may include a keyboard, a mouse, a touch screen, etc., and the output device 240 may include a display device, such as a liquid crystal display (Liquid Crystal Display, LCD), a cathode ray tube (Cathode Ray Tube, CRT), etc.

[0073] The memory 220 may include a read-only memory (ROM) and a random access memory (RAM), and provides the processor 210 with program instructions and data stored in the memory 220. In the embodiment of the present application, the memory 220 may be used to store the program of any object recommendation method in the embodiment of the present application.

[0074] The processor 210 calls the program instructions stored in the memory 220, and the processor 210 is used to execute the steps of any object recommendation method in the embodiments of the present application according to the obtained program instructions.

[0075] The terminal 100 and the server 200 are connected through the Internet to achieve mutual communication. Optionally, the above-mentioned Internet uses standard communication technology and / or protocol. The Internet is usually the Internet, but it can also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a dedicated network or a virtual private network. In some embodiments, the data exchanged through the network is represented by technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies.

[0076] It is worth noting that the application architecture diagram in the embodiment of the present application is intended to more clearly illustrate the technical solution in the embodiment of the present application, and does not constitute a limitation on the technical solution provided in the embodiment of the present application, nor is it limited to commodities and videos. For other application architectures and business applications, the technical solution provided in the embodiment of the present application is also applicable to similar problems.

[0077] After introducing the application scenarios of the embodiments of the present application, the object recommendation proposed in the present application is described with specific embodiments below. Figure 2 A flowchart of an object recommendation method provided in an embodiment of the present application, the method is applied to Figure 1 In a server in, and the method includes the following steps.

[0078] In step S201, when the object recommendation condition of the target account is met, at least one candidate object is obtained.

[0079] Among them, the object recommendation conditions include the target account entering the object recommendation page, the target account logging into the server, etc.

[0080] In step S202, based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object.

[0081] In specific implementation, Figure 3 The process shown performs feature analysis on the candidate object, and the process includes the following steps:

[0082] In step S301a, the node corresponding to the candidate object is used as a reference node.

[0083] In step S302a, a node having a direct connection relationship with the reference node is searched in the knowledge graph.

[0084] That is, find nodes in the knowledge graph that are directly connected to the reference node.

[0085] In step S303a, the current feature description information of the candidate object is updated based on the found node.

[0086] The initial feature description information of the candidate object is generated in advance.

[0087] In specific implementation, the preset feature description information corresponding to each node found can be fused to obtain fused information, and the fused information can be attenuated based on the preset attenuation coefficient corresponding to the current number of searches. The attenuated fused information and the current feature description information of the candidate object can then be fused to obtain the updated feature description information of the candidate object, wherein the preset attenuation coefficient is a decimal, and the number of searches is negatively correlated with the preset attenuation coefficient, that is, the more searches, the smaller the preset attenuation coefficient, and the fewer searches, the larger the preset attenuation coefficient.

[0088] Assuming that the preset feature description information corresponding to each node is expressed in vector form, the feature description information of the candidate object is also expressed in vector form, and the dimensions of each vector are the same, the vectors corresponding to each found node can be added to obtain a fusion vector, and the preset attenuation coefficient corresponding to the current search number is multiplied by the fusion vector to attenuate the fusion vector, and then the attenuated fusion vector and the current vector of the candidate object are added to obtain the updated vector of the candidate object.

[0089] In this way, the feature description information of nodes at different distances from the node corresponding to the candidate object in the knowledge graph is attenuated to different degrees with the help of a preset attenuation factor, which conforms to the rule that the farther the distance, the smaller the impact on the candidate object. Therefore, the feature description information of the candidate object finally obtained is more accurate.

[0090] In step S304a, it is determined whether the node cannot be found or the number of searches reaches a preset value. If not, the process proceeds to S305a. If so, the process proceeds to S306a.

[0091] That is, when either of the two conditions, that is, no node is found or the number of searches reaches a preset value, is met, the process proceeds to S306a; when neither condition is met, the process proceeds to S305a.

[0092] In step S305a, the found node is used as a new reference node and the process returns to S302a.

[0093] That is, the found node is used as the new reference node to continue expanding outward in the knowledge graph to cover more nodes.

[0094] In step S306a, the current feature description information of the candidate object is determined as the final feature description information.

[0095] In step S203, interest analysis is performed based on the path information between the node corresponding to the historical interaction object of the target account in the knowledge graph and the node corresponding to the candidate object to obtain the interest information of the target account in the candidate object.

[0096] In specific implementation, Figure 4 The process shown in the figure performs interest analysis to obtain the target account's interest information for the candidate object. The process includes the following steps:

[0097] In step S401a, in the knowledge graph, a path is searched from the node corresponding to the historical interaction object of the target account to the node corresponding to the candidate object, where the number of nodes passed through is less than a set value.

[0098] In actual applications, there may be multiple paths from the node corresponding to the target account's historical interaction object to the node corresponding to the candidate object in the knowledge graph, and the length of each path (i.e., the total number of nodes included in the path from the starting node to the ending node) is different. Generally speaking, the longer the path, the weaker the target account's interest in the candidate object, and the shorter the path, the stronger the target account's interest in the candidate object.

[0099] In order to improve the effectiveness of the path, the length of the path, that is, the maximum number of nodes M (i.e., the set value) contained in the path can be set, and then a path is searched in the knowledge graph from the node corresponding to the historical interaction object of the target account to the node corresponding to the candidate object, in which the number of nodes passing through is no more than M.

[0100] In step S402a, an association analysis is performed on each path and the candidate object to obtain the weight of the path.

[0101] In a specific implementation, the path information of each path can be encoded to obtain the feature description information of the path, and then the feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path, wherein the path information of the path includes which nodes are on the path, the order of these nodes on the path, and the relationship between two adjacent nodes on the path.

[0102] In step S403a, based on the weight of each path, the feature description information of each path is fused to obtain the target account's interest information on the candidate object.

[0103] Assuming that the feature description information of each path is expressed in vector form, the vectors of each path and the weights of each path can be weighted averaged, and the weighted average result (also a vector) can be determined as the target account's interest information on the candidate object.

[0104] In step S204, the feature description information of the candidate object is matched with the interest information of the target account on the candidate object to obtain a matching result between the candidate object and the target account.

[0105] Taking the example that the feature description information of the candidate object and the target account's interest information on the candidate object are both represented as vectors, the two vectors can be concatenated, and then the concatenated vector is passed through a multi-layer perceptron (MLP) network to obtain the interaction probability between the target account and the candidate object (i.e., the matching result between the candidate object and the target account).

[0106] In step S205, based on the matching results between each candidate object and the target account, an object recommendation is performed to the target account.

[0107] For example, based on the matching results between each candidate object and the target account, a preset number of candidate objects with the highest matching degree among the candidate objects are recommended to the target account.

[0108] The object recommendation method of the embodiment of the present application is described below in conjunction with specific embodiments.

[0109] In specific implementation, the graph triples (h, r, t) of each node in the knowledge graph (each node corresponds to an entity or attribute value) can be pre-constructed. Assuming that multiple candidate objects are obtained when recommending objects to the target account, the specific recommendation process is explained by taking a candidate object A as an example:

[0110] Step 1: Calculate the vector representation of candidate object A after N rounds of expansion, see Figure 5 .

[0111] (1) Calculate the vector representation of candidate object A after the first expansion.

[0112] First, construct the first expansion set S of candidate object A 1 :

[0113] S 1 ={(A,R1,B1),(A,R2,B2),(A,R3,B3)};

[0114] According to the rule that the closer the relationship between an entity or an attribute value is to an entity, the closer the distance is to the entity, the first expansion is assigned a decay coefficient p, and the vector representation E of the candidate object A after the first round of expansion is calculated. A for:

[0115]

[0116] Among them, h is the vector representation of the candidate object A at the initial time, t i For S 1 The vector representation of the i-th entity or attribute value in .

[0117] (2) E A As h for the next expansion, step (1) is repeated until the set round N is reached.

[0118] Step 2: Calculate the vector representation of the user's interest path.

[0119] (1) In the knowledge graph, find a path from the node corresponding to the historical interaction object of the target account to the node corresponding to the candidate object A, in which the number of nodes passed through is less than a set value, where each path is a user interest path.

[0120] Taking the purchase of books as an example, assume that the user corresponding to the target account is Xiao Ming and the candidate object A is "Text XX Mining". Figure 6 A diagram of a graph relationship provided for an embodiment of the present application. Xiao Ming has purchased the book "Statistical XX Processing". Should we recommend the book "Text XX Mining" to him? Figure 6 There are three paths between Xiaoming and the book "Text XX Mining":

[0121]

[0122]

[0123]

[0124] Path 1 and Path 3 indicate that Xiao Ming may like books written by Zong XX and computer science, while Path 2 has the effect of collaborative filtering, and similar users may have similar preferences. These paths show the relationship between Xiao Ming and "Text XX Mining" from different perspectives, and contain various possible explanations of semantics and behavior, so based on these paths, Xiao Ming's interest in "Text XX Mining" can be analyzed more accurately.

[0125] (2) Encode the path.

[0126] For example, use an RNN model or LSTM model to encode the entities and relationships on each path to obtain a vector representation of the path.

[0127] Step 3: User interest prediction based on attention mechanism.

[0128] Figure 7 A schematic diagram of a process for predicting user interests provided in an embodiment of the present application. Figure 7 On the right is a schematic diagram of the structure of the attention network. The input of the attention network is the vector representation of the candidate object A and the vector representation of a path, and the output is the weight of the path. Figure 7 The left side is a user interest prediction model based on the attention mechanism. First, the vector representation of candidate object A and the vector representation of each path are input into the attention network to obtain the weight of the path. The weights of each path are weighted summed with the vector representation of each path to obtain the target account’s interest vector for candidate object A. Then, the vector representation of candidate object A and the target account’s interest vector for candidate object A can be concatenated, and the concatenated vector is connected to an MLP network to obtain the interaction probability between the target account and candidate object A.

[0129] Step 4: Recommend objects based on user interest prediction results.

[0130] For example, a preset number of objects with the highest interaction probability are selected from the candidate objects and sent to the target account.

[0131] In an embodiment of the present application, the influence of multiple nodes connected to the node corresponding to the candidate object in the knowledge graph on the vector representation of the candidate object is taken into consideration, the expression of the candidate object is more complete and comprehensive, and weights are assigned to multiple paths from the target account to the candidate object based on the attention mechanism, and the vector representations of each path are fused based on the weight of each path to obtain the interest information of the target account in the candidate object, and the interest analysis is also more accurate. Therefore, the recommendation accuracy is higher.

[0132] When the method provided in the embodiments of the present application is implemented by software or hardware or a combination of software and hardware, the electronic device may include multiple functional modules, and each functional module may include software, hardware or a combination thereof.

[0133] Based on the same technical concept, an embodiment of the present application also provides an object recommendation device. The principle of solving the problem by the object recommendation device is similar to that of the above-mentioned object recommendation method. Therefore, the implementation of the object recommendation device can refer to the implementation of the object recommendation method, and the repeated parts will not be repeated. Figure 8 A structural diagram of an object recommendation device provided in an embodiment of the present application includes an acquisition module 801, an object analysis module 802, an interest analysis module 803, a matching module 804, and a recommendation module 805.

[0134] An acquisition module 801 is used to acquire at least one candidate object when an object recommendation condition of a target account is met;

[0135] The object analysis module 802 is used to perform feature analysis on the candidate objects based on the nodes connected to the nodes corresponding to each candidate object in the constructed knowledge graph to obtain feature description information of the candidate objects;

[0136] An interest analysis module 803 is used to perform interest analysis based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object, to obtain interest information of the target account on the candidate object;

[0137] A matching module 804 is used to match the feature description information of the candidate object with the interest information of the target account in the candidate object to obtain a matching result between the candidate object and the target account;

[0138] The recommendation module 805 is used to recommend objects to the target account based on the matching results between each candidate object and the target account.

[0139] In some embodiments, the object analysis module 802 is specifically used to:

[0140] Taking the node corresponding to the candidate object as a reference node, searching the knowledge graph for a node that has a direct connection relationship with the reference node;

[0141] Based on the found node, the current feature description information of the candidate object is updated, and the initial feature description information of the candidate object is generated in advance;

[0142] Taking the found node as a new reference node, the step of searching for a node directly connected to the reference node in the knowledge graph is executed until no node is found or the number of searches reaches a preset value, and the current feature description information of the candidate object is determined as the final feature description information.

[0143] In some embodiments, the object analysis module 802 is specifically used to:

[0144] The preset feature description information corresponding to each found node is fused to obtain fused information;

[0145] Attenuating the fusion information based on a preset attenuation coefficient corresponding to the current number of searches;

[0146] The attenuated fusion information is fused with the current feature description information of the candidate object to obtain updated feature description information of the candidate object.

[0147] In some embodiments, the interest analysis module 803 is specifically used to:

[0148] In the knowledge graph, searching for a path from a node corresponding to a historical interaction object of the target account to a node corresponding to the candidate object, the path passing through a number of nodes that is less than a set value;

[0149] Performing association analysis on each path and the candidate object to obtain the weight of the path;

[0150] Based on the weight of each path, the feature description information of each path is fused to obtain the interest information of the target account for the candidate object.

[0151] In some embodiments, the interest analysis module 803 is specifically used to:

[0152] Encoding the path information of each path to obtain feature description information of the path;

[0153] The feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path.

[0154] The division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in the embodiments of the present application may be integrated in a processor, or may exist physically separately, or two or more modules may be integrated in one module. The coupling between the modules may be achieved through some interfaces, which are usually electrical communication interfaces, but it is not excluded that they may be mechanical interfaces or other forms of interfaces. Therefore, the modules described as separate components may or may not be physically separated, and may be located in one place or distributed to different locations of the same or different devices. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0155] After introducing the comparative learning 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.

[0156] 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.

[0157] In some possible implementations, the electronic device according to the present application may include at least one processor and at least one memory. The memory stores program code, and when the program code is executed by the processor, the processor executes the method according to various exemplary implementations of the present application described above in this specification. For example, the processor may execute steps in a neural network model training method based on contrastive learning or steps in a method for extracting image features.

[0158] Refer to the following Fig. 9 The electronic device 130 according to this embodiment of the present application is described. Fig. 9 The electronic device 130 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0159] like Fig. 9 As shown, the electronic device 130 is in the form of a general electronic device. The components of the electronic device 130 may include but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 connecting different system components (including the memory 132 and the processor 131).

[0160] Bus 133 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0161] The memory 132 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1321 and / or a cache memory 1322 , and may further include a read-only memory (ROM) 1323 .

[0162] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0163] The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 130, and / or communicate with any device that enables the electronic device 130 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 135. Furthermore, the electronic device 130 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 136. As shown, the network adapter 136 communicates with other modules for the electronic device 130 via a bus 133. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0164] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 132 including instructions, and the instructions can be executed by the processor 131 to complete the above-mentioned comparative learning method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0165] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by the processor 131, the exemplary method provided in the present application is implemented.

[0166] In an exemplary embodiment, various aspects of a method for training a neural network model based on contrastive learning and a method for extracting image features provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the method according to various exemplary embodiments of the present application described above in this specification.

[0167] The program product may adopt 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 RAM, a ROM, an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0168] The program product for object recommendation in the embodiment of the present application may adopt a CD-ROM and include program code, and may be run on a computing 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 may be used by or in combination with an instruction execution system, apparatus, or device.

[0169] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code 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 above. The 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 an instruction execution system, apparatus, or device.

[0170] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0171] Program code 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" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network such as a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0172] 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.

[0173] 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.

[0174] 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 in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0175] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatus (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions 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 instructions executed by the processor of the computer or other programmable data processing device generate instructions 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.

[0176] These computer program instructions 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 instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing 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.

[0178] 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.

[0179] 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. An object recommendation method, characterized in that: include: When the object recommendation condition of the target account is met, obtaining at least one candidate object; Based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object; Perform interest analysis based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object to obtain interest information of the target account for the candidate object; Matching the feature description information of the candidate object with the interest information of the target account in the candidate object to obtain a matching result between the candidate object and the target account; Based on the matching results between each candidate object and the target account, recommending an object to the target account; The interest analysis is performed based on the path information between the node corresponding to the historical interaction object of the target account in the knowledge graph and the node corresponding to the candidate object to obtain the interest information of the target account for the candidate object, including: In the knowledge graph, searching for a path from a node corresponding to a historical interaction object of the target account to a node corresponding to the candidate object, the path passing through a number of nodes that is less than a set value; Performing association analysis on each path and the candidate object to obtain the weight of the path; Based on the weight of each path, the feature description information of each path is fused to obtain the interest information of the target account for the candidate object.

2. The method according to claim 1, characterized in that Based on the nodes in the constructed knowledge graph that have a connection relationship with the nodes corresponding to each candidate object, feature analysis is performed on the candidate object to obtain feature description information of the candidate object, including: Taking the node corresponding to the candidate object as a reference node, searching the knowledge graph for a node that has a direct connection relationship with the reference node; Based on the found node, the current feature description information of the candidate object is updated, and the initial feature description information of the candidate object is generated in advance; Taking the found node as a new reference node, the step of searching for a node directly connected to the reference node in the knowledge graph is executed until no node is found or the number of searches reaches a preset value, and the current feature description information of the candidate object is determined as the final feature description information.

3. The method according to claim 2, characterized in that The current feature description information of the candidate object is updated based on the found node, including: The preset feature description information corresponding to each found node is fused to obtain fused information; Attenuating the fusion information based on a preset attenuation coefficient corresponding to the current number of searches; The attenuated fusion information is fused with the current feature description information of the candidate object to obtain updated feature description information of the candidate object.

4. The method according to claim 1, characterized in that Performing association analysis on each path and the candidate object to obtain the weight of the path includes: Encoding the path information of each path to obtain feature description information of the path; The feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path.

5. An object recommendation device, characterized in that: include: An acquisition module, used to acquire at least one candidate object when an object recommendation condition of a target account is met; An object analysis module, configured to perform feature analysis on each candidate object based on nodes in the constructed knowledge graph that have a connection relationship with nodes corresponding to each candidate object, to obtain feature description information of the candidate object; An interest analysis module, configured to perform interest analysis based on path information between a node corresponding to a historical interaction object of the target account in the knowledge graph and a node corresponding to the candidate object, to obtain interest information of the target account on the candidate object; A matching module, used to match the feature description information of the candidate object with the interest information of the target account in the candidate object, to obtain a matching result between the candidate object and the target account; A recommendation module, configured to recommend an object to the target account based on the matching results between each candidate object and the target account; The interest analysis module is specifically used to find a path in the knowledge graph from the node corresponding to the historical interaction object of the target account to the node corresponding to the candidate object, where the number of nodes passed is less than a set value; Performing association analysis on each path and the candidate object to obtain the weight of the path; Based on the weight of each path, the feature description information of each path is fused to obtain the interest information of the target account for the candidate object.

6. The device according to claim 5, characterized in that The object analysis module is specifically used for: Taking the node corresponding to the candidate object as a reference node, searching the knowledge graph for a node that has a direct connection relationship with the reference node; Based on the found node, the current feature description information of the candidate object is updated, and the initial feature description information of the candidate object is generated in advance; Taking the found node as a new reference node, the step of searching for a node directly connected to the reference node in the knowledge graph is executed until no node is found or the number of searches reaches a preset value, and the current feature description information of the candidate object is determined as the final feature description information.

7. The device according to claim 6, characterized in that The object analysis module is specifically used for: The preset feature description information corresponding to each found node is fused to obtain fused information; Attenuating the fusion information based on a preset attenuation coefficient corresponding to the current number of searches; The attenuated fusion information is fused with the current feature description information of the candidate object to obtain updated feature description information of the candidate object.

8. The device according to claim 5, characterized in that The interest analysis module is specifically used for: Encoding the path information of each path to obtain feature description information of the path; The feature description information of the path and the feature description information of the candidate object are input into the attention network to obtain the weight of the path.

9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 4.

10. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the method as claimed in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Information recommendation method and device, storage medium and server

    CN110033851A

  • Information recommendation method, apparatus and device, and storage medium

    CN112100524A