Knowledge graph construction method, object recommendation method and related products

By constructing a time-series knowledge graph, generating triples from user behavior records, and combining it with a time-series analysis model, we solved the problem of insufficient timeliness of user relationships in the knowledge graph and improved the accuracy and timeliness of recommendation results.

CN120687619APending Publication Date: 2025-09-23MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510154554.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-11
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing knowledge graphs are difficult to accurately reflect the complex and time-sensitive relationships between users and objects, resulting in inaccurate recommendation results.

Method used

Construct a time series knowledge graph by extracting entities, relationships, and time information from user behavior records, generating triples and establishing nodes and edges to reflect the changes in entity relationships over time, and combining the time series analysis model to predict user interest.

Benefits of technology

It improves the timeliness and accuracy of recommendation results, can capture the dynamic changes of user preferences, and recommend objects that meet personalized preferences for users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687619A_ABST
    Figure CN120687619A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph construction method, an object recommendation method and a related product, which are used for constructing a time sequence knowledge graph which accurately reflects the relationship between a user and an object and the timeliness so as to improve the accuracy of a recommendation result. The knowledge graph construction method comprises the steps of obtaining entities and a first relationship between the entities from a user behavior record, wherein the user behavior record is used for describing an interaction behavior between a user and an object; combining the entity, first time information corresponding to the user behavior record and object information to obtain a first triple; based on the first triad and the first relation, a time sequence knowledge graph is established, nodes in the time sequence knowledge graph represent the first triad, and edges between the nodes represent the first relation between the entities in the first triad.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a knowledge graph construction method, an object recommendation method, and related products. Background Art

[0002] In today's digital age, Knowledge Graph (KG) has been widely integrated into recommendation systems due to its rich semantic capabilities. This aims to enable recommendation systems to deeply understand the complex relationships between users and objects, thereby recommending suitable objects to users.

[0003] How to ensure that the knowledge graph accurately reflects this complex connection is particularly important for improving the accuracy of recommendation results. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a knowledge graph construction method, an object recommendation method and related products for constructing a temporal knowledge graph that accurately reflects the relationship and timeliness between users and objects, thereby improving the accuracy of recommendation results.

[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions: In a first aspect, an embodiment of the present application provides a method for constructing a knowledge graph, including: Acquire entities and first relationships between the entities from user behavior records, where the user behavior records are used to describe interaction behaviors between a user and an object; Combining the entity and the first time information and the object information corresponding to the user behavior record to obtain a first triplet; Based on the first triples and the first relationships, a temporal knowledge graph is established, where the nodes in the temporal knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between entities in the first triples.

[0006] In a second aspect, an embodiment of the present application provides an object recommendation method, comprising: Obtaining a time series knowledge graph, where the time series knowledge graph represents a first relationship between entities in a first triple, where the first triple includes an entity, first time information corresponding to a user behavior record, and object information, where the entity and the first relationship are obtained from the user behavior record, where the user behavior record is used to describe an interaction between a user and an object; Predicting, based on the temporal knowledge graph, a first interest level of a first user in a first object at a first time point; Based on the first interest level, a second object is selected from the first objects and recommended to the first user.

[0007] In a third aspect, an embodiment of the present application provides a knowledge graph construction device, including: A first acquisition module, configured to acquire entities and first relationships between the entities from user behavior records, wherein the user behavior records are used to describe interaction behaviors between a user and an object; A first generating module is configured to combine the entity and the first time information and the object information corresponding to the user behavior record to obtain a first triplet; The first establishment module is used to establish a temporal knowledge graph based on the first triples and the first relationships, where the nodes in the temporal knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between entities in the first triples.

[0008] In a fourth aspect, an embodiment of the present application provides an object recommendation device, comprising: a second acquisition module, configured to acquire a temporal knowledge graph, wherein the temporal knowledge graph represents a first relationship between entities in a first triple, wherein the first triple includes an entity, first time information corresponding to a user behavior record, and object information, wherein the entity and the first relationship are obtained from the user behavior record, and the user behavior record is used to describe the interaction between the user and the object; A prediction module, configured to predict, based on the temporal knowledge graph, a first interest level of a first user in a first object at a first point in time; A recommendation module is configured to select a second object from the first objects and recommend it to the first user based on the first interest level.

[0009] In a fifth aspect, an embodiment of the present application provides an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the knowledge graph construction method provided in the first aspect; or, the processor is configured to execute the instructions to implement the object recommendation method provided in the second aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the knowledge graph construction method provided in the first aspect; or, the electronic device is enabled to execute the object recommendation method provided in the second aspect.

[0011] In the seventh aspect, an embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute part or all of the steps in the knowledge graph construction method provided in the first aspect or the object recommendation method provided in the second aspect.

[0012] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: Considering that user behavior records describe user interactions with objects, such as purchases, reviews, and browsing, they typically contain entities related to the interaction, such as the object's identifier, the object's brand, the user's identifier, and the type of interaction. The relationships between these entities can reflect the complex relationships between users and objects. Furthermore, the time information corresponding to the user behavior records can reflect the timeliness of the relationships between these entities, and the object information corresponding to the user behavior records can provide detailed information about the objects targeted by the interaction. This detailed information provides key clues for a deeper understanding of users' preferences for objects. Based on this, a triple is generated, consisting of an entity, the time information corresponding to the user behavior record, and the object information. Nodes corresponding to the triple are established, and edges are established between the nodes based on the relationships between the entities in the triple. This results in a temporal knowledge graph. The nodes in this temporal knowledge graph provide rich knowledge corresponding to the entities, and the edges in this temporal knowledge graph accurately reflect the evolution of this knowledge over time, including the changes in the complex relationships between users and objects over time. This helps capture the dynamic changes in user preferences, recommend objects that are timely and meet their personalized preferences, and improve the accuracy of recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of a process for constructing a knowledge graph provided in one embodiment of the present application; Figure 2 A flowchart of a knowledge graph construction method provided for another embodiment of the present application; Figure 3 A flowchart of an object recommendation method provided in one embodiment of the present application; Figure 4 A schematic diagram of the structure of a knowledge graph construction device provided in one embodiment of the present application; Figure 5 A schematic structural diagram of an object recommendation device provided in one embodiment of the present application; Figure 6 A schematic structural diagram of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION

[0014] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0015] The terms "first," "second," and the like in this specification and claims are used to distinguish similar objects and are not intended to describe a particular order or precedence. It should be understood that such terms are interchangeable where appropriate so that the embodiments of the present application can be implemented in sequences other than those illustrated or described herein. In addition, the term "and / or" in this specification and claims refers to at least one of the connected objects, and the character " / " generally indicates that the connected objects are in an "or" relationship.

[0016] Some concept descriptions: Temporal Knowledge Graphs (TKGs) are an extension of knowledge graphs that contain not only entities and their relationships, but also information about how these relationships change over time.

[0017] The embodiment of the present application proposes a method for constructing a knowledge graph. Considering that user behavior records describe the interaction between users and objects, such as purchase, evaluation, browsing, etc., they usually contain entities related to the interaction, such as the identifier of the object, the brand of the object, the identifier of the user, the type of interaction, etc. The relationship between these entities can reflect the complex relationship between the user and the object, and the time information corresponding to the user behavior record can reflect the timeliness of the relationship between these entities. The object information corresponding to the user behavior record can reflect the detailed information of the object targeted by the interaction. Such detailed information provides key clues for in-depth understanding of the user's preference for the object. Based on this, a triple containing an entity, the time information corresponding to the user behavior record, and the object information is generated, and nodes corresponding to the triple are established. Edges between nodes are established according to the relationship between entities in the triple, and a temporal knowledge graph is obtained. The nodes in the temporal knowledge graph provide rich knowledge corresponding to the entities, and the edges of the temporal knowledge graph can accurately reflect the evolution of this knowledge over time, including the changes in the complex relationship between users and objects over time, thereby helping to capture the dynamic changes in user preferences, recommend objects that are highly timely and in line with their personalized preferences to users, and improve the accuracy of recommendation results.

[0018] The embodiment of the present application also proposes an object recommendation method, which captures the dynamic changes of user preferences based on the constructed temporal knowledge graph, predicts the user's interest in the recommended objects at a certain point in time, and selects objects that the user is interested in and have strong timeliness based on the interest, thereby improving the accuracy of the recommendation results.

