Personal knowledge graph construction method, device and related equipment

By constructing a personal knowledge graph and using the user's static and behavioral attributes to generate static and behavioral entities triplets, the problem of low correlation between the existing knowledge graph and individual users is solved, and a personal knowledge graph with small data volume and good portability is realized, which can accurately characterize user characteristics.

CN116601626BActive Publication Date: 2025-08-08HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080107891.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2025-08-08
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

The existing general and vertical knowledge graphs have low correlation with individual users, large data volume and poor portability, and difficult to maintain.

Method used

Build a personal knowledge graph, generate a personal knowledge graph architecture by obtaining the user's static attributes and behavioral attributes, and generate static and behavioral entity triplets using user portrait data and behavioral data. Combined with a collection of entity relationships, a knowledge graph that accurately represents the user's personal characteristics.

Benefits of technology

It realizes a knowledge graph centered on individual users, with small data volume and good portability, and can accurately characterize the personal characteristics and behavioral characteristics of users, improves data storage and management efficiency, and ensures feasibility on smart terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116601626B_ABST
    Figure CN116601626B_ABST
Patent Text Reader

Abstract

A method for constructing and updating a personal knowledge graph in the field of artificial intelligence includes: obtaining initial user static attributes and initial user behavioral attributes, and constructing a personal knowledge graph architecture based on the initial user static attributes and initial user behavioral attributes; obtaining initial user portrait data, initial user behavioral data, and a set of entity relationships; obtaining M initial static entity triples based on the initial user portrait data and the set of entity relationships; obtaining E initial behavioral entity triples based on the initial user behavioral data and the set of entity relationships; and generating a personal knowledge graph based on the M initial static entity triples, the E initial behavioral entity triples, and the personal knowledge graph architecture. This method can construct a personal knowledge graph that is highly correlated with the user's personal characteristics, thereby providing intelligent recommendation services to the user based on the personal knowledge graph.
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 technology, and in particular to a method, apparatus, and related equipment for constructing a personal knowledge graph. Background Art

[0002] Artificial Intelligence (AI) is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. Research in the field of AI includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, and basic AI theory.

[0003] A knowledge graph (KG) is an artificial intelligence method that describes concepts, entities, and their relationships in the objective world in a structured form, representing the vast amount of information generated on the internet as "knowledge." There are two types of knowledge graphs: general knowledge graphs and vertical knowledge graphs. General knowledge graphs have a broad scope and are structured encyclopedic knowledge bases for all fields. Vertical knowledge graphs are knowledge bases for a specific field, built on data from that field and having specific industry significance.

[0004] The above two types of knowledge graphs cover a wide range of knowledge and have low relevance to individual users. They also have large amounts of data, poor portability, and are difficult to maintain. Summary of the Invention

[0005] The embodiments of the present application disclose a method, apparatus, and related equipment for constructing a personal knowledge graph. The method can be used to construct a personal knowledge graph centered on an individual user and characterizing the characteristics of the individual user, and the method has a small amount of data and good portability.

[0006] In a first aspect, an embodiment of the present application provides a method for constructing a personal knowledge graph, including:

[0007] Obtain initial user static attributes and initial user behavioral attributes, and construct a personal knowledge graph architecture based on the initial user static attributes and the initial user behavioral attributes; the initial user static attributes are used to represent the user's personal information, and the initial user behavioral attributes are used to represent the field to which the entity type corresponding to the user behavior belongs. The field is a collection of entity types with the same characteristics, and the entity type is a collection of entities with the same characteristics or attributes. The entity is a thing associated with the user and represented by a noun or numeral. The personal knowledge graph architecture represents the relationship between the user and the personal information, and between the user and the field to which the entity type corresponding to the user behavior belongs; obtain initial user portrait data, initial user behavioral data and entity relationship set, the initial user The portrait data corresponds to the initial user static attributes, the initial user behavior data corresponds to the initial user behavior attributes, and the entity relationship set contains multiple relationships, which are used to characterize the relationships between the entities; M initial static entity triples are obtained based on the initial user portrait data and the entity relationship set; E initial behavioral entity triples are obtained based on the initial user behavior data and the entity relationship set; static entity triples are used to describe the attribute relationship between users and static entities, or between static entities, and behavioral entity triples are used to describe the behavioral relationship between users and behavioral entities, or between behavioral entities, and M and E are integers greater than or equal to zero; a personal knowledge graph is generated based on the M initial static entity triples, the E initial behavioral entity triples and the personal knowledge graph architecture.

[0008] It should be understood that the field corresponding to the above-mentioned user behavior refers to the field corresponding to the operation content corresponding to the user behavior, which may include music, movies, news and games, etc.; the above-mentioned entities include static entities and behavioral entities, static entities are entities identified from user portrait data, and behavioral entities are entities identified from user behavior data; entity triples are structured data forms used to characterize the relationship between two entities. The entity triples in this application include three types: static entity triples, behavioral entity triples and target entity triples. Each entity triple contains two entities, the entity types corresponding to the two entities, and the relationship between the two entities.

[0009] It can be seen that in the embodiment of the present application, static attributes that represent user personal information and behavioral attributes that represent user behavioral characteristics are used to construct a personal knowledge graph architecture. This architecture is an architecture that is centered on individual users and represents individual user characteristics; then, based on user portrait data and behavioral data, static entity triples that represent user static attributes and behavioral entity triples that represent user behavioral attributes are obtained respectively; therefore, the personal knowledge graph generated according to the static entity triples, behavioral entity triples and personal knowledge graph architecture can accurately represent the user's personal characteristics.

[0010] In a feasible implementation, the above-mentioned method of obtaining M initial static entity triples based on the initial user portrait data and the entity relationship set includes: obtaining A static entities from the initial user portrait data, where A is an integer greater than or equal to zero; and obtaining M initial static entity triples based on the A static entities and the entity relationship set.

[0011] It can be seen that in the embodiment of the present application, the user's attribute values are obtained from the user portrait data representing the user's personal information; then, based on the entity relationship set and the obtained attribute values, structured data representing the user's personal information, namely, static entity triples, are obtained; structured static entity triples are more convenient for data storage and management, thereby improving the efficiency of the personal knowledge graph construction process.

[0012] In a feasible implementation, the above-mentioned E initial behavior entity triples are obtained based on the initial user behavior data and the entity relationship set, including: obtaining B behavior entities and C behavior characters of the user from the initial user behavior data, the C behavior characters corresponding to O behavior entities among the B behavior entities, the behavior characters are used to represent the operations performed by the user on the O behavior entities, and B, C and O are integers greater than or equal to zero; obtaining G initial behavior entity triples based on the B behavior entities and the entity relationship set; obtaining H initial behavior entity triples based on the user, C behavior characters, O behavior entities and the entity relationship set, E is equal to the sum of G and H, and G and H are integers greater than or equal to zero; the G initial behavior entity triples are used to describe the relationship between the B behavior entities; the H initial behavior entity triples are used to describe the relationship between the user and the O behavior entities.

[0013] It should be noted that the number of action characters and the number of action entities are not one-to-one. One action character can correspond to multiple action entities. For example, if the action character is "click," the action entities corresponding to it can include "News 1," "News 2," "Song A (title)," etc.; multiple action characters can also correspond to one action entity. For example, if the action characters are "click" and "comment," the action entities corresponding to these two action characters can both be "News 1."

[0014] It can be seen that in the embodiment of the present application, multiple behavioral entities are obtained from the user behavior data, and then multiple structured behavioral entity triples are obtained based on the multiple behavioral entities and entity relationship sets. The multiple behavioral entity triples are representations of the user behavior characteristics, and the behavioral entity triples and the above-mentioned static entity triples have the same representation form, which realizes the unification of data form, facilitates data storage and management, and thus improves the efficiency of the personal knowledge graph construction process.

[0015] In a feasible implementation, the above-mentioned personal knowledge graph construction method also includes: obtaining H operation times from the initial user behavior data; the above-mentioned obtaining H initial behavior entity triples based on the user, C behavior characters, O behavior entities and entity relationship sets includes: generating H initial behavior entity triples based on the user, C behavior characters, O behavior entities, H operation times and entity relationship sets.

[0016] It should be understood that since one behavior character can correspond to multiple behavior entities and multiple behavior characters can correspond to one behavior entity, the number of operation times may not be equal to the number of behavior characters or behavior entities. The above operation time is used to characterize the specific moment when the user operates the behavior entity. The above H operation times correspond one to one with the H first behavior entity triplets.

[0017] It can be seen that in the embodiment of the present application, by obtaining the operation time corresponding to the user behavior character and integrating the operation time into the behavior entity triplet, multiple behavior entity triples related to the user behavior are obtained. Since the behavior entity triplet carries the operation time, it can more accurately characterize the user's behavior characteristics; and thus the user's personal knowledge graph subsequently obtained based on the behavior entity triplet is also more accurate and complete.

[0018] In a feasible implementation, the above-mentioned generation of a personal knowledge graph based on M initial static entity triples, E initial behavioral entity triples and a personal knowledge graph architecture includes: generating X initial target entity triples based on the M initial static entity triples and / or E initial behavioral entity triples, where X is an integer greater than or equal to zero; each target entity triple in the target entity triples contains at least one target entity, and the target entity triples are used to describe the relationship between target entities, or between a user and a target entity; generating a personal knowledge graph based on the M initial static entity triples, E initial behavioral entity triples, X initial target entity triples and a personal knowledge graph architecture.

[0019] It should be understood that the target entity triples are obtained by causal reasoning based on static entity triples and / or behavioral entity triples, and the target entity triples represent the commonalities between static entity triples and / or behavioral entity triples, which are the deep personal characteristics of the user.

[0020] It can be seen that in the embodiment of the present application, the target entity triple is used to characterize the deep-level personal characteristics of the user, and then the target entity triple is used to participate in the generation of the personal knowledge graph. Therefore, the personal knowledge graph can accurately characterize the deep-level personal characteristics of the user, and then relevant content can be accurately pushed to the user based on the personal knowledge graph.

[0021] In a feasible implementation, a personal knowledge graph is generated based on M initial static entity triples, E initial behavioral entity triples and a personal knowledge graph architecture, including: generating a personal knowledge graph based on M initial static entity triples, F initial behavioral entity triples among the E initial behavioral entity triples and a personal knowledge graph architecture; wherein the F initial behavioral entity triples are obtained based on first user behavior data and a set of entity relationships, the first user behavior data is behavior data in the initial user behavior data, in which the difference between the collection time and the current system time is less than a preset threshold, and F is an integer greater than or equal to zero.

[0022] It can be seen that in the embodiment of the present application, since the collection time period of the first user behavior data for generating the F initial behavior entity triples is within the collection time period of the initial user behavior data, and the collection time of the first user behavior data is close to the current system time, the F initial behavior entity triples can accurately characterize the user's behavioral characteristics in the most recent period, so that the user personal knowledge graph subsequently generated based on the F initial behavior entity triples has better timeliness.

