Knowledge graph construction method and device, electronic equipment and storage medium

By acquiring historical interaction information from user devices, identifying intents and entity names, and constructing a knowledge graph, the problem of integrating interaction information from different devices in IoT search engines is solved, enabling more accurate content recommendations.

CN116089622BActive Publication Date: 2026-08-04SHANDONG KURUI TECH CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG KURUI TECH CO LTD
Filing Date
2021-11-05
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In IoT search engines, users may express the same intent through queries input by different devices and interaction methods. However, existing technologies struggle to effectively integrate this information, making named entity recognition unsuitable for knowledge extraction and fusion tasks in IoT knowledge graphs.

Method used

By acquiring multiple devices associated with a user's user identifier, historical interaction information is obtained, including device type, interaction method, search text, and time. An intent classification model is used to identify intent categories, and an entity recognition algorithm is used to determine entity names. Node relationships between devices, intents, and entities are established to construct a knowledge graph.

Benefits of technology

It enables unified knowledge extraction and fusion of multi-device interaction information, providing more accurate cross-device content recommendations and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116089622B_ABST
    Figure CN116089622B_ABST
Patent Text Reader

Abstract

The application relates to a knowledge graph construction method and device, electronic equipment and a storage medium, and is applied to the technical field of search. The method comprises the following steps: acquiring a plurality of devices associated with a user identifier of a user according to the user identifier; acquiring historical interaction information between the user and each device, wherein the historical interaction information comprises a device type, an interaction mode, search text and a search time; determining an intention category corresponding to the historical interaction information according to the historical interaction information; performing entity recognition on the search text by using an entity recognition algorithm to determine an entity name contained in the search text; for each historical interaction information, establishing a node relationship between nodes corresponding to the device type, the intention category corresponding to the historical interaction information and the entity name, and obtaining a knowledge graph associated with the user. The application provides data support for more accurate content recommendation to the user by using the knowledge graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of search technology, and in particular to a method, apparatus, electronic device and storage medium for constructing a knowledge graph. Background Technology

[0002] In Internet of Things (IoT) search engines, users can search for information through various devices, such as televisions, refrigerators, and in-vehicle systems, and interact with these devices in multiple ways, such as text interaction, voice interaction, and touch screen input. However, queries entered using different interaction methods on different devices may express the same user intent. Therefore, how to integrate interactive information from different devices has become a hot topic in the field of IoT search. Summary of the Invention

[0003] To solve the above-mentioned technical problems, or at least partially solve them, this application provides a method, apparatus, electronic device, and storage medium for constructing a knowledge graph.

[0004] According to a first aspect of this application, a method for constructing a knowledge graph is provided, comprising:

[0005] Based on the user's user identifier, obtain multiple devices associated with the user identifier;

[0006] Obtain historical interaction information between the user and each of the plurality of devices, the historical interaction information including device type, interaction method, search text, and search time;

[0007] Based on the historical interaction information, determine the intent category corresponding to the historical interaction information;

[0008] An entity recognition algorithm is used to identify entities in the search text in order to determine the names of the entities contained in the search text;

[0009] For each piece of historical interaction information, establish node relationships between the device type, the intent category corresponding to the historical interaction information, and the nodes corresponding to the entity name, respectively, to obtain a knowledge graph associated with the user.

[0010] According to a second aspect of this application, a knowledge graph construction apparatus is provided, comprising:

[0011] The device acquisition module is used to acquire multiple devices associated with the user's user identifier based on the user's user identifier;

[0012] The historical information acquisition module is used to acquire historical interaction information between the user and each of the multiple devices, including device type, interaction method, search text, and search time.

[0013] An intent recognition module is used to determine the intent category corresponding to the historical interaction information based on the historical interaction information.

[0014] An entity recognition module is used to perform entity recognition on the search text using an entity recognition algorithm to determine the entity names contained in the search text;

[0015] The knowledge fusion module is used to establish node relationships between the device type, the intent category corresponding to the historical interaction information, and the nodes corresponding to the entity name for each of the historical interaction information, so as to obtain a knowledge graph associated with the user.

[0016] According to a third aspect of this application, an electronic device is provided, comprising: a processor for executing a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the knowledge graph construction method described in the first aspect.

[0017] According to a fourth aspect of this application, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the knowledge graph construction method described in the first aspect.