[0019] It should be understood that the knowledge graph construction method and object recommendation method provided in the embodiments of the present application can be executed by an electronic device, specifically by a processor of the electronic device. The electronic devices referred to herein may include terminal devices, such as but not limited to smartphones, tablet computers, laptop computers, desktop computers, intelligent voice interaction devices, smart home appliances, smart watches, vehicle-mounted terminals, aircraft, etc.; or, the electronic device may also include a server, such as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0020] The following describes in detail the technical solutions provided by various embodiments of the present application in conjunction with the accompanying drawings.

[0021] Please refer to Figure 1 , is a flow chart of a knowledge graph construction method provided in one embodiment of the present application, the method comprising the following steps: S102: Obtain entities and first relationships between entities from user behavior records.

[0022] User behavior records are used to describe the interaction between users and objects. Objects can include, but are not limited to, items, services, products, etc. User behavior records can be collected by electronic devices from different data sources, such as from third-party data providers, internal data warehouses, and other data sources. The diversity of data is crucial, as it ensures that the recommendation system can understand user needs from different perspectives. The data collection process can be described by set theory formulas. To formalize it, represents the entire data set, and represents the i-th independent data source. This process requires efficient data synchronization and integration capabilities to enable real-time updates and maintain data freshness and relevance. Furthermore, integrating multi-source data breaks down data silos, enabling the recommendation system to fully utilize available data.

[0023] In the above S102, the entities contained in the user behavior record are identified by performing entity recognition on the user behavior record. The entities may include, but are not limited to: the identifier of the object, the attribute of the object (such as brand), the identifier of the user, the type of interactive behavior, etc. As an example, there are multiple user behavior records. For each user behavior record, the user behavior record is input into the Named Entity Recognition (NER) model for recognition, and the entities contained in the user behavior record can be obtained, that is, ,in, Represents a user behavior record set The i-th user behavior record in the user behavior record set contains n user behavior records. Represents the entity set contained in the i-th user behavior record, which contains at least one entity, Represents a named entity recognition model.

[0024] The first relationship between entities can reflect the complex relationship between users and objects, such as the interaction between users and objects, the affiliation between objects and their attributes, the relationship between different users, the temporal relationship between entities, etc., wherein the temporal relationship between entities usually represents the dynamic connection between entities in the time dimension, such as the state or behavior of an entity at a certain point in time. It emphasizes the temporal order and changes of the interaction behavior, which helps to understand the evolution and timeliness of the user's behavior pattern. In the above S102, various relationship extraction technologies in this field, such as pattern matching technology or machine learning models, can be used to identify the first relationship between entities. As an example, the identified entities are classified by a classifier, such as determining the type of the entity, etc., to form a structured entity set, that is, ,in, Represents the entity set consisting of the identified entities, Represents a structured entity set, Represents a classifier; then, the structured entity set is input into the pre-trained machine learning model to obtain the first relationship between the entities contained in the entity set, that is, ,in, Indicates the first relationship, Represents a machine learning model.

[0025] Each user behavior record also has corresponding first time information and object information, recorded as and ,in, represents the i-th user behavior record, Indicates the first time information corresponding to the i-th user behavior record, Represents the object information corresponding to the i-th user behavior record. First-time information may include, but is not limited to, the time of the interaction described in the user behavior record, the object's effective and ineffective time, and so on. First-time information reveals the temporal relationships and timeliness of interactions, helping to enrich the temporal knowledge graph, enabling a better understanding of how user preferences and behaviors change over time, and thus providing more accurate recommendations.

[0026] Object information describes the attributes or characteristics of the object being interacted with, including but not limited to the object's brand, category, price, size, and color. Object information enriches the temporal knowledge graph to better understand user preferences and behaviors, enabling more accurate recommendations.

[0027] In another embodiment, considering that user behavior records from different data sources may be disorganized, in order to facilitate further analysis and utilization, before the above S102, the user behavior records are also pre-processed, that is, the original user behavior records are converted into a format suitable for further analysis and use, which may specifically include, but is not limited to, at least one of the following processes: data cleaning, removing inconsistencies, filling missing values, data conversion, etc.

[0028] Specifically, the data cleaning process includes: removing or correcting erroneous or incomplete user behavior records in the user behavior record set. , is a cleaning function that includes operations such as deleting duplicate user behavior records and correcting obviously incorrect values. The cleaned user behavior record set can be expressed as .

[0029] Inconsistency removal is used to resolve inconsistencies in user behavior record sets, such as inconsistent data formats from different sources. The process includes: and Indicates two inconsistent sets of user behavior records. is a consistency function, including operations such as unified date format, currency unit, encoding method, etc., then the consistent user behavior record set can be expressed as .

[0030] Filling missing values ​​is used to fill missing values ​​in the data set. The process includes: is a user behavior record set with missing values. is a fill function, is a missing data item, then the filled dataset It can be expressed as .

[0031] Here we use the median to fill in. Specifically, we first need to calculate the median of each column. Represents a user behavior record set The jth column in the median of is a value such that at least half of the non-missing data items are less than or equal to , and at least half of the non-missing data items are greater than or equal to Then, we define the filling function is a function that replaces missing values ​​with the median of the corresponding feature. Each column in and each data item (value of row i and column j), the filling function can be defined as ,in is the filled data item. Apply this filling function to the entire user behavior record set , get the filled data set ,in is the number of records.

[0032] The data conversion process includes normalization and encoding, which converts the data into a format suitable for subsequent processing. Indicates the user behavior record set that needs to be converted. is a conversion function, then the converted user behavior record set can be expressed as . Among them, normalization (such as minimum-maximum normalization) can be expressed as .

[0033] These preprocessing steps ensure that the user behavior records provided to the knowledge graph construction and recommendation system are accurate, consistent, clean, and suitable for use in machine learning models. This preprocessing process is crucial to improving the performance of the final recommendation system.

[0034] S104: Combine the first time information and object information corresponding to the entity and user behavior record to obtain a first triplet.

[0035] The first triplet includes an entity, the first time information corresponding to the user behavior record, and the object information. As an example, the first triplet is represented as ,in, Represents a user behavior record set The i-th user behavior record in Represents the entity set contained in the i-th user behavior record, represents the j-th entity in the entity set, Indicates the first time information corresponding to the i-th user behavior record, Indicates the object information corresponding to the i-th user behavior record.

[0036] The first triplet provides rich knowledge corresponding to the entity. By analyzing the relationship between the first triplet, it helps to accurately understand the user's behavior patterns, the popularity trends and temporal changes of the object, and then helps to capture the dynamic changes in user preferences, providing reliable data support for providing more personalized and timely recommendation solutions.

[0037] S106: Establish a temporal knowledge graph based on the first triple and the first relationship.

[0038] The nodes in the temporal knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between the entities in the first triples.

[0039] In one embodiment, the above S106 includes the following steps: S161a, establishing a node corresponding to the first triple; S162a, establishing an edge between the nodes based on the first relationship between the entities in the first triple; S163a, establishing a temporal knowledge graph based on the nodes and the edges between the nodes.

[0040] For example, a user behavior record describes user 1 browsing object 1 at time t1. From this user behavior record, we identify entity e1 representing user 1 and entity e2 representing object 1. Object information for object 1 is F1, and the first time information corresponding to this user behavior record is t1. This yields two first triples: (e1, t1, F1) and (e2, t1, F2). Furthermore, we create two nodes, representing these first triples. Because the first relationship between these two entities is a browsing relationship, we create an edge between these two nodes, indicating that user 1 browsed object 1.

[0041] In another embodiment, the above S106 includes the following steps: S161b, establishing a node corresponding to the first triple; S162b, establishing an edge between the nodes based on the first relationship between the entities in the first triple; S163b, determining the second time information of the first relationship based on the first time information; S164b, adding the second time information to the connecting edge between the nodes to obtain a temporal knowledge graph.

[0042] In the above S163, as an example, the first time information can be determined as the second time information of the first relationship. For example, taking the two first triples (e1, t1, F1) and (e2, t1, F2) as an example, t1 is used as the second time information of the first relationship between entities e1 and e2.

