CN-114896416-B - Time sequence knowledge graph embedding and predicting method for stream scene
Abstract
The invention discloses a sequential knowledge graph embedding and predicting method for a flow scene, which comprises the steps of acquiring interactive knowledge in the flow scene, preprocessing, acquiring a direct influence entity and a propagation influence entity according to the preprocessed interactive knowledge, constructing an updating model to update embedded representations of the direct influence entity and the propagation influence entity, constructing a reading model to read the updated embedded representations of the direct influence entity and the propagation influence entity at the query time, calculating the confidence coefficient of each knowledge according to the embedded representations at the query time by using a scoring function, and predicting future knowledge according to the confidence coefficient of each knowledge.
Inventors
- ZHANG JIASHENG
- SHAO JIE
- SHE LEI
- Abdullah Oman Khan
Assignees
- 四川省人工智能研究院(宜宾)
- 四川省人工智能研究院(宜宾)
Dates
- Publication Date
- 20260421
- Application Date
- 20220516
- Priority Date
- 20220516
Claims (5)
- 1. The time sequence knowledge graph embedding and predicting method for the stream scene is characterized by comprising the following steps of: s1, acquiring interaction knowledge in a flow field scene, and preprocessing to obtain preprocessed interaction knowledge; S2, acquiring a direct influence entity and a propagation influence entity of the preprocessed interaction knowledge, wherein the new interaction knowledge can influence the semantics of the goods or the users contained in the new interaction knowledge, and then the influence is taken as the direct influence, and the two entities contained in the new knowledge are called direct influence entities; S3, constructing an update model, and updating embedded representations of the direct influence entity and the propagation influence entity by using the update model to obtain updated direct influence entity and propagation influence entity, wherein the updated direct influence entity and propagation influence entity are specifically as follows: a1, calculating direct influence characteristics of a direct influence entity; A2, calculating propagation influence characteristics of the propagation influence entity; A3, constructing an embedded representation updating function, and updating embedded representations of the direct influence entity and the propagation influence entity according to the embedded representation updating function to obtain updated direct influence entity and propagation influence entity; S4, constructing a reading model, and reading the updated embedded representation of the direct influence entity and the propagation influence entity at the query time according to the reading model, wherein the embedded representation specifically comprises the following steps: c1, constructing a multi-head evolution model to simulate and obtain the updated semantic evolution track of the direct influence entity and the propagation influence entity; c2, calculating a local state vector; c3, constructing a reading model according to the local state vector and the semantic evolution track, and reading the updated embedded representation of the direct influence entity and the propagation influence entity at the query time according to the reading model; And S5, calculating the confidence coefficient of each knowledge according to the embedded representation at the query time by using a scoring function, and predicting future knowledge according to the confidence coefficient of each knowledge.
- 2. The method for embedding and predicting a time sequence knowledge graph for a stream scene according to claim 1, wherein step S1 specifically comprises: The method comprises the steps of collecting interaction knowledge in a current scene, screening the interaction knowledge with a new entity, constructing a new memory space in a knowledge graph, initializing the memory space by utilizing the original characteristics of the new entity, and taking the processed interaction knowledge and the residual interaction knowledge after screening together as the interaction knowledge after preprocessing.
- 3. The method for embedding and predicting a time sequence knowledge graph for a stream scene according to claim 1, wherein the specific calculation mode of the direct influence feature of the direct influence entity in A1 is as follows: Wherein, the Is that Directly influencing entities at time of day Directly influencing the characteristics of (a); a set of knowledge components for all the time sequence knowledge patterns; for all that occurs in Inclusion of time of day directly influencing entities Is a knowledge of interactions of (a); calculating a function for the combination; An embedded representation of relationships between the direct influencing entities; to directly influence the entity At the position of The latest embedded representation before the moment; in the A2, the specific calculation method of the propagation influence characteristics of the propagation influence entity is as follows: Wherein, the Is that All under time to propagate influencing entities A set of paths that are tail; The first matrix of the learnable parameters is a linking operation; as a hyperbolic tangent function; Influencing entities for propagation At the position of The most recent embedded representation before the moment in time, An embedded representation of relationships between entities is affected for each propagation.
- 4. The method for embedding and predicting a time sequence knowledge graph for a stream scene according to claim 1, wherein the embedding and representing the updated construction process in the step A3 is represented as: b1, constructing an erasure volume function, wherein the function is expressed as: Wherein, the Is an erasure vector; Activating a function for sigmoid; the second parameter matrix can be learned, and the coupling operation is shown in the specification; Is an entity Is the influencing feature of (i.e. entity) A direct influencing entity or a propagation influencing entity may be characterized; is a first parameter vector; Is an entity At the position of The latest embedded representation before the moment; b2, constructing a writing quantity function, wherein the function is expressed as: Wherein, the Is a write vector; as a hyperbolic tangent function; a third matrix of learnable parameters; is a second parameter vector; And B3, constructing an embedded representation updating function according to the erasing quantity function and the writing quantity function, and updating embedded representations of the direct influence entity and the propagation influence entity according to the embedded representation updating function to obtain updated direct influence entity and propagation influence entity, wherein the embedded representation updating function is represented as follows: Wherein, the Is that Time updated entity Is used to determine the embedded representation of (a), Is an element product operation.
- 5. The method for embedding and predicting a time sequence knowledge graph for a stream scene according to claim 1, wherein in C1, a semantic evolution track is expressed as: Wherein, the Is an entity At the position of K is the number of evolution heads; Is a sine function; Is an entity At the position of A time stamp of the last update before the time; is an evolution period vector; Is an entity At the position of The latest embedded representation before the moment; In C3, the embedding at the query time is expressed as: Wherein, the Is an entity At the position of Embedded representation at time instant.
Description
Time sequence knowledge graph embedding and predicting method for stream scene Technical Field The invention relates to the technical field of knowledge maps, in particular to a time sequence knowledge map embedding and predicting method for a stream scene. Background The time sequence knowledge graph is taken as a dynamic knowledge base system, and has good application value and considerable application prospect in various fields such as e-commerce recommendation and the like, so that the time sequence knowledge graph is paid attention in recent years. However, due to its implicit symbolic nature and non-euclidean structure, the existing time series knowledge graph is difficult to directly use by a computer, thereby severely limiting the ability of an e-commerce recommendation system to utilize and mine time series knowledge about users. Some people try to simplify the use of time-series user knowledge by using a time-series knowledge pattern embedding method, inspired by a static knowledge pattern embedding method, and become an important research topic in the field in recent years. While existing works can represent the timing knowledge-graph as a low-dimensional vector, their works assume that no new knowledge is added to the timing knowledge-graph. Knowledge in the real world is continuously updated, particularly in an e-commerce recommendation system, a user can continuously click, purchase or comment on goods and communicate with other users, so that new interaction knowledge is continuously added into a time sequence knowledge graph, the scene is called a stream scene, and the existing work mainly faces the following three problems when being applied to the stream scene: (1) New entities (commodities or users) can be accumulated into the time sequence knowledge graph continuously along with the update of the interaction knowledge, but because the existing work directly learns the embedded representation fixed by each entity, the embedded representation cannot be generated for the newly-appearing entities; (2) Clicking, purchasing or commenting actions of the user on the commodity and interaction actions between the users occur at all times in the real world, which results in frequent updating of knowledge, and existing works require regenerating embedded representations of the current time from the head at each time, which results in difficulty in application of the electronic commerce recommendation system requiring quick response; (3) Existing works can only obtain an embedded representation of an entity (commodity or user) under a time stamp with associated knowledge. Disclosure of Invention Aiming at the defects in the prior art, the invention provides a time sequence knowledge graph embedding and predicting method for a stream scene. In order to achieve the aim of the invention, the invention adopts the following technical scheme: on the one hand, a time sequence knowledge graph embedding and predicting method facing to a stream scene comprises the following sub-steps: s1, acquiring interaction knowledge in a flow field scene, and preprocessing to obtain preprocessed interaction knowledge; S2, acquiring a direct influence entity and a propagation influence entity of the preprocessed interaction knowledge; s3, constructing an update model, and updating embedded representations of the direct influence entity and the propagation influence entity by using the update model to obtain updated direct influence entity and propagation influence entity; S4, constructing a reading model, and reading the updated embedded representation of the direct influence entity and the propagation influence entity at the query time according to the reading model; And S5, calculating the confidence coefficient of each knowledge according to the embedded representation at the query time by using a scoring function, and predicting future knowledge according to the confidence coefficient of each knowledge. Preferably, step S1 is specifically: The method comprises the steps of collecting interaction knowledge in a current scene, screening the interaction knowledge with a new entity, constructing a new memory space in a knowledge graph, initializing the memory space by utilizing the original characteristics of the new entity, and taking the processed interaction knowledge and the residual interaction knowledge after screening together as the interaction knowledge after preprocessing. Preferably, step S3 is specifically: A1, calculating direct influence characteristics of a direct influence entity, wherein the calculation formula is expressed as follows: Wherein, the The method comprises the steps of determining a time sequence knowledge graph, wherein the time sequence knowledge graph is a time sequence knowledge graph, the time sequence knowledge graph is a direct influence characteristic of a direct influence entity e i at a time t p, g is a set of all knowledge components of the time sequence knowledge graph, e i,rm,ej,t