[0023] In a feasible implementation, the above-mentioned generation of a personal knowledge graph based on the M initial static entity triples, the F initial behavioral entity triples among the E initial behavioral entity triples and the personal knowledge graph architecture includes: deduplicating the F initial behavioral entity triples to obtain I initial behavioral entity triples, where I is an integer greater than or equal to zero and less than or equal to F; when I is less than or equal to a preset number Q, generating a personal knowledge graph based on the M initial static entity triples, the I initial behavioral entity triples and the personal knowledge graph architecture, where Q is an integer greater than or equal to zero; when I is greater than the preset number Q, grouping the F initial behavioral entity triples according to the I initial behavioral entity triples to obtain a set of O behavioral entity triples. , O behavior entity triple sets and I initial behavior entity triples correspond one to one, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; according to the number of elements in each behavior entity triple set, the I initial behavior entity triples are sorted to obtain a sorting result, wherein, when the number of elements in each behavior entity triple set is more, the initial behavior entity triple corresponding to each behavior entity triple set has a higher sorting position in the sorting result; according to the M initial static entity triples, the first Q initial behavior entity triples in the sorted I initial behavior entity triples and the personal knowledge graph architecture, a personal knowledge graph is generated.

[0024] It can be seen that in the embodiment of the present application, the behavior entity triples are first sorted in order of frequency from high to low according to the frequency of occurrence of each behavior entity triple; then Q behavior entity triples are selected from the sorted behavior entity triples; the preset number of behavior entity triples obtained in the above manner can characterize the user's high-frequency behavior characteristics, and thus the personal knowledge graph generated based on the Q entity triplets can accurately characterize the user's behavior characteristics; in addition, since the preset number is set, the number of behavior entity triples used to generate the personal knowledge graph can be controlled to avoid the personal knowledge graph from being too large, thereby ensuring the feasibility of using the personal knowledge graph on smart terminal devices and its portability.

[0025] In a feasible implementation, a personal knowledge graph is generated based on M initial static entity triples, E initial behavioral entity triples, X initial target entity triples, and a personal knowledge graph architecture, including: generating a personal knowledge graph based on the M initial static entity triples, F initial behavioral entity triples among the E initial behavioral entity triples, Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture; wherein the F initial behavioral entity triples are obtained based on first user behavior data and a set of entity relationships, and the first user behavior data is behavior data in the initial user behavior data, in which the difference between the collection time and the current system time is less than a preset threshold; the Y initial target entity triples are generated based on the M initial static entity triples and / or the F initial behavioral entity triples, and Y is an integer greater than or equal to zero.

[0026] It can be seen that in the embodiment of the present application, since the collection time period of the first user behavior data for generating the F initial behavior entity triples is within the collection time period of the initial user behavior data, the Y initial target entity triples are generated based on the M static entity triples and the F initial behavior entity triples, and the collection time of the first user behavior data is close to the current system time, the Y initial target entity triples and the F initial behavior entity triples can respectively represent the user's deep personal characteristics and behavioral characteristics in the recent period, so that the user personal knowledge graph subsequently generated based on the F initial behavior entity triples and the Y initial target entity triples can accurately represent the user's behavioral characteristics and deep personal characteristics, and has better timeliness.

[0027] In a feasible implementation, a personal knowledge graph is generated based on M initial static entity triples, F initial behavior entity triples in E initial behavior entity triples, Y initial target entity triples in X initial target entity triples, and a personal knowledge graph architecture, including: removing duplicates from the Y initial target entity triples to obtain J initial target entity triples, where J is an integer greater than or equal to zero and less than or equal to Y; when J is equal to a preset number Q, a personal knowledge graph is generated based on the M initial static entity triples, the J initial target entity triples, and the personal knowledge graph architecture, where Q is an integer greater than or equal to an integer of zero; when J is greater than a preset number Q, grouping the Y initial target entity triples according to the J initial target entity triples to obtain J target entity triple sets, the J target entity triple sets and the J initial target entity triples correspond one to one, and the initial target entity triples contained in each target entity triple set are the same as the initial target entity triples corresponding to the target entity triple set; sorting the J initial target entity triples according to the number of elements in each target entity triple set to obtain a sorting result, wherein, when the number of elements in each target entity triple set is greater, each target entity triple set has a smaller number of elements. The higher the initial target entity triples corresponding to the target entity triple set are in the sorting result, the higher the sorting position is; according to the M initial static entity triples, the first Q initial target entity triples in the sorted J initial target entity triples and the personal knowledge graph architecture, a personal knowledge graph is generated; when J is less than the preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, the O behavior entity triple sets and the I initial behavior entity triples are in one-to-one correspondence, and the initial behavior entity triples contained in each behavior entity triple set are consistent with the behavior entity triples. The initial behavior entity triples corresponding to the M initial static entity triples, the J initial target entity triples, the first QJ initial behavior entity triples in the sorted I initial behavior entity triples, and the personal knowledge graph architecture are used to generate a personal knowledge graph.

[0028] It can be seen that in the embodiment of the present application, the entity triples are first sorted in order from high to low according to the frequency of occurrence of each entity triple; then, selection is made from the sorted target entity triples, and then selection is made from the sorted behavior entity triples, and a total of Q entity triples are selected; since the target entity triples are used to characterize deep-level user personal characteristics, and the behavior entity triples are used to characterize the user's behavioral characteristics, the Q entity triples obtained by the above method have a higher correlation with the user, and the personal knowledge graph generated according to the Q entity triples can more accurately characterize the user's personal characteristics; at the same time, by setting a preset number to control the number of entity triples used to generate the personal knowledge graph, the scale of the personal knowledge graph can be avoided from being too large, thereby ensuring the feasibility of using the personal knowledge graph on smart terminal devices.

[0029] In a feasible implementation, the above-mentioned personal knowledge graph construction method also includes: obtaining the target user static attributes and the target user behavioral attributes, and using the target user static attributes and the target user behavioral attributes to update the personal knowledge graph to obtain the target personal knowledge graph; obtaining the second user portrait data and the second user behavior data; obtaining K first static entity triples based on the second user portrait data and the entity relationship set; obtaining L first behavioral entity triples based on the second user behavior data and the entity relationship set, where L and K are integers greater than or equal to zero; updating the target personal knowledge graph based on the K first static entity triples and the L first behavioral entity triples.

[0030] It should be understood that the collection time period of the target user static attributes, target user behavioral attributes, second user portrait data and second user behavioral data is the same, and is later than the collection time period of the above-mentioned initial user static attributes, initial user behavioral attributes, initial user portrait data and initial user behavioral data.

[0031] It can be seen that in the embodiment of the present application, since the user's behavior, personal preferences and other characteristics will change over time, the target user static attributes and target user behavioral attributes are first used to update the above-mentioned personal knowledge graph, and the obtained target personal knowledge graph can accurately represent the scope of the user's static characteristics and behavioral characteristics in the recent period. Then, the second user portrait data and the second user behavior data are used to respectively generate static entity triples and behavioral entity triples that represent the user's personal information and behavioral characteristics in the recent period. Finally, the generated static entity triples and behavioral entity triples are used to update the target personal knowledge graph. Therefore, the updated target personal knowledge graph can more accurately represent the user's personal characteristics in the recent period.

[0032] In a feasible implementation, the above-mentioned personal knowledge graph construction method also includes: obtaining third user portrait data and third user behavior data; obtaining R second static entity triples based on the third user portrait data and the entity relationship set; obtaining S second behavior entity triples based on the second user behavior data and the entity relationship set, where R and S are integers greater than or equal to zero; updating the personal knowledge graph based on the R second static entity triples and the S second behavior entity triples.

[0033] It can be seen that in the embodiment of the present application, since the user's behavior, personal preferences and other characteristics will change over time, the third user portrait data and the third user behavior data are first used to generate static entity triples and behavioral entity triples respectively, which represent the user's personal information and behavioral characteristics in the recent period, and then the generated static entity triples and behavioral entity triples are used to update the personal knowledge graph, so that the updated personal knowledge graph can more accurately represent the user's personal characteristics in the recent period.

[0034] In a second aspect, an embodiment of the present application provides a personal knowledge graph construction device, which includes a functional module that executes part or all of the method described in the first aspect.

[0035] In a third aspect, an embodiment of the present application provides a device for constructing a personal knowledge graph, which includes: a memory for storing programs; a processor for executing the programs stored in the memory, and when the programs stored in the memory are executed, the processor is used to execute part or all of the methods in the first aspect.

