Knowledge graph generation method, intelligent assistant and operation method thereof, electronic device, computer storage medium and computer program product
By generating user's knowledge graph and user description information, the smart assistant can understand the user's knowledge structure and mastery, solving the problem that the smart assistant cannot provide personalized conversations and improving the quality of question and answers.
Patent Information
- Application Number
- CN202411987172.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-29
AI Technical Summary
The smart assistant cannot quickly understand the user's existing knowledge areas, resulting in the inability to provide personalized conversations and improve the quality of Q&A during subsequent conversations.
By generating a user's knowledge graph, characterizing the records of the user's knowledge acquisition based on user data, and generating user description information based on the knowledge graph, so that the intelligent assistant can understand the user's knowledge structure and mastery.
Improve the quality of Q&A without requiring a large amount of initialization input from users, allowing smart assistants to provide more personalized conversations and more accurate answers.
Smart Images

Figure CN119903192A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of personal knowledge management, and in particular, to a method for generating a knowledge graph, an operating method of an intelligent assistant, an electronic device, an intelligent assistant, a computer storage medium, and a computer program product. Background Art
[0002] As intelligent assistants evolve, clients are provided with the ability to remember key information from a conversation, but this is achieved through user input and interaction with the intelligent assistant. These intelligent assistants cannot quickly understand the user's existing knowledge domains, so for questions in certain knowledge domains, these intelligent assistants cannot directly adjust the answers they provide to match the user's mastery of these knowledge domains. Since intelligent assistants do not understand the user's existing knowledge structure, they cannot provide users with better personalized conversations in subsequent conversations. Summary of the invention
[0003] The embodiments of the present disclosure provide a method for generating a knowledge graph, a method for operating an intelligent assistant, an electronic device, an intelligent assistant, a computer storage medium, and a computer program product.
[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a knowledge graph, comprising: sending an access authorization request to obtain access rights to user data, wherein the user data is used to characterize a record of a user's acquisition of knowledge; in response to receiving an access authorization response to the access rights, accessing the user data; generating a knowledge graph for the user based on the user data; and generating user description information for the user based on the knowledge graph.
[0005] In a second aspect, an embodiment of the present disclosure provides an operating method of an intelligent assistant, comprising: determining whether the intelligent assistant stores a knowledge graph of a user; in response to the intelligent assistant not storing the knowledge graph, generating the knowledge graph according to the knowledge graph generation method of an embodiment of the present disclosure; in response to the user's input operation, generating initialization prompt information according to the user description information, and outputting the operation result to the user based on the initialization prompt information.
[0006] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements a method for generating a knowledge graph according to an embodiment of the present disclosure when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present disclosure provides an intelligent assistant, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor implements an operating method of the intelligent assistant according to an embodiment of the present disclosure when executing the computer program.
[0008] In a fifth aspect, an embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements a method for generating a knowledge graph according to an embodiment of the present disclosure or a method for operating an intelligent assistant according to an embodiment of the present disclosure.
[0009] In a sixth aspect, an embodiment of the present disclosure provides a computer program product, which includes a computer program, which, when executed by a processor, implements a method for generating a knowledge graph according to an embodiment of the present disclosure or implements a method for operating an intelligent assistant according to an embodiment of the present disclosure.
[0010] According to an embodiment of the present disclosure, a knowledge graph can be established for a user based on user data, and user description information can be generated based on the established knowledge graph, so that the intelligent assistant can understand the user's existing knowledge areas and improve the quality of questions and answers without requiring the user to perform a large amount of initialization input. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In the accompanying drawings of the embodiments of the present disclosure:
[0012] Figure 1 is a flowchart showing a method for generating a knowledge graph according to an embodiment of the present disclosure;
[0013] Figure 2 is a detailed flowchart showing step S130 in the method for generating a knowledge graph according to an embodiment of the present disclosure;
[0014] Figure 3 is a detailed flowchart showing step S140 in the method for generating a knowledge graph according to an embodiment of the present disclosure;
[0015] Figure 4 is another detailed flowchart showing step S140 in the method for generating a knowledge graph according to an embodiment of the present disclosure;
[0016] Figure 5 is another flow chart showing a method for generating a knowledge graph according to an embodiment of the present disclosure;
[0017] Figure 6 The knowledge graph displayed according to the embodiment of the present disclosure is exemplarily shown;
[0018] Figure 7 The operation of the displayed knowledge graph according to the embodiment of the present disclosure is exemplarily shown;
[0019] Figure 8 is another flow chart showing a method for generating a knowledge graph according to an embodiment of the present disclosure;
[0020] Fig. 9 is a block diagram showing a system according to an embodiment of the present disclosure;
[0021] Fig.10 is a flow chart showing an operating method of an intelligent assistant according to an embodiment of the present disclosure;
[0022] Fig.11 is a block diagram showing an electronic device according to an embodiment of the present disclosure;
[0023] Fig.12 is a block diagram showing an intelligent assistant according to an embodiment of the present disclosure;
[0024] Fig.13 is a block diagram illustrating a computer storage medium according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0026] The present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms, and the present disclosure should not be construed as being limited to the embodiments set forth below. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete, and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0027] The accompanying drawings of the embodiments of the present disclosure are used to provide a further understanding of the embodiments of the present disclosure, and constitute a part of the specification, and are used together with the detailed embodiments to explain the present disclosure, and do not constitute a limitation of the present disclosure. By describing the detailed embodiments with reference to the accompanying drawings, the above and other features and advantages will become more apparent to those skilled in the art.
[0028] The present disclosure may be described with reference to plan views and / or cross-sectional views by means of ideal schematic views of the present disclosure. Therefore, the exemplary illustrations may be modified according to manufacturing techniques and / or tolerances.
[0029] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0030] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. The term "and / or" as used in the present disclosure includes any and all combinations of one or more related enumerated items. The singular forms "one" and "the" as used in the present disclosure are also intended to include plural forms, unless the context clearly indicates otherwise. The terms "including", "made of..." as used in the present disclosure specify the presence of the features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0031] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless the disclosure explicitly defines it as such.
[0032] The present disclosure is not limited to the embodiments shown in the drawings, but includes modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions, but are not intended to be limiting.
[0033] As intelligent assistants evolve, clients are provided with the ability to remember key information from a conversation, but this is achieved through user input and interaction with the intelligent assistant. These intelligent assistants cannot quickly understand the user's existing knowledge domains, so for questions in certain knowledge domains, these intelligent assistants cannot directly adjust the answers they provide to match the user's mastery of these knowledge domains. Since intelligent assistants do not understand the user's existing knowledge structure, they cannot provide users with better personalized conversations in subsequent conversations.
[0034] On the other hand, although users have gained new knowledge through question and answer sessions with smart assistants, the introduction of smart assistants has not fundamentally changed the way users learn, and cannot fully leverage the more efficient and in-depth learning effects brought by smart assistants.
[0035] In the currently commonly used conversational intelligent assistants, initialization prompts (also called system prompts) need to be executed so that the intelligent assistants can obtain context and make subsequent answers to specific questions more targeted to the relevant knowledge field to obtain high-quality results.
[0036] The disclosed embodiment provides a method for generating a knowledge graph, which can establish a knowledge graph for a user based on user data, and generate user description information based on the established knowledge graph. After obtaining the user's question, the intelligent assistant can perform an initialization prompt operation based on the user description information, so that the intelligent assistant can understand the user's existing knowledge domain and improve the quality of the question and answer without requiring the user to perform a large amount of initialization input.
[0037] Figure 1 It is a flowchart showing a method for generating a knowledge graph according to an embodiment of the present disclosure.
[0038] like Figure 1As shown, the method for generating a knowledge graph according to an embodiment of the present disclosure includes steps S110 to S140.
[0039] In step S110, an access authorization request is sent to obtain access rights to user data, wherein the user data is used to represent a record of the user's acquisition of knowledge.
[0040] In step S120, in response to receiving an access authorization response to the access authority, the user data is accessed.
[0041] In step S130, a knowledge graph of the user is generated based on the user data.
[0042] In step S140, user description information of the user is generated based on the knowledge graph.
[0043] According to an embodiment of the present disclosure, user data may include multiple types of user data, and sending an access authorization request to obtain access rights to user data (i.e., step S110) may include: sending access authorization requests for multiple types of user data to obtain access rights to multiple types of user data.
[0044] According to an embodiment of the present disclosure, in response to receiving an access authorization response to access rights, accessing user data (ie, step S120) may include: in response to receiving an access authorization response to a specific type of user data, accessing a specific type of user data.
[0045] According to an embodiment of the present disclosure, user data may include at least one of a document opening record, a search record, a browsing record, and favorite content.
[0046] In an embodiment of the present disclosure, before accessing user data to build a knowledge graph for the user, it is necessary to obtain the user's permission, that is, it is necessary to issue an authorization request to the user, and the user data of the user can only be accessed after obtaining an access authorization response.
[0047] User data may include various types of user data, including (but not limited to), for example, user opening records of documents, user search records using search engines, user browsing records of web pages, and content in the user's personal favorites, etc. These user data can be regarded as records of users acquiring various types of knowledge.
[0048] By accessing these user data, we can fully understand the user's knowledge structure and the user's knowledge depth in various knowledge fields. In this disclosure, knowledge depth refers to the user's mastery of a knowledge field. The more a user knows about a certain knowledge field, or the position of the knowledge points mastered by the user in the knowledge system of the knowledge field to which it belongs is closer to the frontier knowledge, the deeper the user's knowledge depth in this knowledge field is.
[0049] When the user data includes multiple different types of user data, the access authorization response to the access permission can only grant authorization for a specific type of user data. In this case, only the specific type of user data that is authorized to be accessed can be accessed, and the user's knowledge graph is established based on the specific type of user data.
[0050] Figure 2 It is a detailed flowchart showing step S130 in the method for generating a knowledge graph according to an embodiment of the present disclosure.
[0051] like Figure 2 As shown, according to an embodiment of the present disclosure, generating a user's knowledge graph based on user data (ie, step S130) may include the following steps S131 to S134.
[0052] In step S131, when the user data includes a document opening record, the content of the document recorded in the document opening record is read.
[0053] In step S132, when the user data includes at least one of search records, browsing records, and favorite contents, the content of the web page corresponding to at least one of the search records, browsing records, and favorite contents is read.
[0054] In step S133, the content of the read document and / or the content of the read web page is extracted and classified to generate structured feature data.
[0055] In step S134, one or more knowledge points in the structured feature data are described to generate a knowledge graph.
[0056] According to an embodiment of the present disclosure, extracting and classifying the content of the read document and / or the content of the read web page to generate structured feature data (i.e., step S133) may include: extracting and classifying the content of the document and / or the web page according to type, knowledge field, keywords, and subject to which it belongs to generate structured feature data, wherein the structured feature data includes structured parameters, and the structured parameters include: title, author, knowledge field, knowledge depth, and keywords.
[0057] The following is a detailed description of step S130 in the method for generating a knowledge graph according to an embodiment of the present disclosure through a specific example. It should be appreciated that the following example is only for illustration and is not intended to limit the present disclosure.
[0058] For example, access to various types of user data can be achieved by calling the agent tool library of the intelligent assistant, the content of each document or web page can be extracted and classified by calling the Large Language Model (LLM) or Natural Language Processing (NLP) tools, and the knowledge graph can be established through standard knowledge graph description languages such as Web Ontology Language (OWL).
[0059] The first step is to call the file access tool of the intelligent assistant, read various types of user data that are authorized to access, and list all the content and / or URLs therein, including titles, Uniform Resource Locators (URLs), etc.
[0060] In the second step, the intelligent assistant stores the read file content in the database to be analyzed.
[0061] The third step is to call the web page access tool in the Agent tool library to read the content of the web page corresponding to each URL one by one.
[0062] The fourth step is to create an empty knowledge graph.
[0063] The fifth step is to call LLM or NLP tools according to the preset analysis mode to extract and classify the content of each document or web page, and extract structured feature data based on knowledge attributes such as type, knowledge field, keywords, first-level disciplines and second-level disciplines.
[0064] The sixth step is to use a standard knowledge graph description language such as OWL to describe one or more knowledge points involved, and add the one or more knowledge points to the established knowledge graph, thereby completing the establishment of the knowledge graph.
[0065] Taking the case where user data includes favorite content, after receiving an access authorization response to the favorite content, the user's knowledge graph can be established by calling the LLM of the intelligent assistant. The specific method is as follows.
[0066] For a personal favorites containing multiple URLs, analyze the webpage content corresponding to all these URLs. For each URL, do the following:
[0067] 1. Access the given URL and obtain the entire content of the web page corresponding to the URL;
[0068] 2. Analyze the main content of the web page and extract key information, including (but not limited to): title, author, publication date (if any), abstract or core argument;
[0069] 3. Determine the field of knowledge to which the webpage belongs, for example, computer science, history, art, etc.
[0070] 4. Evaluate the depth of the knowledge points reflected in the webpage content within the knowledge field to which it belongs, for example, elementary, intermediate, or advanced;
[0071] 5. Based on the above analysis results, create structured output for insertion into the database of the knowledge graph described by OWL.
[0072] 6. Return the results in JavaScript Object Notation (JSON) format, ensuring that each field has a clear label for subsequent processing.
[0073] The following is an example of the expected results:
[0074] {"url":"https: / / example.com / article",
[0075] "title":"Article title",
[0076] "author":"Author name",
[0077] "publish_date":"2023-09-15",
[0078] "summary":"A brief summary of the article outlining the core arguments and conclusions.",
[0079] "domain":"Knowledge domain name",
[0080] "depth":"Beginner / Intermediate / Advanced", / / or use a scoring system with a score, such as 1-5 points
[0081] "metadata":{"keywords":["Keyword 1","Keyword 2"],
[0082] "related_topics":["Related topic 1","Related topic 2"]
[0083] },
[0084] "owl_knowledge_graph_entry":{"node_id":"Unique node ID",
[0085] "node_label":"Node label",
[0086] "properties":{"property1":"value1","property2":"value2"},
[0087] "relationships":[{"target_node_id":"target node ID","relationship_type":"relationship type"}]
[0088] }
[0089] }
[0090] Through the above call to LLM, the knowledge graph entry associated with each data entry can be analyzed and inserted into the knowledge graph database.
[0091] By using the established knowledge graph, we can know which knowledge field (or fields) most of the knowledge points mastered by the user are mainly concentrated in, and we can analyze the knowledge depth of the user in each knowledge field. The knowledge depth can be determined according to the position of the knowledge point in the knowledge system of the knowledge field to which it belongs. For example, the knowledge point can belong to general common sense knowledge, knowledge mastered by undergraduates, knowledge mastered by graduate students, or knowledge that is only involved in the current research frontier of the knowledge field. By determining the knowledge depth by the position of the knowledge point, we can distinguish whether the user has mastered popular science knowledge or cutting-edge knowledge in the knowledge field.
[0092] By analyzing the main areas of knowledge mastered by users, various user characteristics such as occupation and age can be further inferred.
[0093] Figure 3 It is a detailed flowchart showing step S140 in the method for generating a knowledge graph according to an embodiment of the present disclosure.
[0094] like Figure 3 As shown, according to an embodiment of the present disclosure, generating user description information of a user based on a knowledge graph (ie, step S140) may include the following steps S141 to S143.
[0095] In step S141, knowledge domains in the knowledge graph are extracted.
[0096] By counting the frequency and relevance of different topics in the knowledge graph, we can identify the main knowledge areas that users master. For example, we can count the number of web pages for each topic and find the topic with the most favorite web pages.
[0097] In step S142, the user's occupation information and / or the user's age information is inferred based on the knowledge field.
[0098] Based on the main knowledge areas of the user, the user's occupation and age can be inferred. For example, the inference can be made based on the subject of the knowledge area and the existing occupation-topic association data. For example, the "technology" subject can be inferred to be a programmer, data scientist, etc., and the "art" subject can be inferred to be a designer, artist, etc.
[0099] In addition, we can make inferences based on the popularity of certain topics and the user's interests, combined with general social trends. For example, if the user is interested in content related to "beginner programming", we can infer that the user is a student or a young person. For another example, if the user pays more attention to "retirement financial management", we can infer that the user is middle-aged or elderly.
[0100] According to an embodiment of the present disclosure, the inferred result can be returned to the user so that the user can confirm whether the inferred result is accurate. The intelligent assistant can also ask further questions to the user based on the user's confirmation.
[0101] In step S143 , user description information of the user is generated according to the knowledge field and the inferred occupation information and / or age information.
[0102] Figure 4 is another detailed flowchart showing step S140 in the method for generating a knowledge graph according to an embodiment of the present disclosure.
[0103] like Figure 4 As shown, according to an embodiment of the present disclosure, generating user description information of a user based on a knowledge graph (ie, step S140) may also include steps S142' to S143'.
[0104] In step S142', the user's collection habit information and / or the user's knowledge depth information are inferred.
[0105] In step S143 ′, user description information of the user is generated based on the knowledge field and at least one of the inferred occupation information, age information, collection habit information, and knowledge depth information.
[0106] For example, the inferred results can be used to build a dictionary containing the main information of the user (i.e., user description information) and provide it to the intelligent assistant. An example of user description information is as follows:
[0107] user_profile={
[0108] "Main knowledge area":"Data analysis",
[0109] "Speculated Occupation":"Data Scientist",
[0110] "Estimated age":"30-40 years old",
[0111] "Main content of recent collection":"Toys""Electromagnetism",
[0112] "In-depth research field": "Electrical automation", ......
[0114] }
[0115] According to an embodiment of the present disclosure, when a user asks a question and answers a question with an intelligent assistant, the intelligent assistant can generate initialization prompt information according to the user description information in response to the user's input operation, and output the operation result to the user based on the initialization prompt information.
[0116] When providing information to the intelligent assistant, an initial prompt containing user background information (i.e., part or all of the information in the user description) can be created to enable the intelligent assistant to understand the user's existing knowledge domain and improve the quality of the question and answer without requiring a lot of initial input from the user. An example of an initial prompt is as follows:
[0117] initial_prompt="
[0118] The user's primary knowledge area is: {user_profile['primary knowledge area']}.
[0119] The inferred occupation is: {user_profile['inferred occupation']}.
[0120] The estimated age range is: {user_profile['estimated age']}.
[0121] Please provide relevant suggestions or answers based on this information.
[0122] "
[0123] Figure 5 is another flow chart showing a method for generating a knowledge graph according to an embodiment of the present disclosure.
[0124] like Figure 5 As shown, the method for generating a knowledge graph according to an embodiment of the present disclosure may also include steps S150 to S160.
[0125] In step S150, the knowledge domain in the knowledge graph is displayed to the user in a visual manner, where the knowledge domain includes one or more knowledge points.
[0126] Figure 6 The displayed knowledge graph according to an embodiment of the present disclosure is exemplarily shown.
[0127] like Figure 6 As shown, the intelligent assistant can use the visual knowledge graph display tool to display the organized knowledge points to the user according to the hierarchical structure from large to small such as first-level disciplines and second-level disciplines, and display the user's existing knowledge graph to the user.
[0128] In step S160, in response to operating the displayed knowledge points, the knowledge graph is updated, and / or information related to the knowledge points is displayed.
[0129] Figure 7 The operation of the displayed knowledge graph according to an embodiment of the present disclosure is exemplarily shown.
[0130] like Figure 7 As shown, the user can operate the knowledge points in the shown knowledge graph. In response to the user's operation, the intelligent assistant can display information related to the knowledge point to the user, and can update the knowledge graph based on the user's operation and the content fed back to the user.
[0131] For example, if the user performs an "extended learning" operation on "real-time rendering", the intelligent assistant can feedback (display) other knowledge points related to "real-time rendering" to the user, and expand from the knowledge point of "real-time rendering" to the other feedback knowledge points in the knowledge graph to update the structure of the knowledge graph. For another example, if the user performs an "in-depth understanding" operation on "offline rendering", the intelligent assistant can feedback (display) deeper knowledge of "offline rendering" to the user, and update the knowledge depth of the knowledge point of "offline rendering" in the knowledge graph.
[0132] Figure 8 is another flow chart showing a method for generating a knowledge graph according to an embodiment of the present disclosure.
[0133] like Figure 8 As shown, the method for generating a knowledge graph according to an embodiment of the present disclosure may also include steps S170 to S190.
[0134] In step S170, an expanded knowledge domain is inferred based on the knowledge domain.
[0135] In step S180, the expanded knowledge domain is displayed to the user in a visual manner, wherein the expanded knowledge domain includes one or more expanded knowledge points.
[0136] In step S190, in response to operating the displayed extended knowledge points, the knowledge graph is updated, and / or information related to the extended knowledge points is displayed.
[0137] On the visual knowledge graph, you can directly perform extended learning based on the suggestions given by the intelligent assistant. Figure 6 and Figure 7 , the smart assistant Figure 6 The user's current knowledge graph shown in FIG. 1 expands from "rendering" to "real-time rendering" and "offline rendering". Figure 7 As shown, the extended knowledge points are displayed to the user. The user can operate on the displayed extended knowledge points. In response to the user's operation, the intelligent assistant can display information related to the extended knowledge points to the user, and can update the knowledge graph based on the user's operation and the content fed back to the user.
[0138] According to an embodiment of the present disclosure, while displaying the user's existing knowledge graph, the intelligent assistant can provide the user with directions suitable for the user to further deepen his or her learning or expand his or her learning, so that the user can learn through this step-by-step exploration method.
[0139] The method for generating a knowledge graph according to an embodiment of the present disclosure may further include: updating the knowledge graph in response to an update of user data.
[0140] When a user updates user data, for example, a user adds a new URL to a personal favorites, the access-granting intelligent assistant can update the knowledge graph based on changes in user data, thereby synchronizing the knowledge acquired by the user in various ways into the knowledge graph.
[0141] The method for generating a knowledge graph according to an embodiment of the present disclosure may further include: updating user description information in response to an update of the knowledge graph.
[0142] After the knowledge graph is updated, the user description information can be updated according to the updated knowledge graph so that the intelligent assistant can understand the user's updated knowledge field and adjust the output results accordingly as the user continues to accumulate knowledge.
[0143] Fig. 9 is a block diagram illustrating a system according to an embodiment of the present disclosure.
[0144] like Fig. 9As shown, the intelligent assistant subsystem may include LLM, NLP tools, and Agent tool libraries, etc. The knowledge graph generated based on user data may be stored in a vector database, the knowledge graph subsystem includes a resource description framework (RDF), OWL, a simple protocol and RDF query language (SparQL), etc. The user interface subsystem may display the generated knowledge graph to the user and provide a graphical user interface (GUI).
[0145] The disclosed embodiment also provides a method for operating an intelligent assistant.
[0146] Fig.10 is a flowchart showing the operating method of the intelligent assistant according to an embodiment of the present disclosure.
[0147] like Fig.10 As shown, the operating method of the intelligent assistant according to the embodiment of the present disclosure includes steps S210 to S230.
[0148] In step S210, determine whether the intelligent assistant stores the user's knowledge graph.
[0149] In step S220, in response to the intelligent assistant not storing the knowledge graph, a knowledge graph is generated according to the knowledge graph generation method of each embodiment of the present disclosure.
[0150] In step S230, in response to the user's input operation, initialization prompt information is generated according to the user description information, and the operation result is output to the user based on the initialization prompt information.
[0151] According to the operating method of the intelligent assistant of the embodiment of the present disclosure, when it is determined that a knowledge graph has not been established for the user, a knowledge graph can be generated for the user according to the method for generating the knowledge graph of the embodiment of the present disclosure, and initialization prompt information can be generated using the generated user description information, so that the intelligent assistant can understand the user's existing knowledge areas and improve the quality of questions and answers without the user having to perform a large amount of initialization input.
[0152] The operating method of the intelligent assistant according to the embodiment of the present disclosure may also include: updating the knowledge graph according to the input information corresponding to the input operation and the operation result.
[0153] As the user interacts with the intelligent assistant, the intelligent assistant can continuously accumulate the user's questions and the answers given to the questions, and update the user's knowledge graph based on these questions and corresponding answers.
[0154] Fig.11 is a block diagram showing an electronic device according to an embodiment of the present disclosure.
[0155] The electronic device according to an embodiment of the present disclosure includes a memory 1102 and a processor 1101. The memory 1102 stores a computer program that can be executed by the processor 1101. When the computer program is executed by the processor 1101, the method for generating a knowledge graph according to each embodiment of the present disclosure is implemented.
[0156] The processor 1101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 1102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH), etc.
[0157] In addition, the electronic device according to the present disclosure may also include an I / O interface (read-write interface) 1103, which is connected between the processor 1101 and the memory 1102, and can realize information interaction between the memory 1102 and the processor 1101, including but not limited to a data bus (Bus), etc.
[0158] In some embodiments, the processor 1101 , the memory 1102 , and the I / O interface 1103 are connected to each other via a bus 1104 , and further connected to other components of the computing device.
[0159] Fig.12 is a block diagram showing an intelligent assistant according to an embodiment of the present disclosure.
[0160] The intelligent assistant according to the embodiment of the present disclosure includes a memory 1202 and a processor 1201. The memory 1202 stores a computer program that can be executed by the processor 1201. When the computer program is executed by the processor 1201, the operation method of the intelligent assistant according to each embodiment of the present disclosure is implemented.
[0161] The processor 1201 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 1202 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH), etc.
[0162] In addition, the intelligent assistant according to the present disclosure may also include an I / O interface (read-write interface) 1203, which is connected between the processor 1201 and the memory 1202, and can realize information interaction between the memory 1202 and the processor 1201, including but not limited to a data bus (Bus), etc.
[0163] In some embodiments, the processor 1201 , the memory 1202 , and the I / O interface 1203 are connected to each other via a bus 1204 , and further connected to other components of the computing device.
[0164] Fig.13 is a block diagram illustrating a computer storage medium according to an embodiment of the present disclosure.
[0165] like Fig.13 As shown, according to the computer storage medium of the embodiments of the present disclosure, a computer program is stored thereon, and when the computer program is executed by the processor, it implements the method for generating the knowledge graph according to the embodiments of the present disclosure or implements the method for operating the intelligent assistant according to the embodiments of the present disclosure.
[0166] The embodiments of the present disclosure also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for generating a knowledge graph according to the embodiments of the present disclosure or the method for operating an intelligent assistant according to the embodiments of the present disclosure.
[0167] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the apparatus disclosed above may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0168] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation.
[0169] Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit (CPU), a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH) or other disk storage; read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical disk storage; magnetic cassettes, tapes, disk storage or other magnetic storage; any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0170] The present disclosure has disclosed example embodiments, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A method for generating a knowledge graph, comprising: Sending an access authorization request to obtain access rights to user data, wherein the user data is used to represent a record of the user's acquisition of knowledge; In response to receiving an access authorization response to the access permission, accessing the user data; Generate a knowledge graph of the user according to the user data; Generate user description information of the user according to the knowledge graph.
2. The method according to claim 1, wherein: The user data includes multiple types of user data, and sending an access authorization request to obtain access rights to the user data includes: The access authorization request is sent for the multiple types of user data to obtain access rights for the multiple types of user data.
3. The method according to claim 2, wherein: In response to receiving an access authorization response to the access permission, accessing the user data includes: In response to receiving an access authorization response to a specific type of user data, access is performed to the specific type of user data.
4. The method according to claim 1, wherein: The user data includes at least one of a document opening record, a search record, a browsing record, and a favorite content.
5. The method according to claim 4, wherein: Generating the user's knowledge graph according to the user data includes: When the user data includes the document opening record, reading the content of the document recorded in the document opening record; When the user data includes at least one of the search record, the browsing record, and the favorite content, reading the content of the webpage corresponding to at least one of the search record, the browsing record, and the favorite content; Extracting and classifying the content of the read document and / or the content of the read webpage to generate structured feature data; One or more knowledge points in the structured feature data are described to generate the knowledge graph.
6. The method according to claim 5, wherein: Extracting and classifying the content of the read document and / or the content of the read webpage to generate structured feature data includes: Extracting and classifying the contents of the document and / or webpage according to type, knowledge field, keyword, and subject to which it belongs, so as to generate the structured feature data, The structured feature data includes structured parameters, and the structured parameters include: title, author, knowledge field, knowledge depth, and keywords.
7. The method according to claim 1, wherein: Generating user description information of the user according to the knowledge graph includes: Extracting knowledge domains in the knowledge graph; inferring the user's occupation information and / or the user's age information based on the knowledge field; User description information of the user is generated according to the knowledge field and the inferred occupation information and / or age information.
8. The method according to claim 7, wherein: Generating user description information of the user according to the knowledge graph further includes: Inferring the user's collection habit information and / or the user's knowledge depth information; The user description information of the user is generated according to the knowledge domain and at least one of the inferred occupation information, age information, collection habit information and knowledge depth information.
9. The method according to claim 1, further comprising: Displaying the knowledge domains in the knowledge graph to the user in a visual manner, The knowledge domain includes one or more knowledge points.
10. The method according to claim 9, further comprising: In response to operating the displayed knowledge point, the knowledge graph is updated, and / or information related to the knowledge point is displayed.
11. The method according to claim 9, further comprising: Inferring the expanded knowledge domain based on the stated knowledge domain; presenting the expanded knowledge domain to the user in a visual manner, The extended knowledge domain includes one or more extended knowledge points.
12. The method according to claim 11, further comprising: In response to operating the displayed extended knowledge points, the knowledge graph is updated, and / or information related to the extended knowledge points is displayed.
13. The method according to any one of claims 1 to 12, further comprising: In response to an update of the user data, the knowledge graph is updated.
14. The method according to claim 13, further comprising: In response to an update of the knowledge graph, the user description information is updated.
15. A method for operating an intelligent assistant, comprising: Determining whether the intelligent assistant stores a knowledge graph of the user; In response to the intelligent assistant not storing the knowledge graph, generating the knowledge graph according to the method according to any one of claims 1 to 14; In response to the input operation of the user, initialization prompt information is generated according to the user description information, and an operation result is output to the user based on the initialization prompt information.
16. The method according to claim 15, further comprising: The knowledge graph is updated according to the input information corresponding to the input operation and the operation result.
17. An electronic device comprising: A memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 14 when executing the computer program.
18. An intelligent assistant, comprising: A memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 15 to 16 when executing the computer program.
19. A computer storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 16 when executed by a processor.
20. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.