Characterizing learning method, apparatus, device, storage medium and computer program product

By dividing and determining the distances of triples in the knowledge graph, and combining translation and clustering ideas, the accuracy of the representation of head entities, relations and tail entities in the knowledge graph is improved, solving the problem of inaccurate representation in the existing technology and enhancing the distinguishability of head entities.

CN117056523BActive Publication Date: 2025-11-28SHENZHEN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210737770.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-11-28
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

Existing technologies struggle to improve the accuracy of representing head entities, relations, and tail entities in triples within knowledge graphs.

Method used

By partitioning multiple triples in the knowledge graph, we obtain the first set of triples and the second set of triples. Based on their respective representation vector sets, we determine the distance between the head entity and the relation. Combining the ideas of translation and clustering, we determine the target representation vector set.

Benefits of technology

It improves the accuracy of knowledge graph representation learning, preserves the spatial distribution information of different head entities, and enhances the distinguishability of head entities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117056523B_ABST
    Figure CN117056523B_ABST
Patent Text Reader

Abstract

The application discloses a representation learning method, device, equipment, storage medium and computer program product, and related embodiments thereof can be applied to artificial intelligence and the like. The method comprises: dividing a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set; determining, based on a representation vector group corresponding to each triple in the first triple set, a representation vector sum of a head entity and a relation included in each triple in the first triple set, and a first distance of the representation vector pointing to a tail entity; determining, based on a representation vector group corresponding to each triple in the second triple set, a representation vector of the head entity included in each triple in the second triple set, and a second distance of the representation vector pointing to the tail entity; and determining, according to the first distance and the second distance, a target representation vector of the head entity, the relation and the tail entity in each triple included in the knowledge graph. The accuracy of representation learning of the knowledge graph can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence, and in particular to a representation learning method and device, equipment, a storage medium and a computer program product. BACKGROUND

[0002] Representation learning refers to a collection of techniques for converting raw data into a form that can be effectively exploited by machine learning; knowledge graph representation learning can learn representations of head entities, relationships and tail entities in triples included in a knowledge graph based on structural information included in the knowledge graph (i.e. information about triples included in the knowledge graph); how to improve the accuracy of knowledge graph representation learning, i.e. how to improve the accuracy of representations of head entities, relationships and tail entities in triples included in a knowledge graph, is a current research hotspot. SUMMARY

[0003] The embodiments of the present application provide a representation learning method, device, equipment, storage medium and computer program product, which can improve the accuracy of knowledge graph representation learning.

[0004] In one aspect, the embodiments of the present application provide a representation learning method, comprising:

[0005] performing division processing on a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set; a triple includes a head entity, a relationship and a tail entity, the number of categories of first tail entities in the first triple set is greater than the number of categories of second tail entities in the second triple set, the first tail entities include tail entities connected to the same type of relationship in the first triple set, and the second tail entities include tail entities connected to the same type of relationship in the second triple set;

[0006] extracting a representation vector group corresponding to each triple in the first triple set and the second triple set; the representation vector group corresponding to a triple includes a representation vector of a head entity, a representation vector of a relationship and a representation vector of a tail entity;

[0007] determining, based on the representation vector group corresponding to each triple in the first triple set, a first distance of a representation vector of a head entity and a representation vector of a relationship included in each triple in the first triple set, and a representation vector of a tail entity;

[0008] determining, based on the representation vector group corresponding to each triple in the second triple set, a second distance of a representation vector of a head entity included in each triple in the second triple set, and a representation vector of a tail entity;

[0009] determine, according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, a target representation vector group corresponding to each triple included in the knowledge graph; the target representation vector group corresponding to each triple includes a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity.

[0010] In one aspect, an embodiment of the present application provides a representation learning device, including:

[0011] The dividing unit is configured to divide a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set; each triple includes a head entity, a relation, and a tail entity; the number of categories of first tail entities in the first triple set is greater than the number of categories of second tail entities in the second triple set; the first tail entity includes a tail entity connected to the same relation in the first triple set; and the second tail entity includes a tail entity connected to the same relation in the second triple set.

[0012] The training unit is configured to extract a representation vector group corresponding to each triple in the first triple set and the second triple set; the representation vector group corresponding to each triple includes a representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity.

[0013] The training unit is further configured to determine, based on the representation vector group corresponding to each triple in the first triple set, a first distance of a representation vector of the head entity and the relation included in each triple in the first triple set, and a representation vector of the tail entity.

[0014] The training unit is further configured to determine, based on the representation vector group corresponding to each triple in the second triple set, a second distance of a representation vector of the head entity included in each triple in the second triple set, and a representation vector of the tail entity.

[0015] The training unit is further configured to determine, according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, a target representation vector group corresponding to each triple included in the knowledge graph; the target representation vector group corresponding to each triple includes a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity.

[0016] In one aspect, an embodiment of the present application provides a representation learning device, including an input interface and an output interface, and further including:

[0017] a processor adapted to implement one or more instructions; and

[0018] A computer storage medium storing one or more instructions adapted to be loaded and executed by the processor to perform the above-described representation learning method.

[0019] In an aspect, an embodiment of the present application provides a computer storage medium, characterized in that the computer storage medium stores computer program instructions, and the computer program instructions are executed by a processor to perform the above-described representation learning method.

[0020] In an aspect, an embodiment of the present application provides a computer program product, which includes a computer program stored in a computer storage medium; a processor of a representation learning device reads the computer program from the computer storage medium, and the processor executes the computer program to enable the representation learning device to perform the above-described representation learning method.

[0021] In the embodiments of the present application, the plurality of triples included in the knowledge graph can be divided and processed to obtain a first triple set and a second triple set, wherein the types of tail entities connected with any one type of relationship in the first triple set are more than the types of tail entities connected with any one type of relationship in the second triple set; then based on the representation vector groups corresponding to each triple in the extracted first triple set, the representation vector sum of the head entity and the relationship included in each triple in the first triple set and the first distance of the representation vector pointing to the tail entity are determined, based on the representation vector groups corresponding to each triple in the extracted second triple set, the representation vector of the head entity included in each triple in the second triple set and the second distance of the representation vector pointing to the tail entity are determined, wherein the representation vector group corresponding to a triple includes the representation vector of the head entity, the representation vector of the relationship and the representation vector of the tail entity; and then according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined. Since the types of tail entities connected with any one type of relationship in the first triple set obtained by division are relatively more, under the condition that the type of the head entity is fixed, the number of head entities connected with any one type of tail entity based on the arbitrary one type of relationship is relatively less, and for this case, the representation vector sum of the head entity and the relationship in the triple indicated based on the translation idea should be close to the representation vector of the tail entity, the representation vector sum of the head entity and the relationship in the triple can be accurately learned by limiting the first distance of the representation vector pointing to the tail entity; since the types of tail entities connected with any one type of relationship in the second triple set obtained by division are relatively less, under the condition that the type of the head entity is fixed, the number of head entities connected with any one type of tail entity based on the arbitrary one type of relationship is relatively more, and for this case, the representation vector of the head entity in the triple can be learned by limiting the size of the second distance of the representation vector pointing to the tail entity based on the clustering idea, which can ensure that the head entities connected with the arbitrary one type of tail entity based on the arbitrary one type of relationship are distributed within the hyperplane centered on the arbitrary one type of tail entity, and when the head entities connected with the arbitrary one type of tail entity based on the arbitrary one type of relationship are represented, the spatial distribution information possessed by different head entities can be preserved, the discrimination degree between the target representation vectors of different head entities learned can be ensured, and the accuracy of the representation learning of the knowledge graph is improved. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the accompanying drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.

[0023] Figure 1 is a structural schematic diagram of a feature extraction model provided by an embodiment of the present application;

[0024] Figure 2 is a flow schematic diagram of a representation learning method provided by an embodiment of the present application;

[0025] Figure 3a is a schematic diagram of a translation idea that a triple in a first triple set needs to meet, provided by an embodiment of the present application;

[0026] Figure 3b is a schematic diagram of a clustering idea that a triple in a second triple set needs to meet, provided by an embodiment of the present application;

[0027] Figure 4 is a flow schematic diagram of another representation learning method provided by an embodiment of the present application;

[0028] Figure 5 is a flow schematic diagram of another representation learning method provided by an embodiment of the present application;

[0029] Figure 6 is a schematic diagram of a sentence representation extraction model provided by an embodiment of the present application;

[0030] Figure 7a is a comparison diagram of games with different painting styles under the same category provided by an embodiment of the present application;

[0031] Figure 7b is a schematic diagram of extracting a painting style label possessed by image information based on a trained residual network model provided by an embodiment of the present application;

[0032] Figure 8a is a structural schematic diagram of another feature extraction model provided by an embodiment of the present application;

[0033] Figure 8b is a structural schematic diagram of another feature extraction model provided by an embodiment of the present application;

[0034] Figure 9 is a flow schematic diagram of another representation learning method provided by an embodiment of the present application;

[0035] Figure 10ais a projection schematic diagram of a target feature vector obtained by using a translation model according to an embodiment of the present application;

[0036] Figure 10b is a projection schematic diagram of a target feature vector obtained by using a clustering idea and introducing multi-modal information according to an embodiment of the present application;

[0037] Figure 11 is a schematic diagram of game promotion according to an embodiment of the present application;

[0038] Figure 12 is a structural schematic diagram of a feature learning device according to an embodiment of the present application;

[0039] Figure 13 is a structural schematic diagram of a feature learning device according to an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0041] Artificial intelligence (AI) is the use of digital computers or digital computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to design and implement principles and methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0042] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics, etc. Artificial intelligence software technology mainly includes computer vision technology (CV), speech processing technology, natural language processing technology, and machine learning (ML) / deep learning (DL) and other major directions.

[0043] Machine learning is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure, and continuously improve performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent. It is applied in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rule-based learning.

[0044] Based on the above-mentioned machine learning techniques, the embodiment of the present application provides a representation learning scheme, which can divide a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set. The number of types of tail entities connected to any type of relationship in the first triple set is greater than the number of types of tail entities connected to any type of relationship in the second triple set. Then, based on the extracted representation vector group corresponding to each triple in the first triple set, the representation vector sum of the head entity and the relationship included in each triple in the first triple set and the first distance of the representation vector pointing to the tail entity are determined. Based on the extracted representation vector group corresponding to each triple in the second triple set, the representation vector of the head entity included in each triple in the second triple set and the second distance of the representation vector pointing to the tail entity are determined. The representation vector group corresponding to a triple includes the representation vector of the head entity, the representation vector of the relationship, and the representation vector of the tail entity. Further, according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined.

[0045] In a specific implementation, the representation learning scheme proposed in the present application can be executed by a representation learning device, which can be a terminal device or a server. The terminal device can include, but is not limited to, a computer, a smart phone, a tablet computer, a notebook computer, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, a smart wearable device, etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (CDN), and big data and artificial intelligence platforms, etc. basic cloud computing services.

[0046] In an embodiment, a triple includes a head entity, a relation, and a tail entity, and can represent a relation between entities, for example, a triple (game A, style, pixel), can represent a relation between the head entity game A and the tail entity pixel as style, that is, the style of game A is pixel, and for another example, a triple (game B, style, national style), can represent a relation between the head entity game B and the tail entity national style as style, that is, the style of game B is national style; the knowledge graph can be a knowledge graph of any field, for example, can be a knowledge graph of the medical field, a knowledge graph of the financial field, a knowledge graph of the game field, and the like; for ease of description, subsequent embodiments of the present application will be described with the knowledge graph as a game knowledge graph of the game field. When the knowledge graph is a game knowledge graph of the game field, the game knowledge graph can be a knowledge graph containing attribute knowledge of a game, and the game can be measured from different attribute dimensions, for example, can contain attributes related to the game, such as developer, publisher, category, theme, style, release year, perspective, platform, and the like; the head entity in the triple included in the game knowledge graph is a game, the relation is an attribute possessed by the game, and the tail entity is a specific attribute value, for example, if the attribute values corresponding to the platform attribute include platform 1, platform 2, and platform 3, the triple (game A, platform, platform 1) can represent that the release platform of game A is platform 1; for example, if game A is a pixel game developed by developer 1 in 2022 and published by publisher 1 on platform 1, the triples related to game A can include (game A, developer, developer 1), (game A, publisher, publisher 1), (game A, release year, 2022), and (game A, style, pixel).

[0047] In an embodiment, the set of representation vectors corresponding to a triple can include a representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity; the set of representation vectors corresponding to a triple can be extracted by a feature extraction model, see Figure 1 A structural diagram of a feature extraction model provided by an embodiment of the present application can include a first feature extraction module, a second feature extraction module, and a third feature extraction module, wherein any feature extraction module can include a feature embedding layer (which can be an Embedding Layer) and a fully connected layer (which can be a FullyConnected Layer), the feature embedding layer is used to map an entity or a relation to an embedding vector, and the fully connected layer is used to unify the dimensions of the embedding vectors of the entity or the relation to obtain the representation vector of the entity or the relation; optionally, the first feature extraction module can be used to extract the representation vector of the head entity in the triple, the second feature extraction module can be used to extract the representation vector of the relation in the triple, and the third feature extraction module can be used to extract the representation vector of the tail entity in the triple.

[0048] It should be particularly noted that in the specific embodiments of the present application, data related to users are involved, for example, in the case where triples in the knowledge graph are extracted from user-related text information, image information, audio information, etc., when the embodiments of the present application are applied to specific products or technologies, the user's permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with local laws, regulations and standards.

[0049] Based on the above-mentioned representation learning scheme, the embodiments of the present application provide a representation learning method. Referring to Figure 2 A flowchart of a representation learning method provided by the embodiments of the present application is shown. Figure 2 The representation learning method shown can be executed by a representation learning device, or by any device with computing power. Figure 2 The representation learning method shown can include the following steps:

[0050] S201, performing division processing on a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set.