[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable medium storing program code for execution by a device, wherein the program code includes a method for executing part or all of the method in the first aspect.

[0037] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute part or all of the method in the first aspect above.

[0038] In a sixth aspect, an embodiment of the present application provides a chip comprising a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute part or all of the method in the first aspect.

[0039] Optionally, as an implementation method, the above-mentioned chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored on the memory. When the instructions are executed, the processor is used to execute part or all of the method in the first aspect.

[0040] In a seventh aspect, an embodiment of the present application provides an electronic device, which includes part or all of the devices in any one of the second or third aspects mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1A This is a system for building a personal knowledge graph provided by an embodiment of the present application;

[0042] Figure 1B This is another system for building a personal knowledge graph provided in an embodiment of the present application;

[0043] Figure 1C This is another system for building a personal knowledge graph provided by an embodiment of the present application;

[0044] Figure 2 A system for training a neural network model provided in an embodiment of the present application;

[0045] Figure 3 This is another system for building a personal knowledge graph provided by an embodiment of the present application;

[0046] Figure 4 This is a schematic diagram of a convolutional neural network provided in an embodiment of the present application;

[0047] Figure 5 Another convolutional neural network diagram is provided for the embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of an entity triple representation method and example provided in an embodiment of the present application;

[0049] Figure 7 This is a schematic diagram of an entity quadruple representation method and example provided in an embodiment of the present application;

[0050] Figure 8 Schematic diagram of another representation method and example of entity triples provided in an embodiment of the present application;

[0051] Figure 9 This is a flowchart of a method for constructing a personal knowledge graph provided in an embodiment of the present application;

[0052] Figure 10 This is a structural diagram of a personal knowledge graph architecture provided by an embodiment of the present application;

[0053] Figure 11 This is a flowchart of a user behavior data collection process provided by an embodiment of the present application;

[0054] Figure 12 This is a schematic diagram of the construction process of a behavior entity triple provided by an embodiment of the present application;

[0055] Figure 13 This is a schematic diagram of a fusion process of a behavior entity quadruple and a behavior entity triple provided in an embodiment of the present application;

[0056] Figure 14 This is a schematic diagram of a target entity triple construction process provided by an embodiment of the present application;

[0057] Figure 15 This is a schematic diagram of another target entity triple construction process provided in an embodiment of the present application;

[0058] Figure 16 This is a schematic diagram of another target entity triple construction process provided by an embodiment of the present application;

[0059] Figure 17 This is a schematic diagram of a process for expanding an entity triple to be expanded into a personal knowledge graph, provided by an embodiment of the present application;

[0060] Figure 18 This is a flowchart of a method for updating a personal knowledge graph provided in an embodiment of the present application;

[0061] Figure 19 This is a flowchart of another method for updating a personal knowledge graph provided in an embodiment of the present application;

[0062] Figure 20 This is a schematic block diagram of a personal knowledge graph construction device provided in an embodiment of the present application;

[0063] Figure 21 This is a hardware structure diagram of a personal knowledge graph construction device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. It should be noted that in this application, the terms "action", "action relationship" and "operation behavior" are all used to describe the user's actions on the behavior entity, that is, they are terms used to characterize the relationship between the user and the behavior entity, which can be equivalent in the embodiments of the present application.

[0065] like Figure 1AAs shown, a system for building a personal knowledge graph includes user devices and data processing equipment. These user devices include users and smart terminals such as mobile phones, personal computers, tablets, or information processing centers. The user device is the initiator of the personal knowledge graph construction process, and users typically initiate requests through the user device.

[0066] The above-mentioned data processing device can be a device or server with data processing capabilities such as a cloud server, a network server, an application server, and a management server. The data processing device receives user behavior data from the smart terminal through an interactive interface, and then performs data processing such as machine learning and deep learning through a memory that stores data and a processor that processes data. Memory can be a general term that includes local storage and a database that stores historical data. The database can be on the data processing device or on other network servers. The above-mentioned user behavior data can be a semi-structured dot log, such as Figure 11 As shown, it may also be other forms of data for recording user behavior, and the embodiments of the present application do not specifically limit this.

[0067] like Figure 1B The following is another application scenario of the system for building a personal knowledge graph in the embodiment of the present application. In this scenario, the smart terminal directly acts as a data processing device, directly receiving input from the user and directly processing it by the hardware and / or software of the smart terminal itself. The specific process is the same as Figure 1A Similarly, please refer to the above description and will not be repeated here.

[0068] like Figure 1C As shown, the above-mentioned user device can be a local device 101 or 102, and the above-mentioned data processing device can be an execution device 210, wherein the data storage system 150 can be integrated on the execution device 210, or can be set on the cloud or other network servers, and the execution device 210 can also be integrated on the local device 101 or 102.

[0069] See also Figure 2 , which is a system architecture 200 for training a neural network model provided in an embodiment of the present application. The data acquisition device 260 is used to collect training data and store it in the database 230. The training device 220 generates an entity recognition model / causal reasoning model 201 based on the training data maintained in the database 230. The following will describe in more detail how the training device 220 obtains the entity recognition model / causal reasoning model 201 based on the training data. The entity recognition model can identify the entities in the above-mentioned user behavior data and the entity type corresponding to each entity. The causal reasoning model can mine target entity triples that reflect the user's deep personal characteristics based on static entity triples and / or behavioral entity triples.

[0070] Figure 2 The following is a functional module diagram of the data processing process, corresponding to Figure 1A or Figure 1B In the actual application scenario diagram in FIG, the user device 240 can be Figure 1A or Figure 1B The user device, the execution device 210 and the data storage system 250 in Figure 1A or Figure 1B When the data processing capability of the user equipment in the embodiment is relatively strong, it can be integrated into the above user equipment. In some feasible embodiments, the execution device 210 and the data storage system 250 can also be integrated into the Figure 1A or Figure 1B The database 230, the training device 220 and the data acquisition device 260 can be integrated into the data processing device in the Figure 1A or Figure 1B The data processing device in the system can be set up on the cloud or other servers on the network.

[0071] In the field of knowledge graphs, the data acquisition device 260 can be a terminal device or an input and output interface of a server or cloud, which is an interactive layer (interface) for obtaining user behavior data and user portrait data.

[0072] Optionally, the entity recognition model / causal reasoning model 201 is implemented based on a deep neural network.

[0073] The work of each layer in a deep neural network can be expressed mathematically as To describe: From a physical perspective, the work of each layer in a deep neural network can be understood as completing the transformation from input space to output space (i.e., from the row space to the column space of a matrix) through five operations on the input space (a set of input vectors). These five operations include: 1. Dimensionality increase / decrease; 2. Zoom in / out; 3. Rotation; 4. Translation; 5. "Bending". Operations 1, 2, and 3 are represented by Completed, operation 4 is completed by +b, and operation 5 is implemented by α(). The word "space" is used here because the object being classified is not a single thing, but a class of things, and space refers to the collection of all individuals of this class of things. Among them, W is a weight vector, and each value in the vector represents the weight value of a neuron in this layer of the neural network. This vector W determines the spatial transformation from the input space to the output space described above, that is, the weight W of each layer controls how to transform the space. The purpose of training a deep neural network is to eventually obtain the weight matrix of all layers of the trained neural network (the weight matrix formed by many layers of vectors W). Therefore, the training process of a neural network is essentially to learn how to control spatial transformation, and more specifically to learn the weight matrix.

[0074] Because we want the output of a deep neural network to be as close as possible to the value we really want to predict, we can compare the current network's predicted value with the target value we really want, and then update the weight vector of each layer of the neural network based on the difference between the two (of course, there is usually an initialization process before the first update, which is to pre-configure the parameters for each layer in the deep neural network). For example, if the network's predicted value is too high, the weight vector is adjusted to make it predict a lower value, and this adjustment is continued until the neural network can predict the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value." This is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference. Then, the training of the deep neural network becomes a process of minimizing this loss as much as possible.

[0075] The entity recognition model / causal reasoning model 201 obtained by the training device 220 can be applied to different systems or devices. Figure 2 In the embodiment, the execution device 210 is configured with an I / O interface 212 for data interaction with external devices, and a “user” can input data into the I / O interface 212 through a user device 240 .

[0076] The execution device 210 can call data, code, etc. in the data storage system 250, receive user portrait data and behavior data from the I / O interface 212, and call the entity recognition model / causal reasoning model 201 generated in the training device 220 to generate static entity triples and behavioral entity triples.

[0077] The correlation function module 213 pre-processes the received user behavior data to facilitate subsequent further processing of the user data.

[0078] Finally, the I / O interface 212 returns the static entity triples and the behavioral entity triples to the user device 240 and provides them to the user.

[0079] More deeply, the training device 220 can generate corresponding entity recognition models / causal reasoning models 201 based on different data for different goals to provide users with better results.

[0080] In the attached Figure 2In the case shown in , the user can manually specify the data to be input into the execution device 210, for example, by operating in the interface provided by the I / O interface 212. In another case, the user device 240 can automatically input the user portrait and behavior data into the I / O interface 212 and obtain the static entity triples and behavior entity triples that are subsequently used to generate the personal knowledge graph. If the user device 240 needs to obtain the user's authorization to automatically input data, the user can set the corresponding permissions in the user device 240. The user can view the results output by the execution device 210 on the user device 240. The specific presentation form can be display, sound, action, etc. The user device 240 can also serve as a data acquisition terminal to store the collected training data in the database 230.

[0081] It is worth noting that Figure 2 This is only a schematic diagram of a system architecture for building a personal knowledge graph provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in the attached Figure 2 In the embodiment, the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.

[0082] Training with convolutional neural networks

[0083] A convolutional neural network (CNN) is a deep neural network with a convolutional structure. It is a deep learning architecture, which uses machine learning algorithms to perform multiple levels of learning at different levels of abstraction. As a deep learning architecture, a CNN is a feed-forward artificial neural network, in which individual neurons respond to input sentences.

[0084] like Figure 4 As shown, a convolutional neural network (CNN) 100 may include an input layer 110 , a convolutional layer / pooling layer 120 , wherein the pooling layer is optional, and a neural network layer 130 .

[0085] Convolutional layer / pooling layer 120:

[0086] Convolutional layer:

[0087] like Figure 4The convolutional layer / pooling layer 120 shown may include layers 121-126, for example. In one implementation, layer 121 is a convolutional layer, layer 122 is a pooling layer, layer 123 is a convolutional layer, layer 124 is a pooling layer, layer 125 is a convolutional layer, and layer 126 is a pooling layer. In another implementation, layers 121 and 122 are convolutional layers, layer 123 is a pooling layer, layers 124 and 125 are convolutional layers, and layer 126 is a pooling layer. That is, the output of a convolutional layer can be used as the input of a subsequent pooling layer, or as the input of another convolutional layer to continue the convolution operation.

[0088] Taking the convolution layer 121 as an example, the convolution layer 121 can include many convolution operators, which are also called kernels. Their role in the knowledge graph construction process is equivalent to a filter that extracts specific information from the input text semantic information. The convolution operator can essentially be a weight matrix, which is usually predefined.

[0089] The weight values in these weight matrices need to be obtained through a lot of training in practical applications. The weight matrices formed by the weight values obtained through training can extract information from the input text, thereby helping the convolutional neural network 100 to make correct predictions.

[0090] When the convolutional neural network 100 has multiple convolutional layers, the initial convolutional layer (for example, 121) often extracts more general features, which can also be called low-level features. As the depth of the convolutional neural network 100 increases, the features extracted by the later convolutional layers (for example, 126) become more and more complex, such as high-level semantic features. Features with higher semantics are more suitable for the problem to be solved.

[0091] Pooling layer:

[0092] Since it is often necessary to reduce the number of training parameters, it is often necessary to periodically introduce a pooling layer after the convolution layer, such as Figure 4 The layers 121-126 in Figure 120 can be a convolutional layer followed by a pooling layer, or multiple convolutional layers followed by one or more pooling layers. In the knowledge graph construction process, the sole purpose of the pooling layer is to reduce the spatial size of the data.

[0093] Fully connected neural network layer 130:

[0094] After being processed by the convolution layer / pooling layer 120, the convolution neural network 100 is still not sufficient to output the required output information. As mentioned above, the convolution layer / pooling layer 120 only extracts features and reduces the parameters brought by the input data. However, in order to generate the final output information (the required class information or other related information), the convolution neural network 100 needs to use the fully connected neural network layer 130 to generate one or a group of outputs of the required number of classes. Therefore, the fully connected neural network layer 130 may include multiple hidden layers (such as Figure 4 131, 132 to 13n) and the output layer 140 shown, the parameters contained in the multi-layer hidden layer can be pre-trained according to relevant training data of a specific task type, for example, the task type may include text semantic recognition, classification or generation, etc.

[0095] After the multiple hidden layers in the fully connected neural network layer 130, that is, the last layer of the entire convolutional neural network 100 is the output layer 140, which has a loss function similar to the classification cross entropy, specifically used to calculate the prediction error. Once the forward propagation of the entire convolutional neural network 100 (such as Figure 4 The propagation from 110 to 140 is forward propagation), and the reverse propagation (such as Figure 4 The propagation from 140 to 110 is back propagation) and then starts to update the weight values and biases of the aforementioned layers to reduce the loss of the convolutional neural network 100 and the error between the result output by the convolutional neural network 100 through the output layer and the ideal result.

[0096] It should be noted that if Figure 4 The convolutional neural network 100 shown is only an example of a convolutional neural network. In specific applications, the convolutional neural network can also exist in the form of other network models, such as Figure 5 The multiple convolutional layers / pooling layers shown are operated in parallel, and the features extracted from each layer are input to the fully connected neural network layer 130 for processing.

[0097] After receiving the user behavior data, the execution device 210 determines multiple behavior entities in the user behavior data and the entity type to which each behavior entity belongs based on the entity recognition model. By introducing the entity recognition model, the relevant entities in the user behavior data can be quickly and accurately identified, thereby improving the efficiency of building the personal knowledge graph. Then, the execution device 210 can determine the relationship between each entity based on the identified entities and entity relationship sets, and generate multiple behavior entity triples based on the relationship between each two behavior entities and the two behavior entities. By introducing the entity relationship extraction model, the relationship between each entity can be quickly and accurately determined to form entity triples in a normalized format, which is convenient for subsequent rapid screening of entity triples and filling the screened entity triples into the personal knowledge graph architecture, thereby improving the efficiency of building the personal knowledge graph. In a feasible implementation, the computing module 211 will also accept static entity triples transmitted from the user device, and mine deep target entity triples based on the above-mentioned behavioral entity triples, static entity triples and causal reasoning models. By introducing a causal reasoning model to mine deep target entity triples related to the user, and in the subsequent process filling the target entity triples into the personal knowledge graph architecture, the relevance of the personal knowledge graph to the user can be improved.

[0098] Assume that the user behavior data is as follows: On May 19, 2020, at 8:03:34 PM, user clicked on song a, artist A, popular, super quality SQ, and VIP. The entity recognition model will identify five behavior entities and their corresponding entity types: song a (song title), artist A (singer), popular (style), super quality SQ (sound quality), and VIP (user attribute). The entity types of each behavior entity are in parentheses. In this user behavior data, the user's behavior character is click, and the operation object is song a. Based on the five identified behavior entities and the entity relationship set, five behavior entity triplets are obtained: 1) user click (2020 / 05 / 19-20:03:34) - song a; 2) song a - artist - artist A; 3) song a - music style - popular; 4) song a - sound quality - super quality SQ; 5) user - account type - VIP. The five behavior entity triplets obtained above are stored in the data storage system 250.

[0099] exist Figure 1B In the scenario shown, the processor of the smart terminal runs as follows Figure 4 and Figure 5 The convolutional neural network shown in Figure 1A and Figure 1C In the scenario shown, the data processing device can run as follows Figure 4 and Figure 5 The convolutional neural network shown in Figure 2In the system shown, the training device 220 and the computing module 211 in the execution device 210 can operate as follows: Figure 4 and Figure 5 The convolutional neural network shown.

[0100] It should be understood that in addition to using convolutional neural networks, this application may also use other network models to construct entity recognition models and causal reasoning models, such as bidirectional encoder representations from transformers (BERT) technology, which is not specifically limited in this application.

[0101] See also Figure 3 , Figure 3 This is another system 300 for constructing a personal knowledge graph provided by the embodiment of the present application. Figure 3 As shown, the system 300 includes a smart terminal 310 and a server 320. The smart terminal 310 includes a data source 301, which is used to record the data generated by the corresponding APPs on the smart terminal 310 when they are running; the data collection module 302 is used to collect relevant user data from the data source 301 and save the user data; the calculation module 303 inputs the collected user data into the entity recognition model / causal reasoning model to obtain entity triples; the knowledge graph generation module 304 generates the user's personal knowledge graph based on the entity triples obtained above and the personal knowledge graph architecture; the recommendation engine module 305 analyzes the user's personal knowledge graph, accurately matches relevant content on the server 320 according to the user's explicit or implicit intentions, and pushes the relevant content to the corresponding application APP in the data source 301.

[0102] See Figure 9 , Figure 9 This is a flowchart of a method for constructing a personal knowledge graph provided by the entity example of this application.

[0103] like Figure 9 As shown, the method includes:

[0104] S910: Obtain initial user static attributes and initial user behavioral attributes, and construct a personal knowledge graph architecture based on the initial user static attributes and initial user behavioral attributes; the initial user static attributes are used to represent the user's personal information, and the initial user behavioral attributes are used to represent the domain to which the entity type corresponding to the user behavior belongs. The above-mentioned domain is a collection of entity types with the same characteristics, and the entity type is a collection of entities with the same characteristics or attributes. An entity is something associated with the user and represented by a noun or numeral. The personal knowledge graph architecture represents the relationship between the user and personal information, and the relationship between the user and the domain to which the entity type corresponding to the user behavior belongs.

[0105] The initial user static attributes include multiple attribute relationships of the user, and the multiple attribute relationships correspond one-to-one to the user's multiple personal information. Figure 10 As shown, Figure 10 is the user's personal knowledge graph architecture, Figure 10 The data contains seven attribute relationships (corresponding to seven types of personal information): spouse, university, nationality, gender, birthday, height, and weight. In the personal knowledge graph, these seven attribute relationships do not have corresponding static entities. That is, the specific data of the user's spouse, university, nationality, gender, birthday, height, and weight are not stored in the user's personal knowledge graph.

[0106] The above initial user behavior attributes are used to characterize the domain to which the entity type corresponding to the user behavior belongs. Specifically, the initial user behavior attributes may include the domain associated with the user through the action (for example, music and games) and the entity types contained in the associated domain, but not the specific behavior entity. Figure 10 As shown in , the initial user behavior attributes include four areas: music, games, movies and news, and each of these four areas also includes multiple entity types. Users associate the above four areas through four actions: listening, playing, watching and browsing. The specific process of obtaining the initial user behavior attributes is: first, based on the behavioral data statistics of a large number of users, obtain the top D areas with the highest user behavior frequency, where D is an integer greater than or equal to zero; then obtain the corresponding entity types in the D areas respectively; associate different areas and the entity types in the area with users through actions, and obtain the following Figure 10 The initial user behavior attributes shown. It should be understood that Figure 10 The four actions included in the initial user behavior attributes, the four fields corresponding to the four actions, and the entity types included in the four fields are just an example provided by this application. This application does not specifically limit the action types and number, the field types and number, and the entity types included in the field.

[0107] After obtaining the initial user static attributes and initial user behavioral attributes, the initial user static attributes and initial user behavioral attributes are fused to generate a personal knowledge graph architecture with the user as the core (such as Figure 10 shown).

[0108] It can be seen that in the embodiment of the present application, the personal knowledge graph architecture is an architecture used to represent the relationship between the user and the static entity representing the user's personal information, as well as the user and the field to which the user behavior belongs. The architecture is user-centric, and thus the user personal knowledge graph subsequently generated based on the architecture can better reflect the user's personal characteristics.

[0109] S920: Obtain initial user portrait data, initial user behavior data and entity relationship set, the initial user portrait data corresponds to the initial user static attributes, the initial user behavior data corresponds to the initial user behavior attributes, and the entity relationship set contains multiple relationships, which are used to represent the relationships between different entities.

[0110] The initial user portrait data corresponds to the initial user static attributes. Specifically, the initial user portrait data contains multiple static entities, and the number of the multiple static entities is less than or equal to the number of attribute relationships contained in the initial user static attributes. For example, if the initial user static attributes contain Figure 10 For the seven attribute relationships shown, the number of static entities included in the initial user profile data is less than or equal to 7, and the included static entities correspond one-to-one with the corresponding attribute relationships. The initial user profile data is structured data, that is, each user profile data piece contains two static entities and the associated characters between the two static entities.

[0111] The initial user behavior data corresponds to the initial user behavior attributes. In a feasible implementation, the initial user behavior data can be semi-structured data, i.e., a dot log (e.g., Figure 11 As shown), the initial user behavior data may include multiple dotting logs, each dotting log corresponding to the operation behavior of a user. Among them, each dotting log contains the user's behavior characters, the operation time corresponding to the behavior characters, the operation object corresponding to the behavior characters, the field to which the operation object belongs, the text content representing the attributes of the operation object, and the text content representing the user's attributes. Among them, the behavior characters are used to represent the behavior relationship between the user and the operation object. The behavior characters may include click, search, comment and copy; the operation object may be a specific entity or a piece of text (such as search text and comment text); the field to which the operation object belongs may include music, video and books, etc.; the attribute of the operation object may be a noun or text content used to specifically describe the operation object; the user attribute may be a noun or text content that describes the user in the corresponding field, such as, in the music field, the user is a VIP user on the music application APP. It should be understood that the above-listed behavior characters and the fields to which the operation objects belong are only a few examples listed in this application, and this application does not make specific limitations on this.

[0112] The collection period of the initial user portrait data is the same as the collection period of the initial user behavior data. The entity relationship set may contain multiple relationships, which are used to represent the relationship between different entities. The entity relationship set may also contain multiple entity types, which are used to represent the relationship between different entity types. For example, the entity relationship set may contain three relationships: click, singing, and music type. These three relationships can be used to represent the relationship between the user and the operation object, the singer and the song title, and the song title and the music type to which the song title belongs.

[0113] See Figure 11 As shown in User Behavior Data Example 1, this user behavior data is specifically: User-Click-2020 / 05 / 19-20:03:34-Song a-Music-Singer A-Popular-Super Quality SQ-VIP. The user behavior character is click, the operation object is song a, the operation object belongs to the music field, and the operation time is 2020 / 05 / 19-20:03:34. The operation object song a is a behavior entity, and its corresponding entity type is song title. The text content representing the attributes of the operation object includes singer A, popular, and super quality SQ. The text content representing the user attribute is VIP.

[0114] As shown in user behavior data example 2, this piece of user behavior data is specifically: User-Comment-2020 / 05 / 18-19:03:34-"Many celebrities sang for charity activities"-News title-Charity special topic-"Thank you to all the celebrities for your kind deeds"; among them, the user's behavior character is a comment, and the operation object is a text content, that is, the field of the operation object of "Many celebrities sang for charity activities" is news, and the text content representing the attributes of the operation object is the user's comment text, that is, "Thank you to all the celebrities for their kind deeds."

[0115] It should be understood that Figure 11 The description of user behavior data and the two examples listed are merely illustrative examples of this application, and the embodiments of this application do not specifically limit this.

[0116] S930: Obtain M initial static entity triplets based on the initial user portrait data and the entity relationship set; obtain E initial behavioral entity triplets based on the initial user behavior data and the entity relationship set; static entity triples are used to describe the attribute relationship between users and static entities, or between static entities, and behavioral entity triples are used to describe the behavioral relationship between users and behavioral entities, or between behavioral entities. M and E are integers greater than or equal to zero.

[0117] In a feasible implementation, the above-mentioned M initial static entity triples are obtained based on the initial user portrait data and the entity relationship set, including: using the entity recognition model to identify A static entities and the entity types to which the A static entities belong from the initial user portrait data, and the A static entities have a one-to-one correspondence with all or part of the attribute relationships in the initial user static attributes, that is, the above-mentioned A is less than or equal to the number of attribute relationships in the initial user static attributes, and A is an integer greater than or equal to zero; generating M initial static entity triples (expressed in the form of) based on the A static entities and the entity relationship set Figure 6 As shown). The entity relationship set includes multiple relationships, which refer to relationships between different entities, and also refer to relationships between entities included in one entity type and entities included in another entity type. Furthermore, the specific process of generating M initial static entity triples based on the A static entities and the entity relationship set includes: matching the entity types to which the A static entities belong with the entity types in the entity relationship set, determining the attribute relationships (also called relationships) between the A static entities, or between the A static entities and the user; and then obtaining M initial static entity triples based on the A static entities and the attribute relationships determined above.