[0018] According to a fifth aspect of this application, a computer program product is provided that, when the computer program product is run on a computer, causes the computer to perform the knowledge graph construction method described in the first aspect.

[0019] The technical solution provided in this application has the following advantages compared with the prior art:

[0020] By acquiring multiple devices associated with a user's identifier and obtaining historical interaction information between the user and each of these devices—including device type, interaction method, search text, and search time—the system determines the intent category corresponding to each historical interaction. Entity recognition algorithms are then used to identify entities within the search text to determine the entity names contained within it. Furthermore, for each historical interaction, node relationships are established between the device type, the intent category corresponding to the historical interaction, and the entity names, resulting in a knowledge graph associated with the user. This approach enables unified knowledge extraction from interaction information across multiple devices, and the fusion of extracted knowledge to construct a knowledge graph. This provides data support for more accurate content recommendations to users using knowledge graphs. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a method for constructing a knowledge graph according to an embodiment of this application;

[0024] Figure 2 Example diagram of a knowledge graph provided for an exemplary embodiment of this application;

[0025] Figure 3 Example diagram of a knowledge graph constructed for an exemplary embodiment of this application;

[0026] Figure 4 A flowchart illustrating a method for constructing a knowledge graph according to another embodiment of this application.

[0027] Figure 5 A schematic diagram of the structure of a knowledge graph construction apparatus provided in an embodiment of this application;

[0028] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0029] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0030] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0031] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0032] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0033] The construction of a knowledge graph typically involves two stages: knowledge extraction and knowledge fusion. Knowledge extraction refers to extracting entities from large-scale text that are related to predefined entity categories in the knowledge graph, usually achieved using named entity recognition. Knowledge fusion refers to merging entities extracted from different data sources into the corresponding entity types within the knowledge graph and constructing relationships between these entities. These entities and relationships can then be used for knowledge reasoning in the application phase of the knowledge graph.

[0034] In IoT search engines, users may use various devices, such as televisions, refrigerators, in-vehicle systems, and smart speakers. Furthermore, there are many ways for users to interact with these devices, such as text interaction, voice interaction, and touchscreen input. However, when users interact with these different devices using different methods, the input information may express the same intent. For example, the actions of checking the weather on a mobile phone are different from those on a smart speaker. This makes existing technologies based solely on named entity recognition (NID) of interactive text unsuitable for knowledge extraction and fusion tasks in IoT knowledge graphs.

[0035] To address the aforementioned issues, this application provides a method for constructing a knowledge graph that can identify the same user intent across different devices and interaction methods. It integrates device information, interaction information, and user intent information into the knowledge graph, enabling unified knowledge extraction of search statements from multiple devices based on user search intent. Furthermore, it establishes relationships between devices, intents, and entities within the knowledge graph, thereby constructing a knowledge graph for cross-device content recommendation.

[0036] Figure 1This is a flowchart illustrating a method for constructing a knowledge graph according to an embodiment of this application. This method can be executed by a knowledge graph construction device provided in this embodiment, wherein the device can be implemented using software and / or hardware, and is generally integrated into electronic devices such as search engine servers and cloud servers. Figure 1 As shown, the method for constructing this knowledge graph may include the following steps:

[0037] Step 101: Obtain multiple devices associated with the user's user identifier.

[0038] The user identifier can be information that identifies the user, such as the user's mobile phone number or user account name.

[0039] Typically, when users first use electronic devices such as smart speakers and in-vehicle devices, they need to enter personal information to register. In this embodiment, multiple devices used by the same user can be obtained based on the user's registration information. For example, devices registered with the same mobile phone number can be obtained as multiple devices associated with the user, and the mobile phone number serves as the user's identifier.

[0040] Step 102: Obtain historical interaction information between the user and each of the multiple devices. The historical interaction information includes device type, interaction method, search text, and search time.

[0041] During a user's use of a device, the device's server typically stores records of user interactions with the device, including the time the user inputs search text, the device's response time, and the interaction methods used by the user. Therefore, in this embodiment, historical interaction information between the user and each device can be obtained from multiple devices, including but not limited to device type, interaction method, search text, and search time.

