WO2021073254A1 - 基于知识图谱的实体链接方法、装置、设备和存储介质 - Google Patents

基于知识图谱的实体链接方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2021073254A1
WO2021073254A1 PCT/CN2020/111240 CN2020111240W WO2021073254A1 WO 2021073254 A1 WO2021073254 A1 WO 2021073254A1 CN 2020111240 W CN2020111240 W CN 2020111240W WO 2021073254 A1 WO2021073254 A1 WO 2021073254A1
Authority
WO
WIPO (PCT)
Prior art keywords
entity
word segmentation
entities
legal
knowledge graph
Prior art date
Application number
PCT/CN2020/111240
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 WO2021073254A1 publication Critical patent/WO2021073254A1/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/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of big data technology, and in particular to an entity linking method, device, device and storage medium based on a knowledge graph.
  • the knowledge graph expresses the information of the Internet in a form closer to the human cognitive world, and provides a better ability to organize, manage and understand the massive amount of information on the Internet.
  • Knowledge graphs have brought vitality to Internet semantic search, and at the same time have shown strong power in intelligent question answering, big data analysis and decision-making, and have become the infrastructure of knowledge-based intelligent services on the Internet. Together with big data and deep learning, knowledge graphs have become one of the core driving forces for the development of artificial intelligence.
  • each node represents the "entity” that exists in the real world, and each edge is the "relationship" between the entity and the entity.
  • the knowledge graph is the most effective way to express the relationship.
  • An entity linking method based on knowledge graph including:
  • Calculate the correlation scores between each entity reference in the entity reference set and the corresponding candidate entity calculate the correlation scores of any two candidate entities among all the candidate entities that each entity refers to, and compare the correlation scores with the corresponding candidate entities.
  • the relevant scores of are added to obtain multiple objective functions;
  • the entity reference with the largest objective function value is determined as the final entity reference, and the final entity reference is linked to the corresponding entity in the legal knowledge graph.
  • An entity linking device based on knowledge graph including:
  • the word segmentation and search module is used to obtain the legal text, perform word segmentation on the legal text, and obtain the word segmentation result, and look up in the preset mapping table whether there is an entity reference that is the same as the word segmentation result.
  • the entity reference with the same word segmentation result is put into the entity reference set, and the entity reference that is the same as the word segmentation result is put into the candidate entity set.
  • the entity reference refers to the pronoun of the entity.
  • the entity refers to corresponding multiple entities;
  • the calculation module is used to calculate the correlation scores between each entity reference in the entity reference set and the corresponding candidate entity, calculate the correlation scores of any two candidate entities among all the corresponding entity reference entities, and compare all The correlation scores are added to the corresponding correlation scores to obtain multiple objective functions;
  • the determining and linking module is used to determine the entity reference with the largest objective function value in the entity reference set as the final entity reference, and link the final entity reference to the corresponding entity in the legal knowledge graph in.
  • a computer device includes a memory and a processor, and the memory stores computer-readable instructions.
  • the processor executes the following knowledge graph-based Steps of the entity link method:
  • Calculate the correlation scores between each entity reference in the entity reference set and the corresponding candidate entity calculate the correlation scores of any two candidate entities among all the candidate entities that each entity refers to, and compare the correlation scores with the corresponding candidate entities.
  • the relevant scores of are added to obtain multiple objective functions;
  • the entity reference with the largest objective function value is determined as the final entity reference, and the final entity reference is linked to the corresponding entity in the legal knowledge graph.
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute the steps of the entity linking method based on the knowledge graph as described below:
  • Calculate the correlation scores between each entity reference in the entity reference set and the corresponding candidate entity calculate the correlation scores of any two candidate entities among all the candidate entities that each entity refers to, and compare the correlation scores with the corresponding candidate entities.
  • the relevant scores of are added to obtain multiple objective functions;
  • the entity reference with the largest objective function value is determined as the final entity reference, and the final entity reference is linked to the corresponding entity in the legal knowledge graph.
  • the above-mentioned entity linking method, device, device and storage medium based on the knowledge graph include obtaining legal text, segmenting the legal text, and obtaining the word segmentation result, and searching in a preset mapping table whether there is the same as the word segmentation result Entity reference, if it exists, put the entity reference that is the same as the word segmentation result into the entity reference set, and put the entity reference that is the same as the word segmentation result into the candidate entity set;
  • the entity refers to the association score between each entity in the set and the corresponding candidate entity, calculates the correlation score of any two candidate entities among all the candidate entities that each entity refers to, and compares the association score with each corresponding candidate entity.
  • the relevant scores are added to obtain multiple objective functions; in the entity reference set, the entity reference with the largest objective function value is determined as the final entity reference, and the final entity reference is linked to legal knowledge In the corresponding entity in the map.
  • This application determines the final entity reference by calculating the correlation score of the entity reference and the correlation score between the candidate entities, and links the entity reference to avoid the existence of synonyms and ambiguities in the legal text.
  • the entity linking can help the machine truly understand the semantic information of the legal entity in the free text, and help the machine effectively perform tasks such as follow-up case retrieval, evidence guidance, and intelligent question and answer.
  • Figure 1 is a flowchart of an entity linking method based on a knowledge graph in an embodiment of the application
  • FIG. 2 is a flowchart of step S1 in an embodiment of the application
  • Fig. 3 is a structural diagram of an entity linking device based on a knowledge graph in an embodiment of the application.
  • Fig. 1 is a flowchart of an entity linking method based on a knowledge graph in an embodiment of the application. As shown in Fig. 1, an entity linking method based on a knowledge graph includes the following steps:
  • Step S1 word segmentation and search: obtain the legal text, perform word segmentation on the legal text, and obtain the word segmentation result, and search the preset mapping table for whether there is an entity reference that is the same as the word segmentation result. If it exists, it will be the same as the word segmentation result
  • the entity reference is placed in the entity reference set, and the entity reference corresponding to the same word segmentation result is placed in the candidate entity set.
  • the entity reference refers to the entity's pronoun, and one entity refers to multiple entities.
  • the legal text in this step is a sentence or a paragraph of text input by the user, and entity referential identification is performed according to the input legal text.
  • the legal text is segmented first, a sentence or a paragraph of text is divided into multiple words, and the words are compared with the mapping table to obtain the entity reference and the entity corresponding to the entity reference, and The entity references and corresponding entities obtained after reading the search are classified into the entity reference set and the candidate entity set.
  • step S1 obtaining the legal text, performing word segmentation on the legal text, to obtain the word segmentation result, includes:
  • the minimum word segmentation sliding window is the preset minimum word segmentation threshold
  • the maximum word segmentation sliding window is the length of the legal text.
  • the value range of the minimum word segmentation threshold in this embodiment is greater than or equal to 2 and less than or equal to the length of the legal text.
  • the mapping table is a mapping relationship table between entity references and entities in the preset legal knowledge graph, as shown in FIG. 2, including:
  • Step S101 crawling data: obtaining legal judgment documents in a preset website through a preset crawler script.
  • crawler technology is used to crawl legal judgment documents on legal aspects in various websites disclosed on the network.
  • the specific crawling method is as follows:
  • the preset URL list contains the URLs of multiple legal judgment documents; the browser kernel is called to send web access requests to the URLs in the URL list in turn, and wait for the feedback information sent by the website that receives the web access request.
  • the feedback information includes Receive access feedback information and refuse to receive access feedback information; when receiving access feedback information, call the web crawler algorithm preset in the database, collect the content of the legal judgment document, and then continue to call the browser kernel to access the URL list Other URLs in the URL list until all URLs in the URL list are traversed; after receiving the feedback message that access is denied, continue to call the browser kernel to access other URLs in the URL list until all URLs in the URL list are traversed; summarize the web crawler algorithm Collected legal judgment documents.
  • Step S102 Deconstructing the data: Deconstructing the content of each legal judgment document to obtain node content, which includes but is not limited to the plaintiff, the lawyer, the focus of the dispute, and the evidence.
  • entity refers to that the same entity may have multiple expressions when deconstructing the content of a legal judgment document, that is, an entity contains multiple possible Chinese meanings.
  • entity referents When determining the content of a node, define one of the node content as an entity, and set the other Other entities with the same meaning are defined as entity referents, and the entity referents and entities are filled in the mapping table to obtain the mapping table between entity referents and entities.
  • the node content obtained includes "Apple”, “Apple Company", etc., then "Apple” or “Apple Company” is used to refer to the specific term “Apple Company", the former refers to the entity and the latter refers to entity.
  • Step S103 construct a graph: construct the relationship between the entities and the attributes of the node content to obtain the legal knowledge graph.
  • Entity such as plaintiff, prison, focus of dispute, etc.
  • relationship such as submission, establishment of request, etc.
  • Step S104 Establish a mapping relationship: refer to each entity in the legal knowledge graph and the entity in the preset mapping relationship table to establish a mapping relationship to obtain an updated mapping relationship table.
  • an initial mapping table between entity references and entities can be set up in advance.
  • all entities in the legal knowledge graph are referred to entities in the initial mapping table.
  • the mapping relationship is established on the generation, and the updated mapping relationship table is obtained. For example, if the entity in the legal knowledge graph includes "Apple”, and the initial mapping table contains entity references such as "Apple” or "Apple”, then these entities will be referred to as the entity "Apple” in the legal knowledge graph.
  • the mapping relationship is established to facilitate subsequent determination of the candidate entity set according to the updated mapping relationship table.
  • the data used to construct the legal knowledge graph is obtained through the web crawler technology, and the legal knowledge graph is finally obtained through the process of deconstructing the data and constructing the graph.
  • This legal knowledge graph is used as the basis for entity reference recognition to determine the final entity reference. generation.
  • Step S2 Calculate the objective function: Calculate the correlation score between each entity reference in the set and the corresponding candidate entity, calculate the correlation score of any two candidate entities among all the corresponding candidate entities, and associate The scores are respectively added to the corresponding correlation scores to obtain multiple objective functions.
  • the disambiguation task of candidate entities is realized by calculating the correlation score.
  • any entity refers to multiple candidate entities.
  • the correlation score is calculated between any two candidate entities, and the traversal entity refers to all the corresponding candidate entities.
  • the calculation of the correlation score is added to the objective function, and the similarity between the candidate entities is used for global disambiguation.
  • step S2 the relevance score is obtained by multiplying the context-independent score and the context-relevant score.
  • the context-independent score preferably adopts the Levenshtein string edit distance formula, that is, the text edit distance score between the entity reference and the candidate entity is calculated as the context-independent score.
  • the context-independent score sim(m, e) is obtained using the following calculation formula:
  • m refers to the entity
  • e refers to one of the candidate entities in the corresponding candidate entity set
  • represent the string lengths of m and e, respectively
  • ed(m, e) is Levenshtein
  • the distance formula refers to the minimum number of editing operations required to convert two strings from one to the other, and w s is a preset coefficient.
  • the context-related score is to vectorize the context of the entity and the attributes of the candidate entity, which is determined by calculating the distance between the two vectors.
  • the attribute of the candidate entity is related attribute information of the candidate entity in the preset legal knowledge graph.
  • word2vec is an NLP tool that can vectorize all words so that words can be quantified. To measure the relationship between them, to dig out the connection between words. In this step, the word2vec method is used to vectorize the context referred to by the entity and the attributes of the candidate entity by means of direct calling.
  • Levenshtein distance formula and cosine distance formula are used to quickly and effectively realize the disambiguation task of candidate entities.
  • step S2 calculating the correlation scores of any two candidate entities among all corresponding candidate entities that each entity refers to includes:
  • e 1 and e 2 represent two candidate entities
  • E 1 represents the set of entities directly connected to e 1
  • E 2 represents the set of entities directly connected to e 2
  • represents the number of entities in E 1
  • represents the number of entities in E 2
  • E 1 ⁇ E 2 represents the intersection of two sets
  • represents the number of all entities in the legal knowledge graph.
  • ⁇ (m i , e i ) is the correlation score
  • coh(e i , e j ) is the correlation score between the two candidate entities.
  • the correlation scores of the two candidate entities are obtained through the above calculation formula. Considering that there may be multiple entity references in the legal text, the objective function is increased by the intervention of this correlation score, and the similarity between the candidate entities is used. Sex, global disambiguation.
  • Step S3 determination and linking: in the entity reference set, the entity reference with the largest objective function value is determined as the final entity reference, and the final entity reference is linked to the corresponding entity in the legal knowledge graph.
  • step 2 After calculating all the objective functions in step 2), the final goal is to maximize the objective function, and finally get
  • the content of the legal text entered in step 1) is "Is Apple selling Apple", and finally in this step, the entity refers to “Apple” and “Apple”, and the entity refers to “Apple”.
  • the entity is "Apple Company”, and the entity corresponding to "Apple” is “Apple (fruit of the genus Rosaceae)”.
  • each entity reference is also linked to the corresponding entity in the legal knowledge graph to provide a retrieval basis for subsequent legal case retrieval and evidence guidance intelligent question and answer.
  • the legal text is segmented by word segmentation calculation, so that all possible words can be divided, and the problem of omission of divided words can be avoided.
  • compare the word segmentation results with the preset mapping table remove irrelevant words, quickly and efficiently filter out key words and add the entity reference set and the corresponding candidate entity set, as Subsequent determination of the correct entity refers to the data support.
  • This application also realizes the disambiguation task of multiple candidate entities through the calculation of the correlation score.
  • Entities refer to links to avoid the existence of synonyms and polysemous words in legal texts.
  • an entity linking device based on a knowledge graph including:
  • the word segmentation and search module is used to obtain the legal text, perform word segmentation on the legal text, and obtain the word segmentation result, and find in the preset mapping table whether there is an entity reference that is the same as the word segmentation result. If it exists, it will be the same as the word segmentation result
  • the entity reference is placed in the entity reference set, and the entity reference corresponding to the same as the word segmentation result is placed in the candidate entity set.
  • the entity reference refers to the entity's pronoun, and one entity reference corresponds to multiple entities;
  • the calculation module is used to calculate the correlation score between the entity reference and the corresponding candidate entity for each entity reference in the entity reference set, and calculate the correlation scores of any two candidate entities among all the corresponding candidate entities for each entity reference , Add the correlation scores to the corresponding correlation scores to obtain multiple objective functions;
  • the determining and linking module is used to determine the entity reference with the largest objective function value in the entity reference set as the final entity reference, and link the final entity reference to the corresponding entity in the legal knowledge graph.
  • a computer device including a memory and a processor, and computer-readable instructions are stored in the memory.
  • the processor executes the computer-readable instructions to implement the above The steps in the entity linking method based on the knowledge graph of the embodiment.
  • a storage medium storing computer-readable instructions.
  • the computer-readable instructions are executed by one or more processors, the one or more processors execute the knowledge graph based on the foregoing embodiments.
  • the steps in the entity linking method may be a non-volatile storage medium or a volatile storage medium.
  • the program can be stored in a computer-readable storage medium, and the storage medium can include: Read only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.

