WO2021017734A1 - 一种实体消歧方法、装置、计算机设备及存储介质 - Google Patents

一种实体消歧方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021017734A1
WO2021017734A1 PCT/CN2020/099471 CN2020099471W WO2021017734A1 WO 2021017734 A1 WO2021017734 A1 WO 2021017734A1 CN 2020099471 W CN2020099471 W CN 2020099471W WO 2021017734 A1 WO2021017734 A1 WO 2021017734A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
subtree
user
target question
answer
Prior art date
Application number
PCT/CN2020/099471
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 平安科技(深圳)有限公司
Publication of WO2021017734A1 publication Critical patent/WO2021017734A1/zh

Links

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
    • 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

Definitions

  • This application relates to the technical field of task management, and in particular to an entity disambiguation method, device, computer equipment and storage medium.
  • the entity link is the primary module, which is to identify the subject entity in the user’s question and link it with the knowledge graph.
  • entity disambiguation is required, that is, dedicated Technology to resolve the ambiguity of entities with the same name.
  • the main method of entity disambiguation is to rely on string similarity, supplemented by artificially extracted features and rules, to give multiple possible entities at once, and combine the semantics of questions to make certain disambiguation .
  • the entity disambiguation can be done by asking the user questions, but it is simple to do interactive disambiguation through the attributes of the entity. Generally, there are many interactive rounds and the user experience is not good.
  • the purpose of this application is to provide an entity disambiguation method, device, computer equipment and storage medium to solve the problems in the prior art.
  • this application provides an entity disambiguation method, which includes the following steps:
  • the answer entity corresponding to the target question in the target question text is determined according to the first entity, and the user portrait subtree of the user is established based on the target question text ;
  • the entity with the lowest level and the closest distance to the user portrait subtree in the entity subtree is selected as the target problem corresponding The answering entity of, outputting the answering entity to the user terminal;
  • the user portrait subtree is updated.
  • this application also provides an entity disambiguation device, which includes:
  • the recognition module is used to obtain the target question text input by the user terminal, and to recognize the first entity in the target question text;
  • the user profile subtree determination module is used to determine whether there is a user profile subtree of the user in the pre-built knowledge graph, wherein the user profile subtree is established according to the entities contained in the user information of the user;
  • the processing module is used to determine the answer entity corresponding to the target question in the target question text according to the user portrait subtree, and includes:
  • the first processing unit is configured to, if the user profile subtree of the user is not established, determine the answering entity corresponding to the target question according to the first entity, and at the same time, establish the user profile subtree of the user based on the target question tree;
  • the second processing unit is configured to, if the user profile subtree of the user has been established, create an entity subtree with the first entity as the vertex in the knowledge graph, and compare the entity subtree with the user profile Whether the distance of the tree is greater than the preset length, which includes:
  • the first processing subunit is configured to, if the distance between the entity subtree and the user portrait subtree is less than a preset length, select the entity with the lowest level and the closest distance to the user portrait subtree among the entity subtrees Entity, as the answering entity corresponding to the target question, outputting the answering entity to the user terminal;
  • the second processing subunit is used to determine that the distance between the entity subtree and the user portrait subtree is greater than a preset length, and determine the answer entity corresponding to the target question according to the first entity, and based on this For the second user target problem, update the user profile subtree.
  • the present application also provides a computer device, including a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor.
  • the processor executes the computer-readable instructions when the computer-readable instructions are executed.
  • the user profile subtree of the user determines the answer entity corresponding to the target question text according to the first entity, and at the same time establish the user profile subtree of the user based on the target question text;
  • the entity with the lowest level and the closest distance to the user portrait subtree in the entity subtree is selected as the target problem
  • the answer entity corresponding to the target question in the target question text is determined according to the first entity, and the answer entity is output to The user terminal simultaneously updates the user portrait subtree based on the target question text.
  • the present application also provides a computer-readable storage medium on which computer-readable instructions are stored, and the computer-readable instructions implement the following steps of the entity disambiguation method when executed by a processor:
  • the user profile subtree of the user determines the answer entity corresponding to the target question text according to the first entity, and at the same time establish the user profile subtree of the user based on the target question text;
  • the entity with the lowest level and the closest distance to the user portrait subtree in the entity subtree is selected as the target problem
  • the answer entity corresponding to the target question in the target question text is determined according to the first entity, and the answer entity is output to The user terminal simultaneously updates the user portrait subtree based on the target question text.
  • the entity disambiguation method, device, computer equipment and storage medium provided in this application are embedded in the knowledge graph question-and-answer dialogue system, and continuously update the user profile subtree according to the user's usage, so as to effectively mine the user's focus and Preferences, and simplify the disambiguation process according to the distance between the user profile subtree and the entity subtree involved in the user target problem.
  • the distance between the entity subtree involved in the user’s target problem and the user profile subtree If the length is less than the preset length, the entity with the lowest level in the entity subtree and the closest distance to the user portrait subtree is selected as the answering entity for the user’s current target question, so as to effectively utilize the concerns and preferences of the mined user.
  • Entity disambiguation avoids the situation where the user repeatedly enters the provided information, reduces the number of interactive rounds of the question and answer dialogue system, and improves the convenience of the user when using the question and answer system.
  • Fig. 1 is a flowchart of Embodiment 1 of an entity disambiguation method of the application
  • Embodiment 1 is a schematic diagram of program modules of Embodiment 1 of the entity disambiguation device of this application;
  • FIG. 3 is a schematic diagram of the hardware structure of Embodiment 1 of the entity disambiguation device of this application.
  • the entity disambiguation method, device, computer equipment, and storage medium of this application are mainly applicable to the field of smart cities, such as smart medical services, smart transportation services, and smart life services.
  • An entity disambiguation method of this embodiment includes the following steps:
  • S10 acquire the target question text input by the user terminal, and identify the first entity in the target question text
  • S20 Determine whether there is a user portrait subtree of the user in the pre-built knowledge graph, wherein the user portrait subtree is established according to the entities contained in the user information of the user, and the user portrait subtree follows the user information Update and update;
  • the entity disambiguation method shown in this application is embedded in the knowledge graph question-and-answer dialogue system, and continuously updates its user profile subtree according to the user’s usage, so as to effectively mine the user’s concerns and preferences, and based on the user profile The distance between the tree and the entity subtree involved in the user target problem to simplify the disambiguation process.
  • step S10 the entity description involved in the question sentence can be determined based on the NER model. mention), and based on the entity link to determine the first entity corresponding to the target problem in the knowledge graph according to the entity description.
  • step S20 by collecting user information, identifying entities included in the user information to construct a user profile subtree.
  • the user information may be one or more combinations of basic user information, user focus information, and previous question information.
  • a subgraph ie, user Portrait subtree. For example, when a new user starts to use the Q&A system service, he can build the user profile subtree of the user by digging the information filled in at the initial registration. At the same time, the user is in the "diseases of concern" during the use process.
  • type 2 diabetes will be included in the user profile subtree of the user to establish and continuously update the user profile subtree. If the user information of the specified user is not collected or stored in the pre-built knowledge graph, the user has not established the user profile subtree. If the user information of the specified user has been collected or stored, it is determined that the user profile subtree of the user exists
  • step S30 if the user profile subtree of the user is not established, determining the answering entity corresponding to the target question according to the first entity includes the following steps:
  • the knowledge graph records the entities contained therein and the relationships between the entities in the form of triples.
  • the knowledge graph can record two entities in the form of (entity 1, relationship, entity 2).
  • the relationship between entities can also record a certain attribute of the entity in the form of (entity, attribute, attribute value).
  • the second entity that matches the first entity there may only be a set of second entities that match the first entity, that is, there is only a set of second entities in the knowledge graph.
  • the entity has the same name as the first entity.
  • a unique set of matching second entities is selected as the answering entity for this entity disambiguation; there are also multiple sets of second entities matching the first entity, although these second entities
  • the entity has the same name as the first entity, but each group of second entities may have different meanings. For example, if the target question is "What is Li Na's occupation?", the NER model recognizes the first entity as "Li Na".
  • the second entity “Li Na” can be tennis player Li Na, student Li Na, or employee Li Na, that is, multiple second entities are "a collection of people representing Li Na's name", and the system calculates each second entity After calculation, the second entity with the highest importance is selected as the second entity of the highest importance as the sub-node of tennis player Li Na (the number of other entities linked in the knowledge graph is the largest).
  • step S40 in the knowledge graph database, based on the cypher sentence function in Neo4j, the entity subtree with the entity as the vertex is searched, and the distance between the entity subtree and the user profile subtree is calculated. Then compare the distance between the two and the preset length.
  • step S41 if the distance between the two is less than the preset length, the entity with the lowest level in the entity subtree and the closest distance to the user portrait subtree is selected as the answering entity for the user's question; in addition, if If there are multiple entities in the entity sub-tree with the lowest level and the closest distance to the user portrait sub-tree, the upper node of the lowest level is used as the answer entity corresponding to the target question.
  • the system judges that the user has a user portrait subtree.
  • the system finds the entity subtree with "fruit” as the apex in the user's question in the knowledge graph, and uses the user portrait subtree.
  • the tree knows that the user is a diabetic, and then calculates that the distance between the two is 0 based on the entity subtree and the user portrait subtree, and then selects the low-sugar summer fruit, which is the lowest level in the entity subtree and is the same as the user portrait subtree
  • the closest entity is the entity that the user answers this time, and there is no need to further ask the user "Do you want to eat high-sugar fruit or low-sugar fruit", thereby effectively improving the user's experience when using the question and answer system.
  • the value of the preset length is generally a smaller number. Considering that the value of the preset length is smaller, the disambiguation steps will be more, but will be more refined; the preset length is larger, the disambiguation step will be Less, the user experience will be better. In this embodiment, a compromise is taken between the two, and the preset length can be 1, 2, or 0.
  • the preset length When the preset length is set to 0, it indicates that there are overlapping nodes between the entity subtree and the user portrait subtree, and the entity with the lowest level and the closest distance to the user portrait subtree in the entity subtree is selected as the answer entity corresponding to the target question; If the entity subtree and the user profile subtree do not have overlapping nodes, the answer entity corresponding to the target question is determined according to the first entity, and the user profile subtree is updated based on the current user target question.
  • step S42 if the entity subtree and the user portrait subtree are greater than the preset length, the answer entity corresponding to the target question is also directly determined according to the first entity, and the user portrait subtree is updated based on the current user target question.
  • determining the answering entity corresponding to the target question based on the first entity includes the following steps: comparing the first entity with the entities in the knowledge graph to determine the second entity matching the first entity: if there is only A group of second entities that match the first entity, the second entity is used as the answering entity corresponding to the target question; if there are multiple sets of second entities that match the first entity in the knowledge graph, then multiple sets of second entities The second entity with the highest importance is selected from the entities as the answering entity corresponding to the target question. The more the number of other entities linked by the second entity in the knowledge graph, the higher the importance of the corresponding second entity.
  • the entity disambiguation method shown in this application is embedded in the knowledge graph question-and-answer dialogue system, and continuously updates its user profile subtree according to the user’s usage, so as to effectively mine the user’s concerns and preferences, and based on the user profile The distance between the tree and the entity subtree involved in the user target problem to simplify the disambiguation process.
  • the physical disambiguation device 10 may include or be divided into one or more program modules, and one or more program modules are stored. It is stored in a storage medium and executed by one or more processors to complete the present application and realize the aforementioned entity disambiguation method.
  • the program module referred to in the present application refers to a series of computer-readable instruction instruction segments capable of completing specific functions, and is more suitable for describing the execution process of the physical disambiguation device 10 in the storage medium than the program itself. The following description will specifically introduce the functions of each program module in this embodiment:
  • a physical disambiguation device including:
  • the recognition module 11 is configured to obtain the target question text input by the user terminal, and recognize the first entity in the target question text;
  • the user profile subtree determining module 12 is used to determine whether there is a user profile subtree of the user in the pre-built knowledge graph, wherein the user profile subtree is established according to the entities contained in the user information of the user;
  • the processing module 13 is configured to determine the answer entity corresponding to the target question according to the user profile subtree, and includes:
  • the first processing unit is configured to, if the user profile subtree of the user is not established, determine the answering entity corresponding to the target question according to the first entity, and at the same time, establish the user profile subtree of the user based on the target question tree;
  • the second processing unit is configured to, if the user profile subtree of the user has been established, create an entity subtree with the first entity as the vertex in the knowledge graph, and compare the entity subtree with the user profile Whether the distance of the tree is greater than the preset length, which includes:
  • the first processing subunit is configured to, if the distance between the entity subtree and the user portrait subtree is less than a preset length, select the entity with the lowest level and the closest distance to the user portrait subtree among the entity subtrees Entity, as the answering entity corresponding to the target question, outputting the answering entity to the user terminal;
  • the second processing subunit is used to determine that the distance between the entity subtree and the user portrait subtree is greater than a preset length, and determine the answer entity corresponding to the target question according to the first entity, and based on this For the second user target problem, update the user profile subtree.
  • the recognition module 11 recognizes the first entity in the target problem based on the NER model.
  • the user portrait subtree determination module 12 searches for an entity subtree with the first entity as a vertex based on the cypher sentence function in Neo4j.
  • the first processing unit includes:
  • An overlapping node judging subunit configured to judge whether there are overlapping nodes between the entity subtree and the user portrait subtree
  • a first answer entity determination subunit which is used to determine that when the entity subtree and the user profile subtree have overlapping nodes, select the entity with the lowest level and the closest distance to the user profile subtree in the entity subtree , As the answer entity corresponding to the target question; and when judging that the entity subtree and the user profile subtree do not have overlapping nodes, determine the answer entity corresponding to the target question according to the first entity, and based on this User target problem, update the user portrait subtree.
  • the lowest level node As the answer entity corresponding to the target question.
  • the first processing module and the second processing unit respectively include:
  • the second entity determination subunit is used to compare the first entity with the entities in the knowledge graph, and determine a second entity that matches the first entity:
  • the second answer entity determination subunit is used to determine that when there is only a group of second entities matching the first entity in the knowledge graph, the second entity is used as the answer entity corresponding to the target question; When there are multiple sets of second entities matching the first entity in the knowledge graph, the second entity with the highest importance is selected from the multiple sets of second entities as the answering entity corresponding to the target question.
  • the entity disambiguation device 10 shown in this application is embedded in the knowledge graph question-and-answer dialogue system, and continuously updates its user profile subtree according to the user’s usage, so as to effectively mine the user’s concerns and preferences, and based on the user profile
  • the distance between the subtree and the entity subtree involved in the user goal problem is to simplify the disambiguation process.
  • This application also provides a computer device, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including independent servers, or more Server cluster composed of two servers), etc.
  • the computer device 20 in this embodiment at least includes but is not limited to: a memory 21 and a processor 22 that can be communicably connected to each other through a system bus, as shown in FIG. 3. It should be pointed out that FIG. 3 only shows the computer device 20 with components 21-22, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the memory 21 (that is, a readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), Read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc.
  • the memory 21 may be an internal storage unit of the computer device 20, such as a hard disk or memory of the computer device 20.
  • the memory 21 may also be an external storage device of the computer device 20, such as a plug-in hard disk equipped on the computer device 20, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, Flash Card, etc.
  • the memory 21 may also include both the internal storage unit of the computer device 20 and its external storage device.
  • the memory 21 is generally used to store an operating system and various application software installed in the computer device 20, such as the program code of the physical disambiguation apparatus 10 in the first embodiment, and so on.
  • the memory 21 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 22 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 22 is generally used to control the overall operation of the computer device 20.
  • the processor 22 is used to run the program code or process data stored in the memory 21, for example, to run the entity disambiguation device 10 to implement the entity disambiguation method of the first embodiment.
  • This application also provides a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Programmable Read-Only Memory (PROM), magnetic memory, magnetic disk, optical disk, server, App application mall, etc., on which computer readable instructions are stored , The corresponding function is realized when the program is executed by the processor.
  • the computer-readable storage medium of this embodiment is used to store the entity disambiguation device 10, and when executed by a processor, it implements the entity disambiguation method of the first embodiment.
  • the computer-readable storage medium may be non-volatile or volatile.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种实体消歧方法、装置、计算机设备及存储介质,包括:获取用户目标问题,并识别目标问题中第一实体;判断是否存在已构建的用户画像子树,若未建立用户画像子树,依据第一实体确定目标问题对应的回答实体,同;若已建立用户画像子树,建立以第一实体为顶点的实体子树,比较实体子树与用户画像子树的距离是否大于预设长度;若小于预设长度,选取实体子树中层级最低且与用户画像子树距离最近的实体作为目标问题对应的回答实体;若大于预设长度,依据第一实体确定目标问题对应的回答实体,从而有效利用所挖掘用户的关注点和喜好进行实体消歧,降低了问答对话系统交互轮数,提升了用户在使用问答系统时的便捷性。

Description

一种实体消歧方法、装置、计算机设备及存储介质
本申请申要求于2019年7月31日递交的申请号为CN201910699489.9、名称为“一种实体消歧方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及任务管理技术领域,尤其涉及一种实体消歧方法、装置、计算机设备及存储介质。
背景技术
在知识图谱的问答系统中,实体链接是首要模块,即将用户问句中的主题实体识别出来,并与知识图谱做链接,为了确定出目标问题中的实体,需要进行实体消歧,即专门用于解决同名实体产生歧义问题的技术。目前进行实体消歧的主要方法是依靠字符串相似度,再辅以人工抽取的特征和规则,来一次性的给出可能的多个实体,并结合问句的语义来做出一定的消歧。
但在知识图谱中,相同名称的实体可能有多个,仅仅通过问题中的语义理解将很难明确用户究竟想询问的是哪一个具体的实体。
技术问题
发明人意识到,需要额外的信息进行实体消歧,以确定目标问题的答案。在智能对话机器人场景可以通过向用户提问的方式来做实体消歧,但是这样简单通过实体的属性来做交互式消歧,一般交互轮数比较多,用户体验不好。
技术解决方案
本申请的目的是提供一种实体消歧方法、装置、计算机设备及存储介质,用于解决现有技术存在的问题。
为实现上述目的,本申请提供一种实体消歧方法,包括以下步骤:
获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体,输出所述回答实体至所述用户终端;
若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题,更新所述用户画像子树。
为实现上述目的,本申请还提供一种实体消歧装置,其包括:
识别模块,用于获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
用户画像子树确定模块,用于判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
处理模块,用于依据所述用户画像子树确定所述目标问题文本中目标问题对应的回答实体,其包括:
第一处理单元,用于若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题对应的回答实体,同时基于所述目标问题,建立所述用户的用户画像子树;
第二处理单元,用于若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度,其包括:
第一处理子单元,用于若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体,输出所述回答实体至所述用户终端;
第二处理子单元,用于判断所述实体子树与所述用户画像子树之间的距离大于预设长度时,依据所述第一实体确定所述目标问题对应的回答实体,同时基于本次用户目标问题,更新用户画像子树。
为实现上述目的,本申请还提供一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现实体消歧方法的以下步骤:
获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
为实现上述目的,本申请还提供计算机可读存储介质,其上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现实体消歧方法的以下步骤:
获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
有益效果
本申请提供的实体消歧方法、装置、计算机设备及存储介质,其植入于知识图谱问答对话系统之中,不断地根据用户使用来更新其用户画像子树,以有效挖掘用户的关注点和喜好,并根据用户画像子树与用户目标问题中涉及的实体子树之间的距离来精简消歧过程,当判断用户本次目标问题所涉及的实体子树与用户画像子树之间的距离小于预设长度,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为用户本次目标问题的回答实体,从而有效利用所挖掘用户的关注点和喜好进行实体消歧,避免了用户多次重复输入已提供信息的情况,降低了问答对话系统交互轮数,提升了用户在使用问答系统时的便捷性。
附图说明
图1为本申请实体消歧方法实施例一的流程图;
图2为本申请实体消歧装置实施例一的程序模块示意图;
图3为本申请实体消歧装置实施例一的硬件结构示意图。
本发明的实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的实体消歧方法、装置、计算机设备及存储介质主要适用于智慧城市领域中,如:智慧医疗业务、智慧交通业务和智慧生活业务等。
实施例一
请参阅图1,本实施例的一种实体消歧方法,包括以下步骤:
S10获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
S20判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立,所述用户画像子树随所述用户信息的更新而更新;
S30若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
S40若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
S41若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
S42若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
本申请所示的实体消歧方法,其植入于知识图谱问答对话系统之中,不断地根据用户使用来更新其用户画像子树,以有效挖掘用户的关注点和喜好,并根据用户画像子树与用户目标问题中涉及的实体子树之间的距离来精简消歧过程,当判断用户本次目标问题所涉及的实体子树与用户画像子树之间的距离小于预设长度,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为用户本次目标问题的回答实体,从而有效利用所挖掘用户的关注点和喜好进行实体消歧,避免了用户多次重复输入已提供信息的情况,降低了问答对话系统交互轮数,提升了用户在使用问答系统时的便捷性。
其中,步骤S10中,可基于NER模型确定提问问句中涉及的实体描述(entity mention),同时基于实体链接以根据实体描述在知识图谱中确定目标问题对应的第一实体。
步骤S20中,通过收集用户信息,识别用户信息中所包含的实体以构建用户画像子树,上述用户信息可为用户基本信息、用户关注点信息以及历次提问信息中的一种或多种组合,并通过不断地根据用户使用来更新其对应的用户画像子树,即根据用户初始画像中涉及的实体,以及该用户在使用过程中所涉及的实体,构成知识图谱上面的一个子图(即用户画像子树),如新用户开始使用问答系统服务的时候,可通过挖掘其初始注册时所填写的信息,建立该用户的用户画像子树,同时,用户使用过程中,在"关注的疾病"选项中选择了二型糖尿病,则将二型糖尿病收录至该用户的用户画像子树中,以建立并不断更新用户画像子树。若预先构建的知识图谱未收集或存储过指定用户的用户信息,则该用户未建立用户画像子树,若曾经收集或存储过指定用户的用户信息,则判断存在该用户的用户画像子树
步骤S30中,若未建立所述用户的用户画像子树,依据第一实体确定目标问题对应的回答实体包括以下步骤:
将第一实体与知识图谱中的实体进行比对,确定与第一实体匹配的第二实体:若知识图谱中只有一组与第一实体相匹配的第二实体,则以第二实体作为目标问题对应的回答实体;若知识图谱中有多组与第一实体相匹配的第二实体,则从多组第二实体中选取重要性最高的第二实体,作为目标问题对应的回答实体,其中,第二实体在知识图谱中所链接的其他实体个数越多,则对应的第二实体的重要性越高。
在申请本公开的一些示例性实施方式中,知识图谱通过三元组的形式记录其中包含的实体以及实体之间的关系,知识图谱可以采用(实体1,关系,实体2)的方式记录两个实体之间的关系,也可以采用(实体,属性,属性值)的方式记录该实体的某一属性。将第一实体与知识图谱中的实体进行比对,确定与第一实体匹配的第二实体时,可能只存在一组与第一实体匹配的第二实体,即知识图谱中只有一组第二实体与第一实体名称相同,此时,选择将唯一一组匹配的第二实体作为本次实体消歧的回答实体;也存在多组与第一实体匹配的第二实体,虽然这些第二实体与第一实体名称相同,但各组第二实体可能具有不同的含义,举例而言,如目标问题为“李娜的职业是什么?”时,NER模型识别出第一实体为“李娜”,当将“李娜”(第一实体)与知识图谱中的实体进行比对时,会匹配出多个“李娜”(第二实体),但每个“李娜”(第二实体)的含义并不相同,如第二实体“李娜”可以为网球运动员李娜,也可以为学生李娜,或者职员李娜,即多个第二实体为“表示李娜名称的人的集合”,此时系统计算各第二实体中在知识图谱中的重要性,经计算之后选取网球运动员李娜这子结点(在知识图谱中所链接的其他实体个数最多)重要性最高的第二实体作为回答实体。
步骤S40中,在知识图谱数据库中,基于Neo4j中的cypher语句功能查找以实体为顶点的实体子树,并计算实体子树与所述用户画像子树二者之间的距离。然后比较二者之间距离与预设长度的大小。
步骤S41中,若二者距离小于预设长度,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为用户本次提问问句的回答实体;此外,若所述实体子树中层级最低且与所述用户画像子树距离最近的实体有多个,则以最低层级的上一层节点作为所述目标问题对应的回答实体。
举例说明,当用户询问“夏天适合可以吃什么水果”,系统判断该用户存在用户画像子树,系统在知识图谱中找到用户提问中以“水果”为顶点的实体子树,并通过用户画像子树知道该用户是糖尿病患者,然后基于实体子树与用户画像子树计算二者之间距离为0,则选取低糖的夏季水果这一在实体子树中层级最低且与所述用户画像子树距离最近的实体作为用户本次回答的实体,而不需要向用户进一步询问“您希望吃高糖水果还是低糖水果”,从而有效提升用户在使用问答系统时的体验。
其中,关于预设长度取值,一般取较小的数字,考虑到预设长度取值较小,消歧步骤会更多,但是会更精细;预设长度取值大一些,消歧步骤会更少,用户体验会好一些,本实施例中,在两者之间取一个折中,预设长度取值可为1、2,或0。当预设长度取值为0时,说明实体子树与用户画像子树存在重叠节点,则选取实体子树中层级最低且与用户画像子树距离最近的实体,作为目标问题对应的回答实体;若实体子树与用户画像子树没有重叠节点,则依据第一实体确定目标问题对应的回答实体,同时基于本次用户目标问题,更新用户画像子树。
步骤S42中,若实体子树与用户画像子树大于预设长度,则也直接依据第一实体确定目标问题对应的回答实体,同时基于本次用户目标问题,更新用户画像子树。
如前所述,依据第一实体确定目标问题对应的回答实体包括以下步骤:将第一实体与知识图谱中的实体进行比对,确定与第一实体匹配的第二实体:若知识图谱中只有一组与第一实体相匹配的第二实体,则以第二实体作为目标问题对应的回答实体;若知识图谱中有多组与第一实体相匹配的第二实体,则从多组第二实体中选取重要性最高的第二实体,作为目标问题对应的回答实体,其中,第二实体在知识图谱中所链接的其他实体个数越多,则对应的第二实体的重要性越高。
本申请所示的实体消歧方法,其植入于知识图谱问答对话系统之中,不断地根据用户使用来更新其用户画像子树,以有效挖掘用户的关注点和喜好,并根据用户画像子树与用户目标问题中涉及的实体子树之间的距离来精简消歧过程,当判断用户本次目标问题所涉及的实体子树与用户画像子树之间的距离小于预设长度,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为用户本次目标问题的回答实体,从而有效利用所挖掘用户的关注点和喜好进行实体消歧,避免了用户多次重复输入已提供信息的情况,降低了问答对话系统交互轮数,提升了用户在使用问答系统时的便捷性。
实施例二
请继续参阅图2,本申请示出了一种实体消歧装置,在本实施例中,实体消歧装置10可以包括或被分割成一个或多个程序模块,一个或者多个程序模块被存储于存储介质中,并由一个或多个处理器所执行,以完成本申请,并可实现上述实体消歧方法。本申请所称的程序模块是指能够完成特定功能的一系列计算机可读指令指令段,比程序本身更适合于描述实体消歧装置10在存储介质中的执行过程。以下描述将具体介绍本实施例各程序模块的功能:
一种实体消歧装置,包括:
识别模块11,用于获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
用户画像子树确定模块12,用于判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
处理模块13,用于依据所述用户画像子树确定所述目标问题对应的回答实体,其包括:
第一处理单元,用于若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题对应的回答实体,同时基于所述目标问题,建立所述用户的用户画像子树;
第二处理单元,用于若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度,其包括:
第一处理子单元,用于若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体,输出所述回答实体至所述用户终端;
第二处理子单元,用于判断所述实体子树与所述用户画像子树之间的距离大于预设长度时,依据所述第一实体确定所述目标问题对应的回答实体,同时基于本次用户目标问题,更新用户画像子树。
作为一优选方案,所述识别模块11中,基于NER模型识别所述目标问题中的第一实体。
作为一优选方案,所述用户画像子树确定模块12中,基于Neo4j中的cypher语句功能查找以所述第一实体为顶点的实体子树。
作为一优选方案,第二处理子模块中所述预设长度为0,则所述第一处理单元包括:
重叠节点判断子单元,用于判断所述实体子树与所述用户画像子树是否存在重叠节点;
以及第一回答实体确定子单元,用于判断所述实体子树与所述用户画像子树存在重叠节点时,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体;以及判断所述实体子树与所述用户画像子树没有重叠节点时,依据所述第一实体确定所述目标问题对应的回答实体,同时基于本次用户目标问题,更新用户画像子树。
作为一优选方案,所述第一回答实体确定子单元中,若所述实体子树中层级最低且与所述用户画像子树距离最近的实体有多个,则以最低层级的上一层节点作为所述目标问题对应的回答实体。
作为一优选方案,所述第一处理模块与所述第二处理单元分别包括:
第二实体确定子单元,用于将所述第一实体与知识图谱中的实体进行比对,确定与所述第一实体匹配的第二实体:
第二回答实体确定子单元,用于判断所述知识图谱中只有一组与所述第一实体相匹配的第二实体时,以所述第二实体作为所述目标问题对应的回答实体;判断所述知识图谱中有多组与所述第一实体相匹配的第二实体时,从多组第二实体中选取重要性最高的第二实体,作为所述目标问题对应的回答实体。
进一步的,第二回答实体确定子单元中,所述第二实体在知识图谱中所链接的其他实体个数越多,则所述第二实体的重要性越高。
本申请所示的实体消歧装置10,其植入于知识图谱问答对话系统之中,不断地根据用户使用来更新其用户画像子树,以有效挖掘用户的关注点和喜好,并根据用户画像子树与用户目标问题中涉及的实体子树之间的距离来精简消歧过程,当判断用户本次目标问题所涉及的实体子树与用户画像子树之间的距离小于预设长度,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为用户本次目标问题的回答实体,从而有效利用所挖掘用户的关注点和喜好进行实体消歧,避免了用户多次重复输入已提供信息的情况,降低了问答对话系统交互轮数,提升了用户在使用问答系统时的便捷性。
实施例三
本申请还提供一种计算机设备,如可以执行程序的智能手机、平板电脑、笔记本电脑、台式计算机、机架式服务器、刀片式服务器、塔式服务器或机柜式服务器(包括独立的服务器,或者多个服务器所组成的服务器集群)等。本实施例的计算机设备20至少包括但不限于:可通过系统总线相互通信连接的存储器21、处理器22,如图3所示。需要指出的是,图3仅示出了具有组件21-22的计算机设备20,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
本实施例中,存储器21(即可读存储介质)包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,存储器21可以是计算机设备20的内部存储单元,例如该计算机设备20的硬盘或内存。在另一些实施例中,存储器21也可以是计算机设备20的外部存储设备,例如该计算机设备20上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。当然,存储器21还可以既包括计算机设备20的内部存储单元也包括其外部存储设备。本实施例中,存储器21通常用于存储安装于计算机设备20的操作系统和各类应用软件,例如实施例一的实体消歧装置10的程序代码等。此外,存储器21还可以用于暂时地存储已经输出或者将要输出的各类数据。
处理器22在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器22通常用于控制计算机设备20的总体操作。本实施例中,处理器22用于运行存储器21中存储的程序代码或者处理数据,例如运行实体消歧装置10,以实现实施例一的实体消歧方法。
实施例四
本申请还提供一种计算机可读存储介质,如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘、服务器、App应用商城等等,其上存储有计算机可读指令,程序被处理器执行时实现相应功能。本实施例的计算机可读存储介质用于存储实体消歧装置10,被处理器执行时实现实施例一的实体消歧方法。所述计算机可读存储介质可以是非易失性,也可以是易失性。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种实体消歧方法,其中,包括:
    获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
    判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
    若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
    若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
    若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
    若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
  2. 根据权利要求1所述的实体消歧方法,其中,所述预设长度为0,若判断所述实体子树与所述用户画像子树存在重叠节点,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体;若判断出所述实体子树与所述用户画像子树没有重叠节点,则依据所述第一实体确定所述目标问题文本对应的回答实体,同时所述目标问题文本,更新所述用户画像子树。
  3. 根据权利要求1或2所述的实体消歧方法,其中,若所述实体子树中层级最低且与所述用户画像子树距离最近的实体有多个,则以最低层级的上一层节点作为所述目标问题对应的回答实体。
  4. 根据权利要求1或2所述的实体消歧方法,其中,所述依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体包括以下步骤:
    将所述第一实体与知识图谱中的第二实体进行比对,确定与所述第一实体匹配的第二实体:若所述知识图谱中只有一组与所述第一实体相匹配的第二实体,则以所述第二实体作为所述目标问题对应的回答实体;若所述知识图谱中有多组与所述第一实体相匹配的第二实体,则从多组第二实体中选取重要性最高的第二实体,作为所述目标问题对应的回答实体。
  5. 根据权利要求4所述的实体消歧方法,其中,所述第二实体在知识图谱中所链接的其他实体个数越多,则所述第二实体的重要性越高。
  6. 根据权利要求1所述的实体消歧方法,其中,基于NER模型识别所述目标问题文本中的第一实体。
  7. 根据权利要求1所述的实体消歧方法,其中,基于Neo4j中的cypher语句功能查找以所述第一实体为顶点的实体子树。
  8. 一种实体消歧装置,其中,包括:
    识别模块,用于获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
    用户画像子树确定模块,用于判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
    处理模块,用于依据所述用户画像子树确定所述目标问题文本中目标问题对应的回答实体,其包括:
    第一处理单元,用于若未建立到所述用户的用户画像子树,依据所述第一实体确定所述目标问题对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
    第二处理单元,用于若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度,其包括:
    第一处理子单元,用于若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体,输出所述回答实体至所述用户终端;
    第二处理子单元,用于判断所述实体子树与所述用户画像子树之间的距离大于预设长度时,依据所述第一实体确定所述目标问题对应的回答实体,同时基于本次用户目标问题文本,更新用户画像子树。
  9. 根据权利要求8所述的实体消歧装置,其中,第二处理子模块中所述预设长度为0,则所述第一处理单元包括:
    重叠节点判断子单元,用于判断所述实体子树与所述用户画像子树是否存在重叠节点;
    以及第一回答实体确定子单元,用于判断所述实体子树与所述用户画像子树存在重叠节点时,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体;以及判断所述实体子树与所述用户画像子树没有重叠节点时,依据所述第一实体确定所述目标问题对应的回答实体,同时基于本次用户目标问题文本,更新用户画像子树。
  10. 根据权利要求8所述的实体消歧装置,其中,所述识别模块用于基于NER模型识别所述目标问题文本中的第一实体。
  11. 根据权利要求8所述的实体消歧装置,其中,所述用户画像子树确定模块用于基于Neo4j中的cypher语句功能查找以所述第一实体为顶点的实体子树。
  12. 一种计算机设备,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现实体消歧方法的以下步骤:
    获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
    判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
    若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
    若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
    若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
    若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
  13. 根据权利要求12所述的计算机设备,其中,所述预设长度为0,若判断所述实体子树与所述用户画像子树存在重叠节点,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体;若判断出所述实体子树与所述用户画像子树没有重叠节点,则依据所述第一实体确定所述目标问题文本对应的回答实体,同时所述目标问题文本,更新所述用户画像子树。
  14. 根据权利要求12或13所述的计算机设备,其中,若所述实体子树中层级最低且与所述用户画像子树距离最近的实体有多个,则以最低层级的上一层节点作为所述目标问题对应的回答实体。
  15. 根据权利要求12或13所述的计算机设备,其中,所述依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体包括以下步骤:
    将所述第一实体与知识图谱中的第二实体进行比对,确定与所述第一实体匹配的第二实体:若所述知识图谱中只有一组与所述第一实体相匹配的第二实体,则以所述第二实体作为所述目标问题对应的回答实体;若所述知识图谱中有多组与所述第一实体相匹配的第二实体,则从多组第二实体中选取重要性最高的第二实体,作为所述目标问题对应的回答实体。
  16. 一种计算机可读存储介质,其上存储有计算机可读指令,其中,所述计算机可读指令被处理器执行时实现实体消歧方法的以下步骤:
    获取用户终端输入的目标问题文本,并识别所述目标问题文本中的第一实体;
    判断预先构建的知识图谱中是否有所述用户的用户画像子树,其中所述用户画像子树根据所述用户的用户信息中包含的实体建立;
    若未建立所述用户的用户画像子树,依据所述第一实体确定所述目标问题文本对应的回答实体,同时基于所述目标问题文本,建立所述用户的用户画像子树;
    若已建立所述用户的用户画像子树,在知识图谱中建立以所述第一实体为顶点的实体子树,并比较所述实体子树与所述用户画像子树的距离是否大于预设长度;
    若所述实体子树与所述用户画像子树之间的距离小于预设长度,选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题中的目标问题对应的回答实体,输出所述回答实体至所述用户终端;
    若所述实体子树与所述用户画像子树之间的距离大于预设长度,依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体,并输出所述回答实体至所述用户终端,同时基于所述目标问题文本,更新所述用户画像子树。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述预设长度为0,若判断所述实体子树与所述用户画像子树存在重叠节点,则选取所述实体子树中层级最低且与所述用户画像子树距离最近的实体,作为所述目标问题对应的回答实体;若判断出所述实体子树与所述用户画像子树没有重叠节点,则依据所述第一实体确定所述目标问题文本对应的回答实体,同时所述目标问题文本,更新所述用户画像子树。
  18. 根据权利要求16或17所述的计算机可读存储介质,其中,若所述实体子树中层级最低且与所述用户画像子树距离最近的实体有多个,则以最低层级的上一层节点作为所述目标问题对应的回答实体。
  19. 根据权利要求16或17所述的计算机可读存储介质,其中,所述依据所述第一实体确定所述目标问题文本中的目标问题对应的回答实体包括以下步骤:
    将所述第一实体与知识图谱中的第二实体进行比对,确定与所述第一实体匹配的第二实体:若所述知识图谱中只有一组与所述第一实体相匹配的第二实体,则以所述第二实体作为所述目标问题对应的回答实体;若所述知识图谱中有多组与所述第一实体相匹配的第二实体,则从多组第二实体中选取重要性最高的第二实体,作为所述目标问题对应的回答实体。
  20. 根据权利要求16所述的计算机可读存储介质,其中,基于NER模型识别所述目标问题文本中的第一实体。
PCT/CN2020/099471 2019-07-31 2020-06-30 一种实体消歧方法、装置、计算机设备及存储介质 WO2021017734A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910699489.9 2019-07-31
CN201910699489.9A CN110580284B (zh) 2019-07-31 2019-07-31 一种实体消歧方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021017734A1 true WO2021017734A1 (zh) 2021-02-04

Family

ID=68810869

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/099471 WO2021017734A1 (zh) 2019-07-31 2020-06-30 一种实体消歧方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN110580284B (zh)
WO (1) WO2021017734A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115203436A (zh) * 2022-07-15 2022-10-18 国网江苏省电力有限公司信息通信分公司 一种基于有向图数据融合的电力知识图谱构建方法和装置
CN117556058A (zh) * 2024-01-11 2024-02-13 安徽大学 知识图谱增强网络嵌入的作者名称消歧方法和装置
CN117556058B (zh) * 2024-01-11 2024-05-24 安徽大学 知识图谱增强网络嵌入的作者名称消歧方法和装置

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580284B (zh) * 2019-07-31 2023-08-18 平安科技(深圳)有限公司 一种实体消歧方法、装置、计算机设备及存储介质
CN111259653B (zh) * 2020-01-15 2022-06-24 重庆邮电大学 基于实体关系消歧的知识图谱问答方法、系统以及终端

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180218063A1 (en) * 2017-01-31 2018-08-02 Wal-Mart Stores, Inc. Systems and methods for automated recommendations
CN109241251A (zh) * 2018-07-27 2019-01-18 众安信息技术服务有限公司 一种会话交互方法
CN110019836A (zh) * 2017-08-23 2019-07-16 中兴通讯股份有限公司 一种智能问答方法及装置
CN110580284A (zh) * 2019-07-31 2019-12-17 平安科技(深圳)有限公司 一种实体消歧方法、装置、计算机设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106484764A (zh) * 2016-08-30 2017-03-08 江苏名通信息科技有限公司 基于人群画像技术的用户相似度计算方法
CN108964998B (zh) * 2018-07-06 2021-10-15 北京建筑大学 一种网络实体行为奇异性检测方法及装置
CN109657135B (zh) * 2018-11-13 2023-06-23 华南理工大学 一种基于神经网络的学者用户画像信息抽取方法及模型
CN110046238B (zh) * 2019-03-29 2024-03-26 华为技术有限公司 对话交互方法、图形用户界面、终端设备以及网络设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180218063A1 (en) * 2017-01-31 2018-08-02 Wal-Mart Stores, Inc. Systems and methods for automated recommendations
CN110019836A (zh) * 2017-08-23 2019-07-16 中兴通讯股份有限公司 一种智能问答方法及装置
CN109241251A (zh) * 2018-07-27 2019-01-18 众安信息技术服务有限公司 一种会话交互方法
CN110580284A (zh) * 2019-07-31 2019-12-17 平安科技(深圳)有限公司 一种实体消歧方法、装置、计算机设备及存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115203436A (zh) * 2022-07-15 2022-10-18 国网江苏省电力有限公司信息通信分公司 一种基于有向图数据融合的电力知识图谱构建方法和装置
CN115203436B (zh) * 2022-07-15 2023-12-15 国网江苏省电力有限公司信息通信分公司 一种基于有向图数据融合的电力知识图谱构建方法和装置
CN117556058A (zh) * 2024-01-11 2024-02-13 安徽大学 知识图谱增强网络嵌入的作者名称消歧方法和装置
CN117556058B (zh) * 2024-01-11 2024-05-24 安徽大学 知识图谱增强网络嵌入的作者名称消歧方法和装置

Also Published As

Publication number Publication date
CN110580284B (zh) 2023-08-18
CN110580284A (zh) 2019-12-17

Similar Documents

Publication Publication Date Title
KR101779387B1 (ko) 멀티라운드 세션 인터랙션 방법, 시스템 및 컴퓨터 기기
WO2021017734A1 (zh) 一种实体消歧方法、装置、计算机设备及存储介质
US10133778B2 (en) Query optimization using join cardinality
CN110750649A (zh) 知识图谱构建及智能应答方法、装置、设备及存储介质
US20160328467A1 (en) Natural language question answering method and apparatus
WO2021012519A1 (zh) 基于人工智能的问答方法、装置、计算机设备及存储介质
WO2019242144A1 (zh) 电子装置、偏好倾向预测方法和计算机可读存储介质
WO2019062010A1 (zh) 语义识别方法、电子装置及计算机可读存储介质
WO2023029512A1 (zh) 基于知识图谱的医疗问题解答方法、装置、设备及介质
CN107807915B (zh) 基于纠错平台的纠错模型建立方法、装置、设备和介质
WO2020215675A1 (zh) 医疗数据库的构建方法、装置、计算机设备和存储介质
US10108661B2 (en) Using synthetic events to identify complex relation lookups
WO2022048368A1 (zh) 基于知识图谱的推荐方法、装置、计算机设备及存储介质
WO2020224220A1 (zh) 基于知识图谱的问答方法、电子装置、设备及存储介质
CN108304381B (zh) 基于人工智能的实体建边方法、装置、设备及存储介质
CN108427702A (zh) 目标文档获取方法及应用服务器
CN111507400B (zh) 应用分类方法、装置、电子设备以及存储介质
WO2022222942A1 (zh) 问答记录生成方法、装置、电子设备及存储介质
US11663269B2 (en) Error correction method and apparatus, and computer readable medium
CN115438070A (zh) 针对图数据库的查询语句自动补全的方法及装置
WO2021000400A1 (zh) 导诊相似问题对生成方法、系统及计算机设备
CN110837567A (zh) 实现知识图谱嵌入的方法和系统
US10229156B2 (en) Using priority scores for iterative precision reduction in structured lookups for questions
US8257091B2 (en) Matching learning objects with a user profile using top-level concept complexity
CN116821373A (zh) 基于图谱的prompt推荐方法、装置、设备及介质

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: 20848064

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20848064

Country of ref document: EP

Kind code of ref document: A1