[0043] As another example, the first time information may be analyzed to determine the validity period, occurrence time, etc. of the first relationship, and the analysis result may be used as the second time information of the first relationship.

[0044] In the above S164 , as an example, for each edge, the second time information of the first relationship represented by the edge may be used as an attribute of the edge.

[0045] In another embodiment, after S164, the method further includes: generating a second triple based on the first node, the second node, and the edge between the first node and the second node, wherein the second triple includes the entity in the first triple corresponding to the first node, the edge between the first node and the second node, and the second node; and adding corresponding second time information to the first relationship represented by the edge between the first node and the second node in the second triple to obtain a quadruple, wherein the first node and the second node are any two nodes.

[0046] For example, the entity in the first triple corresponding to the first node is , the entity in the first triplet corresponding to the second node is , the first relationship between the two is , the second time information of the first relationship is , then the generated quadruple is represented as ,in, represents a temporal knowledge graph, Represents an entity set containing all entities.

[0047] Therefore, the obtained quadruple can not only clearly and directly represent the complex relationships and the timeliness of the relationships in the temporal knowledge graph, but also facilitate the storage, subsequent processing and use of the temporal knowledge graph.

[0048] The above describes some implementation methods of the above S106. Of course, it should be understood that the above S106 can also be implemented in other ways, and the present embodiment of the application does not limit this.

[0049] In another embodiment, Figure 2 As shown, considering that user behavior records are dynamically changing, in order to adapt the time series knowledge graph to such dynamic changes, after the above S106, the following steps are further included: S108 : In response to monitoring a newly added user behavior record in the data source, obtaining a newly added entity and a second relationship between the newly added entities from the newly added user behavior record.

[0050] The specific implementation of obtaining the newly added entity and the second relationship between the newly added entities from the newly added user behavior record is similar to the specific implementation of S102 above and will not be repeated here.

[0051] S110, generating a new first triple, and adding a node corresponding to the new first triple in the temporal knowledge graph.

[0052] The new first triplet includes a newly added entity, the first time information corresponding to the newly added user behavior record, and the object information.

[0053] The specific implementation of the above S110 is similar to the above method of generating the first triple and establishing the node corresponding to the first triple, and will not be repeated here.

[0054] S112, based on the second relationship between the newly added entities in the new first triple, add edges between the nodes corresponding to the new first triple in the temporal knowledge graph.

[0055] The specific implementation of S112 is similar to the specific implementation of establishing the edge between the nodes in the first triplet above, and will not be repeated here.

[0056] Specifically, if Indicates at a point in time The temporal knowledge graph is at the time point The temporal knowledge graph can be expressed as ,in, Represents the newly added entities between time points t and t+1 and the second relationships between the newly added entities.

[0057] In the embodiment of the present application, the monitoring of the data source can be carried out in real time to achieve real-time update of the time series knowledge graph. Specifically, in response to monitoring the new user behavior records in the data source, the new user behavior records are input into the stream processing engine (such as Apache Kafka, Apache Flink, etc.) to process the real-time incoming user behavior records, so as to capture, convert and load the real-time entities and the second relationships between entities, and quickly integrate these new information into the time series knowledge graph, that is, ,in, Represents a stream processing engine, Indicates user behavior records collected in real time. Represents the temporal knowledge graph before updating.

[0058] In the embodiment of the present application, the monitoring of the data source can also be performed regularly, and the current time series knowledge graph can be updated in batches at regular time points to incorporate trends and patterns that require long-term observation to identify. Batch jobs are usually triggered by a set scheduling algorithm (such as CRON jobs). These jobs can be reconstruction of the time series knowledge graph or incremental updates of the time series knowledge graph, that is: ,in, represents the update algorithm, Represents the current temporal knowledge graph.

[0059] Real-time updates and scheduled updates to data sources can work together to enable the time series knowledge graph to reflect changes in real-time data while integrating long-term accumulated data changes to maintain the dynamism and depth of knowledge.

[0060] Through this implementation, new entities and the relationships between new entities can be added while retaining the existing temporal knowledge graph, thereby maintaining the timeliness and accuracy of the temporal knowledge graph to adapt to the ever-changing data and environment, and further improving the accuracy of the recommendation results.

[0061] In another embodiment of the present application, after the above S112, the temporal knowledge graphs at different time points can be fused to form a coherent temporal knowledge graph. Specifically, the fused temporal knowledge graph can be represented as ,in, and Respectively represent the start and end time points of the time range.

[0062] In another embodiment of the present application, for the fused temporal knowledge graph, the time series analysis method can also be used to mine the change patterns of entities and relationships over time from the temporal knowledge graph, that is, ,in, Represents the change pattern mined from the temporal knowledge graph, Represents the event sequence analysis method.

[0063] Among them, time series analysis methods may include, for example, but are not limited to: Moving Average (MA) method, Autoregressive (AR) model, Autoregressive Moving Average (ARMA) model, Autoregressive Integrated Moving Average (ARIMA) model, Seasonal Autoregressive Integrated Moving Average (SARIMA) model, Recurrent Neural Network (RNN), Long Short-Term Memory Network (LSTM), etc.

[0064] Variation patterns may include, but are not limited to, cyclical patterns, trend patterns, and anomaly patterns. A cyclical pattern refers to a pattern that recurs at regular intervals. For example, in the retail industry, the weekend shopping peak is a typical cyclical pattern. A trend pattern describes how data changes over time, such as whether sales of a particular product have gradually increased or decreased over the past year. Anomaly patterns are used to identify events that deviate significantly from normal patterns, which is particularly important for monitoring systems and risk management.

[0065] In this way, meaningful information and patterns can be extracted from the large amount of time series data contained in the time series knowledge graph. This information and patterns usually reflect the changes in a series of events within a specific time period, and the mined patterns can help enterprises and organizations make more informed decisions.

[0066] One or more embodiments of the present application provide a method for constructing a knowledge graph. Considering that user behavior records describe the interaction between users and objects, such as purchase, evaluation, browsing, etc., they usually contain entities related to the interaction, such as the object's identifier, the object's brand, the user's identifier, the type of interaction, etc. The relationship between these entities can reflect the complex relationship between users and objects, and the time information corresponding to the user behavior records can reflect the timeliness of the relationship between these entities. The object information corresponding to the user behavior records can reflect the detailed information of the object targeted by the interaction. Such detailed information provides key clues for in-depth understanding of the user's preferences for objects. Based on this, a triple containing an entity, the time information corresponding to the user behavior record, and the object information is generated, nodes corresponding to the triple are established, and edges between nodes are established based on the relationships between entities in the triples to obtain a temporal knowledge graph. The nodes in the temporal knowledge graph provide rich knowledge corresponding to the entities, and the edges of the temporal knowledge graph can accurately reflect the evolution of this knowledge over time, including the changes in the complex relationship between users and objects over time, thereby helping to capture the dynamic changes in user preferences, recommend objects that are highly timely and in line with their personalized preferences to users, and improve the accuracy of recommendation results.

[0067] Based on the constructed temporal knowledge graph, this embodiment of the application also provides an object recommendation method. Please refer to Figure 3 , is a flow chart of an object recommendation method provided in one embodiment of the present application, the method comprising the following steps: S302, obtaining a time series knowledge graph.

[0068] The temporal knowledge graph represents a first relationship between entities in a first triple. The first triple includes an entity, first time information corresponding to a user behavior record, and object information. The entity and first relationship are obtained from the user behavior record, which is used to describe the interaction between the user and the object.

[0069] As an example, the temporal knowledge graph can be obtained through the knowledge graph construction method provided in the embodiments of the present application.

[0070] S304: Predicting a first interest level of a first user in a first object at a first time point based on the temporal knowledge graph.

[0071] The first user can be any user of the recommended object. The first object refers to the object to be recommended. The first interest level is used to measure the first user's interest in the first object at a first point in time. The first time point refers to the time when the object is recommended to the first user. It can be set according to actual needs and is not limited in this embodiment of the application.

[0072] Since the nodes in the temporal knowledge graph provide rich knowledge corresponding to entities, the edges of the temporal knowledge graph can accurately reflect the evolution of this knowledge over time, including the changes in the complex relationship between users and objects over time. Therefore, from the temporal knowledge graph, we can capture the dynamic changes in user preferences and accurately predict the first user's first interest in the first object at the first time point.