[0051] The triple includes a head entity, a relationship and a tail entity. The number of categories of the first tail entity in the first triple set obtained by division is greater than the number of categories of the second tail entity in the second triple set. The first tail entity includes a tail entity connected to the same type of relationship in the first triple set. The second tail entity includes a tail entity connected to the same type of relationship in the second triple set. That is, the number of categories of the tail entity connected to any type of relationship in the first triple set obtained by division is greater than the number of categories of the tail entity connected to any type of relationship in the second triple set. That is, the value range of the tail entity connected to any type of relationship in the first triple set obtained by division is greater than the value range of the tail entity connected to any type of relationship in the second triple set. Taking a game knowledge graph in a game field as an example, the head entity in the triple included in the game knowledge graph is a game, the relationship is an attribute possessed by the game, and the tail entity is a specific attribute value. The number of categories of the tail entity connected to any type of relationship in the first triple set obtained by division is greater than the number of categories of the tail entity connected to any type of relationship in the second triple set, which can be understood as: the number of attribute values of any attribute in the first triple set obtained by division is greater than the number of attribute values of any attribute in the second triple set.

[0052] In an embodiment, the representation learning device divides a plurality of triples included in the knowledge graph to obtain a first triple set and a second triple set, which can include: for any one relationship in the knowledge graph, counting the types of tail entities connected to the any one relationship in the knowledge graph; if the types of tail entities connected to the any one relationship are greater than a preset type threshold, the triples including the any one relationship in the knowledge graph are divided into the first triple set, and if the types of tail entities connected to the any one relationship are less than or equal to the preset type threshold, the triples including the any one relationship in the knowledge graph are divided into the second triple set. For example, if the knowledge graph is a game knowledge graph in the game field, the various relationships included in the game knowledge graph are attributes for measuring games from different dimensions, specifically including: developer, publisher, category, theme, style, release year, perspective, platform, if the types of tail entities connected to the various relationships in the game knowledge graph are counted, that is, the value range of the tail entities connected to the various relationships in the game knowledge graph is counted, that is, the number of attribute values of the various attributes in the game knowledge graph is counted, which are: 37556 developers, 61331 publishers, 174 categories, 105 themes, 17 styles, 15 release years, 9 perspectives, and 3 platforms, if the preset type threshold is 100, the triples including the relationships of developer, publisher, category, and theme in the game knowledge graph can be divided into the first triple set, and the triples including the relationships of style, release year, perspective, and platform in the game knowledge graph can be divided into the second triple set.

[0053] S202, extracting the representation vector group corresponding to each triple in the first triple set and the second triple set.

[0054] In an embodiment, the representation vector group corresponding to the triple includes: the representation vector of the head entity, the representation vector of the relationship, and the representation vector of the tail entity; any one of the representation vector group corresponding to the triple in the first triple set and the second triple set can be extracted by the feature extraction model shown in the figure, specifically, the representation vector of the head entity in the triple can be extracted by the first feature extraction module, the representation vector of the relationship in the triple can be extracted by the second feature extraction module, and the representation vector of the tail entity in the triple can be extracted by the third feature extraction module. Figure 1

[0055] S203, determining the first distance of the representation vector of the head entity and the relationship included in each triple in the first triple set and the representation vector of the tail entity based on the representation vector group corresponding to each triple in the first triple set.

[0056] ​S204, determining, based on the set of representation vectors corresponding to each of the second set of triples, a representation vector of the head entity included in each of the second set of triples, and a second distance from the representation vector of the head entity to the representation vector of the tail entity.

[0057] In steps S203 to S204, the representation vectors of the head entity and the relation included in the triple, the first distance from the representation vector of the head entity to the representation vector of the tail entity, and the second distance from the representation vector of the head entity to the representation vector of the tail entity included in the triple can be a cosine distance, a Euclidean distance, or a self-defined distance, etc., and the embodiments of the present application do not make any limitation.

[0058] S205, determining, according to the first distance corresponding to each of the first set of triples and the second distance corresponding to each of the second set of triples, a target set of representation vectors corresponding to each of the triples included in the knowledge graph.

[0059] In one embodiment, the target set of representation vectors corresponding to the triple includes a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity; and the representation learning device can determine, according to the first distance corresponding to each of the first set of triples and the second distance corresponding to each of the second set of triples, the target set of representation vectors corresponding to each of the triples included in the knowledge graph, which can include: obtaining a reference distribution radius corresponding to each of the second set of triples; iteratively training the feature extraction model in a direction of reducing the first distance corresponding to each of the first set of triples and controlling the second distance corresponding to each of the second set of triples to be less than or equal to the corresponding reference distribution radius, to obtain a trained feature extraction model; and extracting, by the trained feature extraction model, the set of representation vectors corresponding to each of the triples included in the knowledge graph as the target set of representation vectors corresponding to the corresponding triple.

[0060] The reference distribution radius corresponding to the triple is related to the relationship included in the triple. One relationship corresponds to one reference distribution radius, that is, the reference distribution radius corresponding to the triple can be the reference distribution radius corresponding to the relationship in the triple. In an available implementation, the reference distribution radius corresponding to different relationships can be set according to specific requirements. Generally, a larger reference distribution radius can be set for a relationship with smaller distinguishability, and a smaller reference distribution radius can be set for a relationship with larger distinguishability. Taking a game knowledge graph as an example, since the relationship can represent the attribute possessed by the head entity, that is, a larger reference distribution radius can be set for an attribute with smaller distinguishability, and a smaller reference distribution radius can be set for an attribute with larger distinguishability. The distinguishability of the attribute can describe the influence of different attribute values (i.e., different tail entities) on the target representation vector of the learned head entity. The attribute with smaller distinguishability has smaller influence of different attribute values on the target representation vector of the learned head entity, and the attribute with larger distinguishability has larger influence of different attribute values on the target representation vector of the learned head entity. For example, compared with the style attribute, the platform attribute of the game cannot well distinguish the game, so a larger reference distribution radius can be set for the platform attribute, and a smaller reference distribution radius can be set for the style attribute.

[0061] Further, the feature learning device can iteratively train the feature extraction model in a direction of reducing the first distance corresponding to each triple in the first triple set and controlling the second distance corresponding to each triple in the second triple set to be less than or equal to the corresponding reference distribution radius. In the training process of the feature extraction model, the representation vector sum of the head entity and the relation in the triple indicated by the translation idea is introduced for each triple in the first triple set, and the representation vector of the tail entity should be close to the representation vector sum of the head entity and the relation, that is, for the triple in the first triple set, the feature extraction model can be trained in a direction of making the representation vector sum of the head entity and the relation point to the representation vector of the tail entity, so that the first distance of the representation vector sum of the head entity and the relation pointing to the representation vector of the tail entity can be used to represent the closeness of the representation vector sum of the head entity and the relation to the representation vector of the tail entity, and the feature extraction model can be trained in a direction of reducing the first distance corresponding to the triple. The clustering idea is introduced for each triple in the second triple set, that is, the head entity connected with any kind of relation and any kind of tail entity is distributed in the hyperplane centered on the any kind of tail entity, that is, the head entity connected with an attribute value is distributed in the hyperplane centered on the attribute value, for example, the game with platform attribute platform 1 should be distributed in the hyperplane centered on platform 1, and should not be distributed in the hyperplane centered on pixels; the game with picture style attributes of national style and ancient style should be distributed in the hyperplane centered on national style, and should also be distributed in the hyperplane centered on ancient style, but should not be distributed in the hyperplane centered on platform 1; at the same time, the distribution radius of the head entity connected with any kind of relation and any kind of tail entity in the hyperplane centered on the any kind of tail entity should be the reference distribution radius corresponding to the any kind of relation, that is, the head entity connected with any kind of relation and any kind of tail entity is distributed in the hyperplane centered on the any kind of tail entity, and the radius is less than or equal to the reference distribution radius corresponding to the any kind of relation, so the feature extraction model can be trained by controlling the second distance of the representation vector of the head entity included in the triple in the second triple set pointing to the representation vector of the tail entity.

[0062] Further, the representation learning device can extract, by using the trained feature extraction model, a representation vector group corresponding to each of the triples included in the knowledge graph as a target representation vector group corresponding to the triple, that is, can extract, by using the trained feature extraction model, a representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity in each of the triples included in the knowledge graph as a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity in the triple, and obtain the target representation vector group of the triple. The trained feature extraction model is trained based on the translation thought and the clustering thought. For the same head entity, if a part of the triples including the head entity are divided into the first triple set and a part of the triples are divided into the second triple set, the target representation vector of the head entity learned can satisfy the features indicated by the translation thought and the clustering thought. The introduction of the clustering thought can retain the spatial distribution information of the head entity and the tail entity in the triple and retain the distinguishing degree brought by different relations. In the case that the number of the head entities connected to any kind of relation and any kind of tail entity is relatively large, the feature space collapse problem of the target representation vectors of different head entities when only the translation thought is introduced for representation learning can be well solved. That is, since the number of the tail entities connected to any kind of relation in the second triple set obtained by division is relatively small, in the case that the number of the head entities connected to any kind of relation and any kind of tail entity is relatively large under the condition that the type of the head entity is fixed, this kind of case can be called a many-to-one problem, and the translation thought indicates that the representation vectors of the head entity and the relation in the triple should be close to the representation vector of the tail entity, so that the target representation vectors of different head entities learned are similar and the distinguishing degree is insufficient, and are distributed in a small space, that is, the feature space collapse problem.

[0063] Referring to Figure 3a A schematic diagram of the translation thought to be met by a triple in a first triple set provided by an embodiment of the present application; wherein the distribution relationship of the triples in the first triple set can be as shown by the 301 mark, the head entity in a triple can be as shown by the 302 mark, the relation in the triple can be as shown by the 303 mark, the tail entity in the triple can be as shown by the 304 mark, and the translation thought to be met by the triple can be as shown by the 305 mark, wherein h1 represents the head entity in the triple, r1 represents the relation in the triple, and t1 represents the tail entity in the triple. Referring to Figure 3bA schematic diagram of a clustering idea that a triple in a second triple set provided for an embodiment of the present application needs to satisfy; wherein the distribution relationship of the triples in the second triple set can be as shown by the 311 label, as shown by the 312 label is a tail entity, as shown by the 313 label is a head entity connected to the tail entity based on a relationship, and as shown by the 314 label is the relationship; if the tail entity as shown by the 312 label is platform 1, and the corresponding relationship is platform, and the tail entity as shown by the 315 label is pixel, and the corresponding relationship is style, then the head entity connected to the tail entity platform 1 based on the relationship platform is distributed in a hyperplane with the tail entity platform 1 as the center and a radius less than or equal to a reference distribution radius corresponding to the relationship platform, which can be as shown by the 316 label, the head entity connected to the tail entity pixel based on the relationship style is distributed in a hyperplane with the tail entity pixel as the center and a radius less than or equal to a reference distribution radius corresponding to the relationship style, which can be as shown by the 317 label, and since the platform attribute of the game cannot well distinguish the game, but the style attribute of the game can well distinguish the game, the reference distribution radius R1 corresponding to the relationship platform is greater than the reference distribution radius R2 corresponding to the relationship pixel.

[0064] In the embodiments of the present application, the plurality of triples included in the knowledge graph can be divided and processed to obtain a first triple set and a second triple set, wherein the types of tail entities connected to any type of relationship in the first triple set are more than the types of tail entities connected to any type of relationship in the second triple set; then based on the representation vector group corresponding to each triple in the extracted first triple set, the representation vector sum of the head entity and the relationship included in each triple in the first triple set and the first distance of the representation vector pointing to the tail entity are determined, based on the representation vector group corresponding to each triple in the extracted second triple set, the representation vector of the head entity included in each triple in the second triple set and the second distance of the representation vector pointing to the tail entity are determined, wherein the representation vector group corresponding to a triple includes the representation vector of the head entity, the representation vector of the relationship and the representation vector of the tail entity; and further according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined. Since the types of tail entities connected to any type of relationship in the first triple set obtained by division are relatively more, under the condition that the type of the head entity is fixed, the number of head entities connected to any type of relationship and any type of tail entity is relatively less, and for this case, the representation vector sum of the head entity and the relationship in the triple indicated based on the translation idea should be close to the representation vector of the tail entity, the representation vector sum of the head entity and the relationship in the triple can be limited to accurately learn the representation of the entity and the relationship in the triple by limiting the first distance of the representation vector pointing to the tail entity; since the types of tail entities connected to any type of relationship in the second triple set obtained by division are relatively less, under the condition that the type of the head entity is fixed, the number of head entities connected to any type of relationship and any type of tail entity is relatively more, and for this case, the representation of the entity and the relationship in the triple can be learned based on the clustering idea by limiting the size of the second distance of the representation vector of the head entity pointing to the representation vector of the tail entity, which can ensure that the head entities connected to the any type of relationship and the any type of tail entity are distributed in the hyperplane centered on the any type of tail entity, and when learning the representation of the head entities connected to the any type of relationship and the any type of tail entity, the spatial distribution information possessed by different head entities can be preserved, the discrimination degree between the target representation vectors of different head entities learned can be ensured, and the accuracy of the representation learning of the knowledge graph is improved.

[0065] Based on the related embodiments of the above representation learning method, another representation learning method is provided in the embodiments of the present application. Referring to Figure 4 The flowchart of another representation learning method provided in the embodiments of the present application is shown. Figure 4The illustrated representation learning method can be executed by a representation learning device or any computing device. Figure 4 The illustrated representation learning method can include the following steps:

[0066] S401, divide the plurality of triples included in the knowledge graph to obtain a first triple set and a second triple set.

[0067] Wherein, the triple includes a head entity, a relationship and a tail entity, the number of categories of the first tail entity in the first triple set is more than the number of categories of the second tail entity in the second triple set, the first tail entity includes the tail entity connected with the same relationship in the first triple set, and the second tail entity includes the tail entity connected with the same relationship in the second triple set; That is, the number of categories of the tail entity connected with any relationship in the first triple set obtained by division is more than the number of categories of the tail entity connected with any relationship in the second triple set.

[0068] In one embodiment, the representation learning device divides the plurality of triples included in the knowledge graph to obtain a first triple set and a second triple set, which can include: for any relationship in the knowledge graph, the tail entity connected with the any relationship in the knowledge graph is counted as a target tail entity; Each target tail entity is different from each other; The number of head entities connected with each target tail entity based on the any relationship in the knowledge graph is counted as the reference number corresponding to each target tail entity; Determine the division reference value corresponding to the any relationship according to the reference number corresponding to each target tail entity; For any triple included in the knowledge graph, if the division reference value corresponding to the relationship in the any triple is less than a preset division threshold, the any triple is divided into the first triple set; If the division reference value corresponding to the relationship in the any triple is greater than or equal to the preset division threshold, the any triple is divided into the second triple set; Wherein, the preset division threshold can be set according to specific requirements.