[0118] For example, the initial user profile data of user 1 may include: (1) user 1-gender-male; (2) user 1-spouse-user 2; (3) user 2-graduated from-university 1; (4) user 1-graduated from-university 1.

[0119] The following describes the generation process of the initial static entity triples using the four initial user portrait data listed above: the static entities identified by the entity recognition model from the initial user portrait data of user 1 include male (gender), user 2 (name), and university 1 (school name), with the entity type of each static entity in brackets; and the associated character "gender" between user 1 and "male", the associated character "spouse" between user 1 and user 2, the associated character "graduated from" between user 1 and university 1, and the associated character "graduated from" between user 2 and university 1; then the entity types corresponding to the above static entities, the above The associated characters between the identified static entities are matched with the entity types in the entity relationship set and the relationships between the entity types in the entity relationship set, so as to determine the attribute relationships between the static associations or between user 1 and the static entities; based on the attribute relationships and static entities determined above, four initial static entity triples are generated: user 1 (name)-gender (attribute relationship)-male (gender), user 1 (name)-spouse (attribute)-user 2 (name), user 2 (name)-graduated from (attribute)-university 1 (school name), user 1 (name)-graduated from (attribute)-university 1 (school name).

[0120] It should be understood that in this application, entities are nouns or data used to represent various specific things. Entities in this application include static entities, behavioral entities, and users. The relationships between entities are divided into attribute relationships and behavioral relationships. This application uses the above-mentioned attribute relationships and static entities for description in order to distinguish between user profile data used to represent user personal information and user behavior data used to represent user behavior. This application does not specifically limit this description method.