[0073] In one embodiment, the above S304 includes the following steps: S341, obtaining first time series data of the first user before the second time point from the time series knowledge graph.

[0074] The second time point is earlier than the first time point. The first time series data includes but is not limited to: the first interactive behavior sequence of the first user, and the object information of the object targeted by each first interactive behavior in the first interactive behavior sequence. The object information of the object may, for example, include but is not limited to the attribute information and multimodal information of the object. Among them, the attribute information is used to describe the attributes of the object, and specifically may include but is not limited to: the brand, category, price, size, color, etc. of the object. Multimodal information may, for example, include but is not limited to: text related to the object (such as description text and comment text of the object), images (such as promotional images of the object), videos (such as demonstration videos and introduction videos of the object), voice (such as conversation voice about the object, introduction voice of the object), and other information.

[0075] In addition, the first time series data may further include context information for each first interactive behavior. The context information may include, but is not limited to, factors influencing the first interactive behavior, such as the location and device where the first user performs the first interactive behavior, the type of the first interactive behavior, and the weather at the time of the first interactive behavior.

[0076] As an example, a first entity representing a first user and a second entity representing an object can be obtained from a time-series knowledge graph. Then, based on the first relationship between the first and second entities and the second time information of the first relationship, the first interaction behavior of the first user before the second time point is determined. By arranging these first interaction behaviors in chronological order, a first interaction behavior sequence can be obtained. Furthermore, object information of the object represented by the second entity is obtained from the first triple to which the second entity belongs.

[0077] For example, the entities representing user 1 obtained from the temporal knowledge graph include entity 11, and the entities representing objects include entities 21 to 23. Among them, the first relationship between entity 11 and entity 21 is browsing, the second relationship between entity 11 and entity 22 is purchasing, and the first relationship between entity 11 and entity 23 is commenting. Then the following first interaction behavior sequence {(e1, t1), (e2, t2), (e3, t3)} can be obtained, where ei represents the i-th first interaction behavior, and ti represents the time point of occurrence of the i-th first interaction behavior.

[0078] Assuming that the first two first interaction behaviors are directed to object 1 and the third first interaction behavior is directed to object 2, object information of object 1 and object information of object 2 are acquired.

[0079] S342: Predicting a first interest level of a first user in a first object at a first time point based on the first time series data.

[0080] In the above S342 , the first degree of interest may be predicted by any of the following methods.

[0081] In one embodiment, the above S342 includes the following steps: Step A1: predicting a second interest level of a first user in a first object at a first time point based on the object targeted by each first interactive behavior in a first interactive behavior sequence.

[0082] As an example, the above step A1 includes the following steps: Step A11: determining a first interaction frequency between the first user and the first object based on the object targeted by each first interaction behavior in the first interaction behavior sequence.

[0083] The first time period is a period between a first time point and a second time point. The first interaction frequency refers to the frequency of the first user interacting with the first object before the second time point.

[0084] Specifically, the first interaction frequency can be obtained by the following formula (1): (1) in, represents the interaction frequency between the first user and the first object, represents the number of interactions between the first user and the first object e, Indicates the total number of interactions between the first user and all objects.

[0085] For example, the first behavior sequence includes n first interaction behaviors. If m (m≤n) of the first interaction behaviors are directed at the first object, then the total number of interactions between the first user and all objects in the first time period is n, the number of interactions between the first user and the first object in the first time period is m, and the first interaction frequency between the first user and the first object is m / n.

[0086] A higher first interaction frequency, for example, the first user frequently clicks, browses, or purchases the first object within the first time period, indicates that the first user has a higher level of interest in the first object.

[0087] Step A12: predicting the second interest level based on the interaction frequency, the preset decay rate, and the duration of the first time period.

[0088] Taking into account that the user's interest in an object usually gradually decays over time, based on this, the interaction frequency can be used as the first user's interest in the first object at the second time point (also called initial interest). According to the preset decay rate and the length of the first time period, the decay of the initial interest in the first time period is determined, and then the second interest is obtained.

[0089] As an example, an exponential decay model is used to simulate the change of the first user's interest over time. In this case, the second interest level can be determined by the following formula (2): (2) in, Indicates the second interest level, represents the initial interest of the first user at the second time point, Indicates the preset attenuation rate, Indicates the duration of the first period. In actual applications, different decay rates can be set for different users.

[0090] As another example, before step A12, the method further includes: obtaining a second interaction behavior sequence between the first user and the first object within the first time period from the time-series knowledge graph, and determining the frequency of occurrence of each second interaction behavior in the second interaction behavior sequence. Accordingly, in step A12, the second interaction frequency of the first user and the first object at the first time point is predicted based on the first interaction frequency, a preset decay rate, and the duration of the first time period; and the second interest level is determined based on the second interaction frequency and the frequency of occurrence of each second interaction behavior.

[0091] For example, the second interest level can be determined by the following formula (3): (3) in, Indicates the second interest level, Represents the second interaction behavior sequence The second interaction behavior in The corresponding weight, Indicates the number of second interactive behaviors included in the second interactive behavior sequence, represents the duration between the occurrence time point of the i-th second interaction behavior and the first time point, represents the occurrence frequency of the i-th second interaction behavior.

[0092] As can be seen, in this approach, the second interactive behavior sequence (such as clicks, browsing, etc.) decays over time, affecting the frequency of interaction between the first user and the first object. As the number of interactive behaviors increases, the interaction frequency is affected and gradually adjusted. This adjustment process is dynamic, reflecting the dynamic changes in the first user's interest in the first object, helping the recommendation system continuously adapt to the changes in the first user's interests.

[0093] For example, the second interest level can also be determined by the following formula (4): (4) in, Indicates the second interest level, Represents the second interaction behavior sequence The second interaction behavior in The corresponding weight, Indicates the number of second interactive behaviors included in the second interactive behavior sequence, represents the occurrence frequency of the i-th second interaction behavior.

[0094] It can be seen that in this method, if the first object appears frequently in the first user's recent behavior, the first user's second interest in the first object will increase. The second interest obtained in this way fully considers the impact of the first user's real-time interactive behavior on the degree of interest, which helps the recommendation system to continuously adapt to changes in the first user's interests.

[0095] As another example, the above step A1 includes the following steps: encoding the first interaction behavior sequence and the object targeted by each first interaction behavior sequence and inputting them into a time series analysis model (such as LSTM) to obtain the second interest level of the first user in the first object at the first time point.

[0096] The time series analysis model not only considers time decay but also captures underlying patterns and trends in the first user's interactions. For example, the first user may show different interests in certain items due to seasonal changes, unexpected events, or other contextual changes. The time series analysis model can predict the first user's future changes in interest in a particular item based on the sequence of first interaction behaviors, thereby helping the recommendation system more accurately predict the first user's interest trends.

[0097] As another example, the above-mentioned step A1 includes the following steps: determining the first interaction frequency between the first user and the first object based on the object targeted by each first interaction behavior in the first interaction behavior sequence; predicting the seventh interest level of the first user in the first object at the first time point based on the first interaction frequency, the preset attenuation rate and the length of the first time period; encoding the first interaction behavior sequence and the object targeted by each first interaction behavior sequence and inputting them into a time series analysis model (such as LSTM) to obtain the eighth interest level of the first user in the first object at the first time point; determining the weighted sum of the seventh interest level and the eighth interest level to obtain the second interest level.

[0098] It can be seen that this method can effectively simulate the decay process of the first user's interest in the first object by taking into account the time decay model, but it is usually predicted based on a fixed decay rate, and does not take into account the complex pattern of the first user's interest in the first object changing over time. For example, the first user's interest in the first object may fluctuate or recover in a short period of time, and the time decay model cannot effectively capture these changes. The time series analysis model can automatically learn the changing pattern of the first user's interest in the first object from the first interactive behavior sequence through training, and predict future interest trends, so it can provide more flexible and personalized recommendations. To this end, by integrating the interests predicted by the two methods, the two methods can be effectively combined, and the resulting second interest is more accurate.