[0042] The device types include, but are not limited to, televisions, refrigerators, air conditioners, mobile phones, smart speakers, and in-vehicle devices. Interaction methods include touchscreen input, voice interaction, and text input. Search text can be specific search terms, including user-entered search requests, text converted from user speech, text content displayed on touchscreen buttons, etc. Search time can be a specific moment or a pre-set time period, such as morning, noon, afternoon, evening, or late night. Different time periods correspond to different time ranges, such as 6:00-9:00 AM in the morning, 11:00-1:00 PM in the noon period, etc. Device categories and interaction methods can be represented discretely using numbers or other forms; this application does not impose any restrictions on this.

[0043] Step 103: Determine the intent category corresponding to the historical interaction information based on the historical interaction information.

[0044] The intent categories can include, but are not limited to, listening to music, booking a hotel, booking a flight, looking up a recipe, etc., and these intent categories can be predefined.

[0045] In this embodiment of the application, the intent category corresponding to the historical interaction information can be determined based on the historical interaction information.

[0046] As one possible implementation, historical interaction information can be input into a pre-trained intent classification model to obtain the prediction score of each intent category output by the intent classification model. Based on the prediction score of each intent category, the intent category with the highest prediction score can be determined as the intent category corresponding to the historical interaction information.

[0047] The intent classification model can be pre-trained by collecting a large number of training samples. These samples include the interacting device, interaction time, interaction content, interaction method, and labeled intent categories. The model is then used to predict the intent category of the training samples. A loss function is calculated based on the predicted intent category and the labeled intent category. If the loss function does not meet preset conditions, the parameters of the model are continuously adjusted and iterative training is performed until a model that meets the preset conditions is obtained, thus obtaining the intent classification model. The output of the intent classification model is the predicted score (i.e., probability) of the input historical interaction information belonging to each intent category. The higher the predicted score, the more likely the intent category is to correspond to the historical interaction information.

[0048] Considering that the expression of the same intent may differ under different devices and interaction methods, and that the intent corresponding to the same search request may also differ under the same device and interaction method, for example, the intent category corresponding to a user entering a dish name on their phone at noon may be ordering takeout, while the intent corresponding to the same dish name on their phone at night may be searching for a recipe, this embodiment combines multiple features such as device type, interaction method, and search time to perform intent recognition in order to improve the accuracy of intent recognition.

[0049] As another possible implementation, the historical interaction information may also include the target content selected by the user from multiple recommended contents. When determining the intent category corresponding to the historical interaction information based on the historical interaction information, the intent category corresponding to the historical interaction information may be determined based on the target content.

[0050] User responses to recommended content better reflect their query intent. For example, in a user's search, if the device recommends content A, B, and C to the user's search request, and the user selects content B, then the intent corresponding to content B is more consistent with the user's current query intent. Therefore, in one optional embodiment of this application, the target content selected by the user from the multiple recommended contents can also be obtained, and intent recognition can be performed on the target content. The intent category determined based on the target content is then identified as the intent category corresponding to the historical interaction information.

[0051] Step 104: Use an entity recognition algorithm to perform entity recognition on the search text to determine the entity names contained in the search text.

[0052] In this embodiment of the application, for the search text in the historical interaction information, an entity recognition algorithm can be used to identify the entities in the search text in order to determine the entity names contained in the search text.

[0053] Among them, entity recognition algorithms may include, but are not limited to, open-source tools such as Conditional Random Fields (CRF++) and Bidirectional Long Short-Term Memory Network-Conditional Random Fields (BiLSTM-CRF).

[0054] In this embodiment of the application, entity names may include, but are not limited to, names of people and places. For example, entity recognition of the search text "I want to listen to Zhang San's songs" can identify the entity name as "Zhang San".

[0055] Step 105: For each piece of historical interaction information, establish the node relationship between the device type, the intent category corresponding to the historical interaction information, and the node corresponding to the entity name, respectively, to obtain a knowledge graph associated with the user.

[0056] In this embodiment of the application, after identifying the user's intent category and the entity names contained in each search text, the node relationships between the nodes corresponding to the device type, the intent category and the entity names corresponding to the historical interaction information can be established to obtain a knowledge graph associated with the user.

[0057] As an optional implementation method, when constructing a knowledge graph, the node corresponding to the device type can be identified as a device node, the node corresponding to the intent category can be identified as an intent node, and the node corresponding to the entity name can be identified as an entity node. In this way, the node relationship between device nodes, intent nodes, and entity nodes can be established to obtain a knowledge graph associated with the user.

