Methods, devices, and media for constructing a knowledge graph based on conversations
By constructing a session-based knowledge graph, the problem of session data failing to reflect business logic relationships was solved, enabling in-depth analysis of session content and accurate exploration of business relationships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENGDOUSHI SHANGHAI SCI & TECH DEV CO LTD
- Filing Date
- 2021-12-30
- Publication Date
- 2026-05-01
AI Technical Summary
In existing technologies, enterprises focus on storing business-related session data in a discrete manner on a session-by-session basis, failing to pay attention to the connections between different sessions, which results in an inability to effectively support event attribution analysis, user intent analysis, and business relationship analysis.
By acquiring session content and attribute data, tags are extracted and a session data graph is constructed. A session relationship model is used to define relationships of interest, and a knowledge graph is built in conjunction with a knowledge base to reflect business logic relationships.
It enables in-depth analysis and exploration of conversation content, supporting accurate analysis of event attribution, user intent, and business relationships.
Smart Images

Figure CN116415663B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure generally relate to the field of artificial intelligence, and more specifically to a method, apparatus, and medium for constructing knowledge graphs based on sessions. Background Technology
[0002] In enterprises, customer service personnel often come into contact with various customers at the first moment. Therefore, the conversation information between customers and customer service personnel is very important. It can usually reflect various information, such as which information or events are repeatedly mentioned by customers, which products are popular products, what problems exist in the business, and so on.
[0003] Currently, session data related to business-related conversations (e.g., conversation content converted to text) is typically stored discretely on a session-by-session basis. However, it doesn't consider the connections between different sessions, especially the connections between various session elements mentioned (such as products, services, and activities). Instead, it only uses specific statistical rules and logic to perform statistics on these discrete sessions. Consequently, information not addressed by these statistical rules and logic within each session is often ignored. Furthermore, because session data stored discretely on a session-by-session basis cannot reflect the various business logic relationships involved, it cannot support, or can only support, very simply, attribution analysis of some events, user intent analysis, business relationship analysis, and business reasoning exploration. Summary of the Invention
[0004] To address the aforementioned issues, this disclosure provides a method, apparatus, and medium for constructing knowledge graphs based on sessions, enabling the identification of various business logic relationships within the business of interest. This facilitates the analysis and exploration of deeper content attempted to be expressed in the session, and enables the analysis of attribution of related events, user intent, business relationships, and so on.
[0005] According to a first aspect of this disclosure, a method for constructing a knowledge graph based on sessions is provided, comprising: acquiring session content data and session attribute data of multiple associated sessions related to a business of interest; extracting tags from the session content data and session attribute data, wherein the extracted tags include one or more of the following: multiple entities involved in the associated sessions, entity categories of the entities, relationships between associated entities, and corresponding events; constructing a session data graph about the associated sessions based on the extracted tags and an associated session relationship model, wherein the session relationship model defines relationships of interest in the form of a graph based on entity categories; and constructing a knowledge graph for the business of interest for the predetermined time period based on the multiple session data graphs about multiple associated sessions occurring within a predetermined time period and a corresponding knowledge base.
[0006] According to a second aspect of this disclosure, a computing device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory storing instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect of this disclosure.
[0007] In a third aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the method of the first aspect of this disclosure.
[0008] In some embodiments, constructing a session data graph about the associated session based on the extracted tags and the associated session relationship model includes: mapping the extracted entities to the corresponding nodes of the session relationship model based on the entity categories of the extracted entities; constructing explicit association edges between the mapped associated nodes based on the extracted relationships and the relationships of interest defined by the session relationship model; and identifying multiple associated nodes among the mapped nodes that have message propagation relationships but have not established corresponding explicit association edges, so as to establish implicit association edges between the corresponding associated nodes.
[0009] In some embodiments, constructing explicit association edges between mapped related nodes based on the extracted relations and the relations of interest defined by the session relationship model includes: comparing the extracted relations with the relations of interest defined by the session relationship model to determine one or more relations in the extracted relations that involve the relations of interest; and constructing corresponding explicit association edges between mapped related nodes based on the one or more relations.
[0010] In some embodiments, constructing a knowledge graph for the business of interest for the predetermined time period based on multiple session data graphs of multiple related sessions occurring within a predetermined time period and a corresponding knowledge base includes: determining multiple nodes, multiple edges, and associated relationships for the knowledge graph based on the multiple session data graphs and the corresponding knowledge base; adjusting the corresponding multiple nodes, multiple edges, and associated relationships in the knowledge graph when the multiple nodes, multiple edges, and associated relationships meet preset relationship conditions; and forming the knowledge graph based on the adjusted nodes, edges, and associated relationships.
[0011] In some embodiments, the preset relationship conditions include: the plurality of nodes determined for the knowledge graph include a first node, a second node, and a third node; the plurality of edges determined for the knowledge graph include a first edge between the first node and the second node and a second edge between the second node and the third node; and at least a threshold number of the plurality of session data graphs also include the first edge and the second edge; and in the at least threshold number of session data graphs, both the first association strength of the first edge and the second association strength of the second edge are greater than or equal to a predetermined threshold.
[0012] In some embodiments, adjusting the corresponding plurality of nodes, plurality of edges, and associated relationships in the knowledge graph includes: removing the second node from the plurality of nodes determined for the knowledge graph, and replacing the first edge and the second edge determined for the knowledge graph with a third edge between the first node and the third node.
[0013] In some embodiments, determining multiple nodes, multiple edges, and associated relationships for the knowledge graph based on the multiple session data graphs and the corresponding knowledge base includes: analyzing the multiple session data graphs and the corresponding knowledge base to determine multiple nodes in the multiple session data graphs and the corresponding knowledge base that are related to the business of interest; determining the relationships between the determined multiple nodes based on the multiple session data graphs and the corresponding knowledge base; and determining corresponding edges for the determined multiple nodes based on the relationships.
[0014] In some embodiments, the session content data is unstructured text data, and extracting tags from the session content data and session attribute data includes: performing named entity recognition based on the session content data to identify a plurality of first entities; and determining a first relationship between associated first entities, a first entity category of the first entities, and an associated first event based on the session content data.
[0015] The first entity, first relation, first entity category, and first event are respectively structured into corresponding first structured data; and the format and content of the corresponding first structured data are adjusted based on the metadata associated with the entity, relation, category, and event.
[0016] In some embodiments, the session attribute data is structured text data, and extracting tags from the session content data and session attribute data further includes: extracting structured data associated with multiple second entities, second entity categories, and second events from the session attribute data; converting the structured data associated with multiple second entities, second entity categories, and second events into second structured data consistent with the corresponding first structured data format; and concatenating all the first structured data and second structured data associated with the associated session using the session identifier of the associated session.
[0017] In some embodiments, before identifying multiple first entities from the session content data based on a named entity recognition algorithm, the method further includes: converting ambiguous characters in the session content data into characters with the desired meaning; and deduplicating duplicate fields in the session content.
[0018] In some embodiments, the session attribute data includes one or more of the following: the initiation time of the associated session, the duration of the associated session, the session format of the associated session, the initiation channel of the associated session, the reason for initiating the associated session, and the session request of the associated session.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements.
[0021] Figure 1 A schematic diagram of a system 100 for implementing a method for constructing a knowledge graph based on a session according to an embodiment of the present invention is shown.
[0022] Figure 2 A flowchart of a session-based method for constructing a knowledge graph according to an embodiment of the present disclosure is shown.
[0023] Figure 3 A flowchart is shown of a method 300 for constructing a session data graph about associated sessions based on extracted tags and associated session relationship models, according to an embodiment of the present disclosure.
[0024] Figure 4A flowchart is shown of a method 400 for constructing a knowledge graph for a predetermined time period for a business of interest, according to an embodiment of the present disclosure.
[0025] Figure 5A A schematic diagram of an exemplary session data graph according to an embodiment of the present disclosure is shown.
[0026] Figure 5B A schematic diagram of another exemplary session data graph according to an embodiment of the present disclosure is shown.
[0027] Figure 5C A schematic diagram of yet another exemplary session data graph according to an embodiment of the present disclosure is shown.
[0028] Figure 5D A schematic diagram of a portion of an exemplary knowledge base is shown.
[0029] Figure 5E It shows the basis Figures 5A-5D The diagram shows a session data graph and an exemplary knowledge graph constructed from a knowledge base.
[0030] Figure 6 A block diagram of an electronic device 600 according to an embodiment of the present disclosure is shown. Detailed Implementation
[0031] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0032] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0033] As mentioned above, session data (e.g., session content converted to text) related to various business activities of an enterprise is typically stored discretely on a session-by-session basis. However, this does not identify the connections between different sessions, especially not the connections between various session elements mentioned in different sessions (such as products, services, activities, etc.). Instead, it uses specific statistical rules and logic to statistically analyze these discrete sessions based on predetermined metrics. Consequently, information not addressed by these statistical rules and logic in each session is often ignored. Furthermore, because session data stored discretely on a session-by-session basis cannot reflect the various business logic relationships related to the business, it cannot support, or can only support, a few simple attribution analyses of events, user intent analyses, business relationship analyses, and business reasoning explorations.
[0034] To at least partially address one or more of the aforementioned problems and other potential issues, exemplary embodiments of this disclosure propose a method for constructing a knowledge graph based on sessions, comprising: acquiring session content data and session attribute data for each associated session related to a business of interest; extracting tags from the session content data and session attribute data, wherein the extracted tags include multiple entities involved in the associated session, the entity category of each entity, the relationships between associated entities, and corresponding events; constructing a session data graph about the associated sessions based on the extracted tags and a related session relationship model, wherein the session relationship model defines the relationships of interest in the form of a graph based on entity categories; and constructing a knowledge graph for the business of interest for the predetermined time period based on multiple session data graphs of multiple associated sessions occurring within a predetermined time period and a corresponding knowledge base. In this manner, various business logic relationships of the business of interest can be determined, thereby facilitating the analysis and exploration of deeper content attempted to be expressed in the sessions, and enabling the analysis of attribution of related events, user intent, business relationships, etc.
[0035] In the following sections, specific examples of this solution will be described in more detail with reference to the accompanying drawings.
[0036] Figure 1 A schematic diagram of a system 100 for constructing a knowledge graph based on a session, according to an embodiment of the present disclosure, is shown. Figure 1 As shown, system 100 includes, for example, a computing device 110, multiple user terminals 120-1, 120-M to 120-N, and a network 140. The computing device 110 can interact with the multiple user terminals 120-1, 120-M to 120-N via the network 140.
[0037] The computing device 110 includes, but is not limited to, server computers, multiprocessor systems, mainframe computers, and distributed computing environments that include any of the aforementioned systems or devices. In some embodiments, the computing device 110 may have one or more processing units, including dedicated processing units such as graphics processing units (GPUs), field-programmable gate arrays (FPGAs), and application-specific integrated circuits (ASICs), as well as general-purpose processing units such as central processing units (CPUs).
[0038] The computing device 110 can be used, for example, to construct a knowledge graph based on a session, and to perform certain analysis and exploration based on the knowledge graph to determine the deeper content that the session is trying to express, or to determine the attribution of related events, user intent, business relationships, etc. User terminals 120-1 to 120-N include, but are not limited to, users' mobile phones, computers, etc., which can be used to obtain the corresponding knowledge graph or obtain the corresponding analysis results for display or further analysis.
[0039] Figure 2 A flowchart of a method 200 for constructing a knowledge graph based on a session, according to an embodiment of the present disclosure, is shown. Method 200 may be derived from, for example... Figure 1 The computing device 110 shown can be used for execution, and can also be used in Figure 6 The method is performed at the illustrated electronic device 600. It should be understood that method 200 may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0040] In step 202, computing device 110 acquires session content data and session attribute data of multiple associated sessions related to the services of interest.
[0041] A related conversation can refer to any conversation associated with a business of interest (typically a conversation between a consumer and customer service personnel related to a business of interest). Conversations can take the form of voice conversations initiated via telephone or chat software, or online chats initiated through various channels (e.g., related computer applications, related mobile applications, customer service interfaces embedded in related web pages, etc.). Conversation content data refers to the actual interaction between the two parties in any related conversation. For ease of subsequent processing, voice conversations are typically converted to text format. Conversation attribute data indicates the attributes of the corresponding related conversation, such as the initiation time (i.e., conversation initiation time), duration (i.e., conversation duration), conversation format (e.g., voice or text), initiation channel (i.e., conversation initiation channel), reason for initiation (i.e., reason for the conversation), and the conversation request, etc. Conversation attribute data can be recorded by specialized applications based on the actual situation of the related conversation and the user's relevant choices.
[0042] In step 204, computing device 110 extracts tags from session content data and session attribute data.
[0043] Tags are the smallest data units used to describe business entities and their characteristics. Therefore, a relationship session can involve multiple entities, the entity category of each entity, the relationships between related entities, and the corresponding events all belong to tags. An entity can be various named entities mentioned in the relationship session, such as the name of a specific product (e.g., XXX), the name of a specific brand (e.g., YYY), the name of a specific business (e.g., ZZZ), etc. An entity category refers to the category to which the extracted entity belongs, such as whether the extracted entity belongs to a product, brand, business (whether the business as an entity mainly refers to online or offline business types), or coupon (e.g., discount coupons, vouchers, etc.). Relationships between related entities can refer to the associations between related entities. An event can refer to the event that triggered the relationship session, such as a consumer initiating a session to return an item due to slow delivery.
[0044] In some embodiments, session content data is the text of the actual interactions between the two parties in the conversation, and is therefore unstructured text data. Session attribute data, on the other hand, is typically structured text data because it is recorded by a specialized application based on the actual situation of the associated session and the user's relevant choices.
[0045] In these embodiments, step 204 may extract relevant tags from the session content data in the following manner. First, named entity recognition is performed on the session content data to identify multiple first entities. For example, a named entity recognition (NER) algorithm can be used to identify named entities in the session content data. In this disclosure, entities identified from the session content data are collectively referred to as first entities to distinguish them from entities identified from the session attribute data (hereinafter referred to as second entities). For example, by way of example only, for a business context, the first entities identified from the session content data may include, for example, products, brands, roles, services, coupons, etc. Second, based on the session content data, first relationships between associated first entities, first entity categories of the first entities, and associated first events are determined. For example, a natural language processing (NLP) algorithm can be used to determine the corresponding first relationships, first entity categories, and first events based on the session content data. Third, the determined first entities, first relationships, first entity categories, and first events are respectively structured into corresponding first structured data. In this paper, the structured data based on the first entity, first relation, first entity category, and first event is collectively referred to as "first structured data" to distinguish it from the second structured data mentioned later. However, in reality, the first entity, first relation, first entity category, and first event are all associated with different structured data. In this disclosure, by structuring these tags into corresponding first structured data, it is beneficial to form corresponding session data graphs more efficiently. Furthermore, when it is necessary to analyze such session data graphs and knowledge graphs created based on them, it can help to more accurately and efficiently search for the required content from these session data graphs and knowledge graphs for analysis. Finally, the format and content of the corresponding first structured data are adjusted based on the metadata associated with the entity, relation, category, and event, respectively. In this disclosure, the metadata associated with the entity, relation, category, and event defines standard structured data related to these tags. By adjusting the corresponding first structured data based on the corresponding metadata, missing or inaccurate parts in, for example, the previously obtained first structured data can be supplemented and modified.
[0046] In some embodiments, before identifying multiple first entities from session content data based on the named entity recognition algorithm, ambiguous characters in the session content data can be converted into characters with the required meaning, and duplicate fields in the session content can be deduplicated. For example, special characters such as backslash / , asterisk *, and quotation marks "" in session content data often have multiple different meanings. Therefore, converting these special characters into characters with the required meaning can help improve the accuracy of identifying tags such as entities and relationships. In addition, some repetitive and redundant fields often appear in session content data. For example, a user may repeatedly state a sentence in a related session to emphasize it. Therefore, related duplicate fields can be deduplicated before tag extraction to avoid interfering with the subsequent recognition process and affecting the recognition efficiency.
[0047] Step 204 can also extract relevant tags from the session attribute data in the following ways. First, extract structured data associated with multiple second entities, second entity categories, and second events from the session attribute data. As mentioned earlier, the session attribute data can be structured text data, so there is no need to use NER and NLP algorithms to extract corresponding entity, entity category, and event tags from the text; the corresponding tags can be extracted directly from it. In this disclosure, the second entities identified from the session attribute data may include, for example, specific session initiation channels (e.g., the name of the corresponding application), specific session requests (e.g., returns, delivery reminders, etc.), specific reasons for session visits (e.g., inquiries), etc. Second, convert the structured data associated with multiple second entities, second entity categories, and second events into second structured data consistent with the corresponding first structured data format. In this disclosure, by formatting all tags into a unified format associated with the corresponding tag types (i.e., entities, relationships, entity categories, events, etc.), the accuracy and efficiency of subsequent searches on this data can be improved. For example, Tables 1 and 2 below, for illustration only, represent exemplary formats of standardized structured data for entities and relationships, respectively. Finally, using the session identifier of each associated session, all the first and second structured data associated with that session are concatenated together. By concatenating the first and second structured data for each associated session, it becomes easier to efficiently generate corresponding session data graphs for the respective associated sessions based on this data.
[0048] Standardized structured data of entities in Table 1
[0049] entity.id Entity identifier (i.e., entity ID) entity.name Entity Name entity.type Entity type entity.p Positive sentiment data for entities entity.n Negative sentiment data of entities entity.m Entity Neutral Sentiment Number
[0050] Standardized structured data of relationships in Table 2
[0051] relation.id1 Relationship Entity ID1 relation.name1 Relationship Entity Name 1 relation.type1 Relational Entity Type 1 relation.id2 Relationship Entity ID2 relation.name2 Relationship Entity Name 2 relation.type2 Relational Entity Type 2 relation.p Positive Relationship and Emotion relation.n Negative Relationships relation.m Relationship-emotional neutral
[0052] In step 206, a session data graph about related sessions is constructed based on the extracted tags and the associated session relationship model. In this disclosure, the session relationship model defines the relationships of interest based on entity categories. For example, Figure 5A , 5B The 5C diagram shows a brief example of a session data graph, which should be understood. Figure 5A , 5B The 5Cs are for illustrative purposes only; in practice, business data diagrams are typically constructed in ways such as... Figure 5A , 5B The session data graph shown in 5C is much more complex.
[0053] The following will combine Figure 3 Step 206 will be described in further detail.
[0054] Furthermore, in some embodiments, each associated session is acquired in real time. Therefore, for the business of interest, multiple associated sessions may be acquired simultaneously, resulting in a potentially very large number of tags extracted from these sessions. To reduce the amount of data that needs to be processed simultaneously, tags extracted before a predetermined time can be removed before constructing the session data graph of the associated sessions based on the extracted tags and the associated session relationship model. Since the duration of a session is often within half an hour, one hour, or two hours, this predetermined time can be set according to the actual situation of the business, for example, half an hour, one hour, or two hours, etc. By removing such tags, not only can the amount of data processed subsequently be reduced, but interference between different associated sessions can also be avoided.
[0055] In some embodiments, before constructing the session data graph of the associated sessions based on the extracted tags and the associated session relationship model, the first and second structured data associated with each associated session may be subjected to out-of-order message processing, so that each entity associated with the first and second structured data, the entity category of each entity, the relationship between associated entities, and the corresponding events are not out of order. For example, this out-of-order processing can be performed by registering the latest closing time of the current associated session (e.g., 1 hour) or registering the closing time of the current associated session (e.g., 5 seconds).
[0056] In step 208, based on multiple session data graphs of multiple related sessions occurring within a predetermined time period and the corresponding knowledge base, a knowledge graph for the business of interest is constructed for the predetermined time period. In this disclosure, the constructed knowledge graph is a relationship graph of the business logic of the business of interest within the predetermined time period.
[0057] A knowledge base is typically a data dictionary, used for example to describe specific details of an activity. Figure 5D A schematic diagram of a portion of an exemplary knowledge base is shown. It should be understood that... Figure 5D For illustrative purposes only; in practical applications, knowledge bases are more than... Figure 5D The knowledge base shown is much more complex. Furthermore, Figure 5E It shows the basis Figure 5A , 5B The three session data graphs shown in 5C and Figure 5D The example shown is a knowledge graph constructed from a knowledge base. It should be understood that, although in Figures 5A-5E The example only shows the construction of a knowledge graph based on three session data graphs. However, in real-world applications, the number of session data graphs about multiple related sessions that occur within a predetermined time period is much greater, and the knowledge graph is constructed based on such a large number of session data graphs.
[0058] Step 206 allows the construction of a session data graph for each associated session. Each session data graph is only related to the relevant associated sessions, but it cannot reflect the business logic of the entire related business. Therefore, in step 208, by using multiple session data graphs based on multiple associated sessions occurring within a predetermined time period and the corresponding knowledge base, the knowledge graph of the business of interest within that predetermined time period can be determined. This knowledge graph can reflect the entire business logic of the business of interest within that predetermined time period. Thus, based at least on this knowledge graph, visual data support can be provided for attribution analysis, user intent analysis, business relationship analysis, and business reasoning exploration for some events (such as on-site events), thereby helping to improve the service of related businesses.
[0059] In this disclosure, before constructing the knowledge graph, multiple session data graphs about multiple related sessions can be aggregated along a time dimension. This time dimension (i.e., the specific time period mentioned earlier) can be a day, a week, or a month. Typically, business-related activities last for one or more months, so a month is usually chosen as the time dimension. Besides being used to construct the knowledge graph, the aggregated session data graph can also be used for various data analyses, such as year-on-year analysis, month-on-month analysis, and popularity analysis.
[0060] The following will combine Figure 4 Step 208 will be described in further detail.
[0061] Figure 3 A flowchart of a method 300 for constructing a session data graph about associated sessions based on extracted tags and an associated session relationship model, according to an embodiment of the present disclosure, is shown. Method 300 may be derived from, for example... Figure 1 The computing device 110 shown can be used for execution, and can also be used in Figure 6 The method is performed at the illustrated electronic device 600. It should be understood that method 400 may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0062] In step 302, based on the entity category of the extracted entities, the extracted entities are mapped to the corresponding nodes of the session relationship model.
[0063] Since the session relationship model is defined based on entity categories, it's possible to determine which corresponding nodes in the session relationship model should be mapped to the extracted entities based on their entity categories. For example, ... Figure 5A As shown, the entities “Product 1”, “Brand 1”, “Business Type 1”, “Activity 1”, and “Points 1” extracted from the session content data and session attribute data of associated session id_001 are mapped to the nodes “Product”, “Brand”, “Business”, “Activity”, and “Points” in the session relationship model, respectively.
[0064] In step 304, based on the extracted relations and the relations of interest defined by the session relationship model, explicit association edges are constructed between the mapped related nodes.
[0065] In some embodiments, step 304 may be implemented by comparing the extracted relations with the relations of interest defined in the session relation model to determine one or more relations in the extracted relations that involve the relations of interest defined in the session relation model, and then constructing corresponding explicit association edges between the mapped related nodes based on the one or more relations.
[0066] In step 306, identify multiple associated nodes among the mapped nodes that have message propagation relationships but have not established corresponding explicit associations, so as to establish implicit associations between the corresponding associated nodes.
[0067] After executing step 304, some mapped nodes may not have explicit edges connecting them, but may have multi-hop relationships. For example, node A might reach node B and then node C. Therefore, a graph search process is needed to retrieve node C from node A. However, multi-hop relationships can present performance issues in certain scenarios. Therefore, depending on the actual business usage scenario, if node A and node C do not have a direct business connection, but there is a reachable path between them, or they are frequently mentioned together, and in actual use, it is often necessary to reach node B through node A (i.e., there is a message propagation relationship between node A and node B), then it is necessary to establish an implicit connection (also known as a "shortcut") between node A and node C.
[0068] In some embodiments, for example, a label propagation algorithm or a community discovery algorithm can be used to discover multiple associated nodes among multiple mapped nodes that have message propagation relationships but have not established corresponding explicit associations.
[0069] By employing the above methods, this disclosure can automatically and efficiently construct a session data graph for any associated session, and the constructed session data graph can accurately and objectively reflect the various relationships included or implied by the associated session.
[0070] Figure 4 A flowchart of a method 400 for constructing a knowledge graph for a predetermined time period for a business of interest, according to an embodiment of the present disclosure, is shown. Method 400 may be derived from, for example... Figure 1 The computing device 110 shown can be used for execution, and can also be used in Figure 6 The method is performed at the illustrated electronic device 600. It should be understood that method 400 may also include additional boxes not shown and / or the boxes shown may be omitted, and the scope of this disclosure is not limited in this respect.
[0071] In step 402, based on multiple session data graphs and the corresponding knowledge base, multiple nodes, multiple edges, and related relationships are determined for the knowledge graph.
[0072] The multiple session data graphs in step 402 refer to the multiple session data graphs mentioned in step 208 concerning multiple related sessions that occurred within a predetermined time period.
[0073] Specifically, step 402 may include: analyzing the multiple session data graphs and the corresponding knowledge base to identify multiple nodes in the multiple session data graphs and the corresponding knowledge base that are directly related to the business of interest; determining the relationships between the identified multiple nodes based on the multiple session data graphs and the corresponding knowledge base; and determining corresponding edges for the identified multiple nodes based on these relationships.
[0074] For example, in Figures 5A-5E In the example shown, by... Figures 5A-5C Through reasoning and analysis, it can be determined that "Brand 1" includes "Product 1", "Product 2", and "Product 3", and also includes "Activity 1", Business Type 1 (assuming that specific Business 1 and Business 2 both belong to Business Type 1), "Coupon 1", and "Points 1". Furthermore, by querying... Figure 5D The knowledge base shown indicates that "Activity 1" was conducted within region 1, which allows us to determine the nature of the knowledge graph. Figure 5E This shows multiple nodes, multiple edges, and associated relationships. Additionally, due to... Figure 5B and Figure 5C In the example above, "Event 1" and "Event 2" are caused by "Role 1" and "Role 2" respectively, and are unrelated to the business being focused on (i.e., the business involved by Brand 1). Therefore, they are not included as nodes in the relevant knowledge graph. It should be understood that the above example is for illustrative purposes only. In actual applications, the various session data graphs, knowledge bases, and the final constructed knowledge graph are much more complex.
[0075] In step 404, if the multiple nodes, multiple edges and associated relationships meet the preset relationship conditions, the corresponding multiple nodes, multiple edges and associated relationships in the knowledge graph are adjusted.
[0076] In some embodiments, the preset relationship condition includes: the plurality of nodes determined for the knowledge graph include a first node, a second node, and a third node; the plurality of edges determined for the knowledge graph include a first edge between the first node and the second node and a second edge between the second node and the third node; and at least a threshold number of the plurality of session data graphs also include the first edge and the second edge; and in at least a threshold number of the session data graphs, the first association strength of the first edge and the second association strength of the second edge are both greater than or equal to a predetermined threshold.
[0077] In this disclosure, both the first and second association strengths can be determined, for example, using confidence level assessments. The number of thresholds can be two or more. Furthermore, the predetermined thresholds relating to the first and second association strengths can be 50% or higher, depending on the specific application.
[0078] In some embodiments, adjusting the corresponding plurality of nodes, plurality of edges, and associated relationships in the knowledge graph may include: removing a second node from the plurality of nodes determined for the knowledge graph, and replacing the first and second edges determined for the knowledge graph with a third edge between the first node and the third node.
[0079] Therefore, step 404 can also be considered to include: if the plurality of nodes determined for the knowledge graph include a first node, a second node, and a third node, the plurality of edges determined for the knowledge graph include a first edge between the first node and the second node and a second edge between the second node and the third node, and at least a threshold number of the plurality of session data graphs also include the first edge and the second edge, and in the at least threshold number of session data graphs, the first association strength of the first edge and the second association strength of the second edge are both greater than or equal to a predetermined threshold, then the second node is removed from the plurality of nodes determined for the knowledge graph, and the third edge between the first node and the third node is used to replace the first edge and the second edge determined for the knowledge graph.
[0080] In step 406, a knowledge graph is formed based on the adjusted nodes, edges, and associated relationships.
[0081] Step 406 may include forming the knowledge graph based on the nodes, edges, and relationships ultimately determined for the knowledge graph.
[0082] By employing the above methods, this disclosure can automatically and quickly create the required knowledge graph, and the created knowledge graph can comprehensively and accurately reflect the various business logic relationships contained in the business of concern. Thus, certain analysis and exploration can be carried out based on the knowledge graph to determine the deeper content that is being expressed in the conversation, or to determine the attribution of related events, user intent, business relationships, etc.
[0083] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. For example, such as... Figure 1 The computing device 110 shown can be implemented by electronic device 600. As shown, electronic device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 602 or loaded from storage unit 608 into random access memory (RAM) 603. The random access memory 603 may also store various programs and data required for the operation of electronic device 600. The CPU 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0084] Multiple components in electronic device 600 are connected to input / output interface 605, including: input unit 606, such as keyboard, mouse, microphone, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0085] The various processes and procedures described above, such as methods 200, 300, and 400, can be executed by the central processing unit 601. For example, in some embodiments, methods 200, 300, and 400 can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on device 600 via read-only memory 602 and / or communication unit 609. When the computer program is loaded into random access memory 603 and executed by the central processing unit 601, one or more actions of methods 200, 300, and 400 described above can be performed.
[0086] This disclosure relates to methods, apparatus, systems, electronic devices, computer-readable storage media, and / or computer program products. A computer program product may include computer-readable program instructions for performing various aspects of this disclosure.
[0087] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0088] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge computing devices. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0089] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0090] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0091] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0092] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0094] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for constructing knowledge graphs based on sessions, comprising: Retrieve session content data and session attribute data from multiple related sessions relevant to the business being monitored; Tags are extracted from the session content data and session attribute data. The extracted tags include one or more of the following: multiple entities involved in the associated session, the entity categories of the entities, the relationships between the associated entities, and the corresponding events. Based on the extracted tags and related conversation relationship models, a conversation data graph about the associated conversations is constructed. The conversation relationship model defines the relationships of interest in the form of a graph based on entity categories. as well as Based on multiple session data graphs of related sessions occurring within a predetermined time period and the corresponding knowledge base, a knowledge graph for the business of interest is constructed for the predetermined time period. The construction of a session data graph about the associated sessions based on the extracted tags and related session relationship models includes: Based on the entity category of the extracted entities, the extracted entities are mapped to the corresponding nodes of the session relationship model. Based on the extracted relationships and the relationships of interest defined in the session relationship model, explicit edges are constructed between the mapped related nodes; and Identify multiple associated nodes among the mapped nodes that have message propagation relationships but no corresponding explicit associations, so as to establish implicit associations between the corresponding associated nodes.
2. The method according to claim 1, wherein constructing explicit associations between mapped related nodes based on the extracted relations and the relations of interest defined by the session relationship model comprises: The extracted relations are compared with the relations of interest defined in the session relation model to determine one or more relations among the extracted relations that relate to the relations of interest; as well as Based on the one or more relationships mentioned above, construct corresponding explicit association edges between the mapped related nodes.
3. The method according to claim 1, wherein constructing a knowledge graph for the business of interest for the predetermined time period based on multiple session data graphs of multiple related sessions occurring within a predetermined time period and a corresponding knowledge base includes: Based on the multiple session data graphs and the corresponding knowledge base, multiple nodes, multiple edges, and related relationships are determined for the knowledge graph. If the multiple nodes, multiple edges, and associated relationships meet the preset relationship conditions, the corresponding multiple nodes, multiple edges, and associated relationships in the knowledge graph are adjusted. as well as The knowledge graph is formed based on the adjusted nodes, edges, and associated relationships.
4. The method according to claim 3, wherein the preset relationship conditions include: The knowledge graph includes a first node, a second node, and a third node among the multiple nodes determined for the knowledge graph. The knowledge graph also includes a first edge between the first node and the second node and a second edge between the second node and the third node. Furthermore, at least a threshold number of the multiple session data graphs also include the first edge and the second edge. as well as In the session data graph of at least a threshold number, the first association strength of the first side and the second association strength of the second side are both greater than or equal to a predetermined threshold.
5. The method according to claim 4, wherein adjusting the corresponding plurality of nodes, plurality of edges, and associated relationships in the knowledge graph includes: Remove the second node from the plurality of nodes determined for the knowledge graph, and replace the first and second edges determined for the knowledge graph with a third edge between the first node and the third node.
6. The method according to claim 3, wherein determining multiple nodes, multiple edges, and associated relationships for the knowledge graph based on the multiple session data graphs and the corresponding knowledge base includes: The multiple session data graphs and their corresponding knowledge bases are analyzed to identify multiple nodes in the multiple session data graphs and their corresponding knowledge bases that are related to the business of interest. Based on the multiple session data graphs and the corresponding knowledge base, the relationships between the identified multiple nodes are determined. as well as Based on the aforementioned relationship, corresponding edges are determined for the identified multiple nodes.
7. The method of claim 1, wherein the session content data is unstructured text data, and extracting tags from the session content data and session attribute data includes: Named entity recognition is performed based on the session content data to identify multiple first entities; Based on the session content data, determine the first relationship between the associated first entities, the first entity category of the first entities, and the associated first event; The first entity, first relation, first entity category, and first event are respectively structured into corresponding first structured data; as well as The format and content of the corresponding first structured data are adjusted based on the metadata associated with entities, relationships, categories, and events.
8. The method according to claim 7, wherein the session attribute data is structured text data, and extracting tags from the session content data and session attribute data further includes: Extract structured data associated with multiple second entities, second entity categories, and second events from the session attribute data; The structured data associated with multiple second entities, second entity categories, and second events are respectively converted into second structured data that are consistent with the corresponding first structured data format; as well as Using the session identifier of the associated session, all the first structured data and second structured data associated with the associated session are concatenated together.
9. The method according to claim 7, further comprising, before identifying multiple first entities from the session content data based on a named entity recognition algorithm: Convert ambiguous characters in the session content data into characters with the desired meaning; as well as Duplicate fields in the session content are deduplicated.
10. The method according to claim 1, wherein the session attribute data includes one or more of the following: the initiation time of the associated session, the duration of the associated session, the session format of the associated session, the initiation channel of the associated session, the reason for initiating the associated session, and the session request of the associated session.
11. A computing device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method of any one of claims 1-10.
Citation Information
Patent Citations
Multi-round dialogue processing method for professional scenes
CN111026886A
Multi-round dialogue method and system integrating knowledge graph and emotion supervision
CN111651609A