[0099] In practical applications, the weight of each method can be set according to actual needs. For example, if the performance of the timing analysis model is better, a larger weight is set for the timing analysis model.

[0100] Step A2: predicting the third interest level of the first user in the first object at the first time point based on the context information.

[0101] Specifically, in the above step A2, the prediction can be made by a context-aware model, such as a factorization machine (FM). The model can capture the interaction between different information from the context information, thereby accurately predicting the first user's interest level in the first object in a specific context as the third interest level.

[0102] The above-mentioned step A2 may include the following steps: splicing the user identifier of the first user, the object identifier of the object targeted by each first interactive behavior, and the context information of each first interactive behavior to obtain a first feature vector, wherein the first feature vector includes multiple first features; converting each first feature into a corresponding latent vector; predicting the third interest level based on the weighted sum between multiple first features, the dot product between different first features, and the dot product between the latent vectors corresponding to different first features.

[0103] For example, the context information of each first interaction behavior can be expressed as , the interaction between the first user and the object is represented as ,in, Indicates the first user, to represents the object interacting with the first user, the user ID of the first user, the object ID of each first interactive behavior, and the context information of each first interactive behavior are spliced ​​together to obtain the first feature vector .

[0104] The third interest level can be determined by the following formula (5): (5) in, Indicates the third degree of interest, and are the parameters of the context-aware model, represents the global bias, Represents the i-th feature in the first eigenvector The weight of Representation characteristics The latent vector and features of The dot product between the latent vectors of , which is used to model the interaction between features, is the dimension of the first eigenvector.

[0105] Through the above method, the first interaction behavior sequence of the first user can be combined with the context information of each first interaction behavior to more accurately capture the complex interaction between different information, thereby improving the prediction accuracy of the third interest level and providing reliable data support for improving the recommendation accuracy and personalization level.

[0106] Step A3: predicting the first user's fourth interest level in the first object at the first time point based on the first interaction behavior with respect to the first object, the attribute information of the first object, and the multimodal information of the first object.

[0107] Specifically, in the above step A3, the prediction can be performed by a deep neural network that processes multimodal information, such as a multimodal neural network (MMNN). The model can extract features from information of different modalities, and then fuse these features to learn the complex nonlinear relationship between these features to predict the fourth interest of the first user in the first object.

[0108] The above-mentioned step A3 may include the following steps: converting the first interactive behavior for the first object into a second feature vector; converting the attribute information into a third feature vector; converting the multimodal information into a fourth feature vector; fusing the second feature vector, the third feature vector and the fourth feature vector to obtain a fifth feature vector; inputting the fifth feature vector into a deep neural network for prediction to obtain a fourth degree of interest.

[0109] Exemplarily, converting the first interactive behavior, attribute information, and multimodal information into corresponding feature vectors can be implemented by corresponding deep learning models, such as but not limited to Word2Vec model, BERT model, and Convolutional Neural Networks (CNN).

[0110] The fourth interest level can be determined by the following formula (6): (6) in, Indicates the fourth degree of interest, represents the fifth eigenvector, 、 、 and are the parameters of the deep neural network, and represents the weight matrix, and represents the bias term, represents the activation function, Represents another activation function.

[0111] Through the above method, features can be extracted from information of different modalities, and then these features can be fused to learn the complex nonlinear relationship between these features, thereby improving the prediction accuracy of the fourth degree of interest and providing reliable data support for improving the accuracy and personalization of recommendations.

[0112] In another embodiment, before step A4, it also includes: generating a first feature set including multiple second features and a second feature set corresponding to each second feature based on the first time series data, the second feature set does not include the corresponding second feature; predicting the fifth interest level of the first user in the first object at the first time point based on the first feature set, and predicting the sixth interest level of the first user in the first object at the first time point based on the second feature set; determining the importance of the second feature corresponding to the second feature set based on the difference between the fifth interest level and the sixth interest level.

[0113] The importance of the second feature is used to indicate the contribution of the second feature to the interest prediction result.

[0114] Exemplarily, each piece of information in the first time series data can be used as a second feature, thereby obtaining a first feature set containing multiple second features. For example, the behavioral feature of each first interactive behavior in the first interactive behavior sequence can be used as a second feature, each piece of information in the context information of each first interactive behavior can be used as a second feature, and each piece of information in the object information of the object targeted by the first interactive behavior can be used as a second feature; based on these second features, a first feature set is obtained; then, for each second feature, the second feature is deleted from the first feature set to obtain a second feature set corresponding to the second feature.

[0115] Furthermore, the first feature set is input into a pre-selected and trained deep learning model for prediction to obtain a fifth degree of interest, and the second feature set corresponding to each second feature is input into the deep learning model for prediction to obtain a sixth degree of interest corresponding to each second feature.

[0116] Furthermore, the importance of each second feature is determined by the following formula (7): (7) in, represents the importance of the i-th second feature, represents the first feature set, Indicates the fifth level of interest, represents the second feature set corresponding to the i-th second feature, represents the sixth interest level corresponding to the second feature set, represents the number of second features contained in the first feature set; Is a coefficient used to represent the possibility of the arrangement of the jth second feature in all second feature combinations, indicating that The fairness adjustment when selecting the jth second feature from the jth second features is used to weight all possible combinations of second features, ensuring that the contribution of each combination is weighted according to its importance in all permutations; Represents the second feature set The number of permutations of the second feature in . represents the number of permutations of the remaining second features except the j-th second feature; Represents the total number of permutations of all second features.

[0117] In some other optional ways, the importance of the second feature can also be obtained by using the Shapley Additive ExPlanation (SHAP) method.

[0118] It can be seen that through the above embodiment, the sharing of the prediction result by each second feature used to predict the interest level can be intuitively reflected, so that the object recommendation result has explainability and transparency, that is, the basis for recommending the first object to the first user is clearly displayed.

[0119] In another embodiment, after obtaining the importance of each second feature in the first feature set, the importance of each second feature can be displayed using a visualization tool such as a bar chart. In addition, an explanation model shown in the following formula (8) can be constructed: (8) in, represents the first feature set, , used to generate user-friendly explanatory text; represents the i-th second feature, and the mode of each second feature may be different; Represents the second feature the importance of Is the model The explanation output is the weighted sum of all second features, with the weight being the importance of each second feature. It can help us understand how to predict the interest level based on the second feature of the input. Specifically, The contribution of each second feature to the final prediction result is given to help users understand the interest level and how to get the recommendation results based on it.

[0120] Step A4: determining the first interest level based on the second interest level, the third interest level, and the fourth interest level.

[0121] As an example, a weighted sum of the second degree of interest, the third degree of interest, and the fourth degree of interest is determined as the first degree of interest.

[0122] As another example, an average of the second degree of interest, the third degree of interest, and the fourth degree of interest is determined as the first degree of interest.

[0123] As another example, the first interest level is obtained by taking a weighted sum of the second, third, and fourth interest levels, as well as the importance of each second feature in the first feature set. This approach comprehensively considers the impact of all second features on the interest level and the importance of each second feature. The resulting first interest level can more accurately reflect the first user's preference for the first object at the first point in time, helping to recommend objects that meet the first user's preferences and are highly timely.

[0124] Of course, it should be understood that the above S304 can also be implemented in other ways, such as using the interest level obtained in any of the above steps A1 to A3 as the first interest level, which is not limited in this embodiment of the present application.

[0125] S306: Based on the first interest level, select a second object from the first object and recommend it to the first user.

[0126] As an example, if the first user's interest in the first object at a first time point is greater than an interest threshold, the first object is recommended to the first user as the second object. As another example, if there are multiple first objects, they are sorted in descending order of first interest, and the first objects that rank in the top specified number of digits (e.g., the top 10%) are recommended to the first user as the second object.

[0127] In another embodiment, after the above S306, feedback information of the first user on the recommended second object may be collected, such as the first user's third interactive behavior on the second object, etc., to evaluate whether the first user is interested in the second object; further, based on the evaluation results, the second object recommended to the first user is continuously updated to improve the recommendation accuracy.

[0128] For example, if the first user interacts with the second object multiple times within the second time period after the first time point, it is determined that the first user is interested in the second object; if the number of times the first user interacts with the second object within the second time period after the first time point is less than the number threshold, it is determined that the first user is not interested in the second object, and then by optimizing the objective function, the parameters of the model used to predict the first interest level are continuously updated and iterated to obtain a new second object.