Landscapes

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

Abstract

一种基于知识图谱的实体链接方法、装置、设备和存储介质。该方法包括:对法律文本进行分词,得到分词结果,查找是否存在与分词结果相同的实体指代,若存在,则将实体指代放入实体指代集合中,将实体放入候选实体集合中;分别计算关联分数和相关分数,将关联分数与对应的各相关分数进行相加,得到目标函数;在实体指代集合中,以目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。通过计算实体指代的关联分数和候选实体间的相关分数,确定最终的实体指代,并将实体指代进行链接,避免法律文本中存在着同义词、一词多义现象。

Description

基于知识图谱的实体链接方法、装置、设备和存储介质
本申请要求于2019年10月18日提交中国专利局、申请号为201910992304.3、发明名称为“基于知识图谱的实体链接方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及大数据技术领域,尤其涉及一种基于知识图谱的实体链接方法、装置、设备和存储介质。
背景技术
知识图谱将互联网的信息表达成更接近人类认知世界的形式,提供了一种更好地组织、管理和理解互联网海量信息的能力。知识图谱给互联网语义搜索带来了活力,同时也在智能问答、大数据分析与决策中显示出强大威力,已经成为互联网基于知识的智能服务的基础设施。知识图谱与大数据和深度学习一起,成为推动人工智能发展的核心驱动力之一。在知识图谱里,每个节点表示现实世界中存在的“实体”,每条边为实体与实体之间的“关系”,知识图谱是关系的最有效的表示方式。
构建法律知识图谱对整合法律知识、挖掘法律热点、对法律事件预测、构建法律领域专家系统等将起到重要作用。由于法律的知识体系非常复杂,是多种逻辑的结合。发明人发现,法律文书中存在这大量的实体,如原告、被告、争议焦点、事实要素、法律发条等,这些实体对于案件信息抽取、法律信息检索等环节非常重要,但中文语言中普遍存在着同义词、一词多义现象,因此如何利用合适的自然语言处理技术将法律文书中的实体找出,并链接到法律知识图谱中正确的实体上变得尤为重要。
发明内容
有鉴于此,有必要针对复杂的法律文书中的实体如何正确的链接到法律知识图谱中的问题,提供一种基于知识图谱的实体链接方法、装置、设备和存储介质。
一种基于知识图谱的实体链接方法,包括:
获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数与对应的各相关分数进行相加,得到多个目标函数;
在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
一种基于知识图谱的实体链接装置,包括:
分词及查找模块,用于获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
计算模块,用于计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分 数与对应的各相关分数进行相加,得到多个目标函数;
确定及链接模块,用于在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下所述的基于知识图谱的实体链接方法的步骤:
获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数与对应的各相关分数进行相加,得到多个目标函数;
在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如下所述的基于知识图谱的实体链接方法的步骤:
获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数与对应的各相关分数进行相加,得到多个目标函数;
在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
上述基于知识图谱的实体链接方法、装置、设备和存储介质,包括获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中;计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数与对应的各相关分数进行相加,得到多个目标函数;在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。本申请通过计算实体指代的关联分数和候选实体间的相关分数,确定最终的实体指代,并将实体指代进行链接,避免法律文本中存在着同义词、一词多义现象。在将实体指代链接至法律知识图谱后,实体链接能够帮助机器真正理解自由文本中法务实体的语义信息,帮助机器有效进行后续类案检索、证据指引和智能问答等任务。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。
图1为本申请一个实施例中的基于知识图谱的实体链接方法的流程图;
图2为本申请一个实施例中步骤S1的流程图;
图3为本申请一个实施例中基于知识图谱的实体链接装置的结构图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。
图1为本申请一个实施例中的基于知识图谱的实体链接方法的流程图,如图1所示,一种基于知识图谱的实体链接方法,包括以下步骤:
步骤S1,分词及查找:获取法律文本,对法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与分词结果相同的实体指代,若存在,则将与分词结果相同的实体指代放入实体指代集合中,将与分词结果相同的实体指代对应的实体放入候选实体集合中,实体指代是指实体的代称,一个实体指代对应有多个实体。
由于日常书面文本当中可能会采用简称或者代称来表示一些特定名词,例如,用“苹果”或“苹果公司”等词来指代“苹果公司”这一特定名词,这些如“苹果”或“苹果公司”等简称或代称即为实体指代,一些特定名词即为实体,根据词语之间的对应关系,实体指代与实体之间得到一张预设的映射表。
本步骤中的法律文本是用户输入的一句话或一段文字,根据输入的法律文本来进行实体指代识别。本步骤在进行实体指代识别时,首先对法律文本进行分词,将一句话或一段文字切分成多个词语,将词语与映射表进行比较,得到实体指代及实体指代对应的实体,并读查找后得到的实体指代及对应的实体进行分类放入实体指代集合和候选实体集合中。
其中,实体指代代集合记作:M={m 1,m 2,…,m N},m指在映射表中存在分词结果的实体指代。候选实体集合记作:E i={e i1,e i2,…,e ik}(i=1,2,…,N),e指在映射表中实体指代对应的实体。
在一个实施例中,步骤S1中,获取法律文本,对法律文本进行分词,得到分词结果,包括:
对获取的法律文本进行分词,得到的多个词语为分词结果,在进行分词时最小分词滑窗为预设的最小分词阈值,最大分词滑窗为法律文本长度。
例如,输入的法律文本内容为“苹果公司卖的是苹果嘛”,预设的最小分词阈值为2,最大分词滑窗为10,则可以得到:划窗大小为2时的分词结果为“苹果”、“果公”、“公司”、“司卖”、“卖的”、“的是”、“是苹”、“苹果”、“果嘛”,划窗大小为3时得到的分词结果为“苹果公”、“果公司”、“公司卖”、“司卖的”、“卖的是”、“的是苹”、“是苹果”、“苹果嘛”,直至划窗大小为10时得到的分词结果为“苹果公司卖的是苹果嘛”。“苹果”、“果公”、“公司”、“司卖”、“卖的”、“的是”、“是苹”、“苹果”、“果嘛”、“苹果公”、“果公司”、 “公司卖”、“司卖的”、“卖的是”、“的是苹”、“是苹果”、“苹果嘛”…“苹果公司卖的是苹果嘛”均为本通过本实施方式得到的分词结果。
将上述分词结果中的每个词语在映射表中进行查询,是否存在相同的实体指代,当映射表中存在“苹果”和“苹果公司”两个实体指代,则实体指代集合为“苹果”和“苹果公司”,在映射表中查找实体指代对应的实体,能够得到“苹果”对应的实体有“苹果(蔷薇科苹果属果实)”、“苹果(苹果产品公司)”、“苹果(韩国2008年康理贯执导电影)”等,这些实体的集合即为候选实体集合。对于实体指代“苹果公司”同样有对应的候选实体集合。此时,M=[“苹果”,“苹果公司”],E1=[“苹果(蔷薇科苹果属果实)”,“苹果(苹果产品公司)”,“苹果(韩国2008年康理贯执导电影)”,…]
本实施例的最小分词阈值取值范围为大于等于2,小于等于法律文本长度。通过上述方式对获取的法律文本进行分词,可以将所有可能的词语都得到划分,避免词语的遗漏。
在一个实施例中,步骤S1中,映射表为预设的法律知识图谱中实体指代与实体之间的映射关系表,如图2所示,包括:
步骤S101,爬取数据:通过预设的爬虫脚本获取预设网站中的法律裁判文书。
本步骤通过爬虫技术对网络中公开的各个网站内关于法律方面的法律裁判文书进行爬取。具体爬取方式如下:
预设网址列表,网址列表中包含多个法律裁判文书内容的网址;调用浏览器内核依次对网址列表中的网址发出网页访问请求,并等待接收网页访问请求的网站发出的反馈信息,反馈信息包括接收访问的反馈信息和拒绝接收访问的反馈信息;当接收到接收访问的反馈信息时,调用预设在数据库中的网络爬虫算法,采集法律裁判文书内容,然后继续调用浏览器内核访问网址列表中的其他网址,直到遍历网址列表中的所有网址;当接收到拒绝接收访问的反馈信息后,继续调用浏览器内核访问网址列表中的其他网址,直到遍历网址列表中的所有网址;汇总网络爬虫算法采集到的法律裁判文书。
步骤S102,解构数据:对每篇法律裁判文书的内容进行解构,得到节点内容,节点内容包括但不限于原告、被告、争议焦点和证据。
由于法律裁判文书的格式基本固定,因此本步骤在解构时,可以采用正则表达式、json表达式或grok表达式等解析方式对法律裁判文书内容进行解构。
其中,实体指代指在解构法律裁判文书内容时同一实体可能有多种表达方式,即一个实体含有多个可能的中文含义,在确定节点内容时,将其中一个节点内容定义为实体,将其他相同含义的其他实体定义为实体指代,将实体指代和实体填入映射表中,得到实体指代与实体之间的映射表。例如得到的节点内容有“苹果”、“苹果公司”等,则用“苹果”或“苹果公司”来指代“苹果公司”这一特定名词,则前者即为实体指代,后者即为实体。
步骤S103,构建图谱:将节点内容构建实体和属性之间的关系,得到法律知识图谱。
实体如原告、被告、争议焦点等,关系如提出、请求成立等。
步骤S104,建立映射关系:将法律知识图谱中的各实体与预设的映射关系表中的实体指代建立映射关系,得到更新后的映射关系表。
在建立法律知识图谱之前,可以预先设置一张实体指代与实体之间的初始映射表,当法律知识图谱构建完成后,将法律知识图谱中的所有实体,都与初始映射表中的实体指代建立映射关系,得到更新后的映射关系表。例如,法律知识图谱中的实体包含“苹果公司”,初始映射表中包含有“苹果”或“苹果公司”等实体指代,则将这些实体指代与法律知识图谱中的实体“苹果公司”建立映射关系,以便于后续根据更新后的映射关系表确定候选实体集合。
本实施例通过网络爬虫技术得到用于构建法律知识图谱的数据,通过解构数据,构建 图谱的过程,最终得到法律知识图谱,此法律知识图谱作为实体指代识别的基础,确定出最终的实体指代。
步骤S2,计算目标函数:计算实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将关联分数分别与对应的各相关分数进行相加,得到多个目标函数。
通过步骤1)得到的实体指代和候选实体较多,其中大部分候选实体并不是最终确定的实体,因此本步骤通过对关联分数的计算,来实现候选实体的消歧任务。在候选实体集合中,任一实体指代对应可能有多个候选实体,在多个候选实体中,对任一两个候选实体之间计算相关分数,遍历实体指代对应的所有的候选实体,得到实体指代对应的多个相关分数,对此实体指代得到的关联分数,分别与所有的相关分数进行相加,得到多个目标函数。本步骤通过在目标函数中增加相关分数的计算,利用候选实体之间的相似性进行全局消歧。
在一个实施例中,步骤S2中,关联分数由上下文无关分数与上下文相关分数相乘得到。
1)上下文无关分数优选采用Levenshtein字符串编辑距离公式,即计算实体指代与候选实体文本编辑距离分数作为上下文无关分数。上下文无关分数sim(m,e)采用如下计算公式得到:
Figure PCTCN2020111240-appb-000001
其中,m为实体指代,e为实体指代对应的候选实体集合中的其中一个候选实体,|m|和|e|分别表示m和e的字符串长度,ed(m,e)为Levenshtein距离公式,指的是两个字符串之间,由一个转换成另一个所需的最少编辑操作次数,w s是预设的系数。
上述Levenshtein距离公式,例如对于字符串kitten和sitting,第一步,kitten-->sitten将k替换成s;第二步,sitten-->sittin将e替换成i;第三步,sittin-->sitting添加g;每经过一次编辑,也就是变化(插入,删除,替换)花费的代价都是1,因此ed(kitten,sitting)=3,上述举例为英文,对于中文采用相同的计算方式。
2)上下文相关分数是将实体指代的上下文与候选实体的属性进行向量化,通过计算两个向量的距离来确定。
其中,候选实体的属性是预设的法律知识图谱中的候选实体的相关属性信息。在向量化时,可以采用NLP自然语言处理系统中现有的模型,如word2vec词向量化模型,word2vec是一个NLP工具,它可以将所有的词向量化,这样词与词之间就可以定量的去度量他们之间的关系,挖掘词之间的联系。本步骤利用word2vec的方法,采用直接调用的方式对实体指代的上下文与候选实体的属性分别进行向量化。
在通过计算两个向量的距离时,优选通过计算两个向量的余弦距离得到上下文相关分 数,余弦距离的计算公式为:
Figure PCTCN2020111240-appb-000002
其中,
Figure PCTCN2020111240-appb-000003
表示利用word2vec的方法得到的两个向量,
Figure PCTCN2020111240-appb-000004
表示向量模长。
本实施例通过上述Levenshtein距离公式及余弦距离公式等方式,来快速有效的实现候选实体的消歧任务。
在一个实施例中,步骤S2中,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,包括:
两个候选实体之间的相关分数sim(e 1,e 2)的计算公式为:
Figure PCTCN2020111240-appb-000005
其中,e 1、e 2表示两个候选实体,E 1表示与e 1直接连接的实体集合,E 2表示与e 2直接连接的实体集合,|E 1|表示E 1中实体的数量,|E 2|表示E 2中实体的数量,E 1∩E 2表示两个集合的交集,|E|表示法律知识图谱中全部实体的数量。
目标函数
Figure PCTCN2020111240-appb-000006
的计算公式为:
Figure PCTCN2020111240-appb-000007
其中,φ(m i,e i)为关联分数,coh(e i,e j)为两个候选实体之间的相关分数。
本实施例通过上述计算公式,得到两个候选实体的相关分数,考虑到法律文本中可能存在多个实体指代,因此在目标函数中通过增加此相关分数的介入,利用候选实体之间的相似性,进行全局消歧。
步骤S3,确定及链接:在实体指代集合中,以目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
在步骤2)计算出所有的目标函数后,最终的目标为目标函数最大化,最终得到
Figure PCTCN2020111240-appb-000008
为实体指代M={m 1,m 2,…,m N}集合对应的实体结果,实体结果为实体指代M集合与实体集合
Figure PCTCN2020111240-appb-000009
例如,步骤1)中输入的法律文本内容为“苹果公司卖的是苹果嘛”,最终在本步骤中得到了实体指代“苹果公司”和“苹果”,实体指代“苹果公司”对应的实体为“苹果公司”,“苹果”对应的实体为“苹果(蔷薇科苹果属果实)”。
在得到最终的实体指代后,还将每个实体指代链接到法律知识图谱中对应的实体中,为后续法律案件检索、证据指引智能问答提供检索依据。
例如,将实体指代“苹果公司”链接到法律知识图谱中实体为“苹果公司”上,将实体指代“苹果”链接到法律知识图谱中实体为“苹果(蔷薇科苹果属果实)”上。
本实施例基于知识图谱的实体链接方法,采用分词计算对法律文本进行分词,可将所有可能的词语都得到划分,避免划分词语的遗漏问题。在得到的分词结果量较大的情况下,将分词结果与预设的映射表进行比较查询,去除无关词语,快速高效的筛选出关键词语并加入实体指代集合和对应的候选实体集合,为后续确定正确的实体指代给出数据支持。本申请还通过关联分数的计算,实现多个候选实体的消歧任务。考虑到输入的法律文本中可能存在多个实体指代,因此在目标函数中增加相关分数的计算,利用候选实体之间的相似性进一步实现全局消歧,最终得到确定的实体指代,并将实体指代进行链接,避免法律文本中存在着同义词、一词多义现象。
在一个实施例中,提出了一种基于知识图谱的实体链接装置,如图3所示,包括:
分词及查找模块,用于获取法律文本,对法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与分词结果相同的实体指代,若存在,则将与分词结果相同的实体指代放入实体指代集合中,将与分词结果相同的实体指代对应的实体放入候选实体集合中,实体指代是指实体的代称,一个实体指代对应有多个实体;
计算模块,用于对实体指代集合中每个实体指代计算实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将关联分数分别与对应的各相关分数进行相加,得到多个目标函数;
确定及链接模块,用于在实体指代集合中,以目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
在一个实施例中,提出了一种计算机设备,包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行计算机可读指令时实现上述各实施例的基于知识图谱的实体链接方法中的步骤。
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述各实施例的基于知识图谱的实体链接方法中的步骤。其中,存储介质可以为非易失性存储介质,也可以为易失性存储介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可 以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请一些示例性实施例,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种基于知识图谱的实体链接方法,其中,包括:
    获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
    计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数分别与对应的各相关分数进行相加,得到多个目标函数;
    在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
  2. 根据权利要求1所述的基于知识图谱的实体链接方法,其中,所述获取法律文本,对所述法律文本进行分词,得到分词结果,包括:
    对获取的所述法律文本进行分词,得到的多个词语为分词结果,在进行分词时最小分词滑窗为预设的最小分词阈值,最大分词滑窗为所述法律文本长度。
  3. 根据权利要求1所述的基于知识图谱的实体链接方法,其中,所述映射表为预设的法律知识图谱中实体指代与实体之间的映射关系表,包括:
    通过预设的爬虫脚本获取预设网站中的法律裁判文书;
    对每篇所述法律裁判文书的内容进行解构,得到节点内容,所述节点内容包括但不限于原告、被告、争议焦点和证据;
    将所述节点内容构建实体和属性之间的关系,得到法律知识图谱;
    将所述法律知识图谱中的各实体与预设的映射关系表中的所述实体指代建立映射关系,得到更新后的映射关系表。
  4. 根据权利要求1所述的基于知识图谱的实体链接方法,其中,所述计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,包括:
    所述关联分数由上下文无关分数与上下文相关分数相乘得到;
    所述上下文无关分数sim(m,e)采用如下计算公式得到:
    Figure PCTCN2020111240-appb-100001
    其中,m为实体指代,e为实体指代对应的候选实体集合中的其中一个候选实体,|m|和|e|分别表示m和e的字符串长度,ed(m,e)为距离公式,指的是两个字符串之间,由一个转换成另一个所需的最少编辑操作次数,w s是预设的系数;
    将所述实体指代的上下文与候选实体的属性进行向量化,通过计算两个向量的距离确定所述上下文相关分数。
  5. 根据权利要求4所述的基于知识图谱的实体链接方法,其中,所述通过计算两个向量的距离确定所述上下文相关分数,包括:
    通过计算两个向量的余弦距离得到所述上下文相关分数,所述余弦距离的计算公式为:
    Figure PCTCN2020111240-appb-100002
    其中,
    Figure PCTCN2020111240-appb-100003
    表示两个向量,
    Figure PCTCN2020111240-appb-100004
    表示向量模长。
  6. 根据权利要求1、4或5所述的基于知识图谱的实体链接方法,其中,所述计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,包括:
    两个所述候选实体之间的相关分数sim(e 1,e 2)的计算公式为:
    Figure PCTCN2020111240-appb-100005
    其中,e 1、e 2表示两个所述候选实体,E 1表示与e 1直接连接的实体集合,E 2表示与e 2直接连接的实体集合,|E 1|表示E 1中实体的数量,|E 2|表示E 2中实体的数量,E 1∩E 2表示两个集合的交集,|E|表示法律知识图谱中全部实体的数量。
  7. 根据权利要求6所述的基于知识图谱的实体链接方法,其中,所述将所述关联分数与对应的各相关分数进行相加,得到多个目标函数,包括:
    所述目标函数
    Figure PCTCN2020111240-appb-100006
    的计算公式为:
    Figure PCTCN2020111240-appb-100007
    其中,φ(m i,e i)为所述关联分数,coh(e i,e j)为两个所述候选实体之间的相关分数。
  8. 一种基于知识图谱的实体链接装置,其中,包括:
    分词及查找模块,用于获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
    计算模块,用于计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数分别与对应的各相关分数进行相加,得到多个目标函数;
    确定及链接模块,用于在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
  9. 一种计算机设备,其中,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行如下所述的基于知识图谱的实体链接方法的步骤:
    获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中, 所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
    计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数分别与对应的各相关分数进行相加,得到多个目标函数;
    在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
  10. 根据权利要求9所述的基于知识图谱的实体链接设备,其中,所述获取法律文本,对所述法律文本进行分词,得到分词结果,包括以下步骤:
    对获取的所述法律文本进行分词,得到的多个词语为分词结果,在进行分词时最小分词滑窗为预设的最小分词阈值,最大分词滑窗为所述法律文本长度。
  11. 根据权利要求9所述的基于知识图谱的实体链接设备,其中,所述映射表为预设的法律知识图谱中实体指代与实体之间的映射关系表,包括以下步骤:
    通过预设的爬虫脚本获取预设网站中的法律裁判文书;
    对每篇所述法律裁判文书的内容进行解构,得到节点内容,所述节点内容包括但不限于原告、被告、争议焦点和证据;
    将所述节点内容构建实体和属性之间的关系,得到法律知识图谱;
    将所述法律知识图谱中的各实体与预设的映射关系表中的所述实体指代建立映射关系,得到更新后的映射关系表。
  12. 根据权利要求9所述的基于知识图谱的实体链接设备,其中,所述计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,包括以下步骤:
    所述关联分数由上下文无关分数与上下文相关分数相乘得到;
    所述上下文无关分数sim(m,e)采用如下计算公式得到:
    Figure PCTCN2020111240-appb-100008
    其中,m为实体指代,e为实体指代对应的候选实体集合中的其中一个候选实体,|m|和|e|分别表示m和e的字符串长度,ed(m,e)为距离公式,指的是两个字符串之间,由一个转换成另一个所需的最少编辑操作次数,w s是预设的系数;
    将所述实体指代的上下文与候选实体的属性进行向量化,通过计算两个向量的距离确定所述上下文相关分数。
  13. 根据权利要求12所述的基于知识图谱的实体链接设备,其中,所述通过计算两个向量的距离确定所述上下文相关分数,包括以下步骤:
    通过计算两个向量的余弦距离得到所述上下文相关分数,所述余弦距离的计算公式为:
    Figure PCTCN2020111240-appb-100009
    其中,
    Figure PCTCN2020111240-appb-100010
    表示两个向量,
    Figure PCTCN2020111240-appb-100011
    表示向量模长。
  14. 根据权利要求9、12或13所述的基于知识图谱的实体链接设备,其中,所述计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,包括以下步骤:
    两个所述候选实体之间的相关分数sim(e 1,e 2)的计算公式为:
    Figure PCTCN2020111240-appb-100012
    其中,e 1、e 2表示两个所述候选实体,E 1表示与e 1直接连接的实体集合,E 2表示与e 2直接连接的实体集合,|E 1|表示E 1中实体的数量,|E 2|表示E 2中实体的数量,E 1∩E 2表示两个集合的交集,|E|表示法律知识图谱中全部实体的数量。
  15. 根据权利要求14所述的基于知识图谱的实体链接设备,其中,所述将所述关联分数与对应的各相关分数进行相加,得到多个目标函数,包括以下步骤:
    所述目标函数
    Figure PCTCN2020111240-appb-100013
    的计算公式为:
    Figure PCTCN2020111240-appb-100014
    其中,φ(m i,e i)为所述关联分数,coh(e i,e j)为两个所述候选实体之间的相关分数。
  16. 一种存储有计算机可读指令的存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行如下所述的基于知识图谱的实体链接方法的步骤:
    获取法律文本,对所述法律文本进行分词,得到分词结果,在预设的映射表中查找是否存在与所述分词结果相同的实体指代,若存在,则将与所述分词结果相同的实体指代放入实体指代集合中,将与所述分词结果相同的实体指代对应的实体放入候选实体集合中,所述实体指代是指实体的代称,一个所述实体指代对应有多个实体;
    计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数,计算各实体指代对应的所有候选实体中任意两个候选实体的相关分数,将所述关联分数分别与对应的各相关分数进行相加,得到多个目标函数;
    在所述实体指代集合中,以所述目标函数值最大的实体指代确定为最终的实体指代,将最终的实体指代链接到法律知识图谱中对应的实体中。
  17. 根据权利要求16所述的存储介质,其中,所述基于知识图谱的实体链接的计算机可读指令被处理器执行所述获取法律文本,对所述法律文本进行分词,得到分词结果的步骤时,包括以下步骤:
    对获取的所述法律文本进行分词,得到的多个词语为分词结果,在进行分词时最小分词滑窗为预设的最小分词阈值,最大分词滑窗为所述法律文本长度。
  18. 根据权利要求16所述的存储介质,其中,所述基于知识图谱的实体链接的计算机可读指令被处理器执行所述映射表为预设的法律知识图谱中实体指代与实体之间的映射关系表的步骤时,包括以下步骤:
    通过预设的爬虫脚本获取预设网站中的法律裁判文书;
    对每篇所述法律裁判文书的内容进行解构,得到节点内容,所述节点内容包括但不限于原告、被告、争议焦点和证据;
    将所述节点内容构建实体和属性之间的关系,得到法律知识图谱;
    将所述法律知识图谱中的各实体与预设的映射关系表中的所述实体指代建立映射关系,得到更新后的映射关系表。
  19. 根据权利要求16所述的存储介质,其中,所述基于知识图谱的实体链接的计算机可读指令被处理器执行所述计算所述实体指代集合中各实体指代与对应的候选实体之间的关联分数的步骤时,包括以下步骤:
    所述关联分数由上下文无关分数与上下文相关分数相乘得到;
    所述上下文无关分数sim(m,e)采用如下计算公式得到:
    Figure PCTCN2020111240-appb-100015
    其中,m为实体指代,e为实体指代对应的候选实体集合中的其中一个候选实体,|m|和|e|分别表示m和e的字符串长度,ed(m,e)为距离公式,指的是两个字符串之间,由一个转换成另一个所需的最少编辑操作次数,w s是预设的系数;
    将所述实体指代的上下文与候选实体的属性进行向量化,通过计算两个向量的距离确定所述上下文相关分数。
  20. 根据权利要求19所述的存储介质,其中,所述基于知识图谱的实体链接的计算机可读指令被处理器执行所述通过计算两个向量的距离确定所述上下文相关分数的步骤时,包括以下步骤:
    通过计算两个向量的余弦距离得到所述上下文相关分数,所述余弦距离的计算公式为:
    Figure PCTCN2020111240-appb-100016
    其中,
    Figure PCTCN2020111240-appb-100017
    表示两个向量,
    Figure PCTCN2020111240-appb-100018
    表示向量模长。
PCT/CN2020/111240 2019-10-18 2020-08-26 基于知识图谱的实体链接方法、装置、设备和存储介质 WO2021073254A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910992304.3A CN110929038B (zh) 2019-10-18 2019-10-18 基于知识图谱的实体链接方法、装置、设备和存储介质
CN201910992304.3 2019-10-18

Publications (1)

Publication Number Publication Date
WO2021073254A1 true WO2021073254A1 (zh) 2021-04-22

Family

ID=69849193

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111240 WO2021073254A1 (zh) 2019-10-18 2020-08-26 基于知识图谱的实体链接方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN110929038B (zh)
WO (1) WO2021073254A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360605A (zh) * 2021-06-23 2021-09-07 中国科学技术大学 基于主题实体语境迭代优化的全局实体链接方法
CN115599903A (zh) * 2021-07-07 2023-01-13 腾讯科技(深圳)有限公司(Cn) 对象标签获取方法、装置、电子设备及存储介质
CN115809311A (zh) * 2022-12-22 2023-03-17 企查查科技有限公司 知识图谱的数据处理方法、装置及计算机设备

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110929038B (zh) * 2019-10-18 2023-07-21 平安科技(深圳)有限公司 基于知识图谱的实体链接方法、装置、设备和存储介质
CN111858903A (zh) * 2020-06-11 2020-10-30 创新工场(北京)企业管理股份有限公司 一种用于负面新闻预警的方法和装置
CN111814477B (zh) * 2020-07-06 2022-06-21 重庆邮电大学 一种基于争议焦点实体的争议焦点发现方法、装置及终端
CN112231575B (zh) * 2020-10-30 2022-05-10 衢州量智科技有限公司 面向复杂机电产品设计过程的知识推荐方法与系统
CN112380865A (zh) * 2020-11-10 2021-02-19 北京小米松果电子有限公司 识别文本中的实体方法、装置及存储介质
CN113220835B (zh) * 2021-05-08 2023-09-29 北京百度网讯科技有限公司 文本信息处理方法、装置、电子设备以及存储介质
CN113326697A (zh) * 2021-05-31 2021-08-31 云南电网有限责任公司电力科学研究院 一种基于知识图谱的电力文本实体语义理解方法
CN114741627B (zh) * 2022-04-12 2023-03-24 中国人民解放军32802部队 面向互联网的辅助信息搜索方法
CN115269879B (zh) * 2022-09-05 2023-05-05 北京百度网讯科技有限公司 知识结构数据的生成方法、数据搜索方法和风险告警方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198026A1 (en) * 2004-02-03 2005-09-08 Dehlinger Peter J. Code, system, and method for generating concepts
CN103488724A (zh) * 2013-09-16 2014-01-01 复旦大学 一种面向图书的阅读领域知识图谱构建方法
CN106844413A (zh) * 2016-11-11 2017-06-13 南京缘长信息科技有限公司 实体关系抽取的方法及装置
CN106886516A (zh) * 2017-02-27 2017-06-23 竹间智能科技(上海)有限公司 自动识别语句关系和实体的方法及装置
CN110929038A (zh) * 2019-10-18 2020-03-27 平安科技(深圳)有限公司 基于知识图谱的实体链接方法、装置、设备和存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105224648A (zh) * 2015-09-29 2016-01-06 浪潮(北京)电子信息产业有限公司 一种实体链接方法与系统
CN109255031B (zh) * 2018-09-20 2022-02-11 苏州友教习亦教育科技有限公司 基于知识图谱的数据处理方法
CN109635114A (zh) * 2018-12-17 2019-04-16 北京百度网讯科技有限公司 用于处理信息的方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198026A1 (en) * 2004-02-03 2005-09-08 Dehlinger Peter J. Code, system, and method for generating concepts
CN103488724A (zh) * 2013-09-16 2014-01-01 复旦大学 一种面向图书的阅读领域知识图谱构建方法
CN106844413A (zh) * 2016-11-11 2017-06-13 南京缘长信息科技有限公司 实体关系抽取的方法及装置
CN106886516A (zh) * 2017-02-27 2017-06-23 竹间智能科技(上海)有限公司 自动识别语句关系和实体的方法及装置
CN110929038A (zh) * 2019-10-18 2020-03-27 平安科技(深圳)有限公司 基于知识图谱的实体链接方法、装置、设备和存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360605A (zh) * 2021-06-23 2021-09-07 中国科学技术大学 基于主题实体语境迭代优化的全局实体链接方法
CN113360605B (zh) * 2021-06-23 2024-02-23 中国科学技术大学 基于主题实体语境迭代优化的全局实体链接方法
CN115599903A (zh) * 2021-07-07 2023-01-13 腾讯科技(深圳)有限公司(Cn) 对象标签获取方法、装置、电子设备及存储介质
CN115599903B (zh) * 2021-07-07 2024-06-04 腾讯科技(深圳)有限公司 对象标签获取方法、装置、电子设备及存储介质
CN115809311A (zh) * 2022-12-22 2023-03-17 企查查科技有限公司 知识图谱的数据处理方法、装置及计算机设备

Also Published As

Publication number Publication date
CN110929038A (zh) 2020-03-27
CN110929038B (zh) 2023-07-21

Similar Documents

Publication Publication Date Title
WO2021073254A1 (zh) 基于知识图谱的实体链接方法、装置、设备和存储介质
US10963794B2 (en) Concept analysis operations utilizing accelerators
US11327978B2 (en) Content authoring
US10740678B2 (en) Concept hierarchies
US10831762B2 (en) Extracting and denoising concept mentions using distributed representations of concepts
US11080295B2 (en) Collecting, organizing, and searching knowledge about a dataset
US9792280B2 (en) Context based synonym filtering for natural language processing systems
CN116775847B (zh) 一种基于知识图谱和大语言模型的问答方法和系统
JP6095621B2 (ja) 回答候補間の関係を識別および表示する機構、方法、コンピュータ・プログラム、ならびに装置
US20190392066A1 (en) Semantic Analysis-Based Query Result Retrieval for Natural Language Procedural Queries
US9318027B2 (en) Caching natural language questions and results in a question and answer system
US20170286832A1 (en) Analyzing Concepts Over Time
US20170161619A1 (en) Concept-Based Navigation
US10810215B2 (en) Supporting evidence retrieval for complex answers
CN108681557B (zh) 基于自扩充表示和相似双向约束的短文本主题发现方法及系统
US20160328467A1 (en) Natural language question answering method and apparatus
KR20200094627A (ko) 텍스트 관련도를 확정하기 위한 방법, 장치, 기기 및 매체
US10503830B2 (en) Natural language processing with adaptable rules based on user inputs
CN113392651B (zh) 训练词权重模型及提取核心词的方法、装置、设备和介质
RU2704531C1 (ru) Способ и устройство для анализа семантической информации
JP2013543172A (ja) 質問に対する解答を自動的に生成するための方法、システム、およびコンピュータ・プログラム
KR20190118744A (ko) 딥러닝 기반의 지식 구조 생성 방법을 활용한 의료 문헌 구절 검색 방법 및 시스템
WO2023231331A1 (zh) 一种知识抽取方法、系统、设备及存储介质
CN114840685A (zh) 一种应急预案知识图谱构建方法
Mavrogiorgos et al. A Question Answering Software for Assessing AI Policies of OECD Countries

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

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

Country of ref document: EP

Kind code of ref document: A1