WO2021238447A1 - 人机交互方法及装置、存储介质及电子设备 - Google Patents

人机交互方法及装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2021238447A1
WO2021238447A1 PCT/CN2021/086274 CN2021086274W WO2021238447A1 WO 2021238447 A1 WO2021238447 A1 WO 2021238447A1 CN 2021086274 W CN2021086274 W CN 2021086274W WO 2021238447 A1 WO2021238447 A1 WO 2021238447A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
knowledge graph
entities
subgraph
human
Prior art date
Application number
PCT/CN2021/086274
Other languages
English (en)
French (fr)
Inventor
马明园
梁天新
董文储
温垦
Original Assignee
京东方科技集团股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to DE112021000226.0T priority Critical patent/DE112021000226T5/de
Priority to KR1020227018067A priority patent/KR20230015872A/ko
Priority to US17/439,758 priority patent/US20220343183A1/en
Publication of WO2021238447A1 publication Critical patent/WO2021238447A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models

Definitions

  • the present disclosure relates to the technical field of computer question answering, and in particular to a human-computer interaction method, a human-computer interaction device, an electronic device, and a computer-readable storage medium.
  • the embodiments of the present disclosure provide a human-computer interaction method and device, electronic equipment, and computer-readable storage medium, which can display the reasoning process of obtaining the answer in the display area while returning the answer to the query, thereby realizing human-computer interaction
  • the visualization of machine reasoning in the process can then improve the interaction effect.
  • a human-computer interaction method including:
  • a knowledge graph subgraph is displayed, wherein the knowledge graph subgraph includes entities related to the input question and the answer, and a directional identifier, and the directional identifier is configured to identify a reasoning path corresponding to the query process.
  • the directional identifier is configured to connect each entity sequentially passed through the query process.
  • the directivity identifier includes a multi-level directivity identifier to distinguish successively corresponding levels of reasoning in the query process path;
  • Any two of the multi-level directional marks have at least one of different colors, sizes, and shapes.
  • the aforementioned directional indicator is a directional arrow.
  • the directivity identifier is represented by multiple entities with different attributes that are sequentially passed through the query process, and the attributes include at least one of color, size, and shape.
  • the display of the subgraph of the knowledge graph includes:
  • the method further includes:
  • the reasoning paths corresponding to different input questions are differentiated and displayed based on the directional indicator.
  • the method when the knowledge graph subgraph is displayed, the method further includes:
  • the user attribute data includes at least one of the user's age, gender, and purchasing power
  • the user behavior data includes historical search data
  • the recommended object is displayed distinctively relative to the entity in the knowledge graph sub-graph.
  • the discriminatingly displaying the recommended object relative to the entity in the knowledge graph sub-graph includes:
  • the target entity is distinguished by color filling or symbol mark, wherein the target entity is an entity connected to the recommended object through a relationship;
  • the discriminatingly displaying the recommended object relative to the entity in the knowledge graph sub-graph includes:
  • the recommended object and the relationship connected to the recommended object are displayed with a dashed line, wherein the recommended object is displayed in the knowledge graph sub-graph in the form of an entity; or,
  • a message prompt window is popped up, and the recommended object is displayed in the message prompt window.
  • the displaying the knowledge graph subgraph includes:
  • the knowledge graph subgraph is displayed, wherein the knowledge graph subgraph includes the selected entity and the directivity identifier.
  • the selecting the input question and the entity involved in the answer according to a preset screening rule includes:
  • the selecting the display state of the entity and its related entities according to the control operation includes:
  • a human-computer interaction device including:
  • Input device configured to receive input problems
  • a processor configured to extract the entities and relationships involved in the input question, and query the answers to the input questions in the knowledge graph according to the entities and the relationships;
  • a display configured to display a subgraph of a knowledge graph, wherein the subgraph of the knowledge graph includes an entity related to the input question and the answer, and a directional identifier, and the directional identifier is configured to identify the query process The corresponding reasoning path.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the above is implemented.
  • an electronic device including:
  • the memory is configured to store executable instructions of the processor; wherein the processor is configured to execute any one of the above-mentioned methods by executing the executable instructions.
  • FIG. 1 shows a schematic diagram of an exemplary system architecture of a human-computer interaction method and device to which embodiments of the present disclosure can be applied;
  • FIG. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure
  • FIG. 3 schematically shows a flowchart of a process of a human-computer interaction method according to an embodiment of the present disclosure
  • FIG. 4 schematically shows a flowchart of a process of updating a subgraph of a knowledge graph according to an embodiment of the present disclosure
  • Fig. 5 schematically shows a schematic diagram of sub-figure 1 of obtaining a knowledge graph according to an embodiment of the present disclosure
  • Fig. 6 schematically shows a schematic diagram of sub-figure 1 of obtaining a knowledge graph according to an embodiment of the present disclosure
  • FIG. 7 schematically shows a schematic diagram of sub- FIG. 2 of acquiring a knowledge graph according to an embodiment of the present disclosure
  • FIG. 8 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 1 according to an embodiment of the present disclosure
  • FIG. 9 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 2 according to an embodiment of the present disclosure
  • FIG. 10 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 2 according to an embodiment of the present disclosure
  • FIG. 11 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 2 according to an embodiment of the present disclosure
  • FIG. 12 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 2 according to an embodiment of the present disclosure
  • FIG. 13 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 3 according to an embodiment of the present disclosure
  • FIG. 14 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 1 according to an embodiment of the present disclosure
  • FIG. 15 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 1 according to an embodiment of the present disclosure
  • FIG. 16 schematically shows a schematic diagram of obtaining a reasoning path corresponding to input question 1 according to an embodiment of the present disclosure
  • FIG. 17 schematically shows a schematic diagram of distinguishingly displaying recommended objects according to an embodiment of the present disclosure
  • FIG. 18 schematically shows a schematic diagram of distinguishingly displaying recommended objects according to an embodiment of the present disclosure
  • FIG. 19 schematically shows a schematic diagram of displaying a knowledge graph subgraph containing a selected entity according to an embodiment of the present disclosure
  • FIG. 20 schematically shows a schematic diagram of displaying a knowledge graph subgraph containing a selected entity according to an embodiment of the present disclosure
  • FIG. 21 schematically shows a schematic diagram of displaying a knowledge graph subgraph containing a selected entity according to an embodiment of the present disclosure
  • FIG. 22 schematically shows a schematic diagram of displaying a knowledge graph subgraph containing a selected entity according to an embodiment of the present disclosure
  • Fig. 23 schematically shows a block diagram of a human-computer interaction apparatus according to an embodiment of the present disclosure.
  • Fig. 1 shows a schematic diagram of a system architecture of an exemplary application environment in which a human-computer interaction method and device to which embodiments of the present disclosure can be applied.
  • the system architecture 100 may include one or more of the terminal devices 101, 102, and 103, a network 104 and a server 105.
  • the network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105.
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the terminal devices 101, 102, 103 may be various electronic devices with display screens, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and so on. It should be understood that the numbers of terminal devices, networks, and servers in FIG. 1 are merely illustrative. According to implementation needs, there can be any number of terminal devices, networks, and servers.
  • the server 105 may be a server cluster composed of multiple servers.
  • the human-computer interaction method provided by the embodiments of the present disclosure can be executed by the terminal equipment 101, 102, 103, and accordingly, the human-computer interaction apparatus can be provided in the terminal equipment 101, 102, 103.
  • the human-computer interaction method provided by the embodiment of the present disclosure can also be executed by the server 105, and accordingly, the human-computer interaction device can be set in the server 105.
  • the human-computer interaction method provided by the embodiments of the present disclosure can also be executed by the terminal devices 101, 102, 103 and the server 105. Accordingly, the human-computer interaction device can be set in the terminal devices 101, 102, 103 and the server 105. This is not particularly limited in the exemplary embodiment.
  • the user can input a question through the terminal devices 101, 102, 103.
  • the terminal devices 101, 102, and 103 obtain the input question, they extract the entities and relationships involved in the input question, and pass The network 104 sends to the server 105; after receiving the above-mentioned entity and relationship, the server 105 searches the knowledge graph for answers to the above-mentioned input question according to the entity and relationship.
  • a subgraph of the knowledge graph is obtained, the subgraph of the knowledge graph contains the entities involved in the input question and answer and the directional identifier, and the directional identifier is configured to identify the reasoning path corresponding to the query process.
  • the obtained knowledge graph subgraph is sent to the terminal devices 101, 102, 103 through the network 104, and the terminal devices 101, 102, 103 receive the knowledge graph subgraph and display the knowledge graph subgraph.
  • Fig. 2 shows a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present disclosure.
  • the computer system 200 includes a central processing unit (CPU) 201, which can be based on a program stored in a read-only memory (ROM) 202 or a program loaded from a storage part 208 into a random access memory (RAM) 203 And perform various appropriate actions and processing.
  • ROM read-only memory
  • RAM random access memory
  • various programs and data required for system operation are also stored.
  • the CPU 201, the ROM 202, and the RAM 203 are connected to each other through a bus 204.
  • An input/output (I/O) interface 205 is also connected to the bus 204.
  • the following components are connected to the I/O interface 205: an input part 206 including a keyboard, a mouse, etc.; an output part 207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and speakers, etc.; a storage part 208 including a hard disk, etc. ; And a communication section 209 including a network interface card such as a LAN card, a modem, and the like. The communication section 209 performs communication processing via a network such as the Internet.
  • the drive 210 is also connected to the I/O interface 205 as needed.
  • the removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 210 as needed, so that the computer program read from it is installed into the storage part 208 as needed.
  • the automatic question answering based on the knowledge graph solves the problem of low accuracy and flexibility in the question and answer process, the user can only get the answer to the input question, but cannot obtain the reasoning path to get the answer.
  • the visualization of the interactive process is still relatively high. Low, the interaction effect is also affected to a certain extent.
  • the knowledge graph containing all entities is displayed in the display area, it will cause problems such as poor display effect and users' inability to quickly obtain important information.
  • how to make relevant recommendations based on input questions and user-related information is also very important for practical applications.
  • This exemplary embodiment first provides a human-computer interaction method.
  • the human-computer interaction method is shown in FIG. 3 and specifically includes the following steps:
  • Step S310 receiving the input question
  • Step S320 Extract the entities and relationships involved in the input question, and query the answers to the input questions in the knowledge graph according to the entities and the relationships;
  • Step S330 Display a subgraph of the knowledge graph, where the subgraph of the knowledge graph includes the entities involved in the input question and the answer, and a directional identifier, and the directional identifier is configured to identify the corresponding entity of the query process. Reasoning path.
  • the human-computer interaction method provided by the exemplary embodiment of the present disclosure on the one hand, in the human-computer interaction method provided by the exemplary embodiment, because the directional identifier is configured, the reasoning path corresponding to the above-mentioned query process can be identified. Furthermore, the user can intuitively see the process of the query input problem, which improves the effect of human-computer interaction. On the other hand, the method also displays the entities involved in the input questions and answers and the directional signs in the form of knowledge graph sub-graphs, so as to help users obtain effective information, increase screen utilization, and improve display effects.
  • step S310 an input question is received.
  • the user inputs an input question to the human-computer interaction system through a terminal device
  • the input question is a question for which the user wants to query an answer.
  • it can be a first-order question, such as "What year was painter A born", or a second-order question, such as "Who else is a painter in the same country as painter A?”
  • the input question can also be higher Order problem.
  • the input question listed above is only an exemplary description, and does not limit the protection scope of this exemplary embodiment.
  • the input question may also be any other question that the user wants to know.
  • the foregoing terminal device may be a smart phone, a tablet computer, or other terminals such as a notebook, which is not particularly limited in the embodiment of this example.
  • the knowledge related to the input question is stored in a knowledge graph in the form of an entity.
  • the knowledge graph is a structured semantic knowledge base and provides a way of storing and querying knowledge.
  • the semantic knowledge base stores the entities and the relationships connected with the entities.
  • the basic constituent unit can be a storage method such as (entity, relationship, entity).
  • "painter A's nationality is country B” can be represented in the semantic database as (painter A, nationality, country B), where "painter A” is an entity, "nationality” is a relationship, and "painter A” is an entity, and "nationality” is a relationship.
  • Country B” is another entity connected to the entity “Painter A” through the relationship of “nationality”.
  • the structured semantic knowledge base of the above-mentioned knowledge graph may be a graph database storing data in the form of triples
  • the graph database may be any open source graph database or a commercial graph database.
  • the database may be Neo4j, Apache Jena, or Gstore, and this example embodiment does not have special requirements for this.
  • step S320 the entities and relationships involved in the input question are extracted, and the answers to the input questions are queried in the knowledge graph according to the entities and the relationships.
  • the terminal device after receiving the input question input by the user, the terminal device needs to extract the entities and relationships involved in the input question, and then can query the answer to the input question in the above-mentioned knowledge graph.
  • the aforementioned entities can be extracted through a data dictionary, and the aforementioned relationships can be finally extracted through steps such as entity replacement, generalization problems, and intent recognition model processing.
  • the combination of extracted entities and relationships will be different. For example, it can be a single entity single relationship, a single entity multiple relationship, or a multiple entity single relationship or a multiple entity multiple relationship.
  • input the question “What year was painter A born?"
  • the entity extracted is "painter A”
  • the extracted relationship is "birth year”, which is a combination of single entity and single relationship.
  • the input question "who else is a painter in the same country as painter A" is a second-order question.
  • the entity and relationship involved in the input question can be stored in the knowledge graph database as (painter A, nationality, country B), (Country B, painter, painter C), where there may be multiple painters C, that is, the entities extracted by the input question include painter A, the country to which painter A belongs, and other painters belonging to the same country.
  • Nationality, painter the input question corresponds to a combination of multiple entities and multiple relationships.
  • the input question may also be a combination of single entity multiple relationships or multiple entity single relationships, which belong to the protection scope of this example embodiment, and the above example is only an example description, this example embodiment does not use this Is limited.
  • the entities and relationships related to the input question can be queried in the knowledge graph based on the extracted entities and relationships, and the entities related to the input question can be organized into answer output.
  • the specific implementation can be to extract the entity “painter A” corresponding to the input question and the relationship "year of birth", which can be obtained from the graph database of the knowledge graph
  • the basic composition of (painter A, year of birth, 1953) so you can get the answer to the input question as 1953.
  • To further organize it to get the answer it can be "painter A's birth year is 1953”. It should be noted that the foregoing scenario is only an exemplary description, and the protection scope of the exemplary embodiment is not limited to this.
  • step S330 a knowledge graph sub-graph is displayed, wherein the knowledge graph sub-graph includes entities related to the input question and the answer, and a directional identifier, and the directional identifier is configured to identify the query process The corresponding reasoning path.
  • the subgraph of the knowledge graph may include entities and directional identifiers involved in the input questions and answers mentioned above.
  • the realization of displaying entities in the above knowledge graph is as follows:
  • the realization process of obtaining the knowledge graph subgraph is: extracting the entity involved in the input question and displaying the knowledge graph subgraph containing the entity.
  • the implementation process of obtaining and displaying the subgraph of the knowledge graph from the graph database of the knowledge graph can be as follows: Judgment Whether the input question and answer of this interaction involve a new entity compared with the input question and answer of the previous round of interaction; if so, update the new entity and corresponding directional mark to the knowledge graph subgraph obtained in the previous round of interaction , And display the updated knowledge graph sub-graph; if not, use the knowledge graph sub-graph obtained in the last round of interaction as the knowledge graph sub-graph and update the directivity mark.
  • the following takes one or three rounds of dialogue as an example to further explain the update process of the above-mentioned knowledge graph subgraph.
  • the input questions corresponding to the three rounds of dialogue are: input question 1 "When is painter A born"; input question 2 "and Who else is painter A from the same country? Enter question 3 "What is the representative work of painter A?”.
  • the update process is shown in Figure 4 and includes the following steps:
  • step S410 the input question 1 is received, and the entities and relationships contained in the input question 1 and the answer 1 are extracted.
  • the input question 1 "When is painter A born” is received, the input question 1 is extracted, and the entity involved is "painter A” and the relationship involved is "birth year”.
  • step S420 a subgraph of the knowledge graph is obtained according to the entity and the relationship.
  • the entities “painter A” and “1953” involved in the input question 1 and answer 1 and the relationship "year of birth” are extracted from the aforementioned step S410, and the entity “painter A” is obtained from the graph database of the aforementioned knowledge graph. , "1953” and the subgraph of the knowledge graph of the relationship "year of birth”, as shown in Figure 5.
  • the knowledge graph may also include other relationships connected to the entity involved in the input question 1. As shown in FIG.
  • the knowledge graph subgraph 1 may also include other relationships connected to the entity “painter A" "Nationality”, “Genre” and “Representative Works”, and other entities connected with the above relationships, such as “Country B”, “1953”, “Painting X” and “Impressionism”.
  • the subsequent steps use the knowledge graph sub-graph shown in FIG. 6 as the knowledge graph sub-graph 1.
  • step S430 the input question 2 is received, and the entities and relationships included in the input question 2 and the answer 2 are extracted.
  • step S440 it is determined whether there are newly added entities and relationships.
  • step S450 it is determined whether the input question 2 involves a new entity and relationship, and if so, skip to step S450. Otherwise, keep the current knowledge graph subgraph unchanged. Compared with the knowledge graph subgraph 1 shown in Figure 6 obtained in step S420, the entities "painter H" and "painter L" are added to the input question 2 and the corresponding answer 2 and the relationship "painter” is added. Jump to step S450.
  • step S450 the knowledge graph subgraph is updated.
  • step S440 it is determined that the entities "painter H” and “painter L” are newly added to the input question 2 and answer 2 and the relationship "painter” is newly added.
  • the updated knowledge graph subgraph 2 is shown in Fig. 7. On the basis of the atomic graph 1, the relationship "painter” connected to the entity “country B” and the entity “painter L” and the entity connected to the relationship are added. "Painter H”.
  • step S460 the input question 3 is received, and the entities and relationships included in the input question 3 and the answer 3 are extracted.
  • step S440 After obtaining the input question 3 and the entities included in the answer, jump to step S440 to perform the same judgment and update process as the input question 2. In this scenario, since it is judged that the input question 3 and answer 3 do not involve new entities and relationships compared with the knowledge graph subgraph 1 shown in FIG. 6, so the knowledge graph subgraph 2 remains unchanged.
  • the above scenario is only an exemplary illustration, and the scope of protection of this example embodiment is not limited to this.
  • the above process is also suitable for more than three rounds of interaction.
  • the knowledge graph The update process is the same.
  • the above-mentioned input question may also be any other question that the user wants to inquire, which is not specifically limited in this exemplary embodiment.
  • the above-mentioned knowledge graph subgraph further includes a directional identifier, which connects each entity sequentially passed through in the process of query answering, and is used to identify the reasoning path corresponding to the above-mentioned query process.
  • the directional identifier may be a directional arrow, or may be represented by multiple entities with different attributes that are passed through in sequence during the query process, where the attributes include at least one of color, size, and shape.
  • the directional mark can also be in any form that conforms to the above definition, which is not specifically limited in this exemplary embodiment.
  • the user can intuitively see the process of querying and inputting the question, that is, the reasoning path.
  • the realization of identifying the reasoning path can be as follows:
  • the realization process of the above identification of the reasoning path can be as follows: query the answer to the input question, and update the knowledge In the sub-graph of the atlas, each entity passing through the query process is connected in turn with a directional arrow to obtain the reasoning path corresponding to the query process.
  • the input question 2 On the basis of input question 1, take the above input question 2 "who else is a painter in the same country as painter A" as an example.
  • the input question 2 corresponds to the updated knowledge graph subgraph 2.
  • the input question is a second-order question, that is, it takes two inferences to find the corresponding answer.
  • the above-mentioned identification reasoning process can distinguish and display different levels of reasoning, and the specific This can be achieved as follows: the above-mentioned directional mark includes a multi-level directional mark to distinguish successively corresponding inference paths in the query process; wherein, the multi-level directional mark has at least one of different colors, sizes, and shapes.
  • the question "Who else is a painter in the same country as painter A” includes a two-stage reasoning process. As mentioned above, first, get the country B to which painter A belongs. This process is a first-order reasoning process. , Can be identified by the first-level directional mark; then, get other painters corresponding to country B, painter L and painter H, from country B to painter L and country B to painter H are all second-order reasoning processes, which can pass the first level
  • the directional mark is used for identification.
  • the first-level directional mark and the second-level directional mark can be directional marks with different colors, as shown in Figure 10, the first-level directional mark is a gray arrow, and the second-level directional mark is a black arrow; It can be a directional mark with different sizes, as shown in Figure 11, the secondary directional mark is a directional arrow whose size is larger than the primary directional mark; it can also be a directional mark with different shapes, as shown in Figure 12.
  • the first-level directivity is marked as a solid arrow, and the second-level directivity is marked as a dashed arrow.
  • it may also be other colors, sizes, and shapes, or any combination of colors, sizes, and shapes, which is not particularly limited in this example embodiment.
  • the above-mentioned directional identification of the inference path may also be represented by multiple entities with different attributes that are sequentially passed through the query process, where the attributes include at least one of color, size, and shape.
  • the entities passed by this input question 1 include “painter A” and "1953".
  • the directional mark can be through color Deeply progressive entities “Painter A” and entity “1953”; they can also be entities “Painter A” and entity “1953” with different sizes as shown in Figure 15; they can also be entities with different shapes as shown in Figure 16
  • the reasoning paths corresponding to input questions 1 to 3 have been marked in the subgraph of the knowledge graph.
  • the reasoning paths corresponding to different input questions may be distinguished and displayed based on the above-mentioned directional indicator.
  • the directional indicator as a directional arrow as an example, you can also use arrows of different colors to mark the reasoning path corresponding to different input questions. For example, use the red arrow to mark the reasoning path of input question 1 and the green arrow to mark the reasoning path of input question 2. , Use the blue arrow to mark the reasoning path of the input question 3.
  • the reasoning paths corresponding to different input questions can also be distinguished and displayed based on characteristics such as the thickness of the arrow, virtual and real, which is not specifically limited in the embodiment of this example.
  • the above scenario is only an exemplary description, and the scope of protection of this example embodiment is not limited to this.
  • the above process is also suitable for more than three rounds of interaction and higher-level input problems.
  • the process of labeling the inference path is the same.
  • the above-mentioned input question may also be any other question that the user wants to inquire, which is not specifically limited in this exemplary embodiment.
  • the inquired answers are output to the user.
  • the above answer can be played to the user through voice output, the above answer can also be displayed to the user in the display area, and it can also be fed back to the user through other interactive methods that can achieve the same effect. There are no special restrictions.
  • this exemplary embodiment can also obtain objects of interest to the user based on factors such as input questions, queried answers, user attributes and behaviors, and recommend them to the user.
  • the specific implementation of this process may be: obtaining user attribute data and user behavior data; obtaining recommended objects based on the obtained user attribute data and user behavior data; and discriminatingly displaying the above recommended objects in the above display area.
  • the user attribute data may include the user's age, gender, purchasing power and other attribute information
  • the user behavior data may include the user's historical search data, user operation data and other behavior information.
  • Recommended objects can be objects that may be of interest to users based on search data, related products recommended to users based on operational goals, or current affairs hotspot content based on big data analysis, or other recommendations to users All of the objects belong to the protection scope of this example implementation.
  • the user attribute data and user behavior data are obtained. Based on the user attribute data, the age group of the user is obtained as a young group. Based on the user behavior data, it is obtained that the user has searched for backpacks, and then a backpack with the painting X as the theme can be recommended to the user.
  • the paintings related to the painting can be extended.
  • the theme of the painting X is flowers and the genre is Impressivity, then paintings S with the same theme and similar genres can be recommended to the user.
  • the obtained recommended objects can also be displayed in the above display area to distinguish the recommended entities and relationships from the question and answer entities and relationships.
  • the distinguishing display can take the following methods: (1) distinguishingly displaying entities related to the recommended object; receiving control operations acting on the entity, and displaying the recommended object according to the control operation; (2) displaying the recommended object with a dotted line And the relationship connected with the recommended object, where the recommended object is displayed in the knowledge graph sub-graph in the form of an entity; (3) a message prompt window pops up, and the recommended object is displayed in the message prompt window.
  • other technical means that can achieve a distinctive display effect can also be adopted, which is not particularly limited in the embodiment of this example.
  • the obtained recommended objects include a backpack with a painting X as the theme, an electronic picture frame I, and a painting S.
  • the entities "painting X" 1710 and “Impressionist” 1720 with recommended objects can be displayed differently.
  • the details of the recommended object are displayed.
  • the user can display recommended objects related to the entity "painting X" through voice control.
  • the recommended objects can also be displayed in entity form, and in order to distinguish between the recommended objects and the entities and relationships of the question and answer, a dotted line is used to display the recommended object and the relationship connected to the recommended object.
  • the dotted line is used to show the relationship connected to the painting X "Display products”, “derivative products” and “similar works”, and the entities connected to the relationship "backpack with the theme of painting X", “electronic picture frame I" and “painting S”.
  • the relationship "Masterpiece” connected with “Impressionism” and the entities “Painting R” and “Painting C” connected to the "Masterpiece” of the relationship.
  • a message prompt window can also be popped up, and the recommended object is displayed in the message prompt window. For example, in response to the user's operation of clicking the entity "painting X", a message prompt window pops up, in which the product details of the "electronic picture frame I" are displayed.
  • the user may also perform subsequent operations such as purchasing or bookmarking the recommended object.
  • the collection and purchase of products can be controlled according to the user's voice instructions, and when the voice input of "Help me collect the painting X" is detected, the corresponding collection operation will be executed.
  • the purchase control operation is detected, the payment interface is displayed on the system interface, and the payment is determined according to the user's voice.
  • the system authenticates the user's identity according to voiceprint recognition or facial recognition and then makes the payment to complete the purchase process.
  • the process can be implemented as follows: obtaining entities and relationships related to the question and answer, and obtaining multiple recommendation questions based on the obtained entities and relationships; sorting the obtained recommendation questions, and outputting the recommendation questions with the highest ranking. It can be displayed in the display area, and can also be played to the user by voice, which is not particularly limited in this example implementation.
  • the human-computer interaction method displays the selected knowledge graph subgraphs.
  • the specific implementation can be as follows: select entities according to preset screening rules; display in the display area Contains the knowledge graph subgraph of the selected entity.
  • the foregoing selection of entities based on preset screening rules may be: sorting the entities based on a recommendation algorithm, and obtaining the sorted entities. For example, it is possible to obtain user-interested content based on user attribute information and user behavior, sort the obtained content based on a recommendation algorithm, and select the entity with the highest ranking.
  • entities can also be selected based on other factors, for example, based on operational goals, product features or information stored in the system; or based on big data analysis, to recommend current hot content, for example, to filter entities based on weather or geographic location , All of which belong to the protection scope of this example implementation.
  • the entities displayed in the sub-graph of the knowledge graph can also be selected based on the user's control operation.
  • the implementation may be as follows: in response to a selection operation acting on an entity, the branch centered on the entity is hidden and the hidden icon is displayed, where the branch includes all entities, relationships, and directional identifiers connected to the entity.
  • the user can click on an entity to control the hiding of the branch centered on that entity, that is, to hide all the entities, relationships, and relationships connected to the entity.
  • Inference path arrow A hidden icon 2010 is displayed on the entity to remind the user that there is a hidden entity. When the user clicks on the entity again, the hidden entities, relationships and reasoning path arrows are displayed.
  • the above process can also be implemented by the following method: in response to a selection operation acting on a relationship, all entities connected to the relationship are hidden and hidden icons are displayed. As shown in Fig. 21, the entities of the same type are hidden by the operation of selecting the relationship "scenic spot", and the hidden icon 2110 is displayed at the relationship.
  • the above process can also be realized through the control operation on the display area, which can be specifically as follows: receive the control operation for the display area, and adjust the position of the entity in the knowledge graph sub-graph according to the control operation, wherein the control operation is a click or move operation. As shown in Fig. 22, the user selects an entity and re-lays out the sub-picture with the entity as the center, or the user drags the entity to adjust the relative position of each entity in the sub-picture.
  • another rule for selecting entities is also provided.
  • the specific implementation can be as follows: detect the degree of association between the current input question and the previous dialog entity, and determine whether to delete the previous sub-picture according to the degree of association. If it is not relevant, delete the original knowledge graph subgraph, obtain and display the new knowledge graph subgraph corresponding to the current input question; if it is relevant, continue to add entities and relationships to the original knowledge graph subgraph.
  • the corresponding system function can also be activated according to the answer to the input question inquired.
  • the user can be automatically asked whether to play related paintings. Take the input question "Which country is painter A?” as an example. After the query is answered, the answer "country B" will be automatically played by voice, and the acquired knowledge graph sub-graph and reasoning path will be displayed in the display area, and the user will be automatically asked at the same time. Do you want to see the Mona Lisa painting?". If the user confirms to play, it will switch to the corresponding painting.
  • the display method of the paintings can be displayed in layers with the above-mentioned knowledge map sub-maps. The sub-maps are displayed transparently above the paintings so as not to affect the appreciation of the paintings.
  • the knowledge map sub-maps and paintings can also be displayed in different areas, or other displays can be adopted. All of these methods belong to the protection scope of this example implementation.
  • the human-computer interaction apparatus 2300 may include an input device 2310, a processor 2320, and a display 2330. in:
  • the input device 2310 is configured to receive input questions
  • the processor 2320 is configured to extract the entities and relationships involved in the input question, and query the answers to the input questions in the knowledge graph according to the entities and the relationships;
  • the display 2330 is configured to display a subgraph of a knowledge graph, wherein the subgraph of the knowledge graph includes an entity related to the input question and the answer, and a directional indicator, and the directional indicator is configured to identify the query process The corresponding reasoning path.
  • the above-mentioned input device may be a touch screen or a button; the processor may be a cloud server; the display may be an LCD, an OLED, etc., which is not particularly limited in the embodiment of this example.
  • this application also provides a computer-readable medium.
  • the computer-readable medium may be included in the electronic device described in the above-mentioned embodiment; or it may exist alone without being assembled into the electronic device. middle.
  • the foregoing computer-readable medium carries one or more programs, and when the foregoing one or more programs are executed by an electronic device, the electronic device enables the electronic device to implement the method described in the foregoing embodiment. For example, the electronic device may implement various steps as shown in FIGS. 3-22.
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable medium may send, propagate or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

一种人机交互方法及装置、计算机可读存储介质及电子设备,其中,所述人机交互方法包括:接收输入问题(S310);提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案(S320);显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径(S330)。

Description

人机交互方法及装置、存储介质及电子设备
相关申请的交叉引用
本申请要求于2020年05月29日递交的、名称为《人机交互方法及装置、计算机可读存储介质及电子设备》的中国专利申请第202010474979.1号的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开涉及计算机问答技术领域,具体而言,涉及一种人机交互方法、人机交互装置、电子设备以及计算机可读存储介质。
背景技术
随着计算机问答技术的不断发展,其在实际中的应用也日趋成熟,目前已被成功地应用于人机交互中,给人们的生产生活及日常娱乐带来了许多便利。
然而,现有的大多数问答存在准确性与灵活性不高,交互过程的可视化程度低,交互效果差等问题。
上述背景技术部分公开的信息仅用于加强对本公开的背景的理解,因此可以包括不构成对本领域普通技术人员已知的现有技术的信息。
发明内容
本公开实施例提供一种人机交互方法及装置、电子设备以及计算机可读存储介质,可以在返回查询到的答案的同时,在显示区域中显示获取该答案的推理过程,实现了人机交互过程中机器推理的可视化,进而可以改善交互效果。
根据本公开的第一方面,提供一种人机交互方法,包括:
接收输入问题;
提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
在本公开的一种示例性实施例中,所述指向性标识被配置为连接查询过程依次经过的各实体。
在本公开的一种示例性实施例中,对于所述输入问题是多阶推理问题的情形,所述指向性标识包括多级指向性标识,以区分所述查询过程中依次对应的各阶推理路径;
所述多级指向性标识中的任意两个之间具有不同的颜色、尺寸、及形状中的至少一个。
在本公开的一种示例性实施例中,上述指向性标识为指向性箭头。
在本公开的一种示例性实施例中,所述指向性标识为通过所述查询过程依次经过的具有不同属性的多个实体来表示,所述属性包括颜色、尺寸及形状中的至少一个。
在本公开的一种示例性实施例中,对于所述输入问题为大于或等于第二轮的问答交互 的情形,所述显示知识图谱子图,包括:
判断所述输入问题及所述答案与上一轮交互的输入问题及答案相比是否涉及新的实体;
若是,则将所述新的实体及对应的指向性标识更新至上一轮交互获取的知识图谱子图,并显示更新后的所述知识图谱子图;
若否,则将上一轮交互获取的知识图谱子图作为所述知识图谱子图并更新所述指向性标识。
在本公开的一种示例性实施例中,所述方法还包括:
基于所述指向性标识区分显示不同的输入问题对应的所述推理路径。
在本公开的一种示例性实施例中,在所述显示知识图谱子图时,所述方法还包括:
获取用户属性数据、用户行为数据及运营数据中的至少一个,所述用户属性数据包括用户的年龄、性别及购买力中的至少一个,所述用户行为数据包括历史搜索数据;
依据所述用户属性数据、所述用户行为数据及运营数据中的至少一个获取推荐对象;
在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象。
在本公开的一种示例性实施例中,所述在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象,包括:
在所述知识图谱子图中通过色彩填充或符号标记区别性显示目标实体,其中,所述目标实体为通过一关系与所述推荐对象相连的实体;
接收作用于所述目标实体的控制操作,依据所述控制操作显示所述推荐对象。
在本公开的一种示例性实施例中,所述在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象,包括:
以虚线线条显示所述推荐对象及与所述推荐对象相连的关系,其中,所述推荐对象以实体的形式显示在所述知识图谱子图中;或者,
弹出消息提示窗口,在所述消息提示窗口中显示所述推荐对象。
在本公开的一种示例性实施例中,所述显示知识图谱子图,包括:
依据预设的筛选规则对所述输入问题和所述答案涉及的所述实体进行选择;
显示所述知识图谱子图,其中,所述知识图谱子图包含被选的所述实体以及所述指向性标识。
在本公开的一种示例性实施例中,在所述依据预设的筛选规则对所述输入问题和所述答案涉及的所述实体进行选择,包括:
响应于用户的控制操作,依据所述控制操作选择所述实体和其相关的实体的显示状态;
所述依据所述控制操作选择所述实体和其相关的实体的显示状态,包括:
响应于作用于一所述实体的选择操作,隐藏以该所述实体为中心的分支并显示隐藏图标,所述分支包括与该所述实体相连的所有实体、关系及指向性标识;或者,
响应于作用于一所述关系的选择操作,隐藏与该所述关系相连的所有所述实体并显示 隐藏图标。
根据本公开的第二方面,提供一种人机交互装置,包括:
输入设备,被配置为接收输入问题;
处理器,被配置为提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
显示器,被配置为显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
根据本公开的第三方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项所述方法。
根据本公开的第四方面,提供一种电子设备,包括:
处理器;
存储器,用于存储所述处理器的可执行指令;其中,所述处理器配置为经由执行所述可执行指令来执行上述任意一项所述方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了可以应用本公开实施例的一种人机交互方法及装置的示例性系统架构的示意图;
图2示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图;
图3示意性示出了根据本公开的一个实施例的人机交互方法的过程的流程图;
图4示意性示出了根据本公开的一个实施例的更新知识图谱子图的过程的流程图;
图5示意性示出了根据本公开的一个实施例的获取知识图谱子图1的示意图;
图6示意性示出了根据本公开的一个实施例的获取知识图谱子图1的示意图;
图7示意性示出了根据本公开的一个实施例的获取知识图谱子图2的示意图;
图8示意性示出了根据本公开的一个实施例的获取输入问题1对应的推理路径的示意图;
图9示意性示出了根据本公开的一个实施例的获取输入问题2对应的推理路径的示意图;
图10示意性示出了根据本公开的一个实施例的获取输入问题2对应的推理路径的示意图;
图11示意性示出了根据本公开的一个实施例的获取输入问题2对应的推理路径的示意图;
图12示意性示出了根据本公开的一个实施例的获取输入问题2对应的推理路径的示意图;
图13示意性示出了根据本公开的一个实施例的获取输入问题3对应的推理路径的示意图;
图14示意性示出了根据本公开的一个实施例的获取输入问题1对应的推理路径的示意图;
图15示意性示出了根据本公开的一个实施例的获取输入问题1对应的推理路径的示意图;
图16示意性示出了根据本公开的一个实施例的获取输入问题1对应的推理路径的示意图;
图17示意性示出了根据本公开的一个实施例的区别性显示推荐对象的示意图;
图18示意性示出了根据本公开的一个实施例的区别性显示推荐对象的示意图;
图19示意性示出了根据本公开的一个实施例的显示包含被选实体的知识图谱子图的示意图;
图20示意性示出了根据本公开的一个实施例的显示包含被选实体的知识图谱子图的示意图;
图21示意性示出了根据本公开的一个实施例的显示包含被选实体的知识图谱子图的示意图;
图22示意性示出了根据本公开的一个实施例的显示包含被选实体的知识图谱子图的示意图;
图23示意性示出了根据本公开的一个实施例的人机交互装置的框图。
具体实施方式
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施方式中。在下面的描述中,提供许多具体细节从而给出对本公开的实施方式的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知技术方案以避免喧宾夺主而使得本公开的各方面变得模糊。
此外,附图仅为本公开的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。附图中所示的一些方框图是功能实体,不一定必须与物理或逻辑上独立的实体相对应。可以采用软件形式来实现这 些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。
图1示出了可以应用本公开实施例的一种人机交互方法及装置的示例性应用环境的系统架构的示意图。
如图1所示,系统架构100可以包括终端设备101、102、103中的一个或多个,网络104和服务器105。网络104用以在终端设备101、102、103和服务器105之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。终端设备101、102、103可以是具有显示屏的各种电子设备,包括但不限于台式计算机、便携式计算机、智能手机和平板电脑等等。应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。比如服务器105可以是多个服务器组成的服务器集群等。
本公开实施例所提供的人机交互方法可以由终端设备101、102、103执行,相应地,人机交互装置可以设置于终端设备101、102、103中。本公开实施例所提供的人机交互方法也可以由服务器105执行,相应地,人机交互装置可以设置于服务器105中。本公开实施例所提供的人机交互方法还可以由终端设备101、102、103与服务器105共同执行,相应地,人机交互装置可以设置于终端设备101、102、103与服务器105中,本示例性实施例中对此不做特殊限定。
例如,在本示例实施方式中,用户可以通过终端设备101、102、103输入问题,终端设备101、102、103在获取到该输入问题后,提取出该输入问题涉及的实体及关系,并通过网络104发送至服务器105;服务器105在接收到上述实体及关系后,依据该实体及关系在知识图谱中查询上述输入问题的答案。同时,获取知识图谱子图,该知识图谱子图包含上述输入问题和答案涉及的实体以及指向性标识,指向性标识被配置为标识查询过程对应的推理路径。最后,将得到的知识图谱子图通过网络104发送至终端设备101、102、103,终端设备101、102、103接收后并显示该知识图谱子图。
图2示出了适于用来实现本公开实施例的电子设备的计算机系统的结构示意图。
需要说明的是,图2示出的电子设备的计算机系统200仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图2所示,计算机系统200包括中央处理单元(CPU)201,其可以根据存储在只读存储器(ROM)202中的程序或者从储存部分208加载到随机访问存储器(RAM)203中的程序而执行各种适当的动作和处理。在RAM 203中,还存储有系统操作所需的各种程序和数据。CPU 201、ROM 202以及RAM 203通过总线204彼此相连。输入/输出(I/O)接口205也连接至总线204。
以下部件连接至I/O接口205:包括键盘、鼠标等的输入部分206;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分207;包括硬盘等的储存部分208;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分209。通 信部分209经由诸如因特网的网络执行通信处理。驱动器210也根据需要连接至I/O接口205。可拆卸介质211,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器210上,以便于从其上读出的计算机程序根据需要被安装入储存部分208。
随着计算机问答技术的不断发展,其在实际中的应用也日趋成熟,目前已被成功地应用于人机交互中,给人们的生产生活及日常娱乐带来了许多便利。
然而,现有的大多数问答存在准确性与灵活性不高,交互过程的可视化程度低,交互效果差等问题。为了解决上述问题,发明人尝试性地将知识图谱与计算机问答技术相结合,提出了通过基于图知识库的方式完成人机交互过程这一方法。
基于知识图谱的自动问答虽然解决了问答过程存在的准确度和灵活性较低的问题,但用户只能得到输入问题的答案,却无法获取得到该答案的推理路径,交互过程的可视化程度依然较低,交互效果也受到了一定的影响。同时,随着对话的进行,涉及的实体数量增多,若在显示区域显示包含全部实体的知识图谱,会造成显示效果差,用户无法快速获取重要信息等问题。此外,如何依据输入问题及用户相关信息进行相关推荐对实际应用也很重要。
为了解决上述问题,在本示例实施方式中,发明人提出了一种新的技术方案,以下对本公开实施例的技术方案进行详细阐述:
本示例实施方式首先提供了一种人机交互方法,该人机交互方法如图3所示,具体包括以下步骤:
步骤S310:接收输入问题;
步骤S320:提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
步骤S330:显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
在本公开示例实施方式所提供的人机交互方法中,一方面,在本示例实施方式所提供的人机交互方法中,由于配置了指向性标识,可以实现标识上述查询过程对应的推理路径,进而,用户可以直观地看到查询输入问题的过程,改善了人机交互的效果。另一方面,该方法还以知识图谱子图的形式对上述输入问题及答案涉及的实体,以及指向性标识进行了显示,从而有助于用户获取有效信息,提高屏幕利用率,改善显示效果。
下面,在另一实施例中,对上述步骤进行更加详细的说明。
在步骤S310中,接收输入问题。
在本示例实施方式中,用户将输入问题通过终端设备输入至人机交互系统,该输入问题为用户想要查询答案的问题。例如,可以为一阶问题,如“画家A是哪年出生的”,也可以为二阶问题,如“与画家A同一国家的画家还有谁”,此外,该输入问题还可以为更高阶问题。需要说明的是,上述列举的输入问题只是一种示例性说明,对本示例实施方式的保护范 畴不起限定作用,该输入问题还可以为用户想要得知的任何其他问题。且上述终端设备可以为智能手机,也可以为平板电脑,还可以其笔记本等其他终端,本示例实施方式对此不做特殊限定。
在本示例实施方式中,上述输入问题相关的知识以实体的形式存储在一知识图谱中,该知识图谱是结构化的语义知识库,提供了一种知识存储和查询的方式。且该语义知识库中存储着实体及与实体相连的关系。以三元组为例,其基本组成单位可以是(实体,关系,实体)这样的存储方式。举例而言,“画家A的国籍为国家B”在该语义数据库中可以表示成(画家A,国籍,国家B),其中,“画家A”是一个实体,“国籍”是一个关系,而“国家B”则是通过“国籍”这一关系与实体“画家A”相连接的另一个实体。需要说明的是,上述情景只是一种示例性说明,并不对本示例实施方式的保护范畴起任何的限定作用。
本示例实施方式中,上述知识图谱的结构化语义知识库可以是将数据以三元组的形式存储的图数据库,该图数据库可以是任何开源图数据库或商业图数据库。举例而言,该数据库可以为Neo4j,也可以为Apache Jena、还可以为Gstore,本示例实施方式对此不做特殊要求。
在步骤S320中,提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案。
在本示例实施方式中,终端设备在接收到用户输入的输入问题后,需要提取该输入问题中涉及的实体及关系,进而才可以在上述知识图谱中查询该输入问题的答案。其中,上述实体可以通过数据字典提取,上述关系则可以通过实体替换、泛化问题,意图识别模型处理等步骤最终提取得到。
此外,依据输入问题的不同,提取到的实体与关系的组合也会有所不同。例如,可以为单实体单关系、也可以为单实体多关系、还可以为多实体单关系或多实体多关系等不同情况。举例而言,输入问题“画家A是哪年出生的”提取出的实体为“画家A”,提取到的关系为“出生年份”,这即是一种单实体单关系的组合。再例如,输入问题“与画家A同一国家的画家还有谁”为二阶问题,该输入问题涉及到的实体及关系在知识图谱数据库的存储形式可以为(画家A,国籍,国家B),(国家B,画家,画家C),其中画家C可能为多个,也即,该输入问题提取出的实体包括画家A,画家A所属的国家,其他同属该国家的画家等多个实体,关系为国籍,画家,则该输入问题对应的为多实体多关系的组合。同理,输入问题还可能为单实体多关系或多实体单关系的组合,这都属于本示例实施方式的保护范畴,且上述例举只是一种示例性说明,本示例实施方式并不以此为限。
在本示例实施方式中,在提取得到上述输入问题涉及的实体及关系后,可以依据提取到的实体及关系在上述知识图谱中查询与上述输入问题相关的实体,并将其组织成答案输出。以“画家A是哪年出生的”为例,具体实现可以为,提取出该输入问题对应的实体“画家A”及关系“出生年份”,可以在知识图谱的图数据库中得到该实体与关系的基本组成(画家A,出生年份,1953),故可以得到该输入问题的答案为1953年。进一步将其组织得到答案,可以为“画家A的出生年份为1953年”。需要说明的是,上述场景只是一种示例性说明, 本示例实施方式的保护范畴并不以此为限。
在步骤S330中,显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
在本示例实施方式中,还可以进一步在上述知识图谱的图数据库中获取上述输入问题对应的知识图谱子图并进行显示。
其中,该知识图谱子图可以包括上述输入问题及答案涉及的实体以及指向性标识。将实体显示在上述知识图谱中的实现如下:
当问答为单轮对话或多轮对话中的第一轮问答交互时,获取知识图谱子图的实现过程为:提取输入问题涉及的实体并显示包含该实体的知识图谱子图。
当问答为多轮对话,且上述输入问题为多轮对话中的第二轮及以上的问答交互时,上述在知识图谱的图数据库中获取知识图谱子图并进行显示的实现过程可以如下:判断本次交互的输入问题及答案与上一轮交互的输入问题及答案相比是否涉及新的实体;若是,则将新的实体及对应的指向性标识更新至上一轮交互获取的知识图谱子图,并显示更新后的知识图谱子图;若否,则将上一轮交互获取的知识图谱子图作为知识图谱子图并更新指向性标识。
下面以一三轮对话为例,对上述知识图谱子图的更新过程进行进一步详细的说明,该三轮对话对应的输入问题为:输入问题1“画家A哪年出生”;输入问题2“和画家A同一国家的画家还有谁”;输入问题3“画家A有什么代表作”。更新过程如图4所示,包括以下步骤:
在步骤S410中,接收输入问题1,并提取输入问题1和答案1中包含的实体及关系。
在该步骤中,接收输入问题1:“画家A哪年出生”,对该输入问题1进行提取,得到其中涉及的实体为“画家A”,涉及的关系为“出生年份”。
在步骤S420中,依据实体及关系获取知识图谱子图。
在该步骤中,由上述步骤S410提取得到输入问题1及答案1涉及的实体“画家A”、“1953”及关系“出生年份”,在上述知识图谱的图数据库中获取包含实体“画家A”、“1953”及关系“出生年份”的知识图谱子图,如图5所示。此外,可选地,该知识图谱还可以包括与输入问题1涉及的实体相连接的其他关系,如图6所示,该知识图谱子图1还可以包含与实体“画家A”相连的其他关系“国籍”、“流派”及“代表作”,及与上述各关系连接的其他实体,如“国家B”、“1953”、“画作X”及“印象派”。为了方便说明,在本示例实施方式中,后续步骤将如图6所示的知识图谱子图作为知识图谱子图1。
在步骤S430中,接收输入问题2,并提取输入问题2和答案2中包含的实体及关系。
在该步骤中,接收输入问题2“和画家A同一国家的画家还有谁”,依据输入问题2及其对应的答案提取实体及关系,得到实体“画家A”,“国家B”,“画家H”,“画家L”,关系“国籍”,“画家”。
在步骤S440中,判断是否有新增的实体及关系。
在该步骤中,判断输入问题2是否涉及新的实体及关系,若是,则跳转至步骤S450。反之,则保持当前知识图谱子图不变。与步骤S420得到的如图6所示的知识图谱子图1相比,输入问题2及对应的答案2新增了实体“画家H”,“画家L”,新增了关系“画家”,故跳转至步骤S450。
在步骤S450中,更新知识图谱子图。
在该步骤中,将新增的实体及关系更新至知识图谱子图。在步骤S440中判断得出输入问题2及答案2新增了实体“画家H”,“画家L”,新增了关系“画家”。更新得到的知识图谱子图2,如图7所示,在原子图1的基础上新增了与实体“国家B”相连的关系“画家”,及与该关系相连的实体“画家L”及“画家H”。
在步骤S460中,接收输入问题3,并提取输入问题3及答案3包含的实体及关系。
在该步骤中,接收输入问题3“画家A有什么代表作”,并依据输入问题2及其对应的答案提取实体及关系,得到实体“画家A”、“画作X”及关系“代表作”。
在得到输入问题3和答案包含的实体后,跳转至步骤S440,进行与输入问题2相同的判断及更新过程。在该场景中,由于经判断,输入问题3和答案3与如图6所示的知识图谱子图1相比,并未涉及新的实体及关系,故保持知识图谱子图2不变。
需要说明的是,上述场景只是一种示例性说明,本示例实施方式的保护范畴并不以此为限,上述过程也适应于三轮以上的交互,对于更高阶的输入问题,知识图谱的更新过程是相同的。此外,上述输入问题也可以为用户想要查询的其他任何问题,本示例实施方式对此不做特殊限定。
在本示例实施方式中,上述知识图谱子图还包括指向性标识,该指向性标识连接查询答案的过程中依次经过的各实体,用于标识上述查询过程对应的推理路径。该指向性标识,举例而言,可以为指向性箭头,也可以通过查询过程依次经过的具有不同属性的多个实体来表示,其中,属性包括颜色、尺寸及形状中的至少一个。除此之外,该指向性标识还可以为符合上述定义的任何形式,本示例实施方式对此不做特殊限定。
通过上述指向性标识,用户可以直观地看到查询输入问题的过程,即推理路径。以上述指向性标识为指向性箭头为例,标识该推理路径的实现可以如下:
当问答为单轮对话或多轮对话中的第一轮问答交互时,以输入问题1“画家A哪年出生”为例,如图8所示,提取得到对应的实体为“画家A”,关系为“出生年份”,依据该实体及关系得到答案对应的实体应为与上述关系“出生年份”相连的实体“1953”,则在上述获取到的知识图谱中以指向性箭头将实体“画家A”与实体“1953”连接起来。起始于“画家A”终止于“1953”的由指向性箭头连接的路径即为该输入问题对应的推理路径。
当问答为多轮对话,且上述输入问题为多轮对话中的第二轮及以上的问答交互时,上述标识该推理路径的实现过程可以如下:查询输入问题的答案,并在更新后的知识图谱子图中以指向性箭头依次连接查询过程经过的各实体,得到查询过程对应的推理路径。
在输入问题1的基础上,以继续查询上述输入问题2“和画家A同一国家的画家还有谁”为例,该输入问题2对应的为更新得到的知识图谱子图2。该输入问题为二阶问题,即要经过两次推理才能查询到对应的答案。如图9所示,首先,依据实体“画家A”及关系“国籍”得到画家A所属的国家B,以指向性箭头连接实体“画家A”及查询得到的实体“国家B”,再依据该实体“国家B”与关系“画家”得到该二阶问题的答案“画家L”及“画家H”,继续以指向性箭头分别连接实体“国家B”及“画家L”,以及实体“国家B”及“画家L”。起始于“画家A”终止于“画家L”,以及起始于“画家A”终止于“画家H”的由指向性箭头连接的路径均为输入问题2的查询过程对应的推理路径。
优选地,如上述输入问题2所示,当输入问题的答案需要经过多阶推理获取,及为二阶及以上问题时,上述标识推理过程时,可以对不同阶的推理进行区分显示,其具体实现可以为:上述指向性标识包括多级指向性标识,以区分查询过程中依次对应的各阶推理路径;其中,多级指向性标识具有不同的颜色、尺寸、及形状中的至少一个。
以上述输入问题2为例,“和画家A同一国家的画家还有谁”这一问题包括两阶推理过程,如上所述,首先,获取画家A所属的国家B,该过程为一阶推理过程,可通过一级指向性标识进行标识;接着,获取国家B对应的其他画家,画家L及画家H,从国家B至画家L和国家B至画家H均为二阶推理过程,可通过一级指向性标识进行标识。举例而言,该一级指向性标识及二级指向性标识可以为颜色不同的指向性标识,如图10所示,一级指向性标识为灰色箭头,二级指向性标识为黑色箭头;也可以为尺寸不同的指向性标识,如图11所示,二级指向性标识为尺寸大于一级指向性标识的指向性箭头;还可以为通过形状不同的指向性标识,如图12所示,一级指向性标识为实线箭头,二级指向性标识为虚线箭头。此外,还可以是其他颜色、尺寸及形状,也可以是颜色、尺寸、形状的任意组合,本示例实施方式对此不做特殊限定。
需要说明的是,上述场景只是示例性说明,更高阶的推理过程及其对应的更多级指向性标识也属于本示例实施方式的保护范畴。
当继续查询输入问题3“画家A有什么代表作”的答案时,由于没有新增的实体及关系,则直接在知识图谱子图2中标注输入问题3对应的推理路径,如图13所示,基于相同的逻辑,得到起始于“画家A”终止于“画作X”的由指向性箭头连接的路径即为输入问题3对应的推理路径。
在本示例实施方式中,上述标识推理路径的指向性标识也可以通过查询过程依次经过的具有不同属性的多个实体来表示,其中,属性包括颜色、尺寸及形状中的至少一个。
以输入问题1“画家A哪年出生”为例,该输入问题1经过的实体包括“画家A”及“1953”,在该推理过程中,如图14所示,指向性标识可以为通过颜色深度递进的实体“画家A”及实体“1953”;也可以如图15所示,为尺寸不同的实体“画家A”及实体“1953”;还可以如图16所示,为形状不同的实体“画家A”及实体“1953”。此外,可以为其他符合上述定义的多个实体,本示例实施方式对此不做特殊限定。
至此,在知识图谱子图中已经标注出了输入问题1至3对应的推理路径。在本示例实施方式中,为了方便用户区分各输入问题的推理路径,可以基于上述指向性标识区分显示不同的输入问题对应的推理路径。以指向性标识为指向性箭头为例,还可以用不同颜色的箭头标注不同输入问题对应的推理路径,例如,使用红色箭头标注输入问题1的推理路径,使用绿色箭头标注输入问题2的推理路径,使用蓝色箭头标注输入问题3的推理路径。此外,还可以以箭头的粗细,虚实等特征来区分显示不同的输入问题对应的推理路径,本示例实施方式对此不做特殊限定。
需要说明的是,上述场景只是一种示例性说明,本示例实施方式的保护范畴并不以此为限,上述过程也适应于三轮以上的交互及更高阶的输入问题,通过指向性标识对推理路径标注的过程是相同的。此外,上述输入问题也可以为用户想要查询的其他任何问题,本示例实施方式对此不做特殊限定。
在本示例实施方式中,在查询到上述输入问题的答案后,将查询到的答案输出至用户。举例而言,可以通过语音输出的方式将上述答案播放给用户,也可以将上述答案展示在显示区域呈现给用户,还可以通过其他可以达到相同效果的交互方式反馈至用户,本示例实施方式对此不做特殊限定。
此外,在输出查询到的答案的同时,本示例实施方式还可以依据输入问题、查询到的答案及用户属性及行为等因素获取用户感兴趣的对象并推荐给用户。该过程具体实现可以为:获取用户属性数据及用户行为数据;依据获取到的用户属性数据及用户行为数据获取推荐对象;在上述显示区域中区别性显示上述推荐对象。
上述过程中,用户属性数据可以包括用户的年龄、性别及购买力等属性信息,用户行为数据则可以包括用户的历史搜索数据,用户操作数据等行为信息。推荐对象可以为基于搜索数据得到的用户可能感兴趣的对象,也可以为基于运营目标向用户推荐的相关产品,还可以为基于大数据分析得到的时事热点内容,还可以为其他的推荐给用户的对象,这都属于本示例实施方式的保护范畴。
以输入问题为“画家A有什么代表作”为例,查询到该输入问题的答案为画作X。接着,获取用户属性数据及用户行为数据,基于用户属性数据得到用户年龄段为年轻人群体,基于用户行为数据得到用户曾搜索过背包,则可以向用户推荐以画作X为主题的背包。
此外,还可以根据输入问题与艺术画作相关,根据运营目标确定优先向用户推荐电子画框产品,且判断电子画框I适合播放艺术画作,因此,可以向用户推荐电子画框I。
另外,还可以根据实体画作X的内容,延伸与该画作相关的画作。例如,若该画作X的主题为花朵,流派为印象派,则可以向用户推荐同一主题及相似流派的画作S。
需要说明的是,上述场景只是一种示例性说明,并不对本示例实施方式的保护范畴起限定作用。
在本示例实施方式中,在上述过程中,在获取到推荐对象后,还可以将获取到的推荐对象区别性显示在上述显示区域中,以将推荐对象实体及关系与问答实体及关系区分开来。举 例而言,该区别性显示可以采取如下方法:(1)区别性显示与推荐对象相关的实体;接收作用于实体的控制操作,依据该控制操作显示推荐对象;(2)以虚线显示推荐对象及与推荐对象相连的关系,其中,推荐对象以实体的形式显示在知识图谱子图中;(3)弹出消息提示窗口,在该消息提示窗口中显示推荐对象。此外,还可以采取其他可以达到区别性显示效果的技术手段,本示例实施方式对此不做特殊限定。
以上述获取推荐对象的场景为例,获取到的推荐对象包括以画作X为主题的背包、电子画框I及画作S。如图17所示,可以对有推荐对象的实体“画作X”1710及“印象派”1720进行区别性显示。以“画作X”为例进行说明,利用不同的色彩对实体“画作X”框进行填充,提示用户存在与该实体相关的推荐对象;接收作用于实体的控制操作,依据该控制操作显示推荐对象。例如,响应于针对实体“画作X”的点击操作,显示推荐对象详情。另外,用户可以通过语音控制显示该实体“画作X”相关的推荐对象。
此外,还可以实体形式显示推荐对象,且为了区分推荐对象及问答的实体与关系,采用虚线显示推荐对象及与推荐对象相连的关系,如图18所示,采用虚线显示与画作X相连的关系“显示产品”、“衍生产品”及“相似作品”,及与该关系相连的实体“以画作X为主题的背包”、“电子画框I”及“画作S”。以及与“印象派”相连的关系“代表作”,及与该关系“代表作”相连的实体“画作R”及“画作C”。
另外,也可以弹出消息提示窗口,在该消息提示窗口中显示推荐对象。例如,响应于用户点击实体“画作X”的操作,弹出一个消息提示窗口,在该窗口中显示“电子画框I”的产品详情。
在上述获取推荐对象后,本示例实施方式中,用户还可以对推荐对象进行购买或收藏等后续操作。例如,可以根据用户语音指令控制收藏购买产品,当检测到“帮我收藏画作X”的语音输入,则执行对应的收藏操作。还可以在检测到控制购买的操作时,在系统界面显示付费界面,根据用户语音确定付款,付款时系统根据声纹识别、或面部识别认证用户身份后进行付款,完成购买过程。
需要说明的是,上述场景只是一种示例性说明,并不对本示例实施方式的保护范畴起限定作用。
在本示例实施方式中,除了向用户推荐产品等推荐对象,还可以推荐用户感兴趣的问题,以促进多轮对话的进行,提高交互效率。该过程的实现可以为:获取与问题、答案相关的实体与关系,并依据获取到的实体及关系得到多个推荐问题;对获取到的推荐问题进行排序,并输出排序靠前的推荐问题。可以将其显示在显示区域,还可以语音播放给用户,本示例实施方式对此不做特殊限定。
在将上述答案反馈至用户的同时,还需将获取的知识图谱子图及推理路径展示在上述显示区域中。但随着对话的进行,输入问题增多,涉及的实体数量也随之增多。若将所有的实体都显示在显示区域,则会带来界面混乱,显示效果差及用户无法快速获取重要信息等问题。因此,为了解决上述问题,本示例实施方式所提供的人机交互方法所展示的为经选择的知识 图谱子图,具体实现可以如下:依据预设的筛选规则对实体进行选择;在显示区域显示包含被选实体的知识图谱子图。
具体而言,上述依据预设的筛选规则对实体进行选择可以为:基于推荐算法对实体进行排序,获取排序后的实体。例如,可以根据用户属性信息及用户行为获取用户感兴趣的内容,基于推荐算法对获取到的内容进行排序,并选择排序靠前的实体。此外,还可以根据其他因素对实体进行选择,例如,基于运营目标,根据产品特色或系统预存的信息进行选择;也可以基于大数据分析,推荐时下热点内容,例如,根据天气或地理位置筛选实体,这都属于本示例实施方式的保护范畴。
以当前输入问题为“国家B的景点有什么”为例,如图19所示,依据上述用户的搜索历史输入问题1至3,可以判断出该用户对艺术画作感兴趣,则在显示当前输入问题对应的知识图谱子图时,只显示艺术景点实体,隐藏其他景点实体。同时,可以在有隐藏实体处或关系处显示隐藏图标1910,以提示用户此处存在隐藏实体1920。当用户点击隐藏图标时,显示对应的隐藏实体。需要说明的是,上述场景只是一种示例性说明,并不对本示例实施方式的保护范畴起限定作用。
在本示例实施方式中,还可以基于用户的控制操作对知识图谱子图中显示的实体进行选择。该实现可以如下:响应于作用于一实体的选择操作,隐藏以该实体为中心的分支并显示隐藏图标,其中,分支包括与该实体相连的所有实体、关系及指向性标识。如图20所示,由于与国家B连接的实体较多,因此,可以通过用户点击某一实体的操作,控制隐藏以该实体为中心的分支,即隐藏与该实体连接的全部实体、关系、推理路径箭头。在该实体上显示隐藏图标2010,提醒用户有隐藏实体。当用户再次点击该实体时,显示隐藏的实体、关系及推理路径箭头。
此外,上述过程还可以通过以下方法实现:响应于作用于一关系的选择操作,隐藏与该关系相连的所有实体并显示隐藏图标。如图21所示,通过选中关系“景点”的操作,将同一类实体隐藏,并在关系处显示隐藏图标2110。
通过对于显示区域的控制操作,也可以实现上述过程,具体可以如下:接收针对显示区域的控制操作,依据控制操作调整知识图谱子图中实体的位置,其中,控制操作为点击或移动操作。如图22所示,用户选中某个实体,以该实体为中心重新布局子图,或,用户拖动实体调整子图各实体的相对位置。
需要说明的是,上述场景只是一种示例性说明,并不对本示例实施方式起限定作用,其他基于用户的控制操作对知识图谱子图中显示的实体进行选择的方法也属于本示例实施方式的保护范畴。
在本示例实施方式中,除了上述采取推荐算法对实体进行排序选择及基于用户的控制操作对知识图谱子图中显示的实体进行选择,还提供了另一种对实体进行选择的规则。具体实现可以如下:检测当前输入问题和之前的对话实体的关联程度,并依据该关联程度确定是否删除之前的子图。若不相关,则删除原知识图谱子图,获取并展示当前输入问题对应的新的 知识图谱子图;若相关,则继续在原知识图谱子图新增实体及关系。
需要说明的是,上述场景只是一种示例性说明,并不对本示例实施方式起限定作用,其他对实体进行选择的方法也属于本示例实施方式的保护范畴。
优选地,在本示例实施方式中,还可以依据查询到的输入问题的答案,启动对应的系统功能。例如,当经判断得到输入问题为艺术领域时,可以自动问询用户是否播放相关画作。以输入问题为“画家A为哪国人”为例,在查询得到答案后,自动语音播放答案“国家B”,在显示区域展示上述获取的知识图谱子图及推理路径,同时自动问询用户“您想看蒙娜丽莎的画作吗?”。如果用户确认播放,则切换成相应画作。画作的展示方式可以与上述知识图谱子图叠层显示,子图透明显示浮于画作上方,以免影响欣赏画作;还可以将知识图谱子图和画作在不同区域进行显示,也可以采取其他的展示方式,这都属于本示例实施方式的保护范畴。
对应地,本示例实施方式提供了一种人机交互装置。参考图23所示,该人机交互装置2300可以包括输入设备2310、处理器2320及显示器2330。其中:
输入设备2310被配置为接收输入问题;
处理器2320被配置为提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
显示器2330被配置为显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
其中,上述输入设备可以是触控屏、按键;处理器可以是云服务器;显示器可以是lcd,oled等,本示例实施方式对此不做特殊限定。
上述人机交互装置中各子电路或单元的具体细节已经在对应的人机交互方法中进行了详细的描述,因此此处不再赘述。
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干子电路或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多子电路或者单元的特征和功能可以在一个子电路或者单元中具体化。反之,上文描述的一个子电路或者单元的特征和功能可以进一步划分为由多个子电路或者单元来具体化。
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该电子设备执行时,使得该电子设备实现如上述实施例中所述方法。例如,所述电子设备可以实现如图3~图22所示的各个步骤等。
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不 限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (15)

  1. 一种人机交互方法,包括:
    接收输入问题;
    提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
    显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
  2. 根据权利要求1所述的人机交互方法,其中,所述指向性标识被配置为连接查询过程依次经过的各实体。
  3. 根据权利要求2所述的人机交互方法,其中,对于所述输入问题是多阶推理问题的情形,所述指向性标识包括多级指向性标识,以区分所述查询过程中依次对应的各阶推理路径;
    所述多级指向性标识中的任意两个之间具有不同的颜色、尺寸、及形状中的至少一个。
  4. 根据权利要求1-3任一项所述的人机交互方法,其中,所述指向性标识为指向性箭头。
  5. 根据权利要求1所述的人机交互方法,其中,所述指向性标识为通过所述查询过程依次经过的具有不同属性的多个实体来表示,所述属性包括颜色、尺寸及形状中的至少一个。
  6. 根据权利要求1-4任一项所述的人机交互方法,其中,对于所述输入问题为大于或等于第二轮的问答交互的情形,所述显示知识图谱子图,包括:
    判断所述输入问题及所述答案与上一轮交互的输入问题及答案相比是否涉及新的实体;
    若是,则将所述新的实体及对应的指向性标识更新至上一轮交互获取的知识图谱子图,并显示更新后的所述知识图谱子图;
    若否,则将上一轮交互获取的知识图谱子图作为所述知识图谱子图并更新所述指向性标识。
  7. 根据权利要求6所述的人机交互方法,其中,所述方法还包括:
    基于所述指向性标识区分显示不同的输入问题对应的所述推理路径。
  8. 根据权利要求1-7任一项所述的人机交互方法,其中,在所述显示知识图谱子图时,所述方法还包括:
    获取用户属性数据、用户行为数据及运营数据中的至少一个,所述用户属性数据包括用户的年龄、性别及购买力中的至少一个,所述用户行为数据包括历史搜索数据;
    依据所述用户属性数据、所述用户行为数据及运营数据中的至少一个获取推荐对象;
    在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象。
  9. 根据权利要求8所述的人机交互方法,其中,所述在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象,包括:
    在所述知识图谱子图中通过色彩填充或符号标记区别性显示目标实体,其中,所述目标实体为通过一关系与所述推荐对象相连的实体;
    接收作用于所述目标实体的控制操作,依据所述控制操作显示所述推荐对象。
  10. 根据权利要求8所述的人机交互方法,其中,所述在所述知识图谱子图中相对于所述实体区别性显示所述推荐对象,包括:
    以虚线线条显示所述推荐对象及与所述推荐对象相连的关系,其中,所述推荐对象以实体的形式显示在所述知识图谱子图中;或者,
    弹出消息提示窗口,在所述消息提示窗口中显示所述推荐对象。
  11. 根据权利要求1-10任一项所述的人机交互方法,其中,所述显示知识图谱子图,包括:
    依据预设的筛选规则对所述输入问题和所述答案涉及的所述实体进行选择;
    显示所述知识图谱子图,其中,所述知识图谱子图包含被选的所述实体以及所述指向性标识。
  12. 根据权利要求11所述的人机交互方法,其中,所述依据预设的筛选规则对所述输入问题和所述答案涉及的所述实体进行选择,包括:
    响应于用户的控制操作,依据所述控制操作选择所述实体和其相关的实体的显示状态;
    所述依据所述控制操作选择所述实体和其相关的实体的显示状态,包括:
    响应于作用于一所述实体的选择操作,隐藏以该所述实体为中心的分支并显示隐藏图标,所述分支包括与该所述实体相连的所有实体、关系及指向性标识;或者,
    响应于作用于一所述关系的选择操作,隐藏与该所述关系相连的所有所述实体并显示隐藏图标。
  13. 一种人机交互装置,包括:
    输入设备,被配置为接收输入问题;
    处理器,被配置为提取所述输入问题涉及的实体及关系,并依据所述实体及所述关系在知识图谱中查询所述输入问题的答案;
    显示器,被配置为显示知识图谱子图,其中,所述知识图谱子图包含所述输入问题和所述答案涉及的实体、以及指向性标识,所述指向性标识被配置为标识所述查询过程对应的推理路径。
  14. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1-12任一项所述的方法。
  15. 一种电子设备,包括:
    处理器;
    存储器,用于存储所述处理器的可执行指令;
    其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1-12任一项所述的方法。
PCT/CN2021/086274 2020-05-29 2021-04-09 人机交互方法及装置、存储介质及电子设备 WO2021238447A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
DE112021000226.0T DE112021000226T5 (de) 2020-05-29 2021-04-09 Mensch-maschine-interaktion verfahren und vorrichtung, speichermedium undelektronisches gerät
KR1020227018067A KR20230015872A (ko) 2020-05-29 2021-04-09 인간-컴퓨터 인터랙션 방법 및 장치, 저장 매체 및 전자 디바이스
US17/439,758 US20220343183A1 (en) 2020-05-29 2021-04-09 Human-computer interaction method and apparatus, storage medium and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010474979.1A CN111639169A (zh) 2020-05-29 2020-05-29 人机交互方法及装置、计算机可读存储介质及电子设备
CN202010474979.1 2020-05-29

Publications (1)

Publication Number Publication Date
WO2021238447A1 true WO2021238447A1 (zh) 2021-12-02

Family

ID=72333295

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/086274 WO2021238447A1 (zh) 2020-05-29 2021-04-09 人机交互方法及装置、存储介质及电子设备

Country Status (5)

Country Link
US (1) US20220343183A1 (zh)
KR (1) KR20230015872A (zh)
CN (1) CN111639169A (zh)
DE (1) DE112021000226T5 (zh)
WO (1) WO2021238447A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639169A (zh) * 2020-05-29 2020-09-08 京东方科技集团股份有限公司 人机交互方法及装置、计算机可读存储介质及电子设备
CN112417004A (zh) * 2020-11-23 2021-02-26 中国建设银行股份有限公司 一种实体关系图谱构建的方法和装置
CN114153961B (zh) * 2022-02-07 2022-05-06 杭州远传新业科技有限公司 一种基于知识图谱的问答方法及系统
CN114968034A (zh) * 2022-04-24 2022-08-30 上海传英信息技术有限公司 交互方法、智能终端及存储介质
CN115422346A (zh) * 2022-08-29 2022-12-02 浙江极氪智能科技有限公司 基于知识图谱的多轮话题推荐方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344346A1 (en) * 2016-05-26 2017-11-30 Cisco Technology, Inc. Optimal rule generation from a digraph representation
CN107451240A (zh) * 2017-07-26 2017-12-08 北京大学 一种基于交互的知识图谱问答q/a系统检索提升方法和装置
CN110046238A (zh) * 2019-03-29 2019-07-23 华为技术有限公司 对话交互方法、图形用户界面、终端设备以及网络设备
CN111639169A (zh) * 2020-05-29 2020-09-08 京东方科技集团股份有限公司 人机交互方法及装置、计算机可读存储介质及电子设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357849B (zh) * 2017-06-27 2020-11-03 北京百度网讯科技有限公司 基于测试类应用的交互方法和装置
CN108536861B (zh) * 2018-04-19 2022-03-18 中国科学院重庆绿色智能技术研究院 一种医疗指南的交互式培训方法及其系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170344346A1 (en) * 2016-05-26 2017-11-30 Cisco Technology, Inc. Optimal rule generation from a digraph representation
CN107451240A (zh) * 2017-07-26 2017-12-08 北京大学 一种基于交互的知识图谱问答q/a系统检索提升方法和装置
CN110046238A (zh) * 2019-03-29 2019-07-23 华为技术有限公司 对话交互方法、图形用户界面、终端设备以及网络设备
CN111639169A (zh) * 2020-05-29 2020-09-08 京东方科技集团股份有限公司 人机交互方法及装置、计算机可读存储介质及电子设备

Also Published As

Publication number Publication date
DE112021000226T5 (de) 2022-12-22
US20220343183A1 (en) 2022-10-27
CN111639169A (zh) 2020-09-08
KR20230015872A (ko) 2023-01-31

Similar Documents

Publication Publication Date Title
WO2021238447A1 (zh) 人机交互方法及装置、存储介质及电子设备
US11216861B2 (en) Color based social networking recommendations
US10402917B2 (en) Color-related social networking recommendations using affiliated colors
JP6286549B2 (ja) 推奨結果の展示方法及び装置
US20170199943A1 (en) User interface for multivariate searching
US10073860B2 (en) Generating visualizations from keyword searches of color palettes
KR20200128725A (ko) 사용자 지정 디바이스 액션들의 음성 기반 시작을 위한 시스템들 및 방법들
CN109165316A (zh) 一种视频处理方法、视频索引方法、装置及终端设备
CN110413867A (zh) 用于内容推荐的方法及系统
CN111400473A (zh) 意图识别模型的训练方法及装置、存储介质及电子设备
CN110264277A (zh) 由计算设备执行的数据处理方法及装置、介质和计算设备
CN116894711A (zh) 商品推荐理由生成方法及其装置、电子设备
US9369536B1 (en) Event-based user behavior timeline, predictions, and recommendations
CN113254135A (zh) 界面处理方法、装置及电子设备
CN111191133A (zh) 业务搜索处理方法、装置及设备
WO2014013488A1 (en) System and method for searching through a graphic user interface
WO2020199962A1 (zh) 改进传统零售行业货架摆放的方法
CN108694211B (zh) 应用分发方法及装置
US20200081912A1 (en) Identifying physical objects using visual search query
KR102119518B1 (ko) 인공지능을 이용하여 생성되는 스타일 공간에 기반한 상품 추천 방법 및 시스템
JP5805134B2 (ja) 端末装置および装置のプログラム
CN109829033A (zh) 数据展示方法和终端设备
TW202407531A (zh) 媒體項目及產品配對
JP2011209982A (ja) 情報分析処理システム及び情報分析処理方法
CN109242252A (zh) 一种智能服务平台及方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21813157

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21813157

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21813157

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 300623)

122 Ep: pct application non-entry in european phase

Ref document number: 21813157

Country of ref document: EP

Kind code of ref document: A1