[0129] As an example, the objective function is shown in the following formula (9): (9) in, represents a second object of interest to the first user, Represents the first object, Indicates the second interest level, Indicates the third degree of interest, Indicates the fourth degree of interest, represents the importance of each second feature used to predict the first user's first interest in the first object, 、 、 as well as Represents weight.

[0130] By continuously adjusting the model parameters and weights, the resulting second object achieves an optimal balance across different dimensions. For example, in different scenarios, the focus may be on user interest mining or context-aware recommendations, while in other scenarios, interpretability or multimodal fusion may be considered more important.

[0131] One or more embodiments of the present application provide an object recommendation method that, based on a constructed temporal knowledge graph, captures the dynamic changes in user preferences, predicts the user's interest in the recommended objects at a given point in time, and, based on that interest, selects and recommends objects of interest to the user that are time-sensitive, thereby improving the accuracy of the recommendation results. Furthermore, during the cold start phase, new users or new objects often lack sufficient historical data to generate effective recommendations. This object recommendation method, which utilizes the relationships between entities in the temporal knowledge graph to recommend objects, can effectively alleviate the cold start problem.

[0132] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0133] In the embodiments of this application, each step in the above-mentioned knowledge graph construction method and object recommendation method can be implemented by different data processing layers of the recommendation system. This flexible architectural design ensures that recommendation quality is maintained even when data distribution changes, improving the robustness and scalability of the recommendation system.

[0134] In one embodiment, the recommendation system includes: a data layer, a knowledge graph layer, a dynamic update layer, a recommendation algorithm layer, a service layer, an application layer, an evaluation and feedback layer, and an infrastructure layer.

[0135] Specifically, the data layer is used to obtain user behavior records from the data source, pre-process the user behavior records, and extract entities and the first relationships between entities from the pre-processed user behavior records. The knowledge graph layer is used to construct a time-series knowledge graph based on the entities and the first relationships between entities obtained by the data layer. The dynamic update layer is used to dynamically update the time-series knowledge graph, such as real-time updates or scheduled updates. The recommendation algorithm layer is used to predict the first user's first interest in the first object based on the time-series knowledge graph, so as to select the second object that the first user is interested in from the first object and recommend it to the first user. The service layer is the front-end interface for the interaction between the user and the system, and is also a direct manifestation of the implementation of the recommendation system function. The service layer is mainly responsible for processing user requests, providing the necessary computing resources to generate recommendations, and ensuring the availability, reliability and security of all services.

[0136] For example, Application Programming Interface (API) endpoints are core components of the service layer, defining how users interact with the recommendation system. These endpoints accept user queries, pass them to backend processing logic, and return recommendations to the user. The user interface (UI) is the intuitive platform for user operations, typically consisting of a webpage or mobile app. UI design focuses on user experience, enabling users to easily browse recommendations and interact based on their preferences. Recommender system monitoring ensures the healthy operation of the service layer. By monitoring system performance metrics such as response time, error rate, and traffic in real time, issues are promptly identified and resolved, ensuring a consistent and efficient user experience. Security mechanisms include a range of policies and tools to defend against external attacks and internal vulnerabilities, protecting user data and privacy. These include data encryption, authentication and authorization, and intrusion detection systems, ensuring the secure and stable operation of the recommendation system. In the service layer, load balancers distribute incoming requests to different servers to avoid overloading any single point. This is crucial for maintaining high availability and scalability. The service layer also includes caching mechanisms to store frequently accessed data or recommendation results. This reduces the number of requests to the backend system, speeds up responses, and improves overall performance. When backend services are unavailable or take too long to respond, the service layer can automatically downgrade or circuit-breaker services to avoid system crashes, which helps improve system robustness. The design and implementation of the service layer is crucial to the success of the entire recommendation system architecture. It not only addresses technical challenges, such as how to quickly and accurately generate recommendations, but also considers multiple factors, such as user experience and system security. By continuously optimizing the service layer, we can improve user satisfaction, enhance system stability and security, and ultimately drive the success of the entire recommendation system.

[0137] The application layer sits above the service layer and is the layer that users directly interact with and use. This layer typically includes various user-facing applications and services, showcasing the capabilities of the underlying data, analytics, and recommendation systems through a user-friendly interface.

[0138] As an example, the application layer provides a graphical user interface (GUI) or command line interface (CLI) that allows users to intuitively interact with the recommendation system. In a recommendation system, the interactive interface includes complex data visualization, search bars, filtering tools, and personalized recommendation lists. The application layer provides personalized recommendations to users by analyzing user data and behavior and leveraging the semantic relevance of the temporal knowledge graph. These recommendations are products, content, social connections, or anything else related to the user's interests. At the application layer, the recommendation system can generate and provide reports or dashboards to help users understand the context and basis of the recommendations. This includes the recommended entities, the relationships between them, and the user's interaction history with the recommended content. Users can initiate queries through the application layer, and the system will provide responses based on the real-time knowledge graph. These query processing often requires a high degree of dynamics and personalization to meet the user's specific needs. The application layer often includes a feedback mechanism that allows users to evaluate the recommendation results. This feedback is used to further train and optimize the recommendation algorithm, enabling collaborative learning. The application layer is designed to be cross-platform and can run on different devices and operating systems, including desktops, mobile devices, and even accessed through browsers. Recommendation systems emphasize real-time performance, and the application layer needs to be able to handle real-time data streams and user interactions, promptly updating recommended content and the user interface. The design and functionality of the application layer directly impact user experience and satisfaction, so it must be easy to use, responsive, and provide value. In a recommendation system, the application layer must not only demonstrate the power of the underlying technology but also be user-centric, providing an intuitive, interactive, and personalized experience.

[0139] The evaluation and feedback layer is a crucial component, responsible for collecting user feedback, evaluating system performance, and adjusting recommendation strategies accordingly. This layer ensures the recommendation system's self-optimization and continuous improvement to provide more accurate and personalized recommendations. It is primarily divided into two modules: the evaluation module and the feedback collection module. The evaluation module aims to measure the performance of the recommendation system by analyzing user feedback and interaction data, and optimizes the algorithm and user experience accordingly. This is typically achieved through implementing data collection mechanisms, monitoring performance metrics, conducting user satisfaction surveys, and using statistical and machine learning techniques. The feedback collection module aims to capture users' direct reactions and behavioral patterns to recommended content, typically through rating systems, comment functions, click tracking, and behavior logging in the user interface.

[0140] The evaluation and feedback layer serves multiple functions. It's not just a platform for data collection and processing; it also drives system self-improvement. By continuously evaluating user feedback and system performance, the recommendation system can adapt to changes in user behavior, continuously improving recommendation quality and user satisfaction. The design and implementation of this layer is crucial to building a dynamic and sustainable recommendation system.

[0141] The infrastructure layer is the foundation of the entire architecture, providing the necessary hardware and software resources to support upper-layer applications and services. In recommendation systems, the infrastructure layer primarily considers scalability and leverages cloud services and edge computing technologies to support large-scale data processing. Specifically, the infrastructure layer includes the following aspects: (1) Cloud services: Cloud services provide elastic computing, storage, and network resources, enabling systems to scale dynamically based on real-time demand. Cloud platforms such as AWS, Azure, or Google Cloud Platform (GCP) offer a variety of services and tools to help enterprises easily scale their infrastructure.

[0142] (2) Edge computing: Edge computing brings computing power close to the data source, such as the user's mobile device or IoT device. This can reduce latency, improve response speed, and reduce bandwidth requirements for central data centers. In recommendation systems, edge computing can be used to process real-time user interaction data and provide users with faster recommendation services.

[0143] (3) Data storage and processing: The infrastructure layer also includes data storage and processing systems that support time-series knowledge graphs and deep learning models. These systems need to be able to process and analyze large amounts of data and be able to scale horizontally as the amount of data increases.

[0144] (4) Network facilities: Efficient network facilities are key to ensuring fast data transmission and high service availability. In cloud and edge computing environments, network facilities need to be able to support cross-regional data synchronization and service coordination.