[0121] See Figure 6 , Figure 6 This is a schematic diagram of a representation of an entity triple provided in an embodiment of the present application. The above initial static entity triple can be used Figure 6 It is expressed in the form shown. Figure 6 As shown, entity triples are used to represent the relationship between two entities. Each entity triple contains two entities, the relationship between the two entities, and the entity type labels to which the two entities belong. Figure 6 The two entities in the figure are singer A and a region; the relationship between singer A and a region is born in; the entity type to which singer A belongs is a person's name, and the entity type to which a region belongs is a place name.

[0122] The following will refer to Figure 12 The process of obtaining E initial behavior entity triples based on the initial user behavior data and the entity relationship set is described in detail. The process includes two steps S1210 and S1220:

[0123] S1210: Personal knowledge extraction, obtaining B behavior entities and C behavior characters from the initial user behavior data, where the C behavior characters correspond to O behavior entities among the B behavior entities, and the behavior characters are used to represent the user's operations on the O behavior entities. The initial user behavior data is a plurality of dot logs related to user behavior, B, C, and H are integers greater than or equal to zero, and C and H are less than or equal to B.

[0124] Specifically, the initial user behavior data is input into an entity recognition model. The entity recognition model can identify B behavior entities and the entity types corresponding to the B behavior entities from the multiple dot logs contained in the initial user behavior data. Simultaneously, the entity recognition model can also identify C behavior characters of the user and O behavior entities corresponding to the C behavior characters from the initial user behavior data, where the O behavior entities are included in the B behavior entities.

[0125] For example, using Figure 11The user behavior data example in the example is used to describe the entity recognition process: the entity recognition model can identify the following behavioral entities from this marking log: song a, music, popular, super quality SQ and VIP; the field to which this marking log belongs is the music field; at the same time, the entity recognition model can also classify the above-mentioned identified behavioral entities and determine their entity types: the entity type of song a is the song title, the entity type of popular is the music type, the entity type of SQ is the sound quality, and the entity type of VIP is the user account attribute; further, the entity recognition model can also identify the behavioral character - "click", and the entity corresponding to "click" - "song a" from this user behavior data.

[0126] In a feasible implementation, before using the entity recognition model to identify the behavior entity from the initial user behavior data, the initial user behavior data can be determined based on the original user behavior data and the personal knowledge graph architecture. The original user behavior data is also semi-structured data, that is, multiple dot logs (such as Figure 11 ). Initial user behavior data is filtered out from the original user behavior data based on the scope of the personal knowledge graph architecture. Specifically, because the fields to which the multiple dot logs contained in the original user behavior data belong may be different from the fields defined in the initial user behavior attributes, multiple dot logs belonging to the fields defined in the initial user behavior attributes are selected from the original user behavior data based on the fields defined in the initial user behavior attributes. The selected dot logs are then used as the initial user behavior data for the input entity recognition model.

[0127] S1220: Personal knowledge representation, G initial behavior entity triples are obtained based on B behavior entities and entity relationship sets; H initial behavior entity triples are obtained based on the user, C behavior characters, O behavior entities and entity relationship sets, and the above E is equal to the sum of G and H; the G initial behavior entity triples are used to describe the relationship between B behavior entities, and the H initial behavior entity triples are used to describe the relationship between the user and O behavior entities.