[0069] In a specific implementation, for any one relationship in the knowledge graph, the representation learning device counts the tail entities connected with the any one relationship in the knowledge graph as target tail entities, and the same kind of tail entity connected with the any one relationship is taken as a target tail entity. For example, if the knowledge graph includes triples (game A, platform, platform 1), (game B, platform, platform 2), (game C, platform, platform 2), (game D, platform, platform 3), (game E, platform, platform 3), and (game F, platform, platform 3), the target tail entities connected with the platform are platform 1, platform 2, and platform 3, respectively. That is, the target tail entity corresponding to any one relationship is the attribute value of the attribute indicated by the any one relationship. Further, the representation learning device can count the number of head entities connected with each target tail entity based on the any one relationship in the knowledge graph as the reference number corresponding to each target tail entity. In the above example, the reference number corresponding to the target tail entity platform 1 is 1, the reference number corresponding to the target tail entity platform 2 is 2, and the reference number corresponding to the target tail entity platform 3 is 3.

[0070] Further, the representation learning device can determine the partition reference value corresponding to any one relationship according to the reference number corresponding to each target tail entity. In a specific implementation, for any one target tail entity, the reference number corresponding to any one target tail entity can be determined according to the reference number corresponding to each target tail entity. Based on the reference number corresponding to each target tail entity, the information entropy corresponding to any one relationship is determined. The information entropy corresponding to any one relationship is converted to obtain the partition reference value corresponding to any one relationship. The process of obtaining the partition reference value corresponding to any one relationship can be shown by the following formula 1:

[0071]

[0072] wherein, l represents the partition reference value corresponding to any one relationship, I represents the number of target tail entities corresponding to the any one relationship, i is an independent variable less than or equal to I, p i represents the reference number proportion of the i-th target tail entity in the I target tail entities, The information entropy corresponding to any one of the relationships is represented, and the conversion processing of the information entropy corresponding to any one of the relationships is to obtain the reciprocal of the information entropy corresponding to any one of the relationships. For example, based on the statistical triplets included in the exemplary knowledge graph, the reference quantity corresponding to the target tail entity platform 1 is 1, the reference quantity corresponding to the target tail entity platform 2 is 2, and the reference quantity corresponding to the target tail entity platform 3 is 3. Then, the reference quantity corresponding to the target tail entity platform 1 accounts for 1 / 6, the reference quantity corresponding to the target tail entity platform 2 accounts for 2 / 6, and the reference quantity corresponding to the target tail entity platform 3 accounts for 3 / 6. The division reference value corresponding to the platform attribute is:

[0073] For example, if the knowledge graph is a game knowledge graph in the game field, the various relationships included in the game knowledge graph are attributes for measuring games from different dimensions, specifically including: developer, publisher, category, theme, style, release year, perspective, and platform. The division reference values corresponding to each platform attribute are respectively: developer 0.072, publisher 0.068, category 0.018, theme 0.185, style 0.374, release year 0.370, perspective 0.519, and platform 0.696. If the preset division threshold is 0.2, then the relationships of the triplets included in the game knowledge graph, such as developer, publisher, category, and theme, can be divided into the first triplet set, and the relationships of the triplets included in the game knowledge graph, such as style, release year, perspective, and platform, can be divided into the second triplet set.

[0074] S402, constructing reference triplets corresponding to each triplet in the first triplet set to obtain a reference triplet set.

[0075] The reference triplet includes the same relationship as the corresponding triplet, and the reference triplet satisfies any one of the following conditions: the head entity included in the reference triplet is different from the head entity included in the corresponding triplet, or the tail entity included in the reference triplet is different from the tail entity included in the corresponding triplet.

[0076] In an embodiment, the representation learning device constructing the reference triple corresponding to each triple in the first triple set can include: for any triple in the first triple set, performing entity replacement processing on the triple to obtain a replaced triple; if the replaced triple does not exist in the knowledge graph, taking the replaced triple as the reference triple corresponding to the triple; and if the replaced triple exists in the knowledge graph, repeatedly performing entity replacement processing on the triple until the reference triple corresponding to the triple is obtained. In a specific implementation, the representation learning device performing entity replacement processing on any triple to obtain a replaced triple can include: obtaining a head entity in the knowledge graph that is different from the head entity in the triple; replacing the head entity in the triple with the obtained head entity to obtain the replaced triple; or obtaining a tail entity in the knowledge graph that is different from the tail entity in the triple; and replacing the tail entity in the triple with the obtained tail entity to obtain the replaced triple.

[0077] For example, if the triple (game B, style, national style) in the first triple set is taken as an example, a tail entity in the knowledge graph that is different from the tail entity national style is obtained, for example, the obtained tail entity is pixels, and the replaced triple is (game B, style, pixels). It is determined whether the replaced triple (game B, style, pixels) exists in the knowledge graph. If it does not exist in the knowledge graph, the replaced triple (game B, style, pixels) is taken as the reference triple corresponding to the triple (game B, style, national style).

[0078] S403, extracting the representation vector group corresponding to each triple in the first triple set and the second triple set.

[0079] S404, extracting the representation vector group corresponding to each reference triple in the reference triple set.

[0080] In steps S403 to S404, the representation vector group corresponding to a triple includes a representation vector of a head entity, a representation vector of a relationship, and a representation vector of a tail entity, which can be extracted by a feature extraction model as shown in the figure. Figure 1 The representation vector group corresponding to any triple in the first triple set and the second triple set, and the representation vector group corresponding to any reference triple in the reference triple set are extracted by the feature extraction model as shown in the figure.

[0081] S405, determining, based on the representation vector group corresponding to each triple in the first triple set, a first distance of a representation vector of a head entity and a representation vector of a relationship included in each triple in the first triple set, and a representation vector of a tail entity.

[0082] S406, determining, based on the group of representation vectors corresponding to each triple in the second set of triples, a representation vector of the head entity included in each triple in the second set of triples and a second distance of the representation vector of the head entity to the representation vector of the tail entity.

[0083] S407, determining, based on the group of representation vectors corresponding to each reference triple in the set of reference triples, a representation vector of the head entity and the relation included in each reference triple in the set of reference triples and a third distance of the representation vector of the head entity and the relation to the representation vector of the tail entity.

[0084] In one embodiment, the related processes of steps S405 to S406 are similar to the related processes of steps S203 to S204 described above, and will not be described here again; the related process of step S407 is similar to the related process of step S405, and will not be described here again.

[0085] S408, determining, according to the first distance corresponding to each triple in the first set of triples, the second distance corresponding to each triple in the second set of triples, and the third distance corresponding to each reference triple in the set of reference triples, a target group of representation vectors corresponding to each triple included in the knowledge graph.

[0086] In one embodiment, the target group of representation vectors corresponding to each triple includes a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity; the representation learning device determines the target group of representation vectors corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first set of triples, the second distance corresponding to each triple in the second set of triples, and the third distance corresponding to each reference triple in the set of reference triples, which can include: obtaining a reference distribution radius corresponding to each triple in the second set of triples; iteratively training the feature extraction model in a direction of reducing the first distance corresponding to each triple in the first set of triples, increasing the third distance corresponding to each reference triple in the set of reference triples, and controlling the second distance corresponding to each triple in the second set of triples to be less than or equal to the corresponding reference distribution radius, to obtain a trained feature extraction model; extracting, by the trained feature extraction model, the group of representation vectors corresponding to each triple included in the knowledge graph as the target group of representation vectors corresponding to the corresponding triple.

[0087] The reference distribution radius corresponding to the triplets is related to the relationship included in the triplets. One relationship corresponds to one reference distribution radius, that is, the reference distribution radius corresponding to the triplets can be the reference distribution radius corresponding to the relationship in the triplets. In an available embodiment, the reference distribution radius corresponding to different relationships can be set according to specific requirements. In another available embodiment, the partition reference value corresponding to the relationship included in the triplets can be taken as the reference distribution radius corresponding to the triplets. Generally, a larger reference distribution radius can be set for a relationship with a smaller degree of distinction, and a smaller reference distribution radius can be set for a relationship with a larger degree of distinction. Since the larger the information entropy corresponding to the relationship, the greater the degree of distinction of the relationship, a smaller reference distribution radius needs to be set for the relationship with a greater degree of distinction, and the smaller the information entropy corresponding to the relationship, the smaller the degree of distinction of the relationship, a larger reference distribution radius needs to be set for the relationship with a smaller degree of distinction, the reciprocal of the information entropy corresponding to the relationship can be determined as the reference distribution radius corresponding to the relationship. Since the reciprocal of the information entropy corresponding to the relationship is the partition reference value corresponding to the relationship, the partition reference value corresponding to the relationship can be taken as the reference distribution radius corresponding to the relationship. When determining the reference distribution radius corresponding to the triplets, the partition reference value corresponding to the relationship included in the triplets can be taken as the reference distribution radius corresponding to the triplets.

[0088] Further, in the process of training the feature extraction model, the representation learning device can take the triplets in the first triplet set as positive examples and take the corresponding reference triplets as negative examples, train the feature extraction model based on the triplet loss (i.e., Triplet Loss), and thus, for the triplets in the first triplet set and the corresponding reference triplets, the feature extraction model can be trained in the direction of reducing the first distance corresponding to the triplets in the first triplet set and increasing the third distance corresponding to the corresponding reference triplets. The training idea for training the feature extraction model for the triplets in the second triplet set is described in step S205 above, and thus will not be described here.

[0089] In an embodiment, when the feature extraction model is trained for the triplets in the first triplet set and the corresponding reference triplets, the following formula 2 is satisfied:

[0090]

[0091] wherein P represents the first triple set, (h1, r1, t1) represents a triple in the first triple set, h1 represents a head entity, r1 represents a relation, and t1 represents a tail entity; P' represents the reference triple set, (h'1, r1, t'1) represents a reference triple in the reference triple set corresponding to the triple in the first triple set, h'1 represents a head entity, r1 represents a relation, and t'1 represents a tail entity; ||h1+r1-t1|| represents a first distance corresponding to the triple in the first triple set, ||h'1+r1-t'1|| represents a third distance corresponding to the corresponding reference triple, and ε is a hyperparameter which can be set according to specific requirements; L t represents a first loss function value determined based on the triple in the first triple set and the corresponding reference triple.

[0092] In one embodiment, when training the feature extraction model for the triple in the second triple set, the following formula 3 satisfies a second loss function:

[0093]

[0094] wherein Q represents the second triple set, (h2, r2, t2) represents a triple in the second triple set, h2 represents a head entity, r2 represents a relation, and t2 represents a tail entity; ||h2-t2|| 2 represents a second distance corresponding to the triple in the second triple set, and r'2 represents a reference distribution radius corresponding to the corresponding triple (which can be a reference distribution radius corresponding to the relation included in the corresponding triple); L a represents a second loss function value determined based on the triple in the second triple set.

[0095] In one embodiment, when training the feature extraction model for the triple in the second triple set and the triple in the first triple set and the corresponding reference triple, the following formula 4 satisfies a target loss function:

[0096] L = aL t +(1-a)L a (4)

[0097] wherein a is a weight parameter which can be set according to specific requirements; and L represents a target loss function value determined based on the triple in the second triple set and the triple in the first triple set and the corresponding reference triple.

[0098] In an embodiment, the characteristic learning device iteratively trains the feature extraction model in a direction of reducing the first distance corresponding to each triple in the first triple set, increasing the third distance corresponding to each reference triple in the reference triple set, and controlling the second distance corresponding to each triple in the second triple set to be less than or equal to the corresponding reference distribution radius, to obtain the trained feature extraction model. Specifically, the feature extraction model can be trained in a direction of reducing the target loss function value until a convergence condition is reached to obtain the trained feature extraction model. Optionally, the convergence condition can be set according to specific requirements. For example, the convergence condition can be that a certain number of iterations is reached or the target loss function value is less than a preset loss value threshold. The present embodiment is not limited in this regard.

[0099] In the embodiments of the present application, the plurality of triples included in the knowledge graph can be divided and processed to obtain a first triple set and a second triple set, and a reference triple corresponding to each triple in the first triple set is constructed to obtain a reference triple set. Then, based on the extracted feature vector group corresponding to each triple in the first triple set, the feature vector sum of the head entity and the relationship included in each triple in the first triple set, and the first distance of the feature vector pointing to the tail entity are determined; based on the extracted feature vector group corresponding to each triple in the second triple set, the feature vector of the head entity included in each triple in the second triple set, and the second distance of the feature vector pointing to the tail entity are determined; based on the extracted feature vector group corresponding to each reference triple in the reference triple set, the feature vector sum of the head entity and the relationship included in each reference triple in the reference triple set, and the third distance of the feature vector pointing to the tail entity are determined; and then, according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, the target feature vector group corresponding to each triple included in the knowledge graph is determined. In the process of dividing and processing the plurality of triples included in the knowledge graph to obtain the first triple set and the second triple set, the division reference value corresponding to any kind of relationship determined based on the information entropy of the relationship can be used for division; in the process of determining the target feature vector group corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, the corresponding reference triple is introduced as a negative example for the triples in the first triple set, and the feature extraction model is trained based on the triple loss function, which can improve the processing effect of the trained feature extraction model; for the triples in the second triple set, the division reference value corresponding to the relationship included in the triple can be used as the reference distribution radius corresponding to the triple. Since the greater the information entropy corresponding to the relationship is, the greater the discrimination degree of the relationship can be represented, using the division reference value corresponding to the relationship included in the triple as the reference distribution radius corresponding to the triple can ensure the influence of the discrimination degree corresponding to the relationship on the reference distribution radius, which can improve the processing effect of the trained feature extraction model. Furthermore, when the feature extraction model is trained, the feature vector group corresponding to each triple included in the knowledge graph is extracted as the target feature vector group corresponding to the corresponding triple, which can improve the accuracy of the target feature vector group, that is, the accuracy of the knowledge graph representation learning can be improved.

[0100] Based on the above-mentioned related embodiments of the representation learning method, another representation learning method is provided in the embodiments of the present application. Referring to Figure 5Another flowchart of a representation learning method provided by an embodiment of the present application is shown. Figure 5 The representation learning method shown can be executed by a representation learning device or any computing device. Figure 5 The representation learning method shown can include the following steps:

[0101] S501, divide a plurality of triples included in the knowledge graph to obtain a first triple set and a second triple set.

[0102] The triple includes a head entity, a relation, and a tail entity. The number of categories of the first tail entity in the first triple set is greater than the number of categories of the second tail entity in the second triple set. The first tail entity includes a tail entity connected to the same relation in the first triple set. The second tail entity includes a tail entity connected to the same relation in the second triple set. The related process of step S501 is similar to the related process of step S201 and step S401, and will not be repeated here.

[0103] S502, extract a representation vector group corresponding to each triple in the first triple set and the second triple set.

[0104] The representation vector group corresponding to the triple includes a representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity. The related process of step S502 is similar to the related process of step S202 and step S403, and will not be repeated here.

[0105] S503, obtain multi-modal information corresponding to the head entity in each triple included in the knowledge graph.

[0106] In an embodiment, the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information. The multi-modal information corresponding to the head entity is used to supplement the description of the head entity. For example, if the head entity is a game, the multi-modal information corresponding to the game is used to supplement the description of the game. The text description information corresponding to the game can be a game introduction, a promotional text, or any text that can describe the game. The image information corresponding to the game can be a game content image, a scene animation, a promotional image, and the like. Optionally, the multi-modal information corresponding to the head entity can also include audio information and other modal information that can be used to supplement the description of the head entity. The embodiments of the present application do not make any limitation.

[0107] For example, if the knowledge graph is a game knowledge graph in the game field, for the attributes related to the game, such as the developer, the publisher, the category, the theme, the style, the release year, the perspective, the platform, and the like, among the triples included in the game knowledge graph for describing the game C, only the triples describing the three attributes of the developer, the category, and the theme of the game C are included. Since the developer and the category are two high-in-degree attributes, it is difficult to distinguish the game C from other games. Therefore, the multi-modal information of the game C can be added to supplement the description of the game C, and then the representation learning of the game C can be performed based on the representation vector of the multi-modal information of the game C extracted, so as to improve the accuracy of the target representation vector of the game C learned. For example, the game introduction of the game C is as follows: the game C is the first love social mobile game independently developed by the developer 1 in 2022. The game style is fresh, and the top voice actors provide voice throughout. Based on the low-pressure and free play concept, the game focuses on three features of numerical burden reduction, personal customization, and multi-dimensional social interaction, and provides players with a relaxed and free game experience. The game introduction includes the developer of the game C as the developer 1, the release year as 2022, and the style as fresh. The release year and the style can be supplemented on the basis of the attributes of the developer, the category, and the theme of the game C. Further, based on the structural information included in the game knowledge graph (i.e., the related information of the triples included in the game knowledge graph), if the tail entity corresponding to the game C is predicted, the tail entity 2022 corresponding to the relationship release year and the tail entity fresh corresponding to the relationship style cannot be predicted. However, based on the structural information included in the game knowledge graph, the text description information (i.e., the game introduction) of the game C is introduced. Since the text description information of the game C includes the description of the release year and the style, when the tail entity corresponding to the game C is predicted, the tail entity 2022 corresponding to the relationship release year and the tail entity fresh corresponding to the relationship style can be predicted.

[0108] In S504, for any triple included in the knowledge graph, a representation vector of multi-modal information corresponding to the head entity in the triple is extracted.

[0109] In an embodiment, the representation vector of the multi-modal information can be obtained by performing feature extraction processing on the multi-modal information, and the multi-modal information can be represented. Different neural network models can be selected for feature extraction of multi-modal information of different modalities, and the embodiments of the present application do not limit the selection. For ease of description, the neural network model used to extract the representation vector of the text description information of the multi-modal information is referred to as a text representation extraction model, the neural network model used to extract the representation vector of the image information of the multi-modal information is referred to as an image representation extraction model, and the neural network model used to extract the representation vector of the audio information of the multi-modal information is referred to as an audio representation extraction model.

[0110] In an implementable embodiment, for the text description information, a sentence representation corresponding to the text description information can be adopted as the representation vector of the text description information. Further, a trained sentence representation extraction model (i.e., Sentence Bidirectional Encoder Representation from Transformers, Sentence-BERT) in the text matching field can be optionally adopted as the text representation extraction model to extract the representation vector of the text description information. The trained sentence representation extraction model can be obtained by training the sentence representation extraction model. In the process of training the sentence representation extraction model, the sentence representation extraction model can be trained based on the predicted similarity probability that the sentence representations corresponding to two text description information point to the same head entity. In the specific implementation, refer to Figure 6A schematic diagram of a sentence representation extraction model provided by an embodiment of the present application can include a pre-trained language representation model (i.e., a BERT model) and a pooling layer (i.e., a pooling layer). First sample text description information, second sample text description information, and a reference similarity probability between the first sample text information and the second sample text information can be obtained, where the reference similarity probability can indicate the probability that the first sample text information and the second sample text information are used to describe the same head entity. The sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information can be extracted by the sentence representation extraction model. The predicted similarity probability between the sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information can be calculated. The sentence representation extraction model can be trained based on the difference between the predicted similarity probability and the reference similarity probability to obtain a trained sentence representation extraction model. Further, the sentence representation vector corresponding to the text description information extracted by the trained sentence representation extraction model can be used as the representation vector of the text description information. Optionally, the predicted similarity probability between the sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information can be the similarity between the sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information, which can be the cosine similarity between the sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information, or the similarity determined based on the feature distance between the sentence representation corresponding to the first sample text description information and the sentence representation corresponding to the second sample text description information, which is not limited in the embodiments of the present application. For example, the feature distance can be a cosine distance, an Euclidean distance, etc. When the sentence representation extraction model is trained based on the difference between the predicted similarity probability and the reference similarity probability to obtain the trained sentence representation extraction model, the sentence representation extraction model can be trained in the direction of minimizing the mean square error loss to obtain the trained sentence representation extraction model. Through experiments, it is found that the accuracy of the trained sentence representation extraction model in determining whether the sentence representations corresponding to two text description information point to the same head entity can reach 96%, which can indicate that the accuracy of the sentence representation extraction model in extracting the sentence representation corresponding to the text description information is high, i.e., the accuracy of the representation vector of the text description information is high.

[0111] In an embodiment, when the knowledge graph is a game knowledge graph in the game field, the game knowledge graph includes a head entity, a relation, and a tail entity in a triple, the head entity is a game, the relation is an attribute possessed by the game, and the tail entity is a specific attribute value; when the attributes related to the game include a developer, a publisher, a category, a theme, an artistic style, a release year, a perspective, a platform, and the like, since the artistic style has become an important consideration point for users when selecting a game, and the artistic style can provide an effective distinguishing point for games in the same category, when the multi-modal information of the game includes image information, the artistic style features of the image information can be extracted as the representation vector of the image information; for example, as shown in Figure 7a a comparison diagram of games with different artistic styles in the same category provided by an embodiment of the present application; the artistic style of the game as indicated by 701 is pixel, and the artistic style of the game as indicated by 702 is simple. Optionally, a trained residual network model (i.e., a Resnet model) can be used as an image representation extraction model to extract the representation vector of the image information; the trained residual network model can be obtained by training the residual network model, and the trained residual network model can be a multi-label classification model, the labels corresponding to the multi-label classification model can be the artistic style labels corresponding to the artistic style attributes in the game field, i.e., the attribute values corresponding to the artistic style attributes, and the related process of training the multi-label classification model based on sample image information and the reference artistic style labels possessed by the sample image information is similar to the existing related process of training a multi-label classification model, which will not be described here. When performing a multi-label classification task on image information, the representation vector of the image information can be extracted by the trained residual network model, and then the artistic style labels possessed by the image information can be predicted based on the extracted representation vector of the image information, as shown in Figure 7b a diagram for extracting artistic style labels possessed by image information based on a trained residual network model provided by an embodiment of the present application, wherein the image information of a game as indicated by 711 has a probability of 86% of having the artistic style label “pixel”, a probability of 25% of having the artistic style label “cute”, and a probability of 0 of having the remaining artistic style labels (e.g., “national style” and “ancient style”). Through experiments, it is found that the evaluation value of the trained residual network model in the model evaluation indicator AUC indicator can reach 0.88 when performing a multi-label classification task, which can represent that the accuracy of the trained residual network model when performing a multi-label classification task is high, i.e., the accuracy of the trained residual network model when extracting the representation vector of the image information is high.

[0112] For example, if the knowledge graph is a game knowledge graph in the game field, for the attributes related to the game, such as the developer, the publisher, the category, the theme, the style, the release year, the perspective, the platform, etc., among the triples in the game knowledge graph used to describe the game D, the triples used to describe the style attribute of the game D include: (game D, style, cute); based on the image information corresponding to the game D introduced in Figure 7a the game D based on the relationship style, the tail entity corresponding to the game D can be predicted to include pixels. Therefore, introducing the image information corresponding to the game in the process of game knowledge graph representation learning can increase the influence of the style attribute of the game, so that the target representation vector of the game learned is more accurate.

[0113] In an embodiment, the dimension of the representation vector of the multi-modal information extracted by the adaptive neural network model may be different from the dimensions of the representation vector of the head entity, the representation vector of the relationship, and the representation vector of the tail entity extracted based on the feature extraction model as shown in Figure 1 Therefore, after the representation vector of the multi-modal information is extracted by the adaptive neural network model, the dimension of the representation vector of the multi-modal information needs to be unified through a fully connected layer (which can be a Fully Connected Layer) so that the dimension of the representation vector of the multi-modal information is the same as the dimensions of the representation vector of the head entity, the representation vector of the relationship, and the representation vector of the tail entity. It is worth noting that the representation vector of the multi-modal information in the related process of processing the representation vector of the multi-modal information in this application should be the representation vector with unified dimensions.

[0114] S505, updating the representation vector group corresponding to any triple based on the representation vector of the multi-modal information corresponding to the head entity in any triple.

[0115] In an embodiment, the updated representation vector group corresponding to the triple includes: an updated representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity; and the manner of obtaining the updated representation vector of the head entity in any triple includes: fusing a representation vector of multi-modal information corresponding to the head entity in the any triple with a representation vector of the head entity in the any triple to obtain the updated representation vector of the head entity in the any triple. In a specific implementation, based on the representation vector of any multi-modal information corresponding to the head entity in the any triple, the representation vector of the relation in the any triple, and the representation vector of the tail entity in the any triple, a representation vector group corresponding to a multi-modal triple indicated by the any multi-modal information can be constructed, where the head entity in the multi-modal triple indicated by the any multi-modal information is the any multi-modal information, the relation is the relation in the any triple, the tail entity is the tail entity in the any triple, the representation vector of the head entity in the representation vector group corresponding to the multi-modal triple indicated by the any multi-modal information is the representation vector of the any multi-modal information, the representation vector of the relation is the representation vector of the relation in the any triple, and the representation vector of the tail entity is the representation vector of the tail entity in the any triple. For example, if the any triple is (game A, developer, developer 1), the representation vector group corresponding to the any triple is (representation vector of game A, representation vector of developer, representation vector of developer 1), and the multi-modal information corresponding to the game A includes text description information 1 and image information 1, a multi-modal triple constructed based on the text description information 1 is (text description information 1, developer, developer 1), a representation vector group corresponding to the multi-modal triple indicated by the text description information 1 is (representation vector of text description information 1, representation vector of developer, representation vector of developer 1), a multi-modal triple constructed based on the image information 1 is (image information 1, developer, developer 1), and a representation vector group corresponding to the multi-modal triple indicated by the image information 1 is (representation vector of image information 1, representation vector of developer, representation vector of developer 1).

[0116] Further, the representation learning device can determine an embedding vector group corresponding to the any triple based on the representation vector group corresponding to the any triple, and determine an embedding vector group corresponding to the any multi-modal triple based on the any multi-modal information corresponding to the head entity in the any triple, the representation vector group indicated by the multi-modal triple, determine an attention score of the embedding vector group corresponding to the any triple based on an attention mechanism, and determine an attention score of the embedding vector group indicated by the multi-modal triple based on the any multi-modal information corresponding to the head entity in the any triple (i.e., the attention scores of the embedding vector groups corresponding to the multi-modal triples indicated by the any triple); perform weighted adjustment processing on the embedding vector group corresponding to the any triple by using the attention score of the embedding vector group, to obtain an attention representation vector group corresponding to the any triple, and perform weighted adjustment processing on the embedding vector group corresponding to the corresponding multi-modal triple by using the attention scores of the embedding vector groups corresponding to the different multi-modal triples indicated by the any triple, to obtain an attention representation vector group corresponding to the corresponding multi-modal triple; and perform summation processing on the attention representation vector group corresponding to the any triple and the attention representation vector groups corresponding to the multi-modal triples indicated by the any triple, to obtain an adjustment vector group corresponding to the any triple. Further, the representation vector of the head entity in the any triple can be adjusted by using the adjustment vector group corresponding to the any triple, to obtain an updated representation vector of the head entity in the any triple.

[0117] Referring to formula 5.1 provided in the embodiments of the present application, a formula for obtaining an adjustment vector group corresponding to any triple is as follows:

[0118]

[0119] wherein, N t represents a set of to-be-processed triples composed of any triple and each multi-modal triple indicated by the any triple, if the triple in the set of to-be-processed triples is referred to as a to-be-processed triple, (h, r, t) represents any to-be-processed triple in the set of to-be-processed triples, e(h, r, t) represents an embedding vector group corresponding to the any to-be-processed triple, π(h, r, t) represents an attention score of the embedding vector group corresponding to the any to-be-processed triple, π(h, r, t)e(h, r, t) represents an attention representation vector group corresponding to the any to-be-processed triple, e agg represents an adjustment vector group corresponding to the any triple.

[0120] In a feasible implementation, the embedding vector group corresponding to the any to-be-processed triple can be obtained based on a concatenation function (i.e., a Concate function), which can be specifically as shown in formula 5.2.1 as follows:

[0121] e(h, r, t) = W'(e h ||e r ||e t )(5.2.1)

[0122] wherein e h represents the representation vector of the head entity in the any to-be-processed triple, e r represents the representation vector of the relation in the any to-be-processed triple, e t represents the representation vector of the tail entity in the any to-be-processed triple, and W' represents the trainable model parameter. h ||e r ||e t represents e h and e r and e t are concatenated in series.