[0145] By integrating these elements at the infrastructure layer, recommendation systems can ensure scalability and high performance, even when data volumes and user requests surge. This flexibility and scalability are key to enabling modern recommendation systems to provide continuous service in complex and changing environments.

[0146] Based on the same inventive concept, this embodiment of the application also provides a knowledge graph construction device. Figure 4 , is a structural diagram of a knowledge graph construction device 400 provided in an embodiment of the present application, and the device 400 includes: a first acquisition module 410, a first generation module 420 and a first establishment module 430.

[0147] The first acquisition module 410 is configured to acquire entities and first relationships between the entities from user behavior records, where the user behavior records are used to describe the interaction behavior between a user and an object.

[0148] The first generating module 420 is configured to combine the first time information and the object information corresponding to the entity and the user behavior record to obtain a first triplet.

[0149] The first establishing module 430 is used to establish a temporal knowledge graph based on the first triples and the first relationships, where the nodes in the temporal knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between entities in the first triples.

[0150] In another embodiment, the first establishment module is used to: establish nodes corresponding to the first triples; establish edges between the nodes based on the first relationships between entities in the first triples; determine second time information of the first relationships based on the first time information; and add the second time information to the edges between the nodes to obtain a temporal knowledge graph.

[0151] In another embodiment, the first establishment module is also used to: generate a second triple based on the first node, the second node and the edge between the first node and the second node, the second triple including the entity in the first triple corresponding to the first node, the edge and the entity in the first triple corresponding to the second node, the first node and the second node being any two nodes; in the second triple, add corresponding second time information to the first relationship represented by the edge between the first node and the second node to obtain a quadruple.

[0152] In another embodiment, the user behavior record is obtained from a data source; The first acquisition module is further configured to, in response to monitoring a new user behavior record in the data source, acquire a new entity and a second relationship between the new entities from the new user behavior record; The first generating module is further configured to generate a new first triplet, wherein the new first triplet includes a newly added entity, first time information corresponding to the newly added user behavior record, and object information; The first establishment module is also used to add a node corresponding to the new first triple in the temporal knowledge graph, and based on the second relationship between the newly added entities in the new first triple, add an edge between the nodes corresponding to the new first triple in the temporal knowledge graph.

[0153] Obviously, the knowledge graph construction device 400 provided in the embodiment of the present application can be used as the above Figure 1 The execution subject of the knowledge graph construction method shown in FIG can thus realize the knowledge graph construction device in Figure 1 Since the principle is the same, the functions realized will not be described in detail.

[0154] Based on the same inventive concept, this embodiment of the application also provides an object recommendation device. Figure 5 , is a structural diagram of an object recommendation device 500 provided in one embodiment of the present application. The device 500 includes: a second acquisition module 510, a prediction module 520 and a recommendation module 530.

[0155] The second acquisition module 510 is used to obtain a temporal knowledge graph, where the temporal knowledge graph represents a first relationship between entities in a first triple, where the first triple includes an entity, first time information corresponding to a user behavior record, and object information, where the entity and the first relationship are obtained from the user behavior record, and the user behavior record is used to describe the interaction behavior between the user and the object.

[0156] The prediction module 520 is used to predict the first interest level of the first user in the first object at a first time point based on the temporal knowledge graph.

[0157] The recommendation module 530 is configured to select a second object from the first objects based on the first interest level and recommend the second object to the first user.

[0158] In another embodiment, the prediction module is used to: obtain the first time series data of the first user before a second time point from the time series knowledge graph, where the second time point is earlier than the first time point, and the first time series data includes: the first interaction behavior sequence of the first user, and object information of the object targeted by each first interaction behavior in the first interaction behavior sequence; based on the first time series data, predict the first interest level.

[0159] In another embodiment, the first time series data further includes: context information of each first interaction behavior; the object information of the object includes: attribute information and multimodal information of the object; When the prediction module predicts the first interest level based on the first time series data, the prediction module performs the following steps: predicting, based on the object targeted by each first interactive behavior in the first interactive behavior sequence, a second interest level of the first user in the first object at the first time point; predicting, based on the context information, a third interest level of the first user in the first object at the first time point; predicting, based on a first interaction behavior with respect to the first object, attribute information of the first object, and multimodal information of the first object, a fourth interest level of the first user in the first object at the first time point; The first degree of interest is determined based on the second degree of interest, the third degree of interest, and the fourth degree of interest.

[0160] In another embodiment, the prediction module performs the following steps when predicting the second interest level of the first user in the first object at the first time point based on the object targeted by each first interaction behavior in the first interaction behavior sequence: determining a first interaction frequency between the first user and the first object based on an object targeted by each first interaction behavior in the first interaction behavior sequence; The second interest level is predicted based on the first interaction frequency, a preset decay rate, and a length of a first time period, where the first time period is a length of time between the first time point and the second time point.

[0161] In another embodiment, the prediction module is further configured to: obtain, from the time series knowledge graph, a second interaction behavior sequence between the first user and the first object within the first time period, and determine an occurrence frequency of each second interaction behavior in the second interaction behavior sequence; When the prediction model predicts the second interest level based on the first interaction frequency, the preset decay rate and the length of the first time period, the following steps are performed: based on the first interaction frequency, the preset decay rate and the length of the first time period, the second interaction frequency of the first user with the first object at the first time point is predicted; based on the second interaction frequency and the frequency of occurrence of each second interaction behavior, the second interest level is determined.

[0162] In another embodiment, when the prediction module predicts the third interest level of the first user in the first object at the first time point based on the context information, it performs the following steps: concatenating the user identifier of the first user, the object identifier of the object targeted by each first interaction behavior, and the context information of each first interaction behavior to obtain a first feature vector, the first feature vector including multiple first features; converting each first feature into a corresponding latent vector; and predicting the third interest level based on the weighted sum of the multiple first features, the dot product between different first features, and the dot product between the latent vectors corresponding to different first features.

[0163] In another embodiment, when the prediction module predicts the fourth interest level of the first user in the first object at the first time point based on the first interactive behavior with respect to the first object, the attribute information of the first object and the multimodal information of the first object, the following steps are performed: the first interactive behavior with respect to the first object is converted into a second feature vector; the attribute information is converted into a third feature vector; the multimodal information is converted into a fourth feature vector; the second feature vector, the third feature vector and the fourth feature vector are fused to obtain a fifth feature vector; and the fifth feature vector is input into a deep neural network for prediction to obtain the fourth interest level.

[0164] In another embodiment, the prediction module is also used to: generate a first feature set including multiple second features and a second feature set corresponding to each second feature based on the first time series data, and the second feature set does not include the corresponding second feature; predict the fifth interest level of the first user in the first object at the first time point based on the first feature set, and predict the sixth interest level of the first user in the first object at the first time point based on the second feature set; determine the importance of the second feature corresponding to the second feature set based on the difference between the fifth interest level and the sixth interest level.

[0165] In another embodiment, when the prediction module determines the first degree of interest based on the second degree of interest, the third degree of interest and the fourth degree of interest, it performs the following steps: weighted summation of the second degree of interest, the third degree of interest, the fourth degree of interest and the importance of each second feature in the first feature set to obtain the first degree of interest.

[0166] Obviously, the object recommendation device 500 provided in the embodiment of the present application can be used as the above Figure 3 The object recommendation method shown in FIG. Figure 3 Since the principle is the same, the functions realized will not be described in detail.

[0167] Figure 6 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.

[0168] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0169] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.

[0170] The processor reads the corresponding computer program from the non-volatile memory into the internal memory and then runs it, forming a knowledge graph construction device at the logical level. The processor executes the program stored in the memory and is specifically configured to perform the following operations: obtain entities and first relationships between the entities from user behavior records, wherein the user behavior records are used to describe the interaction behavior between the user and the object; combine the entities, the first time information corresponding to the user behavior records, and the object information to obtain a first triple; and establish a time series knowledge graph based on the first triple and the first relationship, wherein the nodes in the time series knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between the entities in the first triples.