[0128] Specifically, based on the B behavioral entities identified in step S1210, two types of personal knowledge can be obtained: static knowledge and behavioral knowledge. Static knowledge is represented by G initial behavioral entity triples, which describe the relationship between B behavioral entities, or the relationship between the user and B behavioral entities (non-operational relationship); behavioral knowledge is represented by H initial behavioral entity triples, which describe the relationship between the user and O behavioral entities (the user's operational relationship with the O behavioral entities). The above initial behavioral entity triples can be used Figure 6 It is expressed in the form shown.

[0129] The following is a detailed introduction to the process of generating initial behavioral entity triples based on B behavioral entities and entity relationship sets: (1) For the above G initial behavioral entity triples, the entity types to which the B behavioral entities belong can be matched with the entity types in the entity relationship set, so as to determine the relationship between every two behavioral entities in the B behavioral entities based on the relationship between the entity types in the entity relationship set, and then generate G initial behavioral entity triples based on every two behavioral entities, the entity types of the two behavioral entities, and the relationship between the two behavioral entities; (2) For the above H initial behavioral entity triples, the entity types to which the O behavioral entities belong, the behavioral characters between the user and the O behavioral entities can be matched with the entity types in the entity relationship set and the relationship between the entity types, respectively, to determine the operational relationship between the user and the O behavioral entities; and then generate H initial behavioral entity triples based on the above-determined operational relationship, user, and O behavioral entities.

[0130] For example, using Figure 11 The user behavior data example 1 in the example is used to describe the generation process of the initial behavior entity triple: (1) The entity type of the behavior entity identified in the example 1 is matched with the entity type in the entity relationship set. Since the relationship between each entity type has been defined in the entity relationship set, the relationship between the behavior entities contained in the different entity types in the example 1 can be determined at this time: the relationship between song a (song name) and popular (music type) is the music type, the relationship between song a (song name) and SQ (sound quality) is the sound quality, and the relationship between user (name) and VIP (account attribute) is the account attribute. The entity types in the above brackets are the entity types of each entity, and then the relationship can be used. Figure 6 The relationship between each two behavioral entities is characterized by the representation of entity triples. At this time, three initial behavioral entity triples can be obtained, and the three initial behavioral entity triples constitute part of the user's static knowledge; (2) the entity types corresponding to the user and song a, and the user behavior character "click" obtained from Example 1 are matched with the entity types and the relationship between entity types in the entity relationship set, and the user's operation relationship on song a is determined to be "click". Based on the user (name), song a (song name) and click (operation relationship), an initial behavioral entity triple is generated, and the initial behavioral entity triple constitutes part of the user's behavioral knowledge.

[0131] In a feasible implementation, the entity recognition model can also obtain H operation times from the initial user behavior data. The above method of obtaining H initial behavior entity triples based on the user, C behavior characters, and O behavior entities includes: generating H initial behavior entity triples based on the user, C behavior characters, O behavior entities, H operation times, and entity relationship sets.

[0132] Specifically, based on the user, C behavior characters, O behavior entities and H operation times, H behavior entity quadruple is generated. The representation of the behavior entity quadruple is as follows: Figure 7 As shown, each entity quadruple contains two entities, a relationship term representing the relationship between the two entities, a time term representing the time when the relationship occurred, and the entity type labels corresponding to the two entities. The difference between the entity quadruple representation and the entity triple representation is that the quadruple includes a time term representing the occurrence of user behavior or actions, which can more accurately reflect user behavioral characteristics.

[0133] After generating the above H behavior entity quadruple, the time item and the relationship item in the H behavior entity quadruple can be spliced into one item to obtain H behavior entity triples with time items. The specific process is as follows: Figure 13 As shown, the formats of entity triples used to represent behavioral knowledge and static knowledge can be unified. The specific representation of the H behavioral entity triples with time terms is shown in Figure 8 .

[0134] In the embodiment of this application, Figure 8 The representation shown is used to describe the above H initial behavior entity triples, which can unify the formats of the H initial behavior entity triples and the G initial behavior entity triples, facilitate data access, and thus improve the efficiency of building the personal knowledge graph; in addition, since the time term is added to the H initial behavior entity triples, it can better reflect the user's behavioral characteristics in different time periods, thereby ensuring that the user's personal knowledge graph constructed based on the above initial behavior entity triples has better timeliness.

[0135] S940: Generate a personal knowledge graph based on the M initial static entity triples, the E initial behavioral entity triples and the personal knowledge graph architecture.

[0136] Specifically, in a feasible implementation, the above-mentioned M initial static entity triples and E initial behavioral entity triples are filled into the personal knowledge graph architecture to generate a personal knowledge graph that can reflect the user's characteristics.

[0137] In one feasible embodiment, generating a personal knowledge graph based on the M initial static entity triples, the E initial behavioral entity triples, and the personal knowledge graph architecture may include: generating a personal knowledge graph reflecting user characteristics based on the M initial static entity triples, the F initial behavioral entity triples among the E initial behavioral entity triples, and the personal knowledge graph architecture. Specifically, in one feasible embodiment, the M initial static entity triples and the F initial behavioral entity triples are populated into the personal knowledge graph architecture to obtain the user's personal knowledge graph.

[0138] The above-mentioned E initial behavior entity triples are generated based on the initial user behavior data, and the collection time of the initial user behavior data is any time between time T1 and the current system time; the above-mentioned F initial behavior entity triples are generated based on the first user behavior data, and the collection time of the first user behavior data is any time between time T2 and the current system time, time T2 is later than or equal to time T1, and time T2 and time T1 are both earlier than the current system time, so the above-mentioned E initial behavior entity triples contain F initial behavior entity triples. It should be understood that the specific time represented by the above-mentioned T1 and T2 can be adjusted according to the application scenario, and this application does not make specific limitations on this.

[0139] In a feasible implementation, the specific process of generating a user's personal knowledge graph based on M initial static entity triples, F initial behavioral entity triples and a personal knowledge graph architecture may include: selecting a preset number Q initial behavioral entity triples from the F initial behavioral entity triples, filling the Q initial behavioral entity triples and the M initial static entity triples into the personal knowledge graph architecture together to generate the user's personal knowledge graph, where Q is an integer greater than or equal to zero.

[0140] The following is a detailed introduction to the process of selecting Q initial behavior entity triples from F initial behavior entity triples: First, the F initial behavior entity triples are deduplicated to obtain I initial behavior entity triples; the above deduplication refers to the elimination of identical initial behavior entity triples in the F initial behavior entity triples, and the I initial behavior entity triples obtained after deduplication are all different. The conditions for determining whether two initial behavior entity triples are identical are: when the two behavior entities in one initial behavior entity triple are respectively identical to the two behavior entities in the other initial behavior entity triple, and the relationship between the two behavior entities in the one initial behavior entity triple is the same as the relationship between the two behavior entities in the other initial behavior entity triple; it should be noted that the process of determining whether two initial behavior entity triples are identical does not include the judgment of the operation time. After obtaining I initial behavior entity triples, Q initial behavior entity triples are selected from the I initial behavior entity triples, where I is an integer greater than or equal to zero.

[0141] The above process of selecting Q initial behavior entity triplets from I initial behavior entity triplets can be divided into two cases:

[0142] (1) When I is less than or equal to the preset number Q, the above I initial behavior entity triples are the Q that need to be selected

[0143] An initial behavior entity triple.

[0144] (2) When I is greater than a preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, which correspond one-to-one to the I initial behavior entity triples, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; then, according to the number of elements in each behavior entity set, the above-mentioned I initial behavior entity triples are sorted according to the rule of number from large to small to obtain a sorting result, wherein, when the number of elements in the behavior entity triple set is greater, the initial behavior entity triple corresponding to the behavior entity triple set is positioned higher in the sorting result; finally, the top Q initial behavior entity triples are selected from the sorting result.

[0145] In one feasible embodiment, the above-mentioned generation of a personal knowledge graph based on M initial static entity triples, E initial behavioral entity triples, and a personal knowledge graph architecture may include: generating X initial target entity triples based on the M initial static entity triples and / or E initial behavioral entity triples, where X is an integer greater than or equal to zero; each target entity triple in the target entity triples contains at least one target entity, and the target entity triples are used to describe the relationship between target entities or between a user and a target entity. The personal knowledge graph is generated based on the M initial static entity triples, E initial behavioral entity triples, X initial target entity triples, and the personal knowledge graph architecture; specifically, in one feasible embodiment, the M initial static entity triples, E initial behavioral entity triples, and X initial target entity triples are populated into the personal knowledge graph architecture to generate the personal knowledge graph.

[0146] The above process of generating X initial target entity triples based on M initial static entity triples and / or E initial behavior entity triples includes three implementation methods. The target entity triples generated by these three implementation methods constitute the X initial target entity triples. The three implementation methods are described below with examples:

[0147] (1) Generate the initial target entity triples based on the initial static entity triples: see Figure 14 , Figure 14 A schematic diagram of the process of constructing a target entity triple provided in an embodiment of the present application. Figure 14 As shown, Figure 14 Entity triples 1, 2, and 3 in the input causal reasoning model can identify the common features between the three entity triplets, that is, user 1 and user 2 both graduated from university 1, and then conclude that the relationship between user 1 and user 2 is alumni, and based on this conclusion, generate the following Figure 14 The target entity triple is shown as one.

[0148] (2) Generate the initial target entity triple based on the initial static entity triple and the initial behavior entity triple: see Figure 15 , Figure 15 This is a schematic diagram of another target entity triple construction process provided in the embodiment of the present application. Figure 15 As shown, Figure 15 Entity triples four, five, and six are input into the causal reasoning model. The model can identify from entity triples four and five that the news category browsed by the user belongs to current affairs and politics; identify from entity triple six that the user's university major is also related to current affairs and politics, and then conclude that the user pays attention to information of the current affairs and politics type, and generate target entity triple two based on this conclusion.

[0149] (3) Generate the initial target entity triple based on the initial behavior entity triple: see Figure 16 , Figure 16 This is another schematic diagram of the process of constructing a target entity triple provided by the embodiment of the present application. Figure 16 As shown, Figure 16 Entity triples seven, eight, and nine are input into the causal reasoning model. The model can identify information related to song a from entity triple one, for example, the singer of song a is singer A, the genre is pop music, and the sound quality is SQ; identify the text content of the news "Public Welfare Concert (News 3)" from entity triple two, for example, the singing stars are singer A, singer B, and singer C; identify information related to movie b from entity triple three, for example, the actors of the movie are actor D and singer A; then the model analyzes the various identified information above and infers that the above three behaviors of the user are related to singer A, thereby concluding that the user likes singer A, and generates target entity triple three based on this conclusion.

[0150] In a feasible embodiment, the specific process of generating a personal knowledge graph based on the M initial static entity triples, the E initial behavior entity triples, the X initial target entity triples, and the personal knowledge graph architecture may include: generating a personal knowledge graph based on the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, the Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture. Specifically, in a feasible embodiment, the M initial static entity triples, the F initial behavior entity triples, and the Y initial target entity triples are populated into the personal knowledge graph architecture to obtain the personal knowledge graph.

[0151] The E initial behavior entity triples are generated based on initial user behavior data, which is collected at any time between time T1 and the current system time. The F initial behavior entity triples are generated based on first user behavior data, which is collected at any time between time T2 and the current system time, where time T2 is later than or equal to time T1, and both time T2 and time T1 are earlier than the current system time. Therefore, the E initial behavior entity triples include F initial behavior entity triples. The Y initial target entity triples are generated based on the M initial static entity triples and / or the F initial behavior entity triples. Therefore, the X initial target entity triples include the Y initial target entity triples.

[0152] In a feasible implementation, the above process of generating a personal knowledge graph based on M initial static entity triples, F initial behavioral entity triples, Y initial target entity triples and a personal knowledge graph architecture may also include: selecting Q entity triples from the F initial behavioral entity triples and Y initial target entity triples, and then filling the Q entity triples and M initial static entity triples into the personal knowledge graph architecture to obtain a personal knowledge graph.

[0153] The following will introduce in detail the process of selecting Q entity triplets from F initial behavior entity triplets and Y initial target entity triplets: first, the Y initial target entity triplets are deduplicated to obtain J initial target entity triplets, where J is an integer greater than or equal to zero, and J is less than or equal to Y. The process of deduplicating the Y initial target entity triplets here is the same as the above-mentioned process of deduplicating the F initial behavior entity triplets, and will not be repeated here.

[0154] After obtaining J initial target entity triplets, Q entity triplets are selected from F initial behavior entity triplets and J initial target entity triplets. The specific process is as follows:

[0155] (1) When J is equal to the preset number Q, M initial static entity triples and J initial target entity triples are filled into the personal knowledge graph architecture to generate a personal knowledge graph.

[0156] (2) When J is greater than a preset number Q, the Y initial target entity triples are grouped according to the J initial target entity triples to obtain a set of J target entity triples. The process of obtaining the set of J target entity triples and sorting the J initial target entity triples is the same as the process of obtaining the set of O behavior entity triples and sorting the I initial behavior entity triples, and thus will not be repeated. After obtaining the sorting results of the J initial target entity triples, the M initial static entity triples and the first Q initial target entity triples of the J initial target entity triples are added to the personal knowledge graph architecture to generate the personal knowledge graph.

[0157] (3) When J is less than the preset number Q, and the sum of J and I is greater than Q, the M initial static entity triples, the J initial target entity triples, and the first QJ initial behavior entity triples among the sorted I initial behavior entity triples are filled into the personal knowledge graph architecture to generate a personal knowledge graph.

[0158] (4) When J is less than the preset number Q, and the sum of J and I is less than or equal to Q, the M initial static entity triples, the J initial target entity triples, and the I initial behavior entity triples are filled into the personal knowledge graph architecture to generate a personal knowledge graph.

[0159] In one possible implementation, see Figure 17 When the entity triple to be expanded is filled into the personal knowledge graph architecture, a search is performed in the general knowledge graph and / or vertical domain knowledge graph on the server side or cloud side to confirm whether any entity in the above-mentioned entity triple to be expanded exists in the general knowledge graph or the vertical domain knowledge graph. If so, an identifier of the any entity is saved on the smart terminal side. This identifier can be used to quickly locate the any entity in the general knowledge graph or the vertical domain knowledge graph in the future, and then quickly obtain information related to the any entity; the entity triple to be expanded refers to the entity triple filled in the personal knowledge graph architecture in the above-mentioned embodiments.

[0160] It can be seen that in the embodiment of the present application, the personal knowledge graph architecture is constructed by adopting static attributes representing personal user information and behavioral data representing the field to which the user behavior belongs. Therefore, the architecture is a user-centric architecture that can reflect the user's personal information and behavioral characteristics. Then, the user portrait data and user behavior data are used to generate static entity triples representing the user's personal information and static entity triples and behavioral entity triples representing the user's behavioral characteristics. The static entity triples and behavioral entity triples are filled into the personal knowledge graph architecture to obtain a personal knowledge graph reflecting the user's personal characteristics. Therefore, relevant content can be accurately recommended to the user based on the generated personal knowledge graph. At the same time, by introducing the time term into the behavioral entity triple, the specific moment when the user behavior occurs can be more accurately reflected, thereby making the constructed personal knowledge graph more accurate. In addition, based on the static entity triples and behavioral entity triples, the target entity triples reflecting the user's deep personal characteristics are mined, and the target entity triples are filled into the personal knowledge graph architecture, so that the obtained personal knowledge graph can more accurately reflect the user's characteristics and be more relevant to the user.

[0161] See Figure 18 , Figure 18 This is a flowchart of a method for updating a personal knowledge graph provided in this application. Figure 18 As shown, the update method includes four steps:

[0162] S1810: Obtain the target user's static attributes and the target user's behavioral attributes, and use the target user's static attributes and the target user's behavioral attributes to update the above-mentioned personal knowledge graph to obtain the target personal knowledge graph.

[0163] Specifically, first, the attribute relationships contained in the target user's static attributes are compared with the attribute relationships contained in the initial user's static attributes, and the parts not included in the initial user's static attributes are selected from the attribute relationships contained in the target user's static attributes to obtain the attribute relationship screening results, and the attribute relationships in the screening results are expanded to the personal knowledge graph; similarly, the operation behaviors, fields and entity types contained in the target user's behavioral attributes and the initial user's behavioral attributes are compared to see whether they are the same, and the operation behaviors, fields and entity types not included in the initial user's behavioral attributes are screened out from the target user's behavioral attributes to obtain the screening results; the attribute relationships, operation behaviors, fields and entity types in the above two screening results are expanded to the personal knowledge graph to obtain the target personal knowledge graph.

[0164] Among them, the collection time period of the target user static attributes, target user behavioral attributes, second user portrait data and second user behavioral data is the same, and is later than the collection time period of the above-mentioned initial user static attributes, initial user behavioral attributes, initial user portrait data and initial user behavioral data.

[0165] S1820: Obtain the second user portrait data and the second user behavior data.

[0166] Specifically, the specific representations of the second user portrait data and the second behavior data are the same as those of the initial user portrait data and the initial user behavior data, respectively. See the description in step S920 and will not be repeated here. The second user portrait data corresponds to the user static attributes in the target personal knowledge graph, and the second user behavior data corresponds to the user behavior attributes in the target personal knowledge graph. The collection time period of the second user portrait data and the second user behavior data is later than the collection time period of the initial user portrait data and the initial user behavior data.

[0167] S1830: Obtain K first static entity triplets based on the second user portrait data and the entity relationship set; obtain L first behavior entity triplets based on the second user behavior data and the entity relationship set, where L and K are integers greater than or equal to zero.

[0168] Specifically, this step corresponds to the same specific process as step S930 and will not be repeated here.

[0169] S1840: Update the target personal knowledge graph based on the K first static entity triples and the L first behavioral entity triples.

[0170] Specifically, the process of generating the entity triples to be expanded based on K first static entity triples and L first behavioral entity triples in this step is the same as the corresponding process in step S940 and will not be repeated here; after obtaining the entity triples to be expanded, the above-mentioned target personal knowledge graph is updated using the entity triples to be expanded.

[0171] See Figure 19 , Figure 19 This is a flowchart of another method for updating personal knowledge graphs provided in this application. Figure 19 As shown, the update method includes three steps:

[0172] S1910: Obtain third user portrait data and third user behavior data.

[0173] S1920: Obtain R second static entity triplets based on the third user portrait data and the entity relationship set; obtain S second behavior entity triplets based on the second user behavior data and the entity relationship set, where R and S are integers greater than or equal to zero.

[0174] Specifically, the specific processes in steps S1910 and S1920 correspond to the specific processes in steps S920 and S930 and are not repeated here.

[0175] S1930: Update the personal knowledge graph based on the R second static entity triples and the S second behavioral entity triples.

[0176] Specifically, the process of generating the entity triples to be expanded based on the K first static entity triples and the L first behavioral entity triples in this step is the same as the corresponding process in step S940 and will not be repeated here; then the entity triples to be expanded are used to update the personal knowledge graph obtained in step S940.

[0177] See Figure 20 , Figure 20 This is a schematic block diagram of a personal knowledge graph construction device 2000 provided in an embodiment of the present application. Figure 20 As shown, the apparatus 2000 includes an acquisition unit 2010 , a processing unit 2020 and a generation unit 2030 .

[0178] The acquisition unit 2010 is used to acquire the initial user static attributes and the initial user behavioral attributes; the initial user static attributes are used to represent the user's personal information, and the initial user behavioral attributes are used to represent the domain to which the entity type corresponding to the user behavior belongs. The domain is a collection of entity types with the same characteristics, and the entity type is a collection of entities with the same characteristics or attributes. The entity is a thing associated with the user and represented by a noun or numeral; the initial user portrait data, the initial user behavior data and the entity relationship set are acquired, the initial user portrait data corresponds to the initial user static attributes, the initial user behavior data corresponds to the initial user behavior attributes, and the entity relationship set contains multiple relationships, and the multiple relationships are used to represent the relationship between entities.

[0179] Processing unit 2020 is used to construct a personal knowledge graph architecture based on the initial user static attributes and the initial user behavioral attributes. The personal knowledge graph architecture represents the relationship between the user and personal information, and the relationship between the user and the domain to which the entity type corresponding to the user behavior belongs; it is used to obtain M initial static entity triples based on the initial user portrait data and the entity relationship set; it is used to obtain E initial behavioral entity triples based on the initial user behavior data and the entity relationship set; the initial static entity triples are used to describe the attribute relationship between the user and the static entity, or between static entities, and the initial behavioral entity triples are used to describe the behavioral relationship between the user and the behavioral entity, or between behavioral entities, and M and E are integers greater than or equal to zero.

[0180] The generating unit 2030 is used to generate a personal knowledge graph based on the M initial static entity triples, the E initial behavioral entity triples and the personal knowledge graph architecture.

[0181] It should be understood that the acquisition unit 2010, the processing unit 2020 and the generation unit 2030 in the apparatus 2000 can also be specifically used to perform the following steps: Figure 9 、 Figure 18 and Figure 19 The corresponding methods in the embodiments described in will not be repeated here.

[0182] See Figure 21 , Figure 21 A schematic diagram of the hardware structure of a personal knowledge graph construction device provided in an embodiment of the present application. Figure 21 The image processing apparatus 2100 shown (the apparatus 2100 may be a computer device) includes a memory 2101, a processor 2102, a communication interface 2103, and a bus 2104. The memory 2101, the processor 2102, and the communication interface 2103 are connected to each other via the bus 2104.

[0183] The memory 2101 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 2101 may store programs. When the programs stored in the memory 2101 are executed by the processor 2102, the processor 2102 and the communication interface 2103 are used to perform the various steps of the image processing method of the embodiment of the present application.

[0184] The processor 2102 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), a graphics processing unit (GPU) or one or more integrated circuits to execute relevant programs to implement the functions required to be performed by the units in the image processing device of the embodiment of the present application, or to execute the image processing method of the method embodiment of the present application.