[0058] It is understandable that the types of nodes included in the constructed knowledge graph differ depending on the content contained in the search text. For example, if the search text only contains the name of an application, the entity nodes in the constructed knowledge graph will be application nodes. However, if the search text contains both the name of an application and the name of a singer, the entity nodes in the constructed knowledge graph will be application nodes and person nodes. Therefore, in an optional embodiment of this application, the type of entity node included in the constructed knowledge graph can be determined based on the identified entity name. That is, determining that the node corresponding to the entity name is an entity node can include:

[0059] When the entity name is a person's name, the node corresponding to the entity name is determined to be a person node;

[0060] When the entity name is an application name, the node corresponding to the entity name is determined to be an application node; when the entity name is a location name, the node corresponding to the entity name is determined to be a location node.

[0061] In this embodiment, when the identified entity name is a person's name, the type of the entity node corresponding to the person's name can be determined as a person node; when the entity name is the name of an application, the type of the entity node corresponding to the application name can be determined as an application node; and when the entity name is a location name, the type of the entity node corresponding to the location name can be determined as a location node. This establishes node relationships between device nodes, intent nodes, application nodes, person nodes, and location nodes, generating a knowledge graph associated with the user. This enriches the node types in the knowledge graph, providing data support for accurate content recommendation in the future.

[0062] For example, suppose a user previously used the K Music Player on an in-car device to play a song created by Zhang San and Li Si. The intent category can be identified as "listening to music," and the entity names are K Music Player, Zhang San, and Li Si. Therefore, the node corresponding to K Music Player is determined as the application node, and the node corresponding to Zhang San and Li Si is determined as the person node. The node relationships between the device node, intent node, person node, and application node are established, resulting in: Figure 2 The knowledge graph shown. From Figure 2 As can be seen, the device node's node information is "in-vehicle device," the intent node's node information is "listening to music," the application node's node information is "K Music Player," there are two person nodes, with node information for Zhang San and Li Si respectively. The node relationship between the two person nodes is "partners," the relationship between the two person nodes and the intent node is "singer," the node relationship between the device node and the application node is "built-in application," and the node relationship between the intent node and the application node is "supported application."

[0063] It should be noted that the aforementioned entity nodes, including person nodes, application nodes, and location nodes, are only examples used to explain this application and should not be construed as limiting this application. As the number of devices in the Internet of Things increases and the amount of user search content increases, other types of entity nodes can also be added. Other types of entities not mentioned in this application should also be included in the disclosure of this application.

[0064] The knowledge graph construction method in this embodiment obtains multiple devices associated with a user's identifier based on the user's identifier, and acquires historical interaction information between the user and each of these devices. This historical interaction information includes device type, interaction method, search text, and search time. Then, based on the historical interaction information, the intent category corresponding to the historical interaction information is determined, and an entity recognition algorithm is used to identify entities in the search text to determine the entity names contained within the search text. Furthermore, for each piece of historical interaction information, node relationships are established between nodes corresponding to device type, the intent category corresponding to the historical interaction information, and the entity names, respectively, resulting in a knowledge graph associated with the user. This achieves unified knowledge extraction from interaction information across multiple devices, and knowledge fusion of the extracted knowledge to construct a knowledge graph, providing data support for more accurate content recommendations to users using knowledge graphs.

[0065] The knowledge graph construction method provided in this application can identify the same user intent across different devices and interaction methods, and integrate device information, user intent, and interaction information to obtain a knowledge graph. For example, Figure 3 An example diagram of a knowledge graph constructed for an exemplary embodiment of this application. For example... Figure 3 As shown, there are three devices associated with the user: a mobile phone, a speaker, and an in-vehicle device. The mobile phone supports text, voice, and touchscreen interaction; the speaker supports voice and touchscreen interaction; and the in-vehicle device supports text, voice, and touchscreen interaction. The user previously entered a search request "***" (song title) as text on their mobile phone, entered a search request "I want to listen to Zhang San's songs" as voice through the speaker, and clicked the "Personal Radio" button on "XX Music" via the touchscreen on the in-vehicle device. By identifying these historical interactions, it can be determined that they all reflect the same user intent: listening to music. Furthermore, the entities identified in the information are the person name "Zhang San" and the application name "XX Music." Therefore, based on the identified information and device information, a system can be constructed as follows: Figure 3 The knowledge graph shown enables information fusion across multiple devices, which is beneficial for cross-device content recommendation.

