User relationship learning method and medium based on improved Trans model
By constructing a global relationship genealogy diagram and a five-tuple genetic model, the problem of low accuracy of user relationship learning in the existing Trans model is solved, higher-precision user relationship learning is achieved, and the problem of multiple contact relationship conflicts is solved.
Patent Information
- Application Number
- CN202410994274.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The user relationship learned by the user relationship learning method based on the Trans model in the prior art is relatively simple and has low accuracy, and cannot effectively reflect multiple contact relationships, making conflict problems difficult to resolve.
By obtaining the user's contact information and relationship information, we construct a global relationship pedigree, establish a five-tuple genetic model, and input it into the trained five-tuple user relationship recognition network to calculate the relationship vector between users and use Euclidean distance to obtain Similarity between users, thereby achieving higher accuracy user relationship learning.
This method can better reflect multiple contact relationships, solve the conflict problem of multiple contact relationships in the triplet model, and improve the accuracy of user relationships.
Smart Images

Figure CN118521420B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a user relationship learning method and medium based on an improved Trans model. Background Art
[0002] In the field of financial risk control, it is often necessary to collect and process some user features, calculate some correlation coefficients for users, and perform some operations such as grouping, clustering, and classification on users.
[0003] Some common characteristics of users include basic personal information (such as age, gender, education level), family status (such as marital status, family income), work status (such as occupation, years of work), credit history (such as credit score, debt status), etc. In addition, some other non-traditional characteristics can also be considered, such as social media data, mobile payment data, Sesame Credit, and some third-party external data and other characteristics.
[0004] In the current common relationship learning, a Trans-based triple model is used to learn user relationships, but the learned user relationships are relatively simple and have low accuracy. Summary of the invention
[0005] The technical problem to be solved by the present application is to provide a user relationship learning method and medium based on an improved Trans model, which has the characteristic of being able to obtain user relationships with higher accuracy.
[0006] In a first aspect, an embodiment provides a user relationship learning method based on an improved Trans model, including:
[0007] Acquire first user relationship information of each user, wherein the first user relationship information includes a first contact of the user, a relationship with the first contact, a second contact, a relationship with the second contact, and a user ID;
[0008] Based on the first user relationship information of each user, one of the contacts is taken as a parent node, another contact is taken as a parent node, the user ID is taken as a child node, the relationship between the one contact and the user ID is taken as a connection relationship between the parent node and the child node, and the relationship between the other contact and the user ID is taken as a connection relationship between the parent node and the child node, thereby obtaining a local relationship pedigree graph of each user; and the child nodes having the same parent node and / or parent node are taken as brothers, thereby obtaining a global relationship pedigree graph based on the local relationship pedigree graphs of all users;
[0009] Constructing a five-tuple genetic model for each user based on the global relationship pedigree graph, the five-tuple genetic model for the user comprising a first head entity representing a parent node, a second head entity representing a parent node, a tail entity representing the user, a first relationship representing a relationship between the first head entity and the tail entity, and a second relationship representing a relationship between the second head entity and the tail entity; wherein the tail entity carries a label indicating the number of brothers;
[0010] Inputting the quintuple genetic model of each user into a trained quintuple user relationship recognition network, thereby obtaining the relationship vector of each user; the quintuple user relationship recognition network is obtained based on the triple user relationship recognition network, and the training method includes: constructing positive samples and negative samples of the quintuple genetic model, taking the positive samples and negative samples of the quintuple genetic model as input, first decomposing the quintuple genetic model into a triple genetic model, and then training based on the decomposed triple genetic model, and combining the loss function to obtain the trained quintuple user relationship recognition network;
[0011] The Euclidean distance between the relationship vectors of any two users is calculated to obtain the similarity between the two users, thereby obtaining the relationship between the users.
[0012] In one embodiment, the telephone number of the first contact is used as the relationship with the first contact, and the telephone number of the second contact is used as the relationship with the second contact.
[0013] In one embodiment, the step of constructing a five-tuple genetic model for each user based on the global relationship pedigree graph includes:
[0014] For any user's five-tuple genetic model, it includes:
[0015] ;
[0016] in, represents the five-tuple genetic model of any user i, 1≤i≤I, I represents the total number of users; Represents the first head entity of the parent node of any user i, Represents the second head entity of the parent node of any user i, represents the tail entity of any user i, where m represents the number of brothers of any user i; The first relationship between the first head entity and the last entity of any user i, The second relationship represents the relationship between the second head entity and the tail entity of any user i.
[0017] In one embodiment, the positive and negative samples of the five-tuple genetic model are constructed, the positive and negative samples of the five-tuple genetic model are used as input, the five-tuple genetic model is first decomposed into a three-tuple genetic model, and then training is performed based on the decomposed three-tuple genetic model, and a trained five-tuple user relationship recognition network is obtained in combination with a loss function, including:
[0018] Obtain positive samples and negative samples of the five-tuple genetic model, and decompose each five-tuple genetic model into a three-tuple model;
[0019] Encode and project each triple genetic model onto the defined relational hyperplane to obtain the projections of the head entity, relation, and tail entity on the relational hyperplane;
[0020] For each triple genetic model, the projections of its head entity, relation, and tail entity on the relation hyperplane are projected into the global genetic relation space based on the defined projection hyperplane;
[0021] Based on the head entity, relationship and tail entity of the triple genetic model projected into the global genetic relationship space, the similarity relationship evaluation score after projection is calculated in combination with the sigmoid function;
[0022] The Euclidean distance between the relationship vectors of any two users is calculated to obtain the similarity between the two users, thereby obtaining the relationship between the users.
[0023] In one embodiment, the step of decomposing each quintuple genetic model into a ternary model includes:
[0024] The five-tuple genetic model of any user i Decomposed into the first triplet model and the second triplet model, including:
[0025] ;
[0026] in, represents the five-tuple genetic model of any user i, 1≤i≤I, I represents the total number of users; Represents the first head entity of the parent node of any user i, Represents the second head entity of the parent node of any user i, represents the tail entity of any user i, where m represents the number of brothers of any user i; The first relationship between the first head entity and the last entity of any user i, A second relationship representing the relationship between the second head entity and the tail entity of any user i; represents the first triplet model, Represents the second triplet model.
[0027] In one embodiment, the encoding and projection of each triple genetic model onto a defined relational hyperplane to obtain the projections of the head entity, the relation, and the tail entity on the relational hyperplane includes:
[0028] ;
[0029] in, represents the defined relational hyperplane, and T represents transposition; Represents the header entity The projection onto the relational hyperplane, Represents the tail entity The projection onto the relational hyperplane, Represents the header entity and tail entity t i Projection onto the relational hyperplane.
[0030] In one embodiment, for each triple genetic model, the projection of its head entity, relationship and tail entity on the relationship hyperplane is projected into the global genetic relationship space based on the defined projection hyperplane, including:
[0031] ;
[0032] in, Represents the projection transformation relationship projected to the global genetic relationship space, Represents the projected hyperplane defined by .
[0033] In one embodiment, the head entity, relationship and tail entity of the triple genetic model projected into the global genetic relationship space are combined with a sigmoid function to calculate the similarity relationship evaluation score after projection, including:
[0034] ;
[0035] in, represents the similarity relationship evaluation score function after projection, Represents the sigmoid operation, Represents a defined global genetic relationship.
[0036] In one embodiment, the loss function includes:
[0037] ;
[0038] Among them, L represents the loss function, , and They represent the head entity, relation, and tail entity in the negative samples respectively.
[0039] In a second aspect, an embodiment provides a computer-readable storage medium, wherein the medium stores a program, and the program can be loaded by a processor to execute the user relationship learning method based on the improved Trans model described in any one of the above embodiments.
[0040] The beneficial effects of the present invention are:
[0041] In this scheme, two contact information of each user and the relationship information with the two contacts are obtained, and a global relationship pedigree graph is constructed based on this information. The five-tuple genetic model of each user is obtained based on the global relationship pedigree graph, and the five-tuple genetic model is input into the trained five-tuple user relationship recognition network to obtain the relationship vector of each user. Based on the Euclidean distance of the relationship vectors between users, the similarity between users can be obtained, and thus the relationship between users can be obtained. Since the five-tuple genetic model can better reflect multiple relationship relationships than the traditional three-tuple model, and can solve the problem of conflict between multiple relationship relationships of the three-tuple based on the multiple relationship relationships, it can achieve the learning of more relationship relationships, thereby obtaining a user relationship with higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of a user relationship learning method based on an improved Trans model in an embodiment of the present application;
[0043] Figure 2 It is a schematic diagram of a local relationship pedigree diagram of an embodiment of the present application;
[0044] Figure 3 It is a schematic diagram of a global relationship pedigree diagram of an embodiment of the present application;
[0045] Figure 4 It is a flowchart of a five-tuple user relationship recognition network training method according to an embodiment of the present application. DETAILED DESCRIPTION
[0046] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0047] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0048] The serial numbers assigned to the components in this article, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0049] To facilitate the description of the inventive concept of the present application, the user relationship learning technology based on the Trans model is briefly described below.
[0050] In current technologies, a relationship graph is established based on user contacts and combined with the user's own characteristics, and the relationship between contacts is represented by a triple. The general format of the triple is: head entity, relationship, tail entity). The TranE model is used to regard the relationship as a transformation from the head entity to the tail entity to construct entity and relationship embeddings. The model has few training parameters and low computational complexity. TranH constructs a hyperplane of the relationship and performs translation operations while maintaining the relationship mapping properties. Compared with TransE, TransH can better handle one-to-many, many-to-one, and many-to-many relationships. However, since each entity can have many aspects, different relationships will focus on different aspects of the entity. To address this problem, some technologies have proposed the TransR model, which constructs entity embeddings and relationship embeddings in independent entity space and relationship space.
[0051] The theme of the TransX (E / H / M / D / R) series of model algorithms is knowledge representation learning based on translation models, which is mainly used to solve the problems of knowledge representation and reasoning. Most methods such as TransE, TransH and TransR only use triples of knowledge graphs. Other important information, such as the relationship description with related knowledge, is still not effectively used, making the learned user relationships simpler and less accurate.
[0052] In view of this, the present application provides a user relationship learning method and medium based on an improved Trans model. In this solution, two contact information of each user and the relationship information with the two contacts are obtained, and a global relationship pedigree graph is constructed based on this information. The five-tuple genetic model of each user is obtained based on the global relationship pedigree graph, and the five-tuple genetic model is input into the trained five-tuple user relationship recognition network to obtain the relationship vector of each user. Based on the Euclidean distance of the relationship vectors between users, the similarity between users can be obtained, and thus the relationship between users can be obtained. Because the five-tuple genetic model can better reflect multiple contact relationships than the traditional three-tuple model, and can solve the problem of conflicts between multiple contact relationships of triples based on the multiple contact relationships, so as to achieve the learning of more contact relationships, thereby obtaining user relationships with higher accuracy.
[0053] In one embodiment of the present application, a user relationship learning method based on an improved Trans model is provided. Figure 1 ,include:
[0054] Step S10, obtaining first user relationship information of each user, wherein the first user relationship information includes the user's first contact, relationship with the first contact, second contact, relationship with the second contact, and user ID.
[0055] In one embodiment, the telephone number of the first contact is used as the relationship with the first contact, and the telephone number of the second contact is used as the relationship with the second contact.
[0056] For the convenience of explanation, let's take a user t 1 Take this as an example to illustrate, then get the user t 1 The first user relationship information, including the first contact h 1 , relationship with the first contact 1 、Second contact person 2 , relationship with the second contact r 2 and user t 1 .
[0057] Step S20, establishing a global relationship pedigree graph based on the first user relationship information of each user. Step S20 may include: based on the first user relationship information of each user, taking one of the contacts as a parent node, taking another contact as a parent node, and taking the user id as a child node. Taking the relationship between the aforementioned one contact and the user id as the connection relationship between the parent node and the child node, taking the relationship between the aforementioned another contact and the user id as the connection relationship between the parent node and the child node, thereby obtaining a local relationship pedigree graph for each user. Taking the child nodes with the same parent node and / or parent node as brothers, thereby obtaining a global relationship pedigree graph based on the local relationship pedigree graphs of all users.
[0058] Through step S20, a global relationship pedigree graph with telephone numbers as the connection relationship between nodes is obtained.
[0059] For an example, see Figure 2 , user t 1 In the local relationship pedigree diagram, h 1 is the parent node, h 2 is the parent node, t 1 is the child node, r 1 h 1 and t 1 The connection relationship between 2 h 2 and t 1 The connection relationship between them.
[0060] Based on the local relationship pedigree graph of each user and the contact relationship, a global relationship pedigree graph can be obtained. For an example, please refer to Figure 3 , based on user t 1 ,t 2 ,t 3 、h 1 and h 2 The local relationship pedigree diagram can be obtained Figure 3 The global relationship pedigree diagram shown in Figure 1. In this global relationship pedigree diagram, t 1 ,t 2 and t 3 Have the same parent node and / or mother node, that is, have the same contact h 1 and h 2 For example, t 1 and t 2 Have the same parent node h 1 and parent node h 2 , t 2 and t 3 Have the same parent node h 2 , and t 3 The parent node is h3 In addition, h 1 and h 2 As a user, h 1 The parent node is h z1 ,h 1 and h z1 The relationship between z1 ,h 1 The parent node is h z2 ,h 1 and h z2 The relationship between z2 .h 2 The parent node is h z3 ,h 2 and h z3 The relationship between z3 ,h 1 The parent node is h z4 ,h 2 and h z4 The relationship between z4 , and each connection relationship is a genetic relationship, then there are 7 types of genetic relationships.
[0061] Step S30, constructing a five-tuple genetic model for each user based on the global relationship pedigree graph. The five-tuple genetic model of the user includes a first head entity representing the parent node, a second head entity representing the parent node, a tail entity representing the user, a first relationship representing the relationship between the first head entity and the tail entity, and a second relationship representing the relationship between the second head entity and the tail entity; wherein the tail entity carries a label indicating the number of brothers.
[0062] For user t 1 ,based on Figure 3 The global relationship pedigree graph, due to t 1 ,t 2 and t 3 have the same parent node and / or mother node, so user t 1 ,t 2 and t 3 Belong to the brother relationship, that is to say, for t 1 , its sibling tag m is equal to 3, which can be represented by t 1,m express.
[0063] In one embodiment, for any user i, the five-tuple genetic model constructed based on the global relationship pedigree graph may include:
[0064] ;
[0065] in, represents the five-tuple genetic model of any user i, 1≤i≤I, I represents the total number of users; Represents the first head entity of the parent node of any user i, Represents the second head entity of the parent node of any user i, represents the tail entity of any user i, where m represents the number of brothers of any user i. When the number of brothers is only user i, then m=1; The first relationship between the first head entity and the last entity of any user i, The second relationship represents the relationship between the second head entity and the tail entity of any user i.
[0066] Since the five-tuple genetic model not only represents the different contact relationships between the user and different contacts, but also represents the relationship between the user and other users, based on the five-tuple genetic model, the user relationship can be better represented, thereby obtaining a user relationship with higher accuracy.
[0067] Step S40, inputting the quintuple genetic model of each user into the trained quintuple user relationship recognition network, thereby obtaining the relationship vector of each user. The quintuple user relationship recognition network is obtained based on the triple user relationship recognition network, and the training method includes: constructing positive samples and negative samples of the quintuple genetic model, taking the positive samples and negative samples of the quintuple genetic model as input, first decomposing the quintuple genetic model into a triple model, and then training based on the decomposed triple model, and combining the loss function to obtain the trained quintuple user relationship recognition network.
[0068] The TransX series of models performs distributed representation learning on entity and relationship triplets in the knowledge base. The basic idea is that the relationship between two entities corresponds to the transformation between entity embeddings, that is, when (h, r, t) holds, h + r ≈ t. Among them, h is the head entity, t is the tail entity, and r is the relationship between h and t. In the current technology, since TransE has problems in modeling one-to-many, many-to-one, and many-to-many relationships, TransH is proposed to treat relationships as translations on specific relationship hyperplanes so that entities have different representations when involving various relationships. Both TransE and TransH assume that entities and relationships are embedded in the same space. However, an entity may have multiple aspects, and various relationships focus on different aspects of the entity. Therefore, TransR is proposed, which models entities and relationships in different spaces and translates them in the corresponding relationship spaces.
[0069] In the current TransX series of methods, most of them only use the knowledge base triples h, r, t to achieve entity and relationship representation learning, ignoring other important information. Figure 2 and Figure 3 In the example shown, the user contact has other related features. At this time, if only triples are used to represent the relationship pedigree graph, then user t 1 As a contactee (i.e., a sub-contact), it can be represented by two sets of triplets, namely (h 1 ,r,t 1 ) and (h 2 ,r,t 1 ). At this time, the representation vector of the sub-contact can be obtained by the contact 1 node h 1 , or contact 2 node h 2 The representation vector of is calculated separately, that is, t 1 = h 1 + r or t 1 = h 2 +r, if the two calculation results are different, there is a conflict.
[0070] In view of this, the present application proposes an improved Trans model, which is based on a learning method for multi-tuple relationship translation and combines a five-tuple genetic model for each user constructed based on a global relationship pedigree graph. It not only solves the above-mentioned conflict problem, but also makes the learned user relationship more accurate.
[0071] In one embodiment, please refer to Figure 4 ,The training method of the five-tuple user relationship recognition network includes:
[0072] Step S100, obtaining positive samples and negative samples of quintuple genetic models, and decomposing each quintuple genetic model into a triple genetic model.
[0073] In one embodiment, the five-tuple genetic model of any user i is Decomposed into the first triple genetic model and the second triple genetic model, including:
[0074] ;
[0075] in, represents the first triplet genetic model of user i, Represents the second triplet genetic model of user i.
[0076] Step S200, encode and project each triple genetic model onto the defined relational hyperplane to obtain the projections of the head entity, the relation and the tail entity on the relational hyperplane.
[0077] In one embodiment, step S200 includes:
[0078] ;
[0079] in, represents the defined relational hyperplane, and T represents transposition; Represents the header entity The projection onto the relational hyperplane, Represents the tail entity t i The projection onto the relational hyperplane, Represents the header entity and tail entity Projection onto the relational hyperplane.
[0080] Step S300: for each triple genetic model, the projections of its head entity, relationship and tail entity on the relationship hyperplane are projected into the global genetic relationship space based on the defined projection hyperplane.
[0081] In one embodiment, step S300 includes:
[0082] ;
[0083] in, Represents the projection transformation relationship projected to the global genetic relationship space, Represents the projected hyperplane defined by .
[0084] Step S400, based on the head entity, relationship and tail entity of the triple genetic model projected into the global genetic relationship space, combined with the sigmoid function, calculate the similarity relationship evaluation score after projection.
[0085] In one implementation, step S400 may include:
[0086] ;
[0087] in, represents the similarity relationship evaluation score function after projection, Represents the sigmoid operation, Represents a defined global genetic relationship.
[0088] Step S500, obtaining a trained five-tuple user relationship recognition network in combination with a loss function.
[0089] In one embodiment, the loss function can be expressed as:
[0090] ;
[0091] Among them, L represents the loss function, , and They represent the head entity, relation, and tail entity in the negative samples respectively.
[0092] Step S50, calculating the Euclidean distance between the relationship vectors of any two users to obtain the similarity between the two users, thereby obtaining the relationship between the users.
[0093] In one embodiment, based on the relationship vectors of all users, the Euclidean distance between the relationship vectors of a user and other users is calculated, and the similarity between the user and other users can be obtained, thereby obtaining the relationship between the user and other users. This enables analysis of the user. If the Euclidean distance between the relationship vectors of all users is calculated, the relationship between all users can be obtained. In this way, if the similarity between a user and several users with higher financial risks is high, it can be obtained that the financial risk of the user is also high, and financial risk control can be performed based on this.
[0094] Based on the above scheme, the five-tuple genetic model of each user is obtained based on the global relationship pedigree graph, and then the five-tuple genetic model is input into the trained five-tuple user relationship recognition network to obtain the relationship vector of each user. Based on the Euclidean distance of the relationship vectors between users, the similarity between users can be obtained, and thus the relationship between users can be obtained. Compared with the traditional three-tuple model, the five-tuple genetic model based on it can better reflect multiple relationship relationships, and can solve the problem of conflict between multiple relationship relationships of triples based on the multiple relationship relationships, so as to achieve the learning of more relationship relationships, thereby obtaining more accurate user relationships.
[0095] In one embodiment of the present application, a computer-readable storage medium is provided, on which a program is stored. The stored program includes a user relationship learning method based on an improved Trans model in any of the above embodiments that can be loaded by a processor and processed.
[0096] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer program. When all or part of the functions in the above-mentioned embodiments are implemented by computer program, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, CD, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer program, the program can also be stored in a storage medium such as a server, another computer, disk, CD, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0097] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A user relationship learning method based on an improved Trans model, characterized in that: include: Obtaining first user relationship information of each user, wherein the first user relationship information includes a first contact of the user, a relationship with the first contact, a second contact, a relationship with the second contact, and a user ID; Based on the first user relationship information of each user, one of the contacts is used as a parent node, another contact is used as a mother node, the user ID is used as a child node, the relationship between the one contact and the user ID is used as a connection relationship between the parent node and the child node, and the relationship between the other contact and the user ID is used as a connection relationship between the mother node and the child node, so as to obtain a local relationship pedigree graph of each user; The child nodes with the same parent node and / or mother node are regarded as brothers, thereby obtaining a global relationship pedigree graph based on the local relationship pedigree graphs of all users; Constructing a five-tuple genetic model for each user based on the global relationship pedigree graph, wherein the five-tuple genetic model for the user includes a first head entity representing a parent node, a second head entity representing a parent node, a tail entity representing the user, a first relationship representing a relationship between the first head entity and the tail entity, and a second relationship representing a relationship between the second head entity and the tail entity; Wherein the tail entity has a label indicating the number of siblings; Input the five-tuple genetic model of each user into the trained five-tuple user relationship recognition network to obtain the relationship vector of each user; The quintuple user relationship recognition network is obtained based on the ternary user relationship recognition network, and the training method includes: constructing positive samples and negative samples of the quintuple genetic model, taking the positive samples and negative samples of the quintuple genetic model as input, first decomposing the quintuple genetic model into a ternary genetic model, and then training based on the decomposed ternary genetic model, and combining the loss function to obtain a trained quintuple user relationship recognition network; Calculate the Euclidean distance between the relationship vectors of any two users to obtain the similarity between the two users, thereby obtaining the relationship between each user; The telephone number of the first contact is used as the relationship with the first contact, and the telephone number of the second contact is used as the relationship with the second contact; The constructing of a five-tuple genetic model for each user based on the global relationship pedigree graph includes: For any user's five-tuple genetic model, it includes: ; in, represents the five-tuple genetic model of any user i, 1≤i≤I, I represents the total number of users; Represents the first head entity of the parent node of any user i, Represents the second head entity of the parent node of any user i, represents the tail entity of any user i, where m represents the number of brothers of any user i; The first relationship between the first head entity and the last entity of any user i, The second relationship represents the relationship between the second head entity and the tail entity of any user i.
2. The user relationship learning method according to claim 1, characterized in that: The method of constructing positive and negative samples of the quintuple genetic model, taking the positive and negative samples of the quintuple genetic model as input, first decomposing the quintuple genetic model into a triple genetic model, and then training based on the decomposed triple genetic model, and combining the loss function to obtain a trained quintuple user relationship recognition network, includes: Obtain positive samples and negative samples of the five-tuple genetic model, and decompose each five-tuple genetic model into a three-tuple model; Encode and project each triple genetic model onto the defined relational hyperplane to obtain the projections of the head entity, relation, and tail entity on the relational hyperplane; For each triple genetic model, the projections of its head entity, relation, and tail entity on the relation hyperplane are projected into the global genetic relation space based on the defined projection hyperplane; Based on the head entity, relationship and tail entity of the triple genetic model projected into the global genetic relationship space, the similarity relationship evaluation score after projection is calculated in combination with the sigmoid function; The Euclidean distance between the relationship vectors of any two users is calculated to obtain the similarity between the two users, thereby obtaining the relationship between the users.
3. The user relationship learning method according to claim 2, characterized in that: The decomposition of each quintuple genetic model into a ternary model comprises: The five-tuple genetic model of any user i Decomposed into the first triplet model and the second triplet model, including: ; in, represents the five-tuple genetic model of any user i, 1≤i≤I, I represents the total number of users; Represents the first head entity of the parent node of any user i, Represents the second head entity of the parent node of any user i, represents the tail entity of any user i, where m represents the number of brothers of any user i; The first relationship between the first head entity and the last entity of any user i, A second relationship representing the relationship between the second head entity and the tail entity of any user i; represents the first triplet model, Represents the second triplet model.
4. The user relationship learning method according to claim 3, characterized in that: The encoding and projection of each triple genetic model onto the defined relational hyperplane to obtain the projection of the head entity, the relation and the tail entity on the relational hyperplane includes: ; in, represents the defined relational hyperplane, and T represents transposition; Represents the header entity The projection onto the relational hyperplane, Represents the tail entity The projection onto the relational hyperplane, Represents the header entity and tail entity t i Projection onto the relational hyperplane.
5. The user relationship learning method according to claim 4, characterized in that: For each triple genetic model, the projection of its head entity, relationship and tail entity on the relationship hyperplane is projected into the global genetic relationship space based on the defined projection hyperplane, including: ; in, Represents the projection transformation relationship projected to the global genetic relationship space, Represents the projected hyperplane defined by .
6. The user relationship learning method according to claim 5, characterized in that: The head entity, relationship and tail entity of the triple genetic model projected into the global genetic relationship space are combined with the sigmoid function to calculate the similarity relationship evaluation score after projection, including: ; in, represents the similarity relationship evaluation score function after projection, represents the sigmoid operation, Represents a defined global genetic relationship.
7. The user relationship learning method according to claim 6, characterized in that: The loss function includes: ; Where L represents the loss function, , and They represent the head entity, relation, and tail entity in the negative samples respectively.
8. A computer-readable storage medium, characterized in that: The medium stores a program, which can be loaded by a processor and execute the user relationship learning method based on the improved Trans model as described in any one of claims 1 to 7.