[0123] In a feasible implementation, the embedding vector group corresponding to the any to-be-processed triple can be shown as formula 5.2.2 below:

[0124]

[0125] wherein tanh is an activation function.

[0126] Further, when determining the attention score of the embedding vector group corresponding to the any to-be-processed triple based on the attention mechanism, an activation function can be used to determine the initial attention score of the embedding vector group corresponding to the any to-be-processed triple, and then the initial attention score of the embedding vector group corresponding to the any to-be-processed triple is normalized to obtain the attention score of the embedding vector group corresponding to the any to-be-processed triple; wherein the activation function used can be a LeakyReLU activation function, and an exponential normalization function (i.e. a softmax function) can be used to normalize the initial attention score; specifically, the initial attention score of the embedding vector group corresponding to the any to-be-processed triple can be shown as formula 5.3 below:

[0127] π'(h, r, t) = LeakyReLU(W1e(h, r, t)) (5.3)

[0128] wherein W1 is a trainable model parameter.

[0129] The attention score of the embedding vector group corresponding to the any to-be-processed triple can be shown as formula 5.4 below:

[0130]

[0131] wherein (h, r, t) represents the any one to-be-processed triple, and (h', r', t) represents any one to-be-processed triple in the set of to-be-processed triples.

[0132] Further, the representation vector of the head entity in the any one triple can be adjusted by using the adjustment vector group corresponding to the any one triple, to obtain the updated representation vector of the head entity in the any one triple. The updated representation vector of the head entity in the any one triple can be shown by the following formula 5.5.1 or 5.5.2:

[0133] e′ h = W2e h + e agg (5.5.1)

[0134] e′ h = W3(e h || e agg )(5.5.2)

[0135] wherein W2 and W3 are trainable model parameters, e h || e agg represents the concatenation of e h and e agg .

[0136] In an optional embodiment, the representation vector group corresponding to the any one triple can be updated based on the representation vector of the multi-modal information corresponding to the head entity in the any one triple, which can also be realized by the related process proposed by the multi-modal knowledge graph recommendation model (Mkgat model).

[0137] S506, based on the updated representation vector group corresponding to each triple in the first triple set, determining the first distance between the representation vector of the head entity and the relationship included in each triple in the first triple set and the representation vector of the tail entity.

[0138] S507, based on the updated representation vector group corresponding to each triple in the second triple set, determining the second distance between the representation vector of the head entity included in each triple in the second triple set and the representation vector of the tail entity.

[0139] S508, according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, determining the target representation vector group corresponding to each triple included in the knowledge graph.

[0140] The target representation vector group corresponding to the triple includes a target representation vector of the head entity, a target representation vector of the relation, and a target representation vector of the tail entity. The related processes of steps S506 to S508 are similar to those of steps S203 to S205, and thus are not described herein again.

[0141] In one embodiment, in the case of introducing multi-modal information, the embodiment of the present application provides another feature extraction model, as shown in Figure 8a The structure diagram of another feature extraction model provided by the embodiment of the present application is shown, taking processing of a triple (game C, developer, developer 1) as an example. The multi-modal information corresponding to the head entity of the triple includes text description information and image information. Figure 8a The feature extraction model shown includes a trained sentence representation extraction model for extracting a representation vector of the text description information, a trained residual network model for extracting a representation vector of the image information, a first feature extraction module, a second feature extraction module, a third feature extraction module, and a full connection layer for unifying the dimension of the representation vectors. The model parameters of the trained sentence representation extraction model and the trained residual network model do not change with the training of the feature extraction model. Optionally, the embodiment of the present application provides another feature extraction model, as shown in Figure 8b The structure diagram of another feature extraction model provided by the embodiment of the present application is shown, taking processing of a triple (game A, developer, developer 1) as an example. The multi-modal information corresponding to the head entity of the triple includes text description information and image information. Figure 8b The feature extraction model shown includes a sentence representation extraction model for extracting a representation vector of the text description information, a residual network model for extracting a representation vector of the image information, a first feature extraction module, a second feature extraction module, a third feature extraction module, and a full connection layer for unifying the dimension of the representation vectors. The model parameters of the sentence representation extraction model and the residual network model also change with the training of the feature extraction model.

[0142] In one embodiment, in the case of introducing reference triples, the embodiment of the present application provides another representation learning method, as shown in Figure 9Another flowchart of a representation learning method is provided in the embodiments of the present application, which can include: dividing a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set; wherein the triple includes a head entity, a relation and a tail entity, the category of the first tail entity in the first triple set is more than the category of the second tail entity in the second triple set, the first tail entity includes a tail entity connected with the same relation in the first triple set, and the second tail entity includes a tail entity connected with the same relation in the second triple set. Construct a reference triple corresponding to each triple in the first triple set to obtain a reference triple set; wherein the relation included in the reference triple is the same as the relation included in the corresponding triple, and the reference triple satisfies any one of the following conditions: the head entity included in the reference triple is not the same as the head entity included in the corresponding triple, or the tail entity included in the reference triple is not the same as the tail entity included in the corresponding triple.

[0143] Extract the representation vector group corresponding to each triple in the first triple set and the second triple set, and extract the representation vector group corresponding to each reference triple in the reference triple set; wherein the representation vector group corresponding to the triple includes the representation vector of the head entity, the representation vector of the relation and the representation vector of the tail entity.

[0144] Obtain the multi-modal information corresponding to the head entity in each triple included in the knowledge graph, wherein the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information. For any triple included in the knowledge graph, extract the representation vector of the multi-modal information corresponding to the head entity in any triple; update the representation vector group corresponding to any triple based on the representation vector of the multi-modal information corresponding to the head entity in any triple; for any reference triple in the reference triple set, extract the representation vector of the multi-modal information corresponding to the head entity in any reference triple; update the representation vector group corresponding to any reference triple based on the representation vector of the multi-modal information corresponding to the head entity in any reference triple. Wherein, for any reference triple in the reference triple set, extracting the representation vector of the multi-modal information corresponding to the head entity in any reference triple, updating the representation vector group corresponding to any reference triple based on the representation vector of the multi-modal information corresponding to the head entity in any reference triple is similar to the above process of extracting the representation vector of the multi-modal information corresponding to the head entity in any triple included in the knowledge graph, and updating the representation vector group corresponding to any triple based on the representation vector of the multi-modal information corresponding to the head entity in any triple, which will not be described here.

[0145] determining, based on the updated representation vector group corresponding to each triple in the first triple set, a first distance between the representation vector of the head entity and the relation and the representation vector of the tail entity included in each triple in the first triple set; determining, based on the updated representation vector group corresponding to each triple in the second triple set, a second distance between the representation vector of the head entity and the representation vector of the tail entity included in each triple in the second triple set; determining, based on the updated representation vector group corresponding to each reference triple in the reference triple set, a third distance between the representation vector of the head entity and the relation and the representation vector of the tail entity included in each reference triple in the reference triple set; and determining, according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, a target representation vector group corresponding to each triple in the knowledge graph.

[0146] In one embodiment, the target representation vector of the head entity, the target representation vector of the relation, and the target representation vector of the tail entity in the knowledge graph learned by using the existing translation model based on the translation idea, and the target representation vector of the head entity, the target representation vector of the relation, and the target representation vector of the tail entity in the same knowledge graph learned by using the representation learning method proposed in the present application and introducing multi-modal information, are respectively projected into a three-dimensional space. It can be found that when the same knowledge graph is represented, if only the translation model is used, the target representation vectors have a significant feature space collapse effect in the three-dimensional space, and many target representation vectors are gathered in a small area. However, the target representation vectors obtained by using the representation learning method proposed in the present application and introducing multi-modal information are relatively dispersed in the feature space, and have higher discrimination. For details, see Figure 10a FIG. 1 is a schematic diagram of the projection of a target representation vector obtained by using a translation model, Figure 10b FIG. 2 is a schematic diagram of the projection of a target representation vector obtained by using the clustering idea and introducing multi-modal information.

[0147] In one embodiment, the evaluation indicators commonly used in the field of knowledge graph representation learning can be used to compare and evaluate the representation learning method proposed in the present application and the existing models for knowledge graph representation learning. Specifically, referring to Table 1, the specific performance of the representation learning method proposed in the present application, the existing translation model (including TransE model and TransH model), the existing semantic matching model (including ComplEx model and DisMult model) and the existing graph convolution model (RGCN model) in the evaluation indicators commonly used in the field of knowledge graph representation learning, HIT@1 indicator, HIT@3 indicator and HIT@10 indicator, can be found that the representation learning method proposed in the present application for introducing multi-modal information is better than the existing model in knowledge graph representation learning, and the accuracy of the target representation vector obtained by using the representation learning method proposed in the present application for introducing multi-modal information is higher.

[0148]

[0149]

[0150] In one embodiment, the evaluation indicators commonly used in the field of knowledge graph representation learning can be used to compare and evaluate the representation learning method proposed in the present application and the existing models for knowledge graph representation learning. Specifically, referring to Table 1, the specific performance of the representation learning method proposed in the present application, the existing translation model (including TransE model and TransH model), the existing semantic matching model (including ComplEx model and DisMult model) and the existing graph convolution model (RGCN model) in the evaluation indicators commonly used in the field of knowledge graph representation learning, HIT@1 indicator, HIT@3 indicator and HIT@10 indicator, can be found that the representation learning method proposed in the present application for introducing multi-modal information is better than the existing model in knowledge graph representation learning, and the accuracy of the target representation vector obtained by using the representation learning method proposed in the present application for introducing multi-modal information is higher.

[0151]

[0152] As can be seen from Table 2, after introducing multi-modal information, the HIT@1 index can be significantly improved. The effect of introducing text description information is better than that of introducing image information; this is because the text description information can usually provide theme, category and other information on the basis of providing the style information. When introducing image information, the generalization of the model is better when introducing three images than when using a single image; this is reflected in the improvement of the HIT@3 index and the HIT@10 index; this is because a single image sometimes cannot provide style information, and multiple images usually provide more style information. When introducing text description information and image information at the same time, the effect based on the Tanh activation function is better than that based on the Concate function. Introducing multi-modal information of multiple modalities, such as introducing text description information and image information at the same time, can achieve the best effect, because the modal information of different modalities can usually complement each other.

[0153] In an embodiment, when the knowledge graph is a game knowledge graph in the game field, the head entity in the triple included in the game knowledge graph is a game, and the target representation vector of the game is the target representation vector of the head entity in the corresponding target representation vector group of the triple; the potential seed object of the game can be determined based on the learned target representation vector of the game to improve the user acquisition effect of the game, that is, by promoting the game to the determined potential seed object to attract users. A positive sample object set and a negative sample object set can be constructed from the object library, and the sample objects in the positive sample object set are seed objects of the target game; for any sample object in the positive sample object set and the negative sample object set, based on the operation time length of each reference game of the sample object and the target representation vector of each reference game within a predetermined time period, the preference feature of the sample object is determined, and the preference feature of the sample object is used to indicate the preference degree of the sample object for each reference game; based on the preference features of each sample object in the positive sample object set and the negative sample object set, the object diffusion model is trained to obtain the trained object diffusion model; the preference features of each object in the object library are processed through the trained object diffusion model, and based on the corresponding processing results of each object, the potential seed objects similar to the seed object are determined from each object; the target game is promoted to the determined potential seed objects.

[0154] Among them, the target game can be any game to be promoted; the seed object of the target game can be an object interested in the target game, for example, it can be a game user of the target game, a pre-booking user of the target game, etc.; the sample objects in the negative sample object set are non-seed objects of the target game, that is, objects currently not interested in the target game, for example, they can be non-game users of the target game, non-pre-booking users of the target game (i.e. users who have not booked the target game so far).

[0155] In specific implementation, for any sample object in the positive sample object set and the negative sample object set, in the process of determining the preference feature of the any sample object based on the operation time length of each reference game in which the any sample object generates operation and the target representation vector of each reference game within a preset time period, the operation time length proportion of each reference game can be determined based on the operation time length of each reference game and the sum of the operation time length of each reference game; the target representation vectors of the corresponding reference games are weighted and summed to obtain the preference feature of the any sample object; wherein the preset time period can be set according to specific requirements; the target representation vector of any reference game is obtained from the game knowledge graph.

[0156] For example, if the reference game and operation time length in which the any sample object generates operation within the preset time period are: game A, 1 hour, game B, 2 hours, game C, 0.6 hours, and game D, 0.4 hours; the sum of the operation time length of each reference game is 4 hours, and the operation time length proportion of each reference game is: game A, 1 / 4, game B, 2 / 4, game C, 6 / 40, and game D, 4 / 40; and the target representation vectors of each reference game are: game A, F1, game B, F2, game C, F3, and game C, F4, respectively, the preference feature of the any sample object can be:

[0157] Further, in the process of training the object diffusion model based on the preference features of each sample object in the positive sample object set and the negative sample object set, the object diffusion model can be any model that can realize object diffusion, for example, can be a label model in a lookalike model, a classification model, etc., and the embodiments of the present application do not make any limitation, and the embodiments of the present application will be described below taking the object diffusion model as a classification model as an example. In this case, the training idea of training the object diffusion model based on the preference features of each sample object in the positive sample object set and the negative sample object set can be: taking the preference features of each sample object in the positive sample object set as the input of the object diffusion model, taking the positive category as the expected output of the object diffusion model, taking the preference features of each sample object in the negative sample object set as the input of the object diffusion model, taking the negative category as the expected output of the object diffusion model, and training the object diffusion model to obtain the trained object diffusion model. Optionally, if the trained object diffusion model obtained based on the positive sample object set and the negative sample object set fails the test, the positive sample object set and the negative sample object set can be updated, and then the trained object diffusion model that fails the test is trained again based on the updated positive sample object set and the updated negative sample object set, until the trained object diffusion model that passes the test is obtained.

[0158] Further, when the trained object diffusion model is a classification model, processing the preference features of each object in the object library by the trained object diffusion model, and determining potential seed objects similar to the seed object from each object based on the processing result corresponding to each object can include: for any object in the object library, inputting the preference features of the any object into the trained object diffusion model to obtain a predicted category, and if the predicted category is a positive category, determining the any object as a potential seed object similar to the seed object; wherein the predicted category is the processing result corresponding to the any object.