[0171] Alternatively, the processor reads a corresponding computer program from the non-volatile memory into the memory and then runs it, forming an object recommendation device at a logical level. The processor executes the program stored in the memory and is specifically configured to perform the following operations: obtain a time-series knowledge graph, wherein the time-series knowledge graph represents a first relationship between entities in a first triple, wherein the first triple includes an entity, first time information corresponding to a user behavior record, and object information, wherein the entity and the first relationship are obtained from the user behavior record, wherein the user behavior record is used to describe the interaction between the user and the object; based on the time-series knowledge graph, predict a first user's first interest in a first object at a first point in time; and based on the first interest, select a second object from the first object and recommend it to the first user.

[0172] The above application Figure 1 The method performed by the knowledge graph construction device disclosed in the embodiment shown, or the above-mentioned method of the present application Figure 3The methods performed by the object recommendation apparatus disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the aforementioned method can be performed by hardware integrated logic circuits within the processor or by software instructions. The aforementioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly executed by a hardware decoding processor or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.

[0173] The electronic device may also perform Figure 1 Method, and realize the knowledge graph construction device in Figure 1 、 Figure 2 Alternatively, the electronic device may also perform the functions of the embodiment shown. Figure 3 Method, and implement the object recommendation device in Figure 3 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.

[0174] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0175] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by an electronic device including multiple application programs, can enable the electronic device to execute Figure 1The method of the embodiment shown is specifically used to perform the following operations: obtaining entities and first relationships between the entities from user behavior records, wherein the user behavior records are used to describe the interaction behavior between the user and the object; combining the first time information and object information corresponding to the entity and the user behavior records to obtain a first triple; establishing a temporal knowledge graph based on the first triple and the first relationship, wherein the nodes in the temporal knowledge graph represent the first triple, and the edges between the nodes represent the first relationship between the entities in the first triple.

[0176] Alternatively, when the instruction is executed by an electronic device including multiple applications, the electronic device can execute Figure 3 The method of the illustrated embodiment is specifically used to perform the following operations: obtaining a temporal knowledge graph, the temporal knowledge graph representing a first relationship between entities in a first triple, the first triple including an entity, first time information and object information corresponding to a user behavior record, the entity and the first relationship being obtained from the user behavior record, and the user behavior record being used to describe the interaction between the user and the object; based on the temporal knowledge graph, predicting a first interest level of a first user in a first object at a first time point; based on the first interest level, selecting a second object from the first object and recommending it to the first user.

[0177] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute some or all of the steps in the knowledge graph construction method or object recommendation method provided in the embodiment of the present application.

[0178] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

[0179] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0180] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0181] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0182] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

Claims

1. A knowledge graph construction method, characterized in that: include: Acquire entities and first relationships between the entities from user behavior records, where the user behavior records are used to describe interaction behaviors between a user and an object; Combining the entity and the first time information and the object information corresponding to the user behavior record to obtain a first triplet; Based on the first triples and the first relationships, a temporal knowledge graph is established, where the nodes in the temporal knowledge graph represent the first triples, and the edges between the nodes represent the first relationships between entities in the first triples.

2. The method according to claim 1, characterized in that The establishing of a temporal knowledge graph based on the first triple and the first relationship includes: Establishing a node corresponding to the first triple; establishing edges between the nodes based on a first relationship between entities in the first triple; determining second time information of the first relationship based on the first time information; The second time information is added to the edges between the nodes to obtain a time series knowledge graph.

3. The method according to claim 2, characterized in that After adding the second time information to the edges between the nodes to obtain a time series knowledge graph, the method further includes: generating a second triple based on a first node, a second node, and an edge between the first node and the second node, where the second triple includes an entity in the first triple corresponding to the first node, the edge, and the entity in the first triple corresponding to the second node, where the first node and the second node are any two nodes; In the second triplet, corresponding second time information is added to the first relationship represented by the edge between the first node and the second node to obtain a quadruple.

4. An object recommendation method, characterized in that: include: Obtaining a time series knowledge graph, where the time series knowledge graph represents a first relationship between entities in a first triple, where the first triple includes an entity, first time information corresponding to a user behavior record, and object information, where the entity and the first relationship are obtained from the user behavior record, where the user behavior record is used to describe an interaction between a user and an object; Predicting, based on the temporal knowledge graph, a first interest level of a first user in a first object at a first time point; Based on the first interest level, a second object is selected from the first objects and recommended to the first user.

5. The method according to claim 4, characterized in that The predicting, based on the time series knowledge graph, a first user's first interest in a first object at a first time point includes: Obtaining, from the time-series knowledge graph, first time-series data of the first user before a second time point, where the second time point is earlier than the first time point, the first time-series data including: a first interaction behavior sequence of the first user, and object information of an object targeted by each first interaction behavior in the first interaction behavior sequence; The first interest level is predicted based on the first time series data.

6. The method according to claim 5, characterized in that The first time series data further includes: context information of each first interaction behavior; the object information of the object includes: attribute information and multimodal information of the object; The predicting the first interest level based on the first time series data includes: predicting, based on the object targeted by each first interactive behavior in the first interactive behavior sequence, a second interest level of the first user in the first object at the first time point; predicting, based on the context information, a third interest level of the first user in the first object at the first time point; predicting, based on a first interaction behavior with respect to the first object, attribute information of the first object, and multimodal information of the first object, a fourth interest level of the first user in the first object at the first time point; The first degree of interest is determined based on the second degree of interest, the third degree of interest, and the fourth degree of interest.

7. The method according to claim 6, characterized in that The predicting, based on the object targeted by each first interactive behavior in the first interactive behavior sequence, the second interest level of the first user in the first object at the first time point includes: determining a first interaction frequency between the first user and the first object based on an object targeted by each first interaction behavior in the first interaction behavior sequence; The second interest level is predicted based on the first interaction frequency, a preset decay rate, and a length of a first time period, where the first time period is a length of time between the first time point and the second time point.

8. The method according to claim 7, characterized in that Before predicting the second interest level based on the first interaction frequency, the preset decay rate, and the duration of the first time period, the method further includes: Obtaining, from the time-series knowledge graph, a second interaction behavior sequence between the first user and the first object within the first time period, and determining an occurrence frequency of each second interaction behavior in the second interaction behavior sequence; The predicting the second interest level based on the first interaction frequency, the preset decay rate, and the duration of the first time period includes: Predicting a second interaction frequency between the first user and the first object at the first time point based on the first interaction frequency, a preset decay rate, and the duration of the first time period; The second interest level is determined based on the second interaction frequency and the occurrence frequency of each second interaction behavior.

9. The method according to claim 6, characterized in that The predicting, based on the context information, a third interest level of the first user in the first object at the first time point includes: concatenating the user identifier of the first user, the object identifier of the object targeted by each first interaction behavior, and the context information of each first interaction behavior to obtain a first feature vector, where the first feature vector includes a plurality of first features; Convert each first feature into a corresponding latent vector; The third interest level is predicted based on a weighted sum of the multiple first features, a dot product between different first features, and a dot product between latent vectors corresponding to different first features.

10. The method according to claim 6, characterized in that The predicting, based on the first interaction behavior with respect to the first object, the attribute information of the first object, and the multimodal information of the first object, a fourth interest level of the first user in the first object at the first time point includes: converting the first interaction behavior directed to the first object into a second feature vector; Converting the attribute information into a third eigenvector; Converting the multimodal information into a fourth eigenvector; fusing the second eigenvector, the third eigenvector, and the fourth eigenvector to obtain a fifth eigenvector; The fifth eigenvector is input into a deep neural network for prediction to obtain the fourth interest level.

11. The method according to claim 7, characterized in that Before determining the first degree of interest based on the second degree of interest, the third degree of interest, and the fourth degree of interest, the method further includes: Based on the first time series data, generating a first feature set including a plurality of second features and a second feature set corresponding to each second feature, wherein the second feature set does not include the corresponding second feature; predicting a fifth interest level of the first user in the first object at the first time point based on the first feature set, and predicting a sixth interest level of the first user in the first object at the first time point based on the second feature set; The importance of the second feature corresponding to the second feature set is determined based on a difference between the fifth interest level and the sixth interest level.

12. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the knowledge graph construction method as described in any one of claims 1 to 3; or, the electronic device is enabled to execute the object recommendation method as described in any one of claims 4 to 11.

13. A computer program product, characterized in that The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the knowledge graph construction method according to any one of claims 1 to 3 or the object recommendation method according to any one of claims 4 to 11.