[0185] The processor 2102 may also be an integrated circuit chip with signal processing capabilities. During implementation, the various steps of the image processing method of the present application may be completed by hardware integrated logic circuits or software instructions in the processor 2102. The aforementioned processor 2102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of the present application may be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or the like. The storage medium is located in the memory 2101, and the processor 2102 reads the information in the memory 2101 and combines its hardware to complete the functions required to be performed by the units included in the image processing device of the embodiment of the present application, or executes the image processing method of the method embodiment of the present application.

[0186] The communication interface 2103 uses a transceiver such as, but not limited to, a transceiver to implement communication between the device 2100 and other devices or communication networks. For example, training data (such as the data in this application) can be obtained through the communication interface 2103. Figure 10 The image to be processed in the described embodiment).

[0187] The bus 2104 may include a path for transmitting information between various components of the device 2100 (eg, the memory 2101 , the processor 2102 , and the communication interface 2103 ).

[0188] It should be noted that although Figure 21 The device 2100 shown only shows a memory, a processor, and a communication interface. However, in the specific implementation process, those skilled in the art should understand that the device 2100 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the device 2100 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the device 2100 may also include only the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 21 All devices shown in .

[0189] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0190] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0191] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0192] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0193] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0194] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0195] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A method for constructing a personal knowledge graph, characterized in that: The method comprises: Obtaining initial user static attributes and initial user behavioral attributes, and constructing a personal knowledge graph architecture based on the initial user static attributes and the initial user behavioral attributes; the initial user static attributes are used to represent the user's personal information, the initial user static attributes include multiple attribute relationships of the user, and the multiple attribute relationships do not have corresponding static entities; the initial user behavioral attributes are used to represent the domain to which the entity type corresponding to the user's behavior belongs, the domain being a collection of entity types with the same characteristics, the entity type being a collection of entities with the same characteristics or attributes, the entity being something associated with the user and represented by a noun or numeral, the initial user behavioral attributes do not include corresponding behavioral entities, and the personal knowledge graph architecture represents the relationship between the user and the personal information, and the relationship between the user and the domain to which the entity type corresponding to the user's behavior belongs; Obtaining initial user portrait data, initial user behavior data, and an entity relationship set, wherein the initial user portrait data corresponds to the initial user static attributes, the initial user portrait data includes multiple static entities, the initial user behavior data corresponds to the initial user behavior attributes, and the entity relationship set includes multiple relationships, wherein the multiple relationships are used to represent the relationships between the entities; Obtain M initial static entity triples based on the initial user portrait data and the entity relationship set; obtain E initial behavioral entity triples based on the initial user behavior data and the entity relationship set; wherein M and E are integers greater than or equal to zero; The personal knowledge graph is generated according to the M initial static entity triples, the E initial behavioral entity triples and the personal knowledge graph architecture.

2. The method according to claim 1, characterized in that The step of obtaining M initial static entity triples according to the initial user portrait data and the entity relationship set includes: Obtaining A static entities from the initial user portrait data, where A is an integer greater than or equal to zero; The M initial static entity triples are obtained according to the A static entities and the entity relationship set.

3. The method according to claim 1, characterized in that The E initial behavior entity triples are obtained according to the initial user behavior data and the entity relationship set, including: Obtaining B behavior entities and C behavior characters from the initial user behavior data, where the C behavior characters correspond to O behavior entities among the B behavior entities, and the behavior characters are used to represent operations performed by the user on the O behavior entities, where B, C, and O are integers greater than or equal to zero; Obtain G initial behavior entity triples according to the B behavior entities and the entity relationship set; Obtaining H initial behavior entity triples according to the user, the C behavior characters, the O behavior entities, and the entity relationship set, where G and H are integers greater than or equal to zero; The G initial behavior entity triples are used to describe the relationship between the B behavior entities; the H initial behavior entity triples are used to describe the relationship between the user and the O behavior entities, and the E initial behavior entity triples include the G initial behavior entity triples and the H initial behavior entity triples.

4. The method according to claim 3, characterized in that The method further comprises: Obtaining H operation times from the initial user behavior data; The H initial behavior entity triples are obtained according to the user, the C behavior characters, the O behavior entities, and the entity relationship set, including: The H initial behavior entity triples are generated according to the user, the C behavior characters, the O behavior entities, the H operation times, and the entity relationship set.

5. The method according to claim 1, characterized in that: Generating the personal knowledge graph according to the M initial static entity triples, the E initial behavior entity triples, and the personal knowledge graph architecture includes: Generate X initial target entity triples based on the M initial static entity triples and / or the E initial behavior entity triples, where X is an integer greater than or equal to zero; each target entity triple in the target entity triples contains at least one target entity, and the target entity triples are used to describe a relationship between target entities or between the user and the target entity; The personal knowledge graph is generated according to the M initial static entity triples, the E initial behavior entity triples, the X initial target entity triples and the personal knowledge graph architecture.

6. The method according to claim 1, characterized in that Generating the personal knowledge graph according to the M initial static entity triples, the E initial behavior entity triples, and the personal knowledge graph architecture includes: Generate the personal knowledge graph according to the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, and the personal knowledge graph architecture; Among them, the F initial behavior entity triplets are obtained based on the first user behavior data and the entity relationship set, the first user behavior data is the behavior data in which the difference between the collection time and the current system time in the initial user behavior data is less than a preset threshold, and F is an integer greater than or equal to zero.

7. The method according to claim 6, characterized in that The generating the personal knowledge graph according to the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, and the personal knowledge graph architecture includes: Deduplication is performed on the F initial behavior entity triples to obtain I initial behavior entity triples, where I is an integer greater than or equal to zero and less than or equal to F; When I is less than or equal to a preset number Q, generating the personal knowledge graph according to the M initial static entity triples, the I initial behavior entity triples, and the personal knowledge graph architecture, where Q is an integer greater than or equal to zero; When I is greater than the preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, the O behavior entity triple sets correspond to the I initial behavior entity triples one-to-one, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; according to the number of elements in each behavior entity triple set, the I initial behavior entity triples are sorted to obtain a sorting result, wherein, when the number of elements in each behavior entity triple set is more, the initial behavior entity triple corresponding to each behavior entity triple set is sorted higher in the sorting result; according to the M initial static entity triples, the first Q initial behavior entity triples in the sorted I initial behavior entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated.

8. The method according to claim 5, characterized in that Generating the personal knowledge graph according to the M initial static entity triples, the E initial behavior entity triples, the X initial target entity triples, and the personal knowledge graph architecture includes: Generate the personal knowledge graph according to the M initial static entity triples, F initial behavior entity triples among the E initial behavior entity triples, Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture; Among them, the F initial behavior entity triplets are obtained based on the first user behavior data and the entity relationship set, and the first user behavior data is the behavior data in which the difference between the collection time and the current system time in the initial user behavior data is less than a preset threshold; the Y initial target entity triplets are generated based on the M initial static entity triplets and / or the F initial behavior entity triplets, and Y is an integer greater than or equal to zero.