[0159] Further, the target game can be promoted to the determined potential seed objects to improve the user acquisition effect of the target game. Optionally, for the determined potential seed object, it can be judged whether the potential seed object is a registered user of the target game. If the potential seed object is a registered user of the target game, the target game can not be promoted to the potential seed object. If the potential seed object is not a registered user of the target game, the target game can be promoted to the potential seed object. Further, after promoting the target game to the determined potential seed objects, exposure click logs can be collected. The exposure click logs can record the objects exposed to the promotion, the objects that click the promotion after exposure, and the objects that register after clicking the promotion. The objects that register after clicking the promotion recorded in the exposure click logs can be used as new seed objects, and the positive sample object set can be updated based on the new seed objects to update the trained object diffusion model.

[0160] Referring to Figure 11 A schematic diagram for promoting a game provided by an embodiment of the present application can construct a positive sample object set and a negative sample object set from an object library. The sample objects in the positive sample object set are seed objects of a target game. For any sample object in the positive sample object set and the negative sample object set, the operation duration of each reference game in which the sample object generates an operation within a preset time period is obtained from a game duration library, and the target representation vector of each reference game is obtained from a game knowledge graph. Then, based on the operation duration of each reference game and the target representation vector of each reference game, the preference feature of the sample object is determined to obtain the preference features of each sample object in the positive sample object set and the negative sample object set. Based on the preference features of each sample object in the positive sample object set and the negative sample object set, an object diffusion model is trained to obtain a trained object diffusion model. When the trained object diffusion model fails the test, the positive sample object set and the negative sample object set can be updated, and the trained object diffusion model that fails the test can be retrained based on the updated positive sample object set and the updated negative sample object set until a trained object diffusion model that passes the test is obtained. When the trained object diffusion model passes the test, the trained object diffusion model is used to determine potential seed objects similar to the seed objects from the object library. Potential seed objects that are not registered users of the target game are selected from the determined potential seed objects, and the target game is promoted to each potential seed object. After promoting the target game to each potential seed object, exposure click logs can be collected, and the trained object diffusion model can be updated based on the exposure click logs.

[0161] In the embodiments of the present application, by introducing multi-modal information in the process of knowledge graph representation learning, supplementary information can be added on the basis of the structural information contained in the knowledge graph for representation learning of the knowledge graph, which can improve the accuracy of the target representation vector learned, that is, improve the accuracy of knowledge graph representation learning; and can effectively improve the accuracy of long-tail data representation learning, that is, the relationship sparse triplets (i.e. long-tail data in the knowledge graph) existing in the knowledge graph usually have low accuracy of the target representation vector group of the triplets learned due to insufficient relationship information, and the introduction of multi-modal information can improve the accuracy of long-tail data representation learning due to the introduction of supplementary information.

[0162] Based on the above embodiment related to the representation learning method, the present embodiment provides a representation learning device. Referring to Figure 12 A structural schematic diagram of a representation learning device provided by the present embodiment is shown in the figure. The representation learning device can include a division unit 1201 and a training unit 1202. Figure 12 The representation learning device shown can be used to perform the following operations:

[0163] The division unit 1201 is configured to divide a plurality of triplets included in a knowledge graph to obtain a first triplet set and a second triplet set; a triplet includes a head entity, a relationship and a tail entity; the number of categories of first tail entities in the first triplet set is greater than the number of categories of second tail entities in the second triplet set; the first tail entity includes a tail entity connected to the same relationship in the first triplet set; and the second tail entity includes a tail entity connected to the same relationship in the second triplet set;

[0164] The training unit 1202 is configured to extract a representation vector group corresponding to each triplet in the first triplet set and the second triplet set; the representation vector group corresponding to a triplet includes a representation vector of a head entity, a representation vector of a relationship and a representation vector of a tail entity;

[0165] The training unit 1202 is further configured to determine, based on the representation vector group corresponding to each triplet in the first triplet set, a first distance of the representation vector of the head entity and the representation vector of the relationship included in each triplet in the first triplet set, and a representation vector of the tail entity;

[0166] The training unit 1202 is further configured to determine, based on the representation vector group corresponding to each triplet in the second triplet set, a second distance of the representation vector of the head entity included in each triplet in the second triplet set, and a representation vector of the tail entity;

[0167] The training unit 1202 is further configured to determine a target representation vector group corresponding to each triple in the knowledge graph according to a first distance corresponding to each triple in the first triple set and a second distance corresponding to each triple in the second triple set; and the target representation vector group corresponding to each triple includes a target representation vector of a head entity, a target representation vector of a relation, and a target representation vector of a tail entity.

[0168] In one embodiment, when the dividing unit 1201 divides the plurality of triples included in the knowledge graph to obtain the first triple set and the second triple set, the dividing unit 1201 performs the following operations:

[0169] For any one relation in the knowledge graph, the dividing unit 1201 counts tail entities connected to the any one relation in the knowledge graph as target tail entities, and the target tail entities are different from each other.

[0170] The dividing unit 1201 respectively counts the number of head entities connected to the any one relation and the target tail entities in the knowledge graph as reference numbers corresponding to the target tail entities.

[0171] The dividing unit 1201 determines a division reference value corresponding to the any one relation according to the reference numbers corresponding to the target tail entities.

[0172] For any one triple included in the knowledge graph, if the division reference value corresponding to the relation in the any one triple is less than a preset division threshold, the dividing unit 1201 divides the any one triple into the first triple set.

[0173] If the division reference value corresponding to the relation in the any one triple is greater than or equal to the preset division threshold, the dividing unit 1201 divides the any one triple into the second triple set.

[0174] In one embodiment, when the dividing unit 1201 determines the division reference value corresponding to the any one relation according to the reference numbers corresponding to the target tail entities, the dividing unit 1201 performs the following operations:

[0175] For any one target tail entity, the dividing unit 1201 determines a reference number proportion of the any one target tail entity according to the reference numbers corresponding to the target tail entities.

[0176] The dividing unit 1201 determines an information entropy corresponding to the any one relation based on the reference number proportions corresponding to the target tail entities.

[0177] The dividing unit 1201 converts the information entropy corresponding to the any one relation to obtain the division reference value corresponding to the any one relation.

[0178] In one embodiment, the training unit 1202 is further configured to:

[0179] construct a reference triple corresponding to each triple in the first triple set to obtain a reference triple set; the reference triple includes the same relation as the corresponding triple, and the reference triple satisfies any one of the following conditions: the head entity included in the reference triple is different from the head entity included in the corresponding triple, or the tail entity included in the reference triple is different from the tail entity included in the corresponding triple;

[0180] extract a representation vector group corresponding to each reference triple in the reference triple set;

[0181] determine, based on the representation vector group corresponding to each reference triple in the reference triple set, a representation vector sum of the head entity and the relation included in each reference triple in the reference triple set, and a third distance of the representation vector pointing to the tail entity;

[0182] When the training unit 1202 determines the target representation vector group corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the following operations are specifically performed:

[0183] determine the target representation vector group corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set.

[0184] In one embodiment, when the training unit 1202 constructs the reference triple corresponding to each triple in the first triple set, the following operations are specifically performed:

[0185] perform entity replacement processing on any triple in the first triple set to obtain a replaced triple;

[0186] if the replaced triple does not exist in the knowledge graph, the replaced triple is taken as the reference triple corresponding to the any triple;

[0187] if the replaced triple exists in the knowledge graph, the entity replacement processing on the any triple is repeatedly performed until the reference triple corresponding to the any triple is obtained.

[0188] In one embodiment, when the training unit 1202 performs entity replacement processing on the any triple to obtain the replaced triple, the following operations are specifically performed:

[0189] obtain a head entity in the knowledge graph that is different from the head entity in the any triple;

[0190] replace the head entity in the any triple with the obtained head entity to obtain the replaced triple.

[0191] In an embodiment, when the training unit 1202 performs entity replacement processing on the any triple to obtain a replaced triple, the training unit 1202 specifically performs the following operations:

[0192] obtain a tail entity in the knowledge graph that is different from the tail entity in the any triple;

[0193] replace the tail entity in the any triple with the obtained tail entity to obtain the replaced triple.

[0194] In an embodiment, the representation vector group corresponding to each triple in the first triple set, the representation vector group corresponding to each triple in the second triple set, and the representation vector group corresponding to each reference triple in the reference triple set are extracted by a feature extraction model;

[0195] When the training unit 1202 determines the target representation vector group corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, the training unit 1202 specifically performs the following operations:

[0196] obtain a reference distribution radius corresponding to each triple in the second triple set;

[0197] Iteratively train the feature extraction model in a direction of reducing the first distance corresponding to each triple in the first triple set, increasing the third distance corresponding to each reference triple in the reference triple set, and controlling the second distance corresponding to each triple in the second triple set to be less than or equal to the corresponding reference distribution radius, to obtain a trained feature extraction model.

[0198] Extract the representation vector group corresponding to each triple included in the knowledge graph by the trained feature extraction model as the target representation vector group corresponding to the corresponding triple.

[0199] In an embodiment, the training unit 1202 is further configured to:

[0200] obtain multi-modal information corresponding to the head entity in each triple included in the knowledge graph; the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information;

[0201] extracting, for any triple included in the knowledge graph, a representation vector of multi-modal information corresponding to a head entity in the any triple;

[0202] updating, based on the representation vector of multi-modal information corresponding to the head entity in the any triple, a representation vector group corresponding to the any triple;

[0203] When the sum of the representation vectors of the head entity and the relation and the first distance of the representation vector of the tail entity are determined based on the representation vector group corresponding to each triple in the first triple set, the training unit 1202 specifically performs the following operations:

[0204] When the sum of the representation vectors of the head entity and the relation and the first distance of the representation vector of the tail entity are determined based on the updated representation vector group corresponding to each triple in the first triple set, the training unit 1202 specifically performs the following operations:

[0205] When the sum of the representation vectors of the head entity and the relation and the second distance of the representation vector of the tail entity are determined based on the representation vector group corresponding to each triple in the second triple set, the training unit 1202 specifically performs the following operations:

[0206] When the sum of the representation vectors of the head entity and the relation and the second distance of the representation vector of the tail entity are determined based on the updated representation vector group corresponding to each triple in the second triple set, the training unit 1202 specifically performs the following operations.

[0207] In one embodiment, the training unit 1202 is further configured to:

[0208] obtaining multi-modal information corresponding to a head entity in each triple included in the knowledge graph; the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information;

[0209] extracting, for any triple included in the knowledge graph, a representation vector of multi-modal information corresponding to a head entity in the any triple;

[0210] updating, based on the representation vector of multi-modal information corresponding to the head entity in the any triple, a representation vector group corresponding to the any triple;

[0211] extracting, for any reference triple in the reference triple set, a representation vector of multi-modal information corresponding to a head entity in the any reference triple;

[0212] updating, based on the representation vector of the multi-modal information corresponding to the head entity in any of the reference triplets, the representation vector group corresponding to the any of the reference triplets;

[0213] The training unit 1202 determines, based on the representation vector group corresponding to each of the triplets in the first triplet set, a first distance between the representation vector of the head entity and the relation included in each of the triplets in the first triplet set and the representation vector of the tail entity, and specifically performs the following operations:

[0214] The training unit 1202 determines, based on the updated representation vector group corresponding to each of the triplets in the first triplet set, a first distance between the representation vector of the head entity and the relation included in each of the triplets in the first triplet set and the representation vector of the tail entity.

[0215] The training unit 1202 determines, based on the representation vector group corresponding to each of the triplets in the second triplet set, a second distance between the representation vector of the head entity included in each of the triplets in the second triplet set and the representation vector of the tail entity, and specifically performs the following operations:

[0216] The training unit 1202 determines, based on the updated representation vector group corresponding to each of the triplets in the second triplet set, a second distance between the representation vector of the head entity included in each of the triplets in the second triplet set and the representation vector of the tail entity.

[0217] The training unit 1202 determines, based on the representation vector group corresponding to each of the reference triplets in the reference triplet set, a third distance between the representation vector of the head entity and the relation included in each of the reference triplets in the reference triplet set and the representation vector of the tail entity, and specifically performs the following operations:

[0218] The training unit 1202 determines, based on the updated representation vector group corresponding to each of the reference triplets in the reference triplet set, a third distance between the representation vector of the head entity and the relation included in each of the reference triplets in the reference triplet set and the representation vector of the tail entity.

[0219] In one embodiment, the updated representation vector group corresponding to the triplet includes: the updated representation vector of the head entity, the representation vector of the relation, and the representation vector of the tail entity.

[0220] The training unit 1202 is configured to obtain the updated representation vector of the head entity in any of the triplets, and specifically performs the following operations:

[0221] The representation vector of the multi-modal information corresponding to the head entity in the any of the triplets is fused with the representation vector of the head entity in the any of the triplets to obtain the updated representation vector of the head entity in the any of the triplets.

[0222] In an embodiment, the knowledge graph is a game knowledge graph, and a head entity in a triple included in the game knowledge graph is a game, and a target representation vector of the game is a target representation vector of the head entity in a target representation vector group corresponding to the corresponding triple.

[0223] The representation learning apparatus further includes an application unit 1203 configured to:

[0224] construct a positive sample object set and a negative sample object set from the object library, wherein a sample object in the positive sample object set is a seed object of a target game;

[0225] determine, for each sample object in the positive sample object set and the negative sample object set, a preference feature of the sample object based on operation durations of each reference game in which the sample object generates operations within a preset time period and target representation vectors of the each reference game, wherein the preference feature of the sample object is used to indicate a preference degree of the sample object for the each reference game;

[0226] train an object diffusion model based on the preference features of the each sample object in the positive sample object set and the negative sample object set to obtain a trained object diffusion model;

[0227] process the preference features of each object in the object library through the trained object diffusion model, and determine a potential seed object similar to a seed object from the each object based on a processing result corresponding to the each object;

[0228] promote the target game to each potential seed object determined.

[0229] According to an embodiment of the present application, Figure 2 , Figure 4 , Figure 5 and Figure 9 each step involved in the representation learning method shown in Figure 12 may be executed by each unit in the representation learning apparatus shown in Figure 2 For example, Figure 12 the step S201 shown in Figure 2 may be executed by the division unit 1201 in the representation learning apparatus shown in Figure 12 the steps S202 to S205 shown in Figure 4 For example, Figure 12 the step S401 shown in Figure 4 may be executed by the division unit 1201 in the representation learning apparatus shown in Figure 12The training unit 1202 in the feature learning apparatus shown can be executed as illustrated. Also as illustrated, Figure 5 The step S501 shown can be executed by Figure 12 The dividing unit 1201 in the feature learning apparatus shown can be executed as illustrated, Figure 5 The steps S502 to S508 shown can be executed by Figure 12 The training unit 1202 in the feature learning apparatus shown can be executed as illustrated.

[0230] According to another embodiment of the present application, Figure 12 The units in the feature learning apparatus shown can be respectively or all combined into one or several other units to constitute, or some of the units can also be further split into a plurality of units with smaller functions to constitute, which can achieve the same operation without affecting the implementation of the technical effects of the embodiments of the present application. The above units are divided based on logical functions, and in actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the feature learning apparatus divided based on logical functions can also include other units, and in actual applications, these functions can also be implemented by other units, and can be implemented by multiple units in cooperation.

[0231] According to another embodiment of the present application, the feature learning apparatus as shown in Figure 2 、 Figure 4 、 Figure 5 and Figure 9 The feature learning apparatus as shown in Figure 12 , and to implement the feature learning method of the embodiments of the present application. The computer program can be recorded on, for example, a computer readable storage medium, and loaded into the above-mentioned computing device through the computer readable storage medium, and run therein.

[0232] In the embodiments of the present application, the plurality of triples included in the knowledge graph can be divided and processed to obtain a first triple set and a second triple set, wherein the types of tail entities connected to any one type of relationship in the first triple set are more than the types of tail entities connected to any one type of relationship in the second triple set. Then, based on the extracted representation vector group corresponding to each triple in the first triple set, the representation vector sum of the head entity and the relationship included in each triple in the first triple set and the first distance of the representation vector pointing to the tail entity are determined, and based on the extracted representation vector group corresponding to each triple in the second triple set, the representation vector of the head entity included in each triple in the second triple set and the second distance of the representation vector pointing to the tail entity are determined, wherein the representation vector group corresponding to a triple includes the representation vector of the head entity, the representation vector of the relationship, and the representation vector of the tail entity. Furthermore, according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined. Since the types of tail entities connected to any one type of relationship in the first triple set obtained by division are relatively more, under the condition that the type of the head entity is fixed, the number of head entities connected to any one type of relationship and any one type of tail entity is relatively less, and for this case, the representation vector sum of the head entity and the relationship in the triple indicated based on the translation idea should be close to the representation vector of the tail entity, the representation vector sum of the head entity and the relationship in the triple can be accurately learned by limiting the first distance of the representation vector pointing to the tail entity. Since the types of tail entities connected to any one type of relationship in the second triple set obtained by division are relatively less, under the condition that the type of the head entity is fixed, the number of head entities connected to any one type of relationship and any one type of tail entity is relatively more, and for this case, the representation vector of the head entity in the triple can be learned by limiting the size of the second distance of the representation vector pointing to the tail entity based on the clustering idea, which can ensure that the head entities connected to the any one type of relationship and the any one type of tail entity are distributed within a hyperplane centered on the any one type of tail entity, and when the head entities connected to the any one type of relationship and the any one type of tail entity are represented, the spatial distribution information possessed by different head entities can be preserved, the discrimination degree between the target representation vectors of different head entities learned can be ensured, and the accuracy of the representation learning of the knowledge graph can be improved.

[0233] Based on the related embodiments of the above representation learning method and the representation learning device embodiments, the present application further provides a representation learning device. Referring to Figure 13 A structural schematic diagram of a representation learning device provided by the embodiments of the present application. Figure 13The illustrated representation learning device can at least include a processor 1301, an input interface 1302, an output interface 1303, and a computer storage medium 1304. Among them, the processor 1301, the input interface 1302, the output interface 1303, and the computer storage medium 1304 can be connected through a bus or other means.

[0234] The computer storage medium 1304 can be stored in the memory of the representation learning device, and the computer storage medium 1304 is used to store a computer program, the computer program includes program instructions, and the processor 1301 is used to execute the program instructions stored by the computer storage medium 1304. The processor 1301 (also known as CPU (Central Processing Unit, Central Processing Unit)) is the computing core and control core of the representation learning device, which is suitable for implementing one or more instructions, and is particularly suitable for loading and executing one or more instructions to implement the representation learning method process or the corresponding function described above.

[0235] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in the representation learning device, and is used to store programs and data. It can be understood that the computer storage medium here can include the built-in storage medium in the terminal, and of course can also include the expansion storage medium supported by the terminal. The computer storage medium provides a storage space, and the storage space stores the operating system of the terminal. Moreover, one or more instructions suitable for being loaded and executed by the processor 1301 are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed random access memory (RAM) memory, or a non-volatile memory such as at least one disk memory; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0236] In one embodiment, one or more instructions stored in the computer storage medium can be loaded and executed by the processor 1301 to implement the corresponding steps of the method in the representation learning method embodiment described above Figure 2 、 Figure 4 、 Figure 5 and Figure 9 , and in the specific implementation, the one or more instructions in the computer storage medium are loaded and executed by the processor 1301 as follows:

[0237] The plurality of triples included in the knowledge graph are divided and processed to obtain a first triple set and a second triple set; a triple includes a head entity, a relation, and a tail entity; the types of first tail entities in the first triple set are more than the types of second tail entities in the second triple set; the first tail entity includes a tail entity connected to the same type of relation in the first triple set; and the second tail entity includes a tail entity connected to the same type of relation in the second triple set;

[0238] The representation vector group corresponding to each triple in the first triple set and the second triple set is extracted; the representation vector group corresponding to a triple includes a representation vector of a head entity, a representation vector of a relation, and a representation vector of a tail entity;

[0239] Based on the representation vector group corresponding to each triple in the first triple set, the first distance of the representation vector of the head entity and the relation included in each triple in the first triple set to the representation vector of the tail entity is determined;

[0240] Based on the representation vector group corresponding to each triple in the second triple set, the second distance of the representation vector of the head entity included in each triple in the second triple set to the representation vector of the tail entity is determined;

[0241] According to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined; the target representation vector group corresponding to a triple includes a target representation vector of a head entity, a target representation vector of a relation, and a target representation vector of a tail entity.

[0242] In one embodiment, when the processor 1301 divides and processes a plurality of triples included in a knowledge graph to obtain a first triple set and a second triple set, the following operations are specifically performed:

[0243] For any type of relation in the knowledge graph, the tail entities connected to the any type of relation in the knowledge graph are counted as target tail entities; each target tail entity is different from each other;

[0244] The number of head entities connected to each target tail entity based on the any type of relation in the knowledge graph is counted as a reference number corresponding to each target tail entity, respectively;

[0245] According to the reference number corresponding to each target tail entity, a division reference value corresponding to the any type of relation is determined;

[0246] For any triple included in the knowledge graph, if a partition reference value corresponding to a relation in the any triple is less than a preset partition threshold, the any triple is partitioned into the first triple set;

[0247] If the partition reference value corresponding to the relation in the any triple is greater than or equal to the preset partition threshold, the any triple is partitioned into the second triple set.

[0248] In one embodiment, when the processor 1301 determines the partition reference value corresponding to the any relation according to the reference quantity corresponding to each target tail entity, the processor 1301 specifically performs the following operations:

[0249] For any target tail entity, the reference quantity proportion corresponding to the any target tail entity is determined according to the reference quantity corresponding to each target tail entity;

[0250] The information entropy corresponding to the any relation is determined based on the reference quantity proportion corresponding to each target tail entity;

[0251] The information entropy corresponding to the any relation is converted to obtain the partition reference value corresponding to the any relation.

[0252] In one embodiment, the processor 1301 is further configured to:

[0253] The reference triple set corresponding to each triple in the first triple set is constructed to obtain a reference triple set. The reference triple includes the same relation as the corresponding triple, and the reference triple satisfies any one of the following conditions: the head entity included in the reference triple is different from the head entity included in the corresponding triple, or the tail entity included in the reference triple is different from the tail entity included in the corresponding triple.

[0254] The representation vector group corresponding to each reference triple in the reference triple set is extracted;

[0255] Based on the representation vector group corresponding to each reference triple in the reference triple set, the representation vector sum of the head entity and the relation included in each reference triple in the reference triple set, and the third distance of the representation vector pointing to the tail entity are determined.

[0256] When the processor 1301 determines the target representation vector group corresponding to each triple included in the knowledge graph according to the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the processor 1301 specifically performs the following operations:

[0257] The target representation vector corresponding to each triple in the knowledge graph is determined according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set.

[0258] In one embodiment, when the processor 1301 constructs the reference triple corresponding to each triple in the first triple set, the following operations are specifically performed:

[0259] For any triple in the first triple set, the entity replacement processing is performed on the any triple to obtain a replaced triple;

[0260] If the replaced triple does not exist in the knowledge graph, the replaced triple is taken as the reference triple corresponding to the any triple;

[0261] If the replaced triple exists in the knowledge graph, the entity replacement processing is repeatedly performed on the any triple until the reference triple corresponding to the any triple is obtained.

[0262] In one embodiment, when the processor 1301 performs the entity replacement processing on the any triple to obtain a replaced triple, the following operations are specifically performed:

[0263] An head entity different from the head entity in the any triple is obtained from the knowledge graph;

[0264] The head entity in the any triple is replaced by the obtained head entity to obtain the replaced triple.

[0265] In one embodiment, when the processor 1301 performs the entity replacement processing on the any triple to obtain a replaced triple, the following operations are specifically performed:

[0266] An tail entity different from the tail entity in the any triple is obtained from the knowledge graph;

[0267] The tail entity in the any triple is replaced by the obtained tail entity to obtain the replaced triple.

[0268] In one embodiment, the representation vector group corresponding to each triple in the first triple set, the representation vector group corresponding to each triple in the second triple set, and the representation vector group corresponding to each reference triple in the reference triple set are extracted by a feature extraction model.

[0269] The processor 1301 determines the target representation vector group corresponding to each triple in the knowledge graph according to the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, and specifically performs the following operations:

[0270] Obtain the reference distribution radius corresponding to each triple in the second triple set;

[0271] Iteratively train the feature extraction model in the direction of reducing the first distance corresponding to each triple in the first triple set, increasing the third distance corresponding to each reference triple in the reference triple set, and controlling the second distance corresponding to each triple in the second triple set to be less than or equal to the corresponding reference distribution radius, to obtain a trained feature extraction model;

[0272] Extract the representation vector group corresponding to each triple in the knowledge graph through the trained feature extraction model as the target representation vector group corresponding to the corresponding triple.

[0273] In one embodiment, the processor 1301 is further configured to:

[0274] Obtain the multi-modal information corresponding to the head entity in each triple included in the knowledge graph; the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information;

[0275] For any triple included in the knowledge graph, extract the representation vector of the multi-modal information corresponding to the head entity in the triple;

[0276] Update the representation vector group corresponding to the triple based on the representation vector of the multi-modal information corresponding to the head entity in the triple;

[0277] The processor 1301 determines the first distance of the representation vector sum of the head entity and the relationship included in each triple in the first triple set, and the representation vector of the tail entity based on the representation vector group corresponding to each triple in the first triple set, and specifically performs the following operations:

[0278] Determine the first distance of the representation vector sum of the head entity and the relationship included in each triple in the first triple set, and the representation vector of the tail entity based on the updated representation vector group corresponding to each triple in the first triple set;

[0279] The processor 1301 determines, based on the representation vector group corresponding to each triple in the second triple set, a representation vector of a head entity included in each triple in the second triple set, a second distance of the representation vector pointing to a representation vector of a tail entity, and specifically performs the following operations:

[0280] The processor 1301 determines, based on the updated representation vector group corresponding to each triple in the second triple set, a representation vector of a head entity included in each triple in the second triple set, a second distance of the representation vector pointing to a representation vector of a tail entity.

[0281] In one embodiment, the processor 1301 is further configured to:

[0282] Obtain multi-modal information corresponding to a head entity in each triple included in the knowledge graph; the multi-modal information corresponding to the head entity includes one or more of the following: text description information and image information;

[0283] Extract a representation vector of multi-modal information corresponding to a head entity in any triple included in the knowledge graph;

[0284] Update the representation vector group corresponding to the any triple based on the representation vector of the multi-modal information corresponding to the head entity in the any triple;

[0285] Extract a representation vector of multi-modal information corresponding to a head entity in any reference triple in the reference triple set;

[0286] Update the representation vector group corresponding to the any reference triple based on the representation vector of the multi-modal information corresponding to the head entity in the any reference triple;

[0287] The processor 1301 determines, based on the representation vector group corresponding to each triple in the first triple set, a representation vector sum of a head entity and a relation included in each triple in the first triple set, a first distance of the representation vector pointing to a representation vector of a tail entity, and specifically performs the following operations:

[0288] The processor 1301 determines, based on the updated representation vector group corresponding to each triple in the first triple set, a representation vector sum of a head entity and a relation included in each triple in the first triple set, a first distance of the representation vector pointing to a representation vector of a tail entity.

[0289] The processor 1301 determines, based on the representation vector group corresponding to each triple in the second triple set, a representation vector of a head entity included in each triple in the second triple set, a second distance of the representation vector pointing to a representation vector of a tail entity, and specifically performs the following operations:

[0290] determine, based on the updated representation vector group corresponding to each triple in the second set of triples, a representation vector of a head entity included in each triple in the second set of triples, a second distance of the representation vector of the head entity to a representation vector of a tail entity;

[0291] When the processor 1301 determines, based on the representation vector group corresponding to each reference triple in the set of reference triples, a third distance of a representation vector sum of a head entity and a relation included in each reference triple in the set of reference triples to a representation vector of a tail entity, the processor 1301 specifically performs the following operations:

[0292] determine, based on the updated representation vector group corresponding to each reference triple in the set of reference triples, a third distance of a representation vector sum of a head entity and a relation included in each reference triple in the set of reference triples to a representation vector of a tail entity.

[0293] In an embodiment, the updated representation vector group corresponding to each triple includes an updated representation vector of the head entity, a representation vector of the relation, and a representation vector of the tail entity.

[0294] When the processor 1301 obtains the updated representation vector of the head entity in any triple, the processor 1301 specifically performs the following operations:

[0295] The updated representation vector of the head entity in the any triple is obtained by fusing the representation vector of the multi-modal information corresponding to the head entity in the any triple with the representation vector of the head entity in the any triple.

[0296] In an embodiment, the knowledge graph is a game knowledge graph, and the head entity in each triple included in the game knowledge graph is a game. The target representation vector of the game is the target representation vector of the head entity in the target representation vector group corresponding to the corresponding triple.

[0297] The processor 1301 is further configured to:

[0298] construct a set of positive sample objects and a set of negative sample objects from the object library. The sample objects in the set of positive sample objects are seed objects of a target game.

[0299] For any sample object in the set of positive sample objects and the set of negative sample objects, determine a preference feature of the any sample object based on operation durations of each reference game in which the any sample object generates operations in a preset time period and target representation vectors of the each reference game. The preference feature of the any sample object is used to indicate a preference degree of the any sample object for the each reference game.

[0300] Based on the preference features of each sample object in the positive sample object set and the negative sample object set, an object diffusion model is trained to obtain a trained object diffusion model;

[0301] The preference features of each object in the object library are processed by the trained object diffusion model, and based on the processing results corresponding to each object, potential seed objects similar to the seed object are determined from the each object;

[0302] The target game is promoted to each determined potential seed object.

[0303] The embodiment of the present application provides a computer program product, which comprises a computer program stored in a computer storage medium; a processor of a representation learning device reads the computer program from the computer storage medium, and the processor executes the computer program, so that the representation learning device executes the method embodiment as shown in the above Figure 2 、 Figure 4 、 Figure 5 and Figure 9 Figure 9 . Wherein, the computer readable storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM) or a random access memory (RAM) and the like.

[0304] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A representation learning method, characterized in that, include: The knowledge graph is divided into multiple triples to obtain a first set of triples and a second set of triples. Each triple includes a head entity, a relation, and a tail entity. The first tail entity in the first set of triples has more types than the second tail entity in the second set of triples. The first tail entity includes tail entities connected to the same relation in the first set of triples, and the second tail entity includes tail entities connected to the same relation in the second set of triples. Extract the representation vector set corresponding to each triplet from the first triplet set and the second triplet set; the representation vector set corresponding to the triplet includes: the representation vector of the head entity, the representation vector of the relation, and the representation vector of the tail entity. Based on the representation vector set corresponding to each triple in the first triple set, determine the sum of the representation vectors of the head entity and relation included in each triple in the first triple set, and the first distance of the representation vector pointing to the tail entity. Based on the representation vector set corresponding to each triple in the second triple set, determine the representation vector of the head entity included in each triple in the second triple set, and the second distance to the representation vector of the tail entity. Based on the first distance corresponding to each triple in the first triple set and the second distance corresponding to each triple in the second triple set, the target representation vector set corresponding to each triple included in the knowledge graph is determined; the target representation vector set corresponding to the triple includes: the target representation vector of the head entity, the target representation vector of the relation, and the target representation vector of the tail entity; wherein, the knowledge graph includes a game knowledge graph, the head entity of the triple in the game knowledge graph is the game, the relation is the attribute possessed by the game, and the tail entity is the attribute value, and the target representation vector corresponding to the game in the game knowledge graph is used to determine the potential seed object of the game.

2. The method as described in claim 1, characterized in that, The process of partitioning the knowledge graph into multiple triples yields a first set of triples and a second set of triples, including: For any relation in the knowledge graph, the tail entities connected to any relation in the knowledge graph are counted and used as target tail entities; each target tail entity is distinct from the others. The number of head entities connected to each target tail entity based on any one of the relationships in the knowledge graph is counted, and used as the reference number for each target tail entity. Based on the reference quantity corresponding to each target tail entity, determine the partitioning reference value corresponding to any one of the relationships; For any triple included in the knowledge graph, if the partitioning reference value corresponding to the relation in any triple is less than a preset partitioning threshold, then any triple is partitioned into the first triple set. If the partitioning reference value corresponding to the relation in any triplet is greater than or equal to the preset partitioning threshold, then any triplet is partitioned into the second triplet set.

3. The method as described in claim 2, characterized in that, The step of determining the partitioning reference value corresponding to any one relationship based on the reference quantity corresponding to each target tail entity includes: For any target tail entity, the reference quantity percentage corresponding to any target tail entity is determined based on the reference quantity corresponding to each target tail entity. Based on the reference quantity ratio corresponding to each target tail entity, determine the information entropy corresponding to any one of the relationships; The information entropy corresponding to any one of the relationships is transformed to obtain the partitioning reference value corresponding to any one of the relationships.

4. The method as described in claim 1, characterized in that, The method further includes: Construct reference triples corresponding to each triple in the first triple set to obtain a reference triple set; the relations included in the reference triples are the same as those included in the corresponding triples, and the reference triples satisfy any of the following conditions: the head entity included in the reference triples is different from the head entity included in the corresponding triples, or the tail entity included in the reference triples is different from the tail entity included in the corresponding triples. Extract the representation vector set corresponding to each reference triplet from the set of reference triplets; Based on the representation vector set corresponding to each reference triple in the reference triple set, determine the sum of the representation vectors of the head entity and relation included in each reference triple in the reference triple set, and the third distance of the representation vector pointing to the tail entity. The step of determining the target representation vector set corresponding to each triplet in the knowledge graph based on the first distance corresponding to each triplet in the first triplet set and the second distance corresponding to each triplet in the second triplet set includes: Based on the first distance corresponding to each triple in the first triple set, the second distance corresponding to each triple in the second triple set, and the third distance corresponding to each reference triple in the reference triple set, the target representation vector group corresponding to each triple included in the knowledge graph is determined.

5. The method as described in claim 4, characterized in that, The construction of reference triplets corresponding to each triplet in the first triplet set includes: For any triplet in the first set of triplets, perform entity replacement processing on the triplet to obtain the replaced triplet; If the replaced triplet does not exist in the knowledge graph, then the replaced triplet is used as the reference triplet corresponding to any triplet. If the replaced triple exists in the knowledge graph, the entity replacement process for any triple is repeated until the reference triple corresponding to any triple is obtained.

6. The method as described in claim 5, characterized in that, The step of performing entity replacement on any of the triples to obtain the replaced triples includes: Obtain the head entity in the knowledge graph that is different from the head entity in any of the triples; Replace the head entity in any of the triples with the obtained head entity to obtain the replaced triples.

7. The method as described in claim 5, characterized in that, The step of performing entity replacement on any of the triples to obtain the replaced triples includes: Obtain the tail entity in the knowledge graph that is different from the tail entity in any triple; Replace the tail entity in any of the triples with the obtained tail entity to obtain the replaced triples.

8. The method as described in claim 4, characterized in that, The representation vector sets corresponding to each triplet in the first triplet set, the representation vector sets corresponding to each triplet in the second triplet set, and the representation vector sets corresponding to each reference triplet in the reference triplet set are extracted by a feature extraction model. The step of determining the target representation vector set corresponding to each triplet in the knowledge graph based on the first distance corresponding to each triplet in the first triplet set, the second distance corresponding to each triplet in the second triplet set, and the third distance corresponding to each reference triplet in the reference triplet set includes: Obtain the reference distribution radius corresponding to each triplet in the second set of triplets; The feature extraction model is iteratively trained in the direction of decreasing the first distance corresponding to each triplet in the first triplet set, increasing the third distance corresponding to each reference triplet in the reference triplet set, and controlling the second distance corresponding to each triplet in the second triplet set to be less than or equal to the corresponding reference distribution radius, to obtain the trained feature extraction model. The trained feature extraction model extracts the representation vector sets corresponding to each triple in the knowledge graph, which are then used as the target representation vector sets for the corresponding triples.

9. The method as described in claim 1, characterized in that, The method further includes: Obtain the multimodal information corresponding to the head entity in each triple of the knowledge graph; the multimodal information corresponding to the head entity includes one or more of the following: text description information and image information; For any triple included in the knowledge graph, extract the representation vector of the multimodal information corresponding to the head entity in the triple; Based on the representation vector of the multimodal information corresponding to the head entity in any triplet, update the representation vector group corresponding to any triplet; The step of determining the sum of the representation vectors of the head entity and relation included in each triplet in the first triplet set, and the first distance between the representation vectors pointing to the tail entity, based on the representation vector set corresponding to each triplet in the first triplet set, includes: Based on the updated representation vector set corresponding to each triple in the first triple set, determine the sum of the representation vectors of the head entity and relation included in each triple in the first triple set, and the first distance of the representation vector pointing to the tail entity. The step of determining the representation vector of the head entity included in each triplet in the second triplet set, and the second distance pointing to the representation vector of the tail entity, based on the representation vector set corresponding to each triplet in the second triplet set, includes: Based on the updated representation vector set corresponding to each triple in the second triple set, determine the representation vector of the head entity included in each triple in the second triple set, and the second distance pointing to the representation vector of the tail entity.

10. The method as described in claim 4, characterized in that, The method further includes: Obtain the multimodal information corresponding to the head entity in each triple of the knowledge graph; the multimodal information corresponding to the head entity includes one or more of the following: text description information and image information; For any triple included in the knowledge graph, extract the representation vector of the multimodal information corresponding to the head entity in the triple; Based on the representation vector of the multimodal information corresponding to the head entity in any triplet, update the representation vector group corresponding to any triplet; For any reference triplet in the set of reference triplets, extract the representation vector of the multimodal information corresponding to the head entity in any reference triplet; Based on the representation vector of the multimodal information corresponding to the head entity in any reference triple, update the representation vector group corresponding to any reference triple; The step of determining the sum of the representation vectors of the head entity and relation included in each triplet in the first triplet set, and the first distance between the representation vectors pointing to the tail entity, based on the representation vector set corresponding to each triplet in the first triplet set, includes: Based on the updated representation vector set corresponding to each triple in the first triple set, determine the sum of the representation vectors of the head entity and relation included in each triple in the first triple set, and the first distance of the representation vector pointing to the tail entity. The step of determining the representation vector of the head entity included in each triplet in the second triplet set, and the second distance pointing to the representation vector of the tail entity, based on the representation vector set corresponding to each triplet in the second triplet set, includes: Based on the updated representation vector set corresponding to each triple in the second triple set, determine the representation vector of the head entity included in each triple in the second triple set, and the second distance to the representation vector of the tail entity. The step of determining the sum of the representation vectors of the head entity and relation included in each reference triplet in the reference triplet set, and the third distance of the representation vector pointing to the tail entity, based on the representation vector set corresponding to each reference triplet in the reference triplet set, includes: Based on the updated representation vector set corresponding to each reference triple in the reference triple set, determine the sum of the representation vectors of the head entity and relation included in each reference triple in the reference triple set, and the third distance of the representation vector pointing to the tail entity.

11. The method as described in claim 9 or 10, characterized in that, The updated representation vector set corresponding to the triple includes: the updated representation vector of the head entity, the representation vector of the relation, and the representation vector of the tail entity. The methods for obtaining the updated representation vector of the head entity in any triple include: The representation vector of the multimodal information corresponding to the head entity in any triplet is fused with the representation vector of the head entity in any triplet to obtain the updated representation vector of the head entity in any triplet.

12. The method as described in claim 1, characterized in that, The target representation vector of the game is the target representation vector of the head entity in the target representation vector group corresponding to the corresponding triple; The method further includes: Construct a positive sample object set and a negative sample object set from the object library; the sample objects in the positive sample object set are the seed objects of the target game; For any sample object in the positive sample object set and the negative sample object set, based on the operation time of each reference game generated by the sample object within a preset time period and the target representation vector of each reference game, the preference features of the sample object are determined; the preference features of the sample object are used to indicate the degree of preference of the sample object for each reference game. Based on the preference features of each sample object in the positive sample object set and the negative sample object set, an object diffusion model is trained to obtain the trained object diffusion model. The trained object diffusion model is used to process the preference features of each object in the object library, and based on the processing results of each object, potential seed objects similar to the seed objects are identified from each object. Promote the target game to each of the identified potential seed objects.

13. A representation learning device, characterized in that, include: A partitioning unit is used to partition multiple triples included in the knowledge graph to obtain a first set of triples and a second set of triples. A triple includes a head entity, a relation, and a tail entity. The first tail entity in the first set of triples has more types than the second tail entity in the second set of triples. The first tail entity includes tail entities connected to the same relation in the first set of triples, and the second tail entity includes tail entities connected to the same relation in the second set of triples. The training unit is used to extract the representation vector set corresponding to each triplet in the first triplet set and the second triplet set; the representation vector set corresponding to the triplet includes: the representation vector of the head entity, the representation vector of the relation, and the representation vector of the tail entity. The training unit is further configured to determine, based on the representation vector set corresponding to each triplet in the first triplet set, the sum of the representation vectors of the head entity and the relation included in each triplet in the first triplet set, and the first distance of the representation vector pointing to the tail entity. The training unit is further configured to determine, based on the representation vector set corresponding to each triplet in the second triplet set, the representation vector of the head entity included in each triplet in the second triplet set, and the second distance to the representation vector of the tail entity. The training unit is further configured to determine the target representation vector set corresponding to each triplet in the knowledge graph based on the first distance corresponding to each triplet in the first triplet set and the second distance corresponding to each triplet in the second triplet set; the target representation vector set corresponding to the triplet includes: the target representation vector of the head entity, the target representation vector of the relation, and the target representation vector of the tail entity; wherein, the knowledge graph includes a game knowledge graph, the head entity in the triplet of the game knowledge graph is the game, the relation is the attribute of the game, and the tail entity is the attribute value, and the target representation vector corresponding to the game in the game knowledge graph is used to determine the potential seed object of the game.

14. A representation learning device, characterized in that, The representation learning device includes an input interface and an output interface, and further includes: A processor, adapted to implement one or more instructions; and, A computer storage medium storing one or more instructions adapted to be loaded by the processor and executed as described in any one of claims 1-12.

15. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, are used to perform the representation learning method as described in any one of claims 1-12.

16. A computer program product, characterized in that, The computer program product includes a computer program that, when executed, performs the representation learning method as described in any one of claims 1-12.

Citation Information

Patent Citations

  • Graph structure and text information fused adaptive knowledge graph representation learning method

    CN112632290A

  • Representation learning method and device of knowledge graph

    CN113569052A