[0066] The knowledge graph constructed in the foregoing embodiments can be used for content recommendation to users, thereby improving the accuracy of content recommendations. Therefore, in one optional embodiment of this application, such as... Figure 4 As shown, in Figure 1 Based on the illustrated embodiment, after step 105, the method may further include the following steps:

[0067] Step 201: Obtain the search request input by the user through the first device and the current time of the first device.

[0068] In this embodiment, the first device can be any device associated with the user, including but not limited to mobile phones, speakers, in-vehicle devices, etc. The user can input a search request through the interaction methods supported by the first device. For example, if the first device is a mobile phone, and the mobile phone supports three interaction methods: text, voice, and touch screen, then the user can input a search request through any of the three interaction methods. The current time of the first device is the system time of the first device when the user inputs the search request.

[0069] Step 202: Based on the device type of the first device, the search request, the current time, and the input method of the search request, the query intent corresponding to the search request is determined using the intent classification model.

[0070] It is understandable that when a user inputs a search request, the input method of the search request can also be determined. For example, if the search request is voice information, then the input method of the search request can be determined to be voice input. When the search request is information generated by clicking on a function of an application installed on the first device, then the input method of the search request can be determined to be touch screen input.

[0071] In this embodiment, after obtaining the search request input by the user through the first device and the current time of the first device, the device type of the first device, the search request, the current time and the input method of the search request can be input into the pre-trained intent classification model. The intent classification model inputs the predicted score of the search request to each intent category, obtains the predicted score of each intent category, and determines the intent category with the highest predicted score as the query intent corresponding to the search request.

[0072] Step 203: Perform entity identification on the search request to obtain the name of the target entity in the search request.

[0073] In this embodiment, for the obtained search request, entity recognition algorithms such as Conditional Random Field (CRF) can be used to identify the entity in the search request in order to obtain the name of the target entity in the search request.

[0074] For example, assuming the user enters a search request for "how to make sweet and sour pork", the target entity name can be identified as "sweet and sour pork".

[0075] Step 204: Query the knowledge graph associated with the user to determine the graph information that matches the query intent. The graph information includes node information related to the target entity name.

[0076] Among them, the node information related to the target entity name can be the node information of the node where the target entity name is located, or the node information of other nodes that are related to the node where the target entity name is located.

[0077] Step 205: Based on the query intent and the graph information, recommend content to the user on the first device.

[0078] In this embodiment, after determining the query intent and target entity name corresponding to the search request, the knowledge graph associated with the user can be queried to determine the graph information recorded in the knowledge graph that matches the query intent. The graph information contains node information related to the target entity name. Then, content recommendation is performed based on the query intent and graph information, and content that meets the query intent and graph information is recommended to the user through the first device.

[0079] For example, suppose a user listened to a duet by Zhang San and Li Si on a home speaker in the morning. The constructed knowledge graph contains the following node relationships:

[0080] Speaker (Device Node) ---- Built-in Application ---- ***Music (Application Node)

[0081] Listen to music (intention node) ---- Singer ---- Zhang San (character node)

[0082] Listen to music (intention node) ---- Singer ---- Li Si (character node)

[0083] Li Si (character node) ---- Partner ---- Zhang San (character node)

[0084] Suppose that a user is driving in the afternoon and interacts with the in-car device using voice, saying "I want to listen to Zhang San's songs." Based on this interaction information, the user's intention can be identified as listening to music, and the identified entity name is Zhang San. By querying the aforementioned knowledge graph, it can be determined that the singers associated with the intention of listening to music are Zhang San and Li Si, and the two have sung songs together. Therefore, the in-car device can recommend songs sung by Zhang San and Li Si to the user.

[0085] The knowledge graph construction method in this embodiment obtains the search request input by the user through a first device and the current time of the first device. Based on the device type, search request, current time, and input method of the search request, it uses an intent classification model to determine the query intent corresponding to the search request and performs entity recognition on the search request to obtain the target entity name in the search request. Then, it queries the knowledge graph associated with the user to determine the graph information that matches the query intent. The graph information includes node information related to the target entity name. Finally, based on the query intent and graph information, it recommends content to the user on the first device. Thus, it realizes cross-device content recommendation based on knowledge graph, which helps to improve the accuracy of content recommendation.

[0086] In one optional embodiment of this application, the target entity name is the application name, and the graph information includes the target device type of the device node related to the application node where the application name is located. The method further includes:

[0087] If the second device corresponding to the target device type is different from the first device, the target application name of the application node associated with the target device node where the first device is located is obtained from the knowledge graph associated with the user. The target application node where the target application name is located is associated with the intent node where the query intent is located.

[0088] The first device recommends the target application corresponding to the target application name to the user.

[0089] In this embodiment, if the target entity name identified from the search request is an application name, the graph information determined by the knowledge graph includes the device type of the device node associated with the application node where the application name is located, referred to as the target device type. Based on the target device type, a second device can be determined. For example, if the target device type is a mobile phone, then the second device is a mobile phone; if the target device type is a refrigerator, then the second device is also a refrigerator. If the second device is different from the first device, the target application name of the application node associated with the target device node where the first device is located can be obtained from the user-associated knowledge graph. Here, the target application node where the target application name is located is associated with the intent node where the query intent is located. That is, the target application name is the application name on the target application node associated with the intent node where the query intent is located, among at least one application node associated with the target device node.

[0090] For example, assuming the application name on the application node associated with the target device node is ***Music or Navigation, and the identified query intent is to listen to music, then the target application name can be determined to be ***Music.

[0091] Furthermore, the first device can recommend the target application corresponding to the target application name to the user.

[0092] For example, suppose the constructed knowledge graph contains the following node relationships:

[0093] Vehicle-mounted device (device node) ---- Built-in application ---- Music player 1 (application node) Mobile phone (device node) ---- Built-in application ---- Music player 2 (application node)

[0094] Listen to music (intent node) ---- Support ---- Music Player 1 (application node)

[0095] Listen to music (intent node) ---- Support ---- Music Player 2 (application node)

[0096] Suppose a user enters a search request for "open music player 2" through the in-vehicle device. Through intent recognition, it can be determined that the query intent is to listen to music. Assuming that the app store of the in-vehicle device does not have the app "music player 2", by querying the knowledge graph, it can be deduced that the app "music player 1" exists under the intent of listening to music. Since the in-vehicle device has "music player 1" built in, the app "music player 1" can be recommended to the user through the in-vehicle device.

[0097] In this embodiment, when the identified target entity name is an application name, the target device type of the device node related to the application node where the application name is located is obtained. If the second device corresponding to the target device type is different from the first device, the target application name of the application node associated with the target device node where the first device is located is obtained from the knowledge graph associated with the user. Then, the target application corresponding to the target application name is recommended to the user through the first device. Thus, when the first device does not support the application requested by the user, other applications supported by the first device that can satisfy the query intent are determined through the knowledge graph, and other applications are recommended to the user to meet the user's needs. This can meet the user's needs as much as possible and improve the user experience.

[0098] Corresponding to the above method embodiments, this application also provides a knowledge graph construction apparatus.

[0099] Figure 5 This is a schematic diagram of the structure of a knowledge graph construction apparatus provided in an embodiment of this application, as shown below. Figure 5 As shown, the knowledge graph construction device 30 may include: a device acquisition module 310, a historical information acquisition module 320, an intent recognition module 330, an entity recognition module 340, and a knowledge fusion module 350.

[0100] The device acquisition module 310 is used to acquire multiple devices associated with the user identifier based on the user identifier.

[0101] The historical information acquisition module 320 is used to acquire historical interaction information between the user and each of the plurality of devices, the historical interaction information including device type, interaction method, search text and search time;

[0102] The intent recognition module 330 is used to determine the intent category corresponding to the historical interaction information based on the historical interaction information.

[0103] The entity recognition module 340 is used to perform entity recognition on the search text using an entity recognition algorithm to determine the entity names contained in the search text;

[0104] The knowledge fusion module 350 is used to establish node relationships between the device type, the intent category corresponding to the historical interaction information, and the nodes corresponding to the entity name for each of the historical interaction information, so as to obtain a knowledge graph associated with the user.

[0105] Optionally, the intent recognition module 330 is further configured to:

[0106] The historical interaction information is input into a pre-trained intent classification model to obtain the prediction score for each intent category output by the intent classification model.

[0107] Based on the predicted score of each intent category, the intent category with the highest predicted score is determined as the intent category corresponding to the historical interaction information.

[0108] Optionally, the historical interaction information also includes the target content selected by the user from multiple recommended content items, and the intent recognition module 330 is further configured to:

[0109] Based on the target content, determine the intent category corresponding to the historical interaction information.

[0110] Optionally, the knowledge fusion module 350 includes:

[0111] A device node determination unit is used to determine that the node corresponding to the device category is a device node;

[0112] An intent node determination unit is used to determine that the node corresponding to the intent category is an intent node;

[0113] An entity node determination unit is used to determine that the node corresponding to the entity name is an entity node.

[0114] The relationship establishment unit is used to establish node relationships between the device node, the intent node, and the entity node, and generate a knowledge graph associated with the user.

[0115] Optionally, the entity node determining unit is further configured to:

[0116] When the entity name is a person's name, the node corresponding to the entity name is determined to be a person node;

[0117] When the entity name is an application name, the node corresponding to the entity name is determined to be an application node;

[0118] When the entity name is a location name, the node corresponding to the entity name is determined to be a location node.

[0119] Optionally, the knowledge graph construction apparatus 30 further includes:

[0120] The request acquisition module is used to acquire the search request input by the user through the first device and the current time of the first device;

[0121] The intent determination module is used to determine the query intent corresponding to the search request based on the device type of the first device, the search request, the current time, and the input method of the search request, using the intent classification model.

[0122] An entity name determination module is used to perform entity identification on the search request in order to obtain the target entity name in the search request.

[0123] The query module is used to query the knowledge graph associated with the user to determine the graph information that matches the query intent. The graph information includes node information related to the name of the target entity.

[0124] The content recommendation module is used to recommend content to the user on the first device based on the query intent and the graph information.

[0125] Optionally, the target entity name is the application name, the graph information includes the target device type of the device node related to the application node where the application name is located, and the knowledge graph construction device 30 further includes:

[0126] The application acquisition module is used to obtain the target application name of the application node associated with the target device node where the first device is located from the knowledge graph associated with the user when the second device corresponding to the target device type is different from the first device. The target application node where the target application name is located is associated with the intent node where the query intent is located.

[0127] An application recommendation module is used to recommend the target application corresponding to the target application name to the user through the first device.

[0128] The knowledge graph construction apparatus provided in this disclosure can execute any knowledge graph construction method applicable to electronic devices such as search engine servers, and has the corresponding functional modules and beneficial effects of the execution method. Content not described in detail in the apparatus embodiments of this disclosure can be referred to the descriptions in any method embodiments of this disclosure.

[0129] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0130] In an exemplary embodiment of this application, an electronic device is also provided, comprising: a processor, the processor being configured to execute a computer program stored in a memory, the computer program being executed by the processor to implement the steps of the knowledge graph construction method as described in the above embodiments.

[0131] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. It should be noted that... Figure 6 The electronic device 500 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0132] like Figure 6 As shown, the electronic device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage section 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for system operation. The CPU 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0133] The following components are connected to I / O interface 505: an input section 506 including a keyboard, mouse, etc.; an output section 507 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a local area network (LAN) card, modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to I / O interface 505 as needed. A removable medium 511, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 510 as needed so that computer programs read from it can be installed into storage section 508 as needed.

[0134] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 509, and / or installed from removable medium 511. When the computer program is executed by central processing unit 501, it performs the various functions defined in the apparatus of this application.

[0135] In this embodiment of the application, a computer-readable storage medium is also provided, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the knowledge graph construction method described in the above embodiments are implemented.

[0136] It should be noted that the computer-readable storage medium shown in this application can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, radio frequency, etc., or any suitable combination thereof.

[0137] In this embodiment of the application, a computer program product is also provided, which, when run on a computer, causes the computer to execute the steps of the knowledge graph construction method described in the above embodiments.

[0138] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0139] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for constructing a knowledge graph, characterized in that, Applied to the field of Internet of Things (IoT) search, the method includes: Based on the user's user identifier, obtain multiple devices associated with the user identifier; Obtain historical interaction information between the user and each of the plurality of devices, the historical interaction information including device type, interaction method, search text, and search time; Based on the historical interaction information, determine the intent category corresponding to the historical interaction information; An entity recognition algorithm is used to identify entities in the search text in order to determine the names of the entities contained in the search text; For each piece of historical interaction information, establish node relationships between the device type, the intent category corresponding to the historical interaction information, and the nodes corresponding to the entity name, respectively, to obtain a knowledge graph associated with the user; wherein, the node corresponding to the device type is determined as a device node; the node corresponding to the intent category is determined as an intent node; the node corresponding to the entity name is determined as an entity node; establish node relationships between the device node, the intent node, and the entity node to generate a knowledge graph associated with the user; The method further includes: Obtain the search request input by the user through the first device and the current time of the first device; Based on the device type of the first device, the search request, the current time, and the input method of the search request, the query intent corresponding to the search request is determined using an intent classification model; Entity identification is performed on the search request to obtain the name of the target entity in the search request; The knowledge graph associated with the user is queried to determine the graph information that matches the query intent, the graph information including node information related to the target entity name; Based on the query intent and the graph information, content is recommended to the user on the first device; The target entity name is the application name, the graph information includes the target device type of the device node related to the application node where the application name is located, and the method further includes: If the second device corresponding to the target device type is different from the first device, the target application name of the application node associated with the target device node where the first device is located is obtained from the knowledge graph associated with the user. The target application node where the target application name is located is associated with the intent node where the query intent is located. The first device recommends the target application corresponding to the target application name to the user.

2. The method for constructing a knowledge graph according to claim 1, characterized in that, The step of determining the intent category corresponding to the historical interaction information based on the historical interaction information includes: The historical interaction information is input into a pre-trained intent classification model to obtain the prediction score for each intent category output by the intent classification model. Based on the predicted score of each intent category, the intent category with the highest predicted score is determined as the intent category corresponding to the historical interaction information.

3. The method for constructing a knowledge graph according to claim 1, characterized in that, The historical interaction information also includes the target content selected by the user from multiple recommended content items. Determining the intent category corresponding to the historical interaction information based on the historical interaction information includes: Based on the target content, determine the intent category corresponding to the historical interaction information.

4. The method for constructing a knowledge graph according to claim 1, characterized in that, The step of determining that the node corresponding to the entity name is an entity node includes: When the entity name is a person's name, the node corresponding to the entity name is determined to be a person node; When the entity name is an application name, the node corresponding to the entity name is determined to be an application node; When the entity name is a location name, the node corresponding to the entity name is determined to be a location node.

5. A knowledge graph construction apparatus, characterized in that, include: The device acquisition module is used to acquire multiple devices associated with the user's user identifier based on the user's user identifier; The historical information acquisition module is used to acquire historical interaction information between the user and each of the multiple devices, including device type, interaction method, search text, and search time. An intent recognition module is used to determine the intent category corresponding to the historical interaction information based on the historical interaction information. An entity recognition module is used to perform entity recognition on the search text using an entity recognition algorithm to determine the entity names contained in the search text; The knowledge fusion module is used to establish node relationships between the device type, the intent category corresponding to the historical interaction information, and the nodes corresponding to the entity name for each of the historical interaction information, so as to obtain a knowledge graph associated with the user. The knowledge fusion module includes: A device node determination unit is used to determine that the node corresponding to the device type is a device node; An intent node determination unit is used to determine that the node corresponding to the intent category is an intent node; An entity node determination unit is used to determine that the node corresponding to the entity name is an entity node. A relationship establishment unit is used to establish node relationships between the device node, the intent node, and the entity node, and generate a knowledge graph associated with the user. The device further includes: The request acquisition module is used to acquire the search request input by the user through the first device and the current time of the first device; The intent determination module is used to determine the query intent corresponding to the search request based on the device type of the first device, the search request, the current time, and the input method of the search request, using an intent classification model. An entity name determination module is used to perform entity identification on the search request in order to obtain the target entity name in the search request. The query module is used to query the knowledge graph associated with the user to determine the graph information that matches the query intent. The graph information includes node information related to the name of the target entity. The content recommendation module is used to recommend content to the user on the first device based on the query intent and the graph information; The target entity name is the application name, the graph information includes the target device type of the device node related to the application node where the application name is located, and the device further includes: The application acquisition module is used to obtain the target application name of the application node associated with the target device node where the first device is located from the knowledge graph associated with the user when the second device corresponding to the target device type is different from the first device. The target application node where the target application name is located is associated with the intent node where the query intent is located. An application recommendation module is used to recommend the target application corresponding to the target application name to the user through the first device.

6. An electronic device, characterized in that, include: A processor for executing a computer program stored in a memory, wherein the computer program, when executed by the processor, implements the steps of the knowledge graph construction method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the knowledge graph construction method as described in any one of claims 1-4.