9. The method according to claim 8, characterized in that Generating the personal knowledge graph according to the M initial static entity triples, F initial behavior entity triples among the E initial behavior entity triples, Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture includes: Deduplication is performed on the F initial behavior entity triples to obtain I initial behavior entity triples, where I is an integer greater than or equal to zero and less than or equal to F; Deduplication is performed on the Y initial target entity triples to obtain J initial target entity triples, where J is an integer less than or equal to Y and greater than or equal to zero; When J is equal to a preset number Q, generating the personal knowledge graph according to the M initial static entity triples, the J initial target entity triples and the personal knowledge graph architecture, where Q is an integer greater than or equal to zero; When J is greater than the preset number Q, the Y initial target entity triples are grouped according to the J initial target entity triples to obtain J target entity triple sets, the J target entity triple sets and the J initial target entity triples correspond one-to-one, and the initial target entity triples contained in each target entity triple set are the same as the initial target entity triples corresponding to the target entity triple set; according to the number of elements in each target entity triple set, the J initial target entity triples are sorted to obtain a sorting result, wherein, when the number of elements in each target entity triple set is greater, the initial target entity triple corresponding to each target entity triple set is sorted higher in the sorting result; according to the M initial static entity triples, the first Q initial target entity triples in the sorted J initial target entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated; When J is less than the preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, the O behavior entity triple sets correspond to the I initial behavior entity triples one-to-one, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; according to the number of elements in each behavior entity triple set, the I initial behavior entity triples are sorted to obtain a sorting result, wherein, when the number of initial behavior entity triples contained in each behavior entity triple set is more, the initial behavior entity triples corresponding to each behavior entity triple set are sorted higher in the result; according to the M initial static entity triples, the J initial target entity triples and the first QJ initial behavior entity triples in the sorted I initial behavior entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated.

10. The method according to claim 1, characterized in that: The method further comprises: Obtaining target user static attributes and target user behavioral attributes, and using the target user static attributes and the target user behavioral attributes to update the personal knowledge graph to obtain a target personal knowledge graph; Obtain second user portrait data and second user behavior data; Obtain K first static entity triples based on the second user portrait data and the entity relationship set; obtain L first behavior entity triples based on the second user behavior data and the entity relationship set, where L and K are integers greater than or equal to zero; The target personal knowledge graph is updated according to the K first static entity triples and the L first behavioral entity triples.

11. The method according to claim 10, characterized in that: The method further comprises: Obtaining third-party user portrait data and third-party user behavior data; Obtain R second static entity triples based on the third user portrait data and the entity relationship set; obtain S second behavior entity triples based on the second user behavior data and the entity relationship set, where R and S are integers greater than or equal to zero; The personal knowledge graph is updated according to the R second static entity triples and the S second behavioral entity triples.

12. A personal knowledge graph construction device, characterized in that: The device comprises: An acquisition unit is configured to acquire initial user static attributes and initial user behavioral attributes; the initial user static attributes are used to characterize the user's personal information, the initial user static attributes include multiple attribute relationships of the user, and the multiple attribute relationships do not have corresponding static entities, the initial user behavioral attributes are used to characterize the domain to which the entity type corresponding to the user behavior belongs, the domain being a collection of entity types with the same characteristics, the entity type being a collection of entities with the same characteristics or attributes, the entity being something associated with the user and represented by a noun or numeral, and the initial user behavioral attributes do not include corresponding behavioral entities; initial user portrait data, initial user behavior data, and an entity relationship set are acquired, the initial user portrait data corresponding to the initial user static attributes, the initial user portrait data including multiple static entities, the initial user behavior data corresponding to the initial user behavior attributes, the entity relationship set including multiple relationships, and the multiple relationships being used to characterize the relationships between the entities; a processing unit, configured to construct a personal knowledge graph architecture based on the initial user static attributes and the initial user behavioral attributes, wherein the personal knowledge graph architecture represents the relationship between the user and the personal information, and between the user and the domain to which the entity type corresponding to the user behavior belongs; and to obtain M initial static entity triples based on the initial user portrait data and the entity relationship set; and to obtain E initial behavioral entity triples based on the initial user behavior data and the entity relationship set; wherein M and E are integers greater than or equal to zero; A generating unit is used to generate the personal knowledge graph based on the M initial static entity triples, the E initial behavior entity triples and the personal knowledge graph architecture.

13. The device according to claim 12, characterized in that In the aspect of obtaining M initial static entity triples according to the initial user portrait data and the entity relationship set, the processing unit is specifically configured to: Obtaining A static entities from the initial user portrait data, where A is an integer greater than or equal to zero; The M initial static entity triples are obtained according to the A static entities and the entity relationship set.

14. The device according to claim 12, characterized in that In the aspect of obtaining E initial behavior entity triples according to the initial user behavior data and the entity relationship set, the processing unit is specifically configured to: Obtaining B behavior entities and C behavior characters from the initial user behavior data, where the C behavior characters correspond to O behavior entities among the B behavior entities, and the behavior characters are used to represent operations performed by the user on the O behavior entities, where B, C, and O are integers greater than or equal to zero; Obtain G initial behavior entity triples according to the B behavior entities and the entity relationship set; Obtaining H initial behavior entity triples according to the user, the C behavior characters, the O behavior entities, and the entity relationship set, where G and H are integers greater than or equal to zero; The G initial behavior entity triples are used to describe the relationship between the B behavior entities; The H initial behavior entity triples are used to describe the relationship between the user and the O behavior entities, and the E initial behavior entity triples include the G initial behavior entity triples and the H initial behavior entity triples.

15. The device according to claim 14, characterized in that The processing unit is further specifically configured to: Obtaining H operation times from the initial user behavior data; The H initial behavior entity triples are obtained according to the user, the C behavior characters, the O behavior entities, and the entity relationship set, including: The H initial behavior entity triples are generated according to the user, the C behavior characters, the O behavior entities, the H operation times, and the entity relationship set.

16. The device according to claim 12, characterized in that The generating unit is specifically configured to: Generate X initial target entity triples based on the M initial static entity triples and / or the E initial behavior entity triples, where X is an integer greater than or equal to zero; each target entity triple in the target entity triples contains at least one target entity, and the target entity triples are used to describe a relationship between target entities or between the user and the target entity; The personal knowledge graph is generated according to the M initial static entity triples, the E initial behavior entity triples, the X initial target entity triples and the personal knowledge graph architecture.

17. The device according to claim 12, characterized in that The generating unit is specifically configured to: Generate the personal knowledge graph according to the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, and the personal knowledge graph architecture; Among them, the F initial behavior entity triplets are obtained based on the first user behavior data and the entity relationship set, the first user behavior data is the behavior data in which the difference between the collection time and the current system time in the initial user behavior data is less than a preset threshold, and F is an integer greater than or equal to zero.

18. The device according to claim 17, characterized in that In the aspect of generating the personal knowledge graph based on the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, and the personal knowledge graph architecture, the generating unit is specifically configured to: Deduplication is performed on the F initial behavior entity triples to obtain I initial behavior entity triples, where I is an integer greater than or equal to zero and less than or equal to F; When I is less than or equal to a preset number Q, generating the personal knowledge graph according to the M initial static entity triples, the I initial behavior entity triples, and the personal knowledge graph architecture, where Q is an integer greater than or equal to zero; When I is greater than the preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, the O behavior entity triple sets correspond to the I initial behavior entity triples one-to-one, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; according to the number of elements in each behavior entity triple set, the I initial behavior entity triples are sorted to obtain a sorting result, wherein, when the number of elements in each behavior entity triple set is more, the initial behavior entity triple corresponding to each behavior entity triple set is sorted higher in the sorting result; according to the M initial static entity triples, the first Q initial behavior entity triples in the sorted I initial behavior entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated.

19. The device according to claim 16, characterized in that In the step of generating the personal knowledge graph according to the M initial static entity triples, the E initial behavior entity triples, the X initial target entity triples, and the personal knowledge graph architecture, the generating unit is specifically configured to: Generate the personal knowledge graph according to the M initial static entity triples, F initial behavior entity triples among the E initial behavior entity triples, Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture; Among them, the F initial behavior entity triplets are obtained based on the first user behavior data and the entity relationship set, and the first user behavior data is the behavior data in which the difference between the collection time and the current system time in the initial user behavior data is less than a preset threshold; the Y initial target entity triplets are generated based on the M initial static entity triplets and / or the F initial behavior entity triplets, and Y is an integer greater than or equal to zero.

20. The device according to claim 19, characterized in that In the aspect of generating the personal knowledge graph based on the M initial static entity triples, the F initial behavior entity triples among the E initial behavior entity triples, the Y initial target entity triples among the X initial target entity triples, and the personal knowledge graph architecture, the generating unit is specifically configured to: Deduplication is performed on the F initial behavior entity triples to obtain I initial behavior entity triples, where I is an integer greater than or equal to zero and less than or equal to F; Deduplication is performed on the Y initial target entity triples to obtain J initial target entity triples, where J is an integer less than or equal to Y and greater than or equal to zero; When J is equal to a preset number Q, generating the personal knowledge graph according to the M initial static entity triples, the J initial target entity triples and the personal knowledge graph architecture, where Q is an integer greater than or equal to zero; When J is greater than the preset number Q, the Y initial target entity triples are grouped according to the J initial target entity triples to obtain J target entity triple sets, the J target entity triple sets and the J initial target entity triples correspond one-to-one, and the initial target entity triples contained in each target entity triple set are the same as the initial target entity triples corresponding to the target entity triple set; according to the number of elements in each target entity triple set, the J initial target entity triples are sorted to obtain a sorting result, wherein, when the number of elements in each target entity triple set is greater, the initial target entity triple corresponding to each target entity triple set is sorted higher in the sorting result; according to the M initial static entity triples, the first Q initial target entity triples in the sorted J initial target entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated; When J is less than the preset number Q, the F initial behavior entity triples are grouped according to the I initial behavior entity triples to obtain O behavior entity triple sets, the O behavior entity triple sets correspond to the I initial behavior entity triples one-to-one, and the initial behavior entity triples contained in each behavior entity triple set are the same as the initial behavior entity triples corresponding to the behavior entity triple set; according to the number of elements in each behavior entity triple set, the I initial behavior entity triples are sorted to obtain a sorting result, wherein, when the number of initial behavior entity triples contained in each behavior entity triple set is more, the initial behavior entity triples corresponding to each behavior entity triple set are sorted higher in the result; according to the M initial static entity triples, the J initial target entity triples and the first QJ initial behavior entity triples in the sorted I initial behavior entity triples and the personal knowledge graph architecture, the personal knowledge graph is generated.

21. The device according to claim 12, characterized in that: The acquisition unit is further configured to acquire static attributes of the target user, behavioral attributes of the target user, second user portrait data, and second user behavioral data; The processing unit is further configured to update the personal knowledge graph using the target user static attributes and the target user behavioral attributes to obtain a target personal knowledge graph; and obtain K first static entity triples based on the second user portrait data and the entity relationship set; Obtaining L first behavior entity triples according to the second user behavior data and the entity relationship set, where L and K are integers greater than or equal to zero; The generating unit is further configured to update the target personal knowledge graph based on the K first static entity triples and the L first behavioral entity triples.

22. The device according to claim 21, characterized in that: The acquisition unit is further configured to acquire third user portrait data and third user behavior data; The processing unit is further configured to obtain R second static entity triples based on the third user portrait data and the entity relationship set; Obtaining S second behavior entity triples according to the second user behavior data and the entity relationship set, where R and S are integers greater than or equal to zero; The generating unit is further configured to update the personal knowledge graph based on the R second static entity triples and the S second behavioral entity triples.

23. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program codes for execution by a device, wherein the program codes include codes for executing the method according to any one of claims 1 to 11.

24. A chip, characterized in that: The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Man-machine dialogue content processing method

    CN106095833A

  • Product recommendation method and device and computer storage medium

    CN110335112A