CN113157947A - Knowledge graph construction method, tool, device and server - Google Patents

Knowledge graph construction method, tool, device and server Download PDF

Info

Publication number
CN113157947A
CN113157947A CN202110551912.8A CN202110551912A CN113157947A CN 113157947 A CN113157947 A CN 113157947A CN 202110551912 A CN202110551912 A CN 202110551912A CN 113157947 A CN113157947 A CN 113157947A
Authority
CN
China
Prior art keywords
data
target
source data
knowledge graph
target source
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN202110551912.8A
Other languages
Chinese (zh)
Other versions
CN113157947B (en
Inventor
张梦迪
贾玉红
徐聿帆
陆怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110551912.8A priority Critical patent/CN113157947B/en
Publication of CN113157947A publication Critical patent/CN113157947A/en
Application granted granted Critical
Publication of CN113157947B publication Critical patent/CN113157947B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification provides a method, a tool, a device and a server for constructing a knowledge graph. Based on the construction method of the knowledge graph, the data structure type of target source data to be processed can be determined firstly; then, according to a preset construction rule and the data structure type of the target source data, constructing and obtaining a target knowledge extraction unit matched with the target source data; further, the target knowledge extraction unit can be called to specifically process target source data to obtain an entity relationship file which contains a plurality of ternary data sets and meets the requirements; and then, according to the entity relation file, a target knowledge graph associated with the target source data is constructed. Therefore, the operation of the user side can be effectively simplified, the construction difficulty of the knowledge graph is reduced, and the knowledge graph which meets the diversified service requirements and has a good effect can be efficiently and accurately constructed by the user.

Description

知识图谱的构建方法、工具、装置和服务器Knowledge graph construction method, tool, device and server

技术领域technical field

本说明书属于人工智能技术领域,尤其涉及知识图谱的构建方法、工具、装置和服务器。This specification belongs to the field of artificial intelligence technology, and in particular relates to methods, tools, devices and servers for constructing knowledge graphs.

背景技术Background technique

知识图谱是人工智能技术中的一个重要分支,对于机器的学习和认知有着重要作用。Knowledge graph is an important branch of artificial intelligence technology, which plays an important role in machine learning and cognition.

但是,现有的知识图谱的构建方法,对具有构建知识图谱需求的用户而言技术门槛较高、构建难度较大。并且,基于现有的知识图谱的构建方法,在具体构建知识图谱时,往往还会存在操作复杂、繁琐,构建效率低,无法满足用户多样化的业务需求等问题。However, the existing knowledge graph construction method has high technical threshold and difficulty for users who need to build a knowledge graph. In addition, based on the existing knowledge graph construction methods, when constructing a knowledge graph, there are often problems such as complex and cumbersome operations, low construction efficiency, and inability to meet the diverse business needs of users.

针对上述问题,目前尚未提出有效的解决方案。For the above problems, no effective solution has been proposed yet.

发明内容SUMMARY OF THE INVENTION

本说明书提供了一种知识图谱的构建方法、工具、装置和服务器,以简化用户侧操作,降低知识图谱的构建难度,使得用户可以高效、准确地构建得到满足多样化业务需求的、效果较好的知识图谱。This specification provides a method, tool, device and server for building a knowledge graph to simplify user-side operations, reduce the difficulty of building a knowledge graph, and enable users to efficiently and accurately build a knowledge graph that meets diverse business needs with better results knowledge graph.

本说明书实施例提供了一种知识图谱的构建方法,包括:The embodiments of this specification provide a method for constructing a knowledge graph, including:

获取目标源数据;Get the target source data;

确定目标源数据的数据结构类型;Determine the data structure type of the target source data;

根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;According to the preset construction rule and the data structure type of the target source data, construct a target knowledge extraction unit matching the target source data;

调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;Invoke the target knowledge extraction unit to process the target source data to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of triple data groups; Two data objects connected by a relationship;

根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。According to the entity relationship file, a target knowledge graph associated with the target source data is constructed.

在一些实施例中,所述目标源数据的数据结构类型包括以下至少之一:结构化数据、非结构化数据、半结构化数据。In some embodiments, the data structure type of the target source data includes at least one of the following: structured data, unstructured data, and semi-structured data.

在一些实施例中,根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元,包括:In some embodiments, constructing a target knowledge extraction unit matching the target source data according to a preset construction rule and the data structure type of the target source data, including:

根据预设的构建规则,从多个预设的数据源算子中筛选出与目标源数据对应的目标源算子;其中,所述目标源算子用于将所述目标源数据接入目标知识提取单元;According to a preset construction rule, a target source operator corresponding to the target source data is selected from a plurality of preset data source operators; wherein, the target source operator is used to access the target source data to the target knowledge extraction unit;

根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构;其中,所述目标数据处理结构用于处理目标源数据以得到多个三元数据组;According to the data structure type of the target source data, a matching target data processing structure is determined; wherein, the target data processing structure is used to process the target source data to obtain a plurality of triplet data groups;

确定并配置目标标识终止算子;其中,所述目标标识终止算子用于从目标数据处理结构输出的多个三元数据组中提取出符合要求的三元数据组以得到对应的实体关系文件;Determine and configure a target identification termination operator; wherein, the target identification termination operator is used to extract a required triplet data group from a plurality of triplet data groups output by the target data processing structure to obtain a corresponding entity relationship file ;

组合所述目标源算子、目标数据处理结构和目标标识终止算子,得到与所述目标数据源匹配的目标知识提取单元。The target source operator, the target data processing structure and the target identification termination operator are combined to obtain a target knowledge extraction unit matching the target data source.

在一些实施例中,根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构,包括:In some embodiments, according to the data structure type of the target source data, a matching target data processing structure is determined, including:

在确定目标源数据的数据结构类型为结构化数据的情况下,从多个预设的数据处理算子中筛选出初始处理算子;In the case that the data structure type of the target source data is determined to be structured data, an initial processing operator is selected from a plurality of preset data processing operators;

对所述初始处理算子进行相应配置,得到目标处理算子;并将所述目标处理算子确定为相匹配的目标数据处理结构。The initial processing operator is correspondingly configured to obtain a target processing operator; and the target processing operator is determined as a matching target data processing structure.

在一些实施例中,所述预设的数据处理算子包括以下至少之一:SQL算子、HIVE算子、SPARK算子。In some embodiments, the preset data processing operators include at least one of the following: SQL operators, HIVE operators, and SPARK operators.

在一些实施例中,根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构,包括:In some embodiments, according to the data structure type of the target source data, a matching target data processing structure is determined, including:

在确定目标源数据的数据结构类型为非结构化数据或半结构化数据的情况下,将预设的三元组抽取模型确定为相匹配的目标数据处理结构。In the case that the data structure type of the target source data is determined to be unstructured data or semi-structured data, the preset triplet extraction model is determined as a matching target data processing structure.

在一些实施例中,在确定目标源数据的数据结构类型之后,所述方法还包括:In some embodiments, after determining the data structure type of the target source data, the method further includes:

根据所述目标源数据的数据结构类型,从多个预设的知识提取单元中筛选出推荐的知识提取单元;According to the data structure type of the target source data, a recommended knowledge extraction unit is selected from a plurality of preset knowledge extraction units;

向用户展示所述推荐的知识提取单元;presenting the recommended knowledge extraction unit to the user;

将用户选中的推荐的知识提取单元确定为所述目标知识提取单元。The recommended knowledge extraction unit selected by the user is determined as the target knowledge extraction unit.

在一些实施例中,根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱,包括:In some embodiments, constructing a target knowledge graph associated with the target source data according to the entity relationship file, including:

获取关于目标知识图谱的定义参数文件;其中,所述定义参数文件包括:数据对象的定义参数和/或数据关系的定义参数;Obtain a definition parameter file about the target knowledge graph; wherein, the definition parameter file includes: definition parameters of data objects and/or definition parameters of data relationships;

根据所述实体关系文件和所述定义参数文件,通过进行数据映射,生成与所述目标数据源关联的目标知识图谱。According to the entity relationship file and the definition parameter file, a target knowledge graph associated with the target data source is generated by performing data mapping.

在一些实施例中,所述定义参数文件还包括索引定义参数;In some embodiments, the definition parameter file further includes index definition parameters;

相应的,在根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱的过程中,所述方法还包括:Correspondingly, in the process of constructing the target knowledge graph associated with the target source data according to the entity relationship file, the method further includes:

根据所述索引定义参数,利用数据对象的定义参数和/或数据关系的定义参数,构建针对所述目标知识图谱的目标查询索引。According to the index definition parameters, a target query index for the target knowledge graph is constructed by using the definition parameters of the data object and/or the definition parameters of the data relationship.

在一些实施例中,在根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱之后,所述方法还包括:In some embodiments, after constructing the target knowledge graph associated with the target source data according to the entity relationship file, the method further includes:

接收目标查询语句;其中,所述目标查询语句至少携带有目标知识图谱的目标标识;Receive a target query statement; wherein, the target query statement carries at least the target identifier of the target knowledge graph;

根据所述目标标识,检索图数据库,以确定出目标知识图谱;According to the target identification, the graph database is retrieved to determine the target knowledge graph;

响应所述目标查询语句,对所述目标知识图谱进行查询操作,以得到对应的查询结果;In response to the target query statement, a query operation is performed on the target knowledge graph to obtain a corresponding query result;

反馈所述查询结果。Feedback the query result.

在一些实施例中,所述目标源数据包括客户的交易数据的流水记录;相应的,所述查询结果包括目标客户的交易数据的流向图。In some embodiments, the target source data includes a flow record of the customer's transaction data; correspondingly, the query result includes a flow diagram of the target customer's transaction data.

本说明书实施例还提供了一种知识图谱的构建工具,至少包括:源数据导入接口、第一处理界面、第二处理界面;其中,The embodiments of this specification also provide a knowledge graph construction tool, which at least includes: a source data import interface, a first processing interface, and a second processing interface; wherein,

所述源数据导入接口,用于支持用户导入目标源数据;The source data import interface is used to support users to import target source data;

所述第一处理界面,用于支持用户设置目标知识图谱中的数据对象的定义参数和/或数据关系的定义参数,以生成关于目标知识图谱的定义参数文件;The first processing interface is used to support the user to set the definition parameters of the data objects and/or the definition parameters of the data relationships in the target knowledge graph, so as to generate a definition parameter file about the target knowledge graph;

所述第二处理界面,用于支持用户根据预设的构建规则,确定并组合相匹配的目标源算子、目标数据处理结构、标识终止算子,以得到与目标源数据匹配的目标知识提取单元;The second processing interface is used to support the user to determine and combine matching target source operators, target data processing structures, and identification termination operators according to preset construction rules, so as to obtain target knowledge extraction matching the target source data. unit;

所述知识图谱的构建工具还用于调用目标知识提取单元处理目标源数据,得到对应的实体关系文件;并根据所述实体关系文件和所述定义参数文件,通过进行数据映射,生成与所述目标数据源关联的目标知识图谱。The construction tool of the knowledge graph is also used to call the target knowledge extraction unit to process the target source data to obtain the corresponding entity relationship file; and according to the entity relationship file and the definition parameter file, by performing data mapping, generate a The target knowledge graph associated with the target data source.

本说明书实施例还提供了一种知识图谱的构建装置,包括:The embodiments of this specification also provide a knowledge graph construction device, including:

获取模块,用于获取目标源数据;The acquisition module is used to acquire the target source data;

确定模块,用于确定目标源数据的数据结构类型;A determination module for determining the data structure type of the target source data;

第一构建模块,用于根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;a first building module, configured to build a target knowledge extraction unit matching the target source data according to a preset construction rule and the data structure type of the target source data;

调用模块,用于调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;a calling module, configured to call the target knowledge extraction unit to process the target source data, so as to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of ternary data groups; the ternary data groups At least two data objects connected by a data relationship are included;

第二构建模块,用于根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。The second building module is configured to build a target knowledge graph associated with the target source data according to the entity relationship file.

本说明书实施例还提供了一种服务器,包括处理器以及用于存储处理器可执行指令的存储器,所述处理器执行所述知识图谱的构建方法的步骤。An embodiment of the present specification further provides a server, including a processor and a memory for storing instructions executable by the processor, where the processor executes the steps of the method for constructing the knowledge graph.

本说明书实施例还提供了一种计算机存储介质,其上存储有计算机指令,所述指令被执行时实现所述知识图谱的构建方法的步骤。The embodiments of this specification also provide a computer storage medium, which stores computer instructions, and when the instructions are executed, implements the steps of the method for constructing the knowledge graph.

本说明书提供了一种知识图谱的构建方法、工具、装置和服务器,基于该知识图谱的构建方法,可以先确定出待处理的目标源数据的数据结构类型;再根据预设的构建规则和目标源数据的数据结构类型,构建得到与该目标源数据相匹配的、针对性较强的目标知识提取单元;进一步,可以调用上述目标知识提取单元来具体处理目标源数据,得到包含有多个三元数据组的符合要求的实体关系文件;再根据上述实体关系文件,构建得到与所述目标源数据关联的目标知识图谱。从而可以有效地简化用户侧操作,降低知识图谱的构建难度,使得用户可以高效、准确地构建得到满足多样化业务需求的、效果较好的知识图谱。This specification provides a method, tool, device and server for constructing a knowledge graph. Based on the method for constructing a knowledge graph, the data structure type of the target source data to be processed can be determined first; The data structure type of the source data is constructed to obtain a target knowledge extraction unit that matches the target source data and is highly targeted; further, the above target knowledge extraction unit can be called to specifically process the target source data, and the target knowledge extraction unit can be called. The entity relationship file that meets the requirements of the metadata group; and then constructs and obtains the target knowledge graph associated with the target source data according to the above entity relationship file. This can effectively simplify user-side operations, reduce the difficulty of building knowledge graphs, and enable users to efficiently and accurately build knowledge graphs that meet diverse business needs and have better effects.

附图说明Description of drawings

为了更清楚地说明本说明书实施例,下面将对实施例中所需要使用的附图作简单地介绍,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present specification more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments. The drawings in the following description are only some of the embodiments described in the present specification. In other words, on the premise of no creative labor, other drawings can also be obtained based on these drawings.

图1是应用本说明书实施例提供的知识图谱的构建方法的系统的结构组成的一个实施例的示意图;FIG. 1 is a schematic diagram of an embodiment of the structural composition of a system to which the method for constructing a knowledge graph provided by an embodiment of the present specification is applied;

图2是本说明书的一个实施例提供的知识图谱的构建工具的示意图;2 is a schematic diagram of a knowledge graph construction tool provided by an embodiment of this specification;

图3是本说明书的一个实施例提供的知识图谱的构建方法的流程示意图;3 is a schematic flowchart of a method for constructing a knowledge graph provided by an embodiment of this specification;

图4是本说明书的一个实施例提供的服务器的结构组成示意图;4 is a schematic diagram of the structural composition of a server provided by an embodiment of this specification;

图5是本说明书的一个实施例提供的知识图谱的构建装置的结构组成示意图;5 is a schematic structural diagram of a construction device for a knowledge graph provided by an embodiment of this specification;

图6是在一个具体的场景示例中应用本说明书实施例提供的知识图谱的构建方法的实施例示意图。FIG. 6 is a schematic diagram of an embodiment of applying the method for constructing a knowledge graph provided by an embodiment of this specification in a specific scenario example.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书一部分实施例,而不是全部的实施例。基于本说明书中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书保护的范围。In order to make those skilled in the art better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this specification. Obviously, the described The embodiments are only some of the embodiments of the present specification, but not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.

本说明书实施例提供了一种知识图谱的构建方法,该方法具体可以应用于包含有服务器和终端设备的系统中。具体可以参阅图1所示。其中,服务器和终端设备可以通过有线或无线的方式相连,以进行具体的数据交互。The embodiments of this specification provide a method for constructing a knowledge graph, and the method can be specifically applied to a system including a server and a terminal device. For details, please refer to Figure 1. Wherein, the server and the terminal device can be connected in a wired or wireless manner to perform specific data interaction.

在本实施例中,所述服务器具体可以包括一种应用于网络平台一侧,能够实现数据传输、数据处理等功能的后台服务器。具体的,所述服务器例如可以为一个具有数据运算、存储功能以及网络交互功能的电子设备。或者,所述服务器也可以为运行于该电子设备中,为数据处理、存储和网络交互提供支持的软件程序。在本实施例中,并不具体限定所述服务器所包含的服务器数量。所述服务器具体可以为一个服务器,也可以为几个服务器,或者,由若干服务器形成的服务器集群。In this embodiment, the server may specifically include a background server that is applied to the side of the network platform and can implement functions such as data transmission and data processing. Specifically, the server may be, for example, an electronic device with data computing, storage, and network interaction functions. Alternatively, the server may also be a software program running in the electronic device to provide support for data processing, storage and network interaction. In this embodiment, the number of servers included in the server is not specifically limited. The server may specifically be one server, or several servers, or a server cluster formed by several servers.

在本实施例中,所述终端设备具体可以包括一种应用于用户一侧,能够实现数据采集、数据传输等功能的前端电子设备。具体的,所述终端设备例如可以为台式电脑、平板电脑、笔记本电脑、智能手机等。或者,所述终端设备也可以为能够运行于上述电子设备中的软件应用。例如,可以是在智能手机上运行的某APP等。In this embodiment, the terminal device may specifically include a front-end electronic device that is applied to the user side and can implement functions such as data collection and data transmission. Specifically, the terminal device may be, for example, a desktop computer, a tablet computer, a notebook computer, a smart phone, and the like. Alternatively, the terminal device may also be a software application that can run in the above electronic device. For example, it may be an APP or the like running on a smartphone.

在本实施例中,上述服务器具体还可以与网络平台的图数据库相连,用于维护、管理网络平台的图数据库。其中,所述图数据库具体可以存储有多个知识图谱。上述终端设备具体还可以部署有知识图谱的构建工具。In this embodiment, the above-mentioned server may be specifically connected to a graph database of the network platform, and is used for maintaining and managing the graph database of the network platform. The graph database may specifically store multiple knowledge graphs. Specifically, the above-mentioned terminal device may also be deployed with a knowledge graph construction tool.

在本实施例中,当前用户需要对一批数据(例如,XX银行2020年客户的交易数据的流水记录)进行处理,以构建得到符合业务需求(例如,适用于分析客户是否存在违规交易风险)的目标知识图谱时,可以先在终端设备上发起针对知识图谱的构建工具的启动指令,以启动知识图谱的构建工具。In this embodiment, the current user needs to process a batch of data (for example, the transaction data of XX Bank's customers in 2020), so as to construct a collection that meets business needs (for example, it is suitable for analyzing whether customers have illegal transaction risks) When the target knowledge graph is set, a start command for the knowledge graph construction tool can be initiated on the terminal device to start the knowledge graph construction tool.

相应的,终端设备启动并向用户展示出知识图谱的构建工具的操作界面。具体可以参阅图2所示。进而用户可以利用上述知识图谱的构建工具,通过终端设备处理相应的目标源数据,以构建得到符合业务需求的目标知识图谱。Correspondingly, the terminal device starts and displays the operation interface of the knowledge graph construction tool to the user. For details, please refer to Figure 2. Then, the user can use the above-mentioned knowledge graph construction tool to process the corresponding target source data through the terminal device, so as to construct a target knowledge graph that meets business requirements.

在所展示的知识图谱的构建工具的操作界面中至少包含有源数据导入接口、第一处理界面、第二处理界面等结构。The operation interface of the displayed knowledge graph construction tool at least includes structures such as an active data import interface, a first processing interface, and a second processing interface.

具体实施时,首先,用户可以根据操作界面上的相关指示,利用源数据导入接口,选择并通过本地文件上传、HDFS文件导入、数据库表导入、第三方数据接入等多种导入方式导入待处理的一批数据,作为目标源数据。During the specific implementation, first, the user can use the source data import interface according to the relevant instructions on the operation interface, select and import the pending processing through various import methods such as local file upload, HDFS file import, database table import, third-party data access, etc. A batch of data is used as the target source data.

具体导入目标源数据时,用户还可以自定义导入方式,例如,可以选择使用源数据导入接口在导入目标源数据的过程中,通过源数据导入接口展示出待导入数据的预览信息;其中,上述预览信息具体可以是数据量参数(例如,数据的行数、列数、总数等),也可以是数据的内容参数(例如,数据的内容关键字、数据中前几行数据的预览、数据名称等)。这样用户在利用源数据导入接口导入目标源数据时,可以根据预览信息更加准确地进行导入操作,避免出现导入错误。When importing the target source data, the user can also customize the import method. For example, you can choose to use the source data import interface to display the preview information of the data to be imported through the source data import interface during the process of importing the target source data. The preview information can specifically be a data volume parameter (for example, the number of rows, columns, total number, etc. of the data), or it can be a content parameter of the data (for example, the content keyword of the data, the preview of the first few rows of data in the data, the data name, etc.) Wait). In this way, when the user uses the source data import interface to import the target source data, the user can perform the import operation more accurately according to the preview information to avoid import errors.

接着,用户可以利用第一处理界面,设置定义待构建的目标知识图谱中的数据对象的定义参数和/或数据关系的定义参数。Next, the user may use the first processing interface to set definition parameters for defining data objects and/or data relationships in the target knowledge graph to be constructed.

具体的,用户可以在第一处理界面中设置数据对象(或者称实体对象)的名称、属性、类型等作为数据对象的定义参数(例如,客户的姓名、客户的账户、客户的企业等)。用户也可以在第一处理界面中设置数据关系的名称、属性、类型等作为数据关系的定义参数(例如,数据对象之间的归属关系、数据对象之间的转账关系、数据对象之间的债务关系等)。Specifically, the user can set the name, attribute, type, etc. of the data object (or entity object) in the first processing interface as the definition parameters of the data object (for example, the customer's name, the customer's account, the customer's company, etc.). The user can also set the name, attribute, type, etc. of the data relationship as the definition parameters of the data relationship in the first processing interface (for example, the attribution relationship between the data objects, the transfer relationship between the data objects, the debt between the data objects). relationship, etc.).

相应的,终端设备可以通过上述第一处理界面接收用户所设置的数据对象的定义参数和/或数据关系的定义参数,并根据上述定义参数,生成关于目标知识图谱的定义参数文件。Correspondingly, the terminal device may receive the definition parameters of the data object and/or the definition parameters of the data relationship set by the user through the above-mentioned first processing interface, and generate a definition parameter file about the target knowledge graph according to the above-mentioned definition parameters.

通过上述方式,用户可以基于实际的业务需求,利用第一处理界面通过生成目标知识图谱的定义参数文件,灵活地完成对目标知识图谱的图谱结构的构建。In the above manner, the user can flexibly complete the construction of the graph structure of the target knowledge graph by generating a definition parameter file of the target knowledge graph by using the first processing interface based on actual business requirements.

当然,需要说明的是,具体实施时,也可以是用户先在第一处理界面中输入具体的业务需求;再由终端设备根据业务需求,结合目标源数据的数据特点,自动生成关于目标知识图谱的定义参数文件。Of course, it should be noted that, in the specific implementation, the user can also input specific business requirements in the first processing interface; then the terminal device can automatically generate the target knowledge graph according to the business requirements and the data characteristics of the target source data. definition parameter file.

然后,用户可以利用第二处理界面,根据预设的构建规则、目标源数据的数据结构类型,高效、简便地构建出与目标源数据匹配的,符合业务需求的目标知识提取单元。其中,上述目标知识提取单元用于处理目标源数据,以提取出用于生成目标知识图谱的实体关系文件。所述实体关系文件具体可以包含有基于目标源数据所提取得到的多个三元数据组。每一个三元数据组至少可以包括两个数据对象和一个数据关系,其中,同一个三元数据组中的两个数据对象可以通过数据关系相连。Then, the user can use the second processing interface to efficiently and simply construct a target knowledge extraction unit that matches the target source data and meets the business requirements according to the preset construction rules and the data structure type of the target source data. Wherein, the above-mentioned target knowledge extraction unit is used for processing the target source data to extract the entity relationship file for generating the target knowledge graph. Specifically, the entity relationship file may contain a plurality of triplet data groups extracted based on the target source data. Each triple data group may include at least two data objects and one data relationship, wherein two data objects in the same triple data group may be connected by a data relationship.

具体的,可以参阅图2所示,第二处理界面具体可以包括:菜单栏、主画布、参数配置栏等结构。其中,在上述菜单栏中具体可以展示有数据源算子选择框、数据处理结构选择框、标识终止算子选择框。在上述参数配置栏中具体可以提供针对数据源算子、数据处理结构、标识终止算子的参数配置接口。Specifically, as shown in FIG. 2 , the second processing interface may specifically include structures such as a menu bar, a main canvas, and a parameter configuration bar. Among them, in the above-mentioned menu bar, a selection box of data source operator, a selection box of data processing structure, and a selection box of identification termination operator can be displayed. In the above parameter configuration column, a parameter configuration interface for the data source operator, data processing structure, and identification termination operator can be provided.

进一步,上述数据源算子选择框具体可以包含有多个供用户选择的预设的数据源算子,例如,针对结构化数据的DATAS算子、针对非结构化数据的DATAU算子等。上述数据处理结构选择框具体可以包含有多个供用户选择的预设的数据处理结构,例如,与结构化数据匹配的多个预设的数据处理算子(包括:SQL算子、HIVE算子、SPARK算子等)、与非结构化数据或半结构化数据匹配的预先训练好的预设的三元组抽取模型等。上述标识终止算子选择框具体可以包含有多个供用户选择的预设的标识终止算子,例如,MDATAS算子等。Further, the above data source operator selection box may specifically include a plurality of preset data source operators for the user to select, for example, a DATAS operator for structured data, a DATAU operator for unstructured data, and the like. The above data processing structure selection box may specifically contain multiple preset data processing structures for the user to select, for example, multiple preset data processing operators (including: SQL operators, HIVE operators) that match structured data , SPARK operator, etc.), pre-trained preset triple extraction model matching unstructured data or semi-structured data, etc. The above identification termination operator selection box may specifically include a plurality of preset identification termination operators for the user to select, for example, MDATAS operators and the like.

具体的,用户可以基于预设的构建规则,结合具体的业务需求、目标源数据的数据结构类型,通过上述第二处理界面,先从菜单栏中选出相匹配的预设的数据源算子、预设的数据处理结构,以及预设的标识终止算子;同时,可以利用参数配置栏对所选出的预设的数据源算子、预设的数据处理结构,以及预设的标识终止算子,以得到对应的目标源算子、目标数据处理结构,以及目标标识终止算子;再通过主画布对上述目标源算子、目标数据处理结构,以及目标标识终止算子进行组合,得到满足用户的个性化的业务需求的,与目标源数据相匹配的目标知识提取单元。Specifically, based on the preset construction rules, the user can select the matching preset data source operator from the menu bar through the above-mentioned second processing interface in combination with the specific business requirements and the data structure type of the target source data. , the preset data processing structure, and the preset identification termination operator; at the same time, the selected preset data source operator, preset data processing structure, and preset identification termination can be selected using the parameter configuration column. operator to obtain the corresponding target source operator, target data processing structure, and target identification termination operator; and then combine the above target source operator, target data processing structure, and target identification termination operator through the main canvas to obtain A target knowledge extraction unit that matches the target source data to meet the user's personalized business needs.

例如,以目标源数据为XX银行2020年客户的交易数据的流水记录为例,首先,基于预设的构建规则,考虑到该目标源数据为通过数据库表导入的结构化数据,可以选择使用针对结构化数据的DATAS算子,并配置相应的导入参数,以对目标源数据的导入方式进行自定义设置,得到对应的目标源算子。同时,还可以选择使用适合于处理结构化数据的SQL算子,并配置相应的处理逻辑,以目标源数据的知识提取方式进行自定义设置,得到对应的目标数据处理结构。然后,考虑到具体的业务需求,可以选择使用MDATAS算子,并配置相应的提取参数(例如,待提取的数据对象的标识信息、待提取的数据关系的标识信息等),以对所提取出的数据对象、数据关系进行自定义设置,得到对应的目标标识终止算子。For example, taking the flow record of the target source data as the transaction data of XX Bank's customers in 2020 as an example, first, based on the preset construction rules, considering that the target source data is structured data imported through database tables, you can choose to use The DATAS operator of structured data, and configure the corresponding import parameters to customize the import method of the target source data to obtain the corresponding target source operator. At the same time, you can also choose to use SQL operators suitable for processing structured data, configure the corresponding processing logic, and perform custom settings in the way of knowledge extraction of the target source data to obtain the corresponding target data processing structure. Then, considering the specific business requirements, you can choose to use the MDATAS operator, and configure the corresponding extraction parameters (for example, the identification information of the data object to be extracted, the identification information of the data relationship to be extracted, etc.) The data objects and data relationships are customized and set, and the corresponding target identification termination operator is obtained.

接着,用户可以将上述目标源算子、目标数据处理结构,以及目标标识终止算子拖入主画布中,并按照目标源算子、目标数据处理结构、目标标识终止算子的顺序排列好;再利用连接线分别连接目标源算子和目标数据处理结构,以及目标数据处理结构和目标标识终止算子,完成组合,得到满足用户的业务需求的,与目标源数据匹配的目标知识提取单元。Next, the user can drag the above-mentioned target source operator, target data processing structure, and target identification termination operator into the main canvas, and arrange them in the order of the target source operator, target data processing structure, and target identification termination operator; Then use connecting lines to connect the target source operator and target data processing structure, as well as the target data processing structure and target identification termination operator, to complete the combination and obtain a target knowledge extraction unit that meets the user's business needs and matches the target source data.

通过上述方式,用户可以基于实际的业务需求,利用第二处理界面高效、便捷地构建得到符合要求的目标知识提取单元。In the above manner, the user can use the second processing interface to efficiently and conveniently construct a target knowledge extraction unit that meets the requirements based on actual business requirements.

当然,需要说明的是,具体实施时,上述过程也可以是终端设备基于预设的构建规则,根据目标源数据的数据结构类型、具体的业务需求,自动生成上述目标知识提取单元的。Of course, it should be noted that, in specific implementation, the above process may also be that the terminal device automatically generates the above target knowledge extraction unit according to the data structure type of target source data and specific business requirements based on preset construction rules.

在得到目标知识提取单元之后,用户可以在知识图谱的构建工具进行相应操作(例如,点击确认运行图标)发起运行指令。终端设备可以响应用户发起的运行指令,基于知识图谱的构建工具中的指令程序,调用目标指示提取单元处理目标源数据,以高效地从目标源数据中提取出用于构建目标知识图谱的三元数据组,进而对应的实体关系文件。After obtaining the target knowledge extraction unit, the user can perform a corresponding operation on the knowledge graph construction tool (for example, click the confirmation operation icon) to initiate an operation instruction. The terminal device can respond to the operation instruction initiated by the user, based on the instruction program in the knowledge graph construction tool, call the target instruction extraction unit to process the target source data, so as to efficiently extract the ternary used to construct the target knowledge graph from the target source data. Data group, and then the corresponding entity relationship file.

进一步,终端设备可以基于知识图谱的构建工具中的指令程序,根据所述实体关系文件和所述定义参数文件,通过进行数据映射,生成与所述目标数据源关联的目标知识图谱。Further, the terminal device can generate a target knowledge graph associated with the target data source by performing data mapping based on the instruction program in the knowledge graph construction tool and according to the entity relationship file and the definition parameter file.

通过上述方式,用户只需要进行简单的操作,就能够高效、准确地构建得到满足多样化业务需求的目标知识图谱。Through the above methods, users only need to perform simple operations to efficiently and accurately construct target knowledge graphs that meet diverse business needs.

在得到目标知识图谱之后,终端设备可以向用户展示出所述目标知识图谱,供用户查询使用目标知识图谱。After obtaining the target knowledge graph, the terminal device may display the target knowledge graph to the user for the user to query and use the target knowledge graph.

用户还可以利用知识图谱的构建工具通过终端设备对目标知识图谱进行修改、编辑,以及对目标知识图谱进行命名等操作。Users can also use the knowledge graph construction tool to modify and edit the target knowledge graph through the terminal device, and name the target knowledge graph.

此外,终端设备还可以为目标知识图谱设置相对应的目标标识(例如,可以将目标知识图谱的生成编号或者名称确定为与该目标知识图谱对应的目标标识);并将携带有目标标识的目标知识图谱发送至服务器。相应的,服务器可以将所接收到的携带有目标标识的目标知识图谱存储到图数据库中。In addition, the terminal device can also set a corresponding target identification for the target knowledge graph (for example, the generation number or name of the target knowledge graph can be determined as the target identification corresponding to the target knowledge graph); The knowledge graph is sent to the server. Correspondingly, the server may store the received target knowledge graph carrying the target identifier in the graph database.

后续,用户需要再次查询目标知识图谱时,可以通过终端设备生成并向服务器发送相关的目标查询语句。其中,目标查询语句至少携带有目标标识。Subsequently, when the user needs to query the target knowledge graph again, the terminal device can generate and send the relevant target query statement to the server. The target query statement carries at least a target identifier.

相应的,服务器接收目标查询语句;并根据目标查询语句所携带的目标标识检索图数据库,找到用户指示查询的目标知识图谱。接着,服务器可以响应目标查询语句,对该目标知识图谱进行具体的查询操作,得到对应的查询结果;再将该查询结果反馈给终端设备。Correspondingly, the server receives the target query sentence; and searches the graph database according to the target identifier carried by the target query sentence, and finds the target knowledge graph for the query indicated by the user. Then, the server can respond to the target query statement, perform a specific query operation on the target knowledge graph, and obtain a corresponding query result; and then feed the query result back to the terminal device.

终端设备接收并向用户展示出上述查询结果。The terminal device receives and displays the above query result to the user.

这样终端设备可以高效、便捷地完成对目标知识图谱的查询,得到所需要的查询结果。进而,终端设备可以根据查询结果进行进一步的数据处理。In this way, the terminal device can efficiently and conveniently complete the query on the target knowledge graph, and obtain the required query result. Furthermore, the terminal device can perform further data processing according to the query result.

例如,终端设备可以目标客户的交易数据的流向图,进一步分析目标客户的交易数据的流转是否存在异常;再以此作为依据判断该目标客户是否在违规交易风险(例如,洗钱风险、赌博风险等)。从而可以高效、准确地识别出存在违规交易风险的客户。For example, the terminal device can use the flow chart of the target customer's transaction data to further analyze whether the flow of the target customer's transaction data is abnormal; and then use this as a basis to determine whether the target customer is at risk of illegal transactions (for example, money laundering risk, gambling risk, etc. ). As a result, customers who are at risk of illegal transactions can be identified efficiently and accurately.

参阅图3所示,本说明书实施例提供了一种知识图谱的构建方法。其中,该方法具体实施时,可以包括以下内容。Referring to FIG. 3 , an embodiment of the present specification provides a method for constructing a knowledge graph. Wherein, when the method is specifically implemented, the following contents may be included.

S301:获取目标源数据。S301: Acquire target source data.

S302:确定目标源数据的数据结构类型。S302: Determine the data structure type of the target source data.

S303:根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元。S303: Build a target knowledge extraction unit matching the target source data according to the preset construction rule and the data structure type of the target source data.

S304:调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象。S304: Invoke the target knowledge extraction unit to process the target source data to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of triplet data groups; the triplet data group at least includes Two data objects connected by a data relation.

S305:根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。S305: Build a target knowledge graph associated with the target source data according to the entity relationship file.

通过上述实施例,可以有效地简化用户侧操作,降低知识图谱的构建难度,使得用户可以较为高效、准确地构建得到满足用户多样化业务需求的目标知识图谱。Through the above embodiments, user-side operations can be effectively simplified, and the difficulty of constructing a knowledge graph can be reduced, so that a user can efficiently and accurately construct a target knowledge graph that meets the user's diverse business needs.

在一些实施例中,上述目标源数据具体可以是指用于生成用户所需要的目标知识图谱的源数据。对应不同的应用场景和不同的业务需求,上述目标源数据具体可以是不同内容的数据。具体的,例如,在客户的交易风险预测场景中,上述目标源数据具体可以是客户的交易数据(例如,资产数据、理财数据等)的流水记录等。又例如,在历史人物的关系考证场景中,上述目标源数据具体还可以是不同历史人物之间的通信记录等。In some embodiments, the above-mentioned target source data may specifically refer to source data used to generate a target knowledge graph required by the user. Corresponding to different application scenarios and different business requirements, the above target source data may specifically be data of different contents. Specifically, for example, in a customer's transaction risk prediction scenario, the above-mentioned target source data may specifically be a flow record of the customer's transaction data (eg, asset data, wealth management data, etc.). For another example, in a scenario of verifying the relationship between historical figures, the above-mentioned target source data may specifically be communication records between different historical figures, and the like.

在一些实施例中,上述目标源数据具体可以包括多种不同数据结构类型的数据。具体的,所述目标源数据的数据结构类型具体可以包括以下至少之一:结构化数据、非结构化数据、半结构化数据等。In some embodiments, the above-mentioned target source data may specifically include data of various types of data structures. Specifically, the data structure type of the target source data may specifically include at least one of the following: structured data, unstructured data, semi-structured data, and the like.

其中,上述结构化数据具体可以是指一种满足预设的数据格式(例如,key-value的键值对格式等)的数据。通常对于某一个结构化数据,根据该数据所对应的预设的数据格式,能够相对较直接地确定出该数据所包含的不同数据的具体属性。例如,对于一个满足键值对格式的数据,能够较直接地确定出该数据中具体哪个数据是key值,哪个数据是value值The above-mentioned structured data may specifically refer to a data that satisfies a preset data format (for example, a key-value key-value pair format, etc.). Generally, for a certain structured data, according to the preset data format corresponding to the data, the specific attributes of different data contained in the data can be relatively directly determined. For example, for a data that satisfies the key-value pair format, it can be more directly determined which data in the data is the key value and which data is the value value

上述半结构化数据具体可以是指一种虽然不满足预设的数据格式,但仍然满足某些其他常规格式(例如,表格格式等)的数据。通常对于某一个半结构化数据,虽然无法像结构化数据那样较为直接地确定出该数据所包含的不同数据的具体属性;但是结合所对应的常规格式,通过一定的语义分析处理,也能够确定出该数据所包含的不同数据的具体属性。The above-mentioned semi-structured data may specifically refer to a data that does not satisfy a preset data format, but still satisfies some other conventional formats (eg, table format, etc.). Usually, for a certain semi-structured data, although the specific attributes of different data contained in the data cannot be determined as directly as structured data; but combined with the corresponding conventional format, through certain semantic analysis processing, it can also be determined. out the specific properties of the different data contained in the data.

上述非结构化数据具体可以是指一种不满足预设的数据格式,同时也不满足某些常规格式的数据,例如,交易订单中的一段文本留言等。通常对于非结构化数据,需要进行语义分析处理,才能确定出该数据所包含的不同数据的具体属性。The above-mentioned unstructured data may specifically refer to a kind of data that does not meet a preset data format and also does not meet certain conventional formats, for example, a text message in a transaction order. Usually, for unstructured data, semantic analysis processing is required to determine the specific attributes of different data contained in the data.

通过上述实施例,可以将本说明书实施例所提供的知识图谱的构建方法推广应用于处理多种不同的数据结构类型的目标源数据,以满足用户多样化的业务需求。Through the above embodiments, the knowledge graph construction method provided by the embodiments of this specification can be extended to process target source data of various data structure types, so as to meet the diverse business needs of users.

在一些实施例中,具体获取目标源数据时,对于结构化数据,可以通过以下所列举的获取方式任意一种来获取目标源数据:通过本地文件上传获取目标源数据;通过HDFS文件导入获取目标源数据;通过数据库表导入获取目标源数据等。In some embodiments, when specifically acquiring target source data, for structured data, the target source data can be acquired by any one of the following acquisition methods: acquiring the target source data by uploading a local file; acquiring the target by importing an HDFS file Source data; obtain target source data through database table import, etc.

对于半结构化数据和非结构化数据,可以通过以下所列举的获取方式任意一种来获取目标源数据:通过本地文件上传获取目标源数据;通过接入的第三方提供的数据获取目标源数据;通过接收其他分布式集群传输的数据获取目标源数据等。For semi-structured data and unstructured data, the target source data can be obtained by any of the following acquisition methods: obtain the target source data through local file upload; obtain the target source data through the data provided by the connected third party ; Obtain target source data by receiving data transmitted by other distributed clusters, etc.

在一些实施例中,为了能够更加高效地获取目标源数据,在具体通过HDFS文件导入获取目标源数据时,预先可以利用HDFS的特性,将目标源数据(对应HDFS元数据)的文件路径记录于数据库中;在需要获取目标源数据时,可以查询数据库得到并利用上述文件路径,直接访问获取相应的目标源数据。从而可以避免数据获取过程中的多次落地,提高目标源数据的获取效率。In some embodiments, in order to obtain the target source data more efficiently, when obtaining the target source data through HDFS file import, the characteristics of HDFS can be used in advance to record the file path of the target source data (corresponding to HDFS metadata) in the In the database; when you need to obtain the target source data, you can query the database to obtain and use the above file path to directly access and obtain the corresponding target source data. In this way, multiple landings in the data acquisition process can be avoided, and the acquisition efficiency of target source data can be improved.

在一些实施例中,具体实施时,可以检测并根据目标源数据的数据结构特征,确定出目标源数据的数据结构类型。In some embodiments, during specific implementation, the data structure type of the target source data may be detected and determined according to the data structure characteristics of the target source data.

在一些实施例中,为了能够较好地兼顾处理多种不同数据结构类型的目标源数据,可以先确定出目标源数据的数据结构类型;再根据目标源数据的数据结构类型,区分不同数据结构类型的目标源数据,针对不同数据结构类型的目标源数据,采用相匹配的方式进行处理,以构建得到符合用户的业务需求的目标知识图谱。In some embodiments, in order to better take into account the processing of target source data of multiple different data structure types, the data structure type of the target source data can be determined first; and then different data structures can be distinguished according to the data structure type of the target source data. Types of target source data, for target source data of different data structure types, are processed in a matching manner to construct a target knowledge graph that meets the user's business needs.

具体的,可以先区分出两大类:第一类(包括结构化数据)和第二类(包括非结构化数据和半结构化数据);再针对上述两大类,根据预设的构建规则构建出相匹配的目标知识提取单元;进而可以利用相匹配的目标知识提取单元来处理目标源数据,以构建得到对应的目标知识图谱。Specifically, two categories can be distinguished first: the first category (including structured data) and the second category (including unstructured data and semi-structured data); and then for the above two categories, according to preset construction rules A matching target knowledge extraction unit is constructed; further, the matching target knowledge extraction unit can be used to process the target source data, so as to construct a corresponding target knowledge graph.

在一些实施例中,上述根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元,具体实施时,可以包括以下内容:In some embodiments, the above-mentioned construction of a target knowledge extraction unit matching the target source data according to the preset construction rules and the data structure type of the target source data, when specifically implemented, may include the following content:

S1:根据预设的构建规则,从多个预设的数据源算子中筛选出与目标源数据对应的目标源算子;其中,所述目标源算子用于将所述目标源数据接入目标知识提取单元;S1: According to a preset construction rule, filter out a target source operator corresponding to the target source data from a plurality of preset data source operators; wherein, the target source operator is used to connect the target source data into the target knowledge extraction unit;

S2:根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构;其中,所述目标数据处理结构用于处理目标源数据以得到多个三元数据组;S2: Determine a matching target data processing structure according to the data structure type of the target source data; wherein, the target data processing structure is used to process the target source data to obtain a plurality of triplet data groups;

S3:确定并配置目标标识终止算子;其中,所述目标标识终止算子用于从目标数据处理结构输出的多个三元数据组中提取出符合要求的三元数据组以得到对应的实体关系文件;S3: Determine and configure a target identification termination operator; wherein the target identification termination operator is used to extract a required triplet data group from a plurality of triplet data groups output by the target data processing structure to obtain a corresponding entity relationship documents;

S4:组合所述目标源算子、目标数据处理结构和目标标识终止算子,得到与所述目标数据源匹配的目标知识提取单元。S4: Combine the target source operator, the target data processing structure and the target identification termination operator to obtain a target knowledge extraction unit matching the target data source.

通过上述实施例,可以基于预设的构建规则,结合目标源数据的数据结构类型等数据特征,准确地建立得到与目标源数据匹配的,符合用户的业务需求的目标知识提取单元。Through the above embodiments, a target knowledge extraction unit that matches the target source data and meets the user's business requirements can be accurately established based on the preset construction rules and in combination with data features such as the data structure type of the target source data.

在一些实施例中,上述根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构,具体实施时,可以包括以下内容:在确定目标源数据的数据结构类型为结构化数据的情况下,从多个预设的数据处理算子中筛选出初始处理算子;对所述初始处理算子进行相应配置,得到目标处理算子;并将所述目标处理算子确定为相匹配的目标数据处理结构。In some embodiments, according to the data structure type of the target source data, the matching target data processing structure is determined. In specific implementation, the following content may be included: When determining that the data structure type of the target source data is structured data In the case of , select an initial processing operator from a plurality of preset data processing operators; perform corresponding configuration on the initial processing operator to obtain a target processing operator; and determine the target processing operator as a relative The matching target data processing structure.

通过上述实施例,可以基于预设的构建规则,针对数据结构类型为结构化数据的目标源数据,确定出针对性较强、较为匹配的目标数据处理结构。Through the above-mentioned embodiment, based on the preset construction rules, for the target source data whose data structure type is structured data, a target data processing structure with strong pertinence and relatively matching can be determined.

在一些实施例中,可以根据用户的业务需求、目标源数据的数据特征,以及用户所偏好的编程语言等,从多个预设的数据处理算子筛选出符合要求的预设的数据处理算子作为初始处理算子。进一步,可以根据业务需求,对该初始处理算子进行处理逻辑的配置,从而可以得到较为匹配的目标数据处理结构。In some embodiments, according to the user's business requirements, the data characteristics of the target source data, and the user's preferred programming language, etc., a preset data processing operator that meets the requirements can be selected from a plurality of preset data processing operators. sub as the initial processing operator. Further, the initial processing operator can be configured with processing logic according to business requirements, so that a relatively matching target data processing structure can be obtained.

在一些实施例中,所述预设的数据处理算子具体可以包括以下至少之一:SQL算子、HIVE算子、SPARK算子等。In some embodiments, the preset data processing operator may specifically include at least one of the following: SQL operator, HIVE operator, SPARK operator, and the like.

当然,需要说明的是,上述所列举的预设的数据处理算子只是一种示意性说明。具体实施时,根据具体情况和所使用的编程语言,还可以引入其他类型的数据处理算子作为预设的数据处理算子。Of course, it should be noted that the preset data processing operators listed above are only a schematic illustration. During specific implementation, other types of data processing operators may also be introduced as preset data processing operators according to specific conditions and the programming language used.

通过上述实施例,针对数据结构类型为结构化数据的目标源数据,可以准备并提供多种可选的预设的数据处理算子,来得到符合要求的目标数据处理结构,从而可以得到匹配度相对更高、更加精准的目标数据处理结构。Through the above embodiment, for the target source data whose data structure type is structured data, a variety of optional preset data processing operators can be prepared and provided to obtain a target data processing structure that meets the requirements, so that the matching degree can be obtained. Relatively higher and more accurate target data processing structure.

在一些实施例中,上述根据所述目标源数据的数据结构类型,确定出相匹配的目标数据处理结构,具体实施时,还可以包括:在确定目标源数据的数据结构类型为非结构化数据或半结构化数据的情况下,将预设的三元组抽取模型确定为相匹配的目标数据处理结构。In some embodiments, determining a matching target data processing structure according to the data structure type of the target source data, in specific implementation, may further include: determining that the data structure type of the target source data is unstructured data Or in the case of semi-structured data, the preset triple extraction model is determined as the matching target data processing structure.

通过上述实施例,可以基于预设的构建规则,针对数据结构类型为非结构化数据或半结构化数据的目标源数据,确定出针对性较强、较为匹配的目标数据处理结构。Through the above-mentioned embodiments, based on the preset construction rules, for the target source data whose data structure type is unstructured data or semi-structured data, a more targeted and relatively matching target data processing structure can be determined.

在一些实施例中,上述预设的三元组抽取模型具体可以是指一种预先训练好的,基于语义识别能够从文本数据中提取出相应的三元数据组的模型。其中,上述三元数据组具体可以包含有通过数据关系相连的两个数据对象。In some embodiments, the above-mentioned preset triplet extraction model may specifically refer to a pre-trained model capable of extracting corresponding triplet data groups from text data based on semantic recognition. Wherein, the above-mentioned triple data group may specifically include two data objects connected by a data relationship.

在一些实施例中,在客户的交易风险预测场景中,上述数据对象具体可以是客户的姓名,也可以是客户的账户,还可以是客户的持股企业等等。上述数据关系具体可以是数据对象之间的转账关系,也可以是数据对象之间的利益归属关系,还可以是数据对象之间的债务关系等等。当然,上述所列举的数据对象、数据关系只是一种示意性说明。根据具体的应用场景和业务需求,上述数据对象、数据关系还可以是其他内容的数据。In some embodiments, in the client's transaction risk prediction scenario, the above-mentioned data object may specifically be the client's name, the client's account, or the client's shareholding company, or the like. The above-mentioned data relationship may specifically be a transfer relationship between data objects, a benefit attribution relationship between data objects, or a debt relationship between data objects, and so on. Of course, the data objects and data relationships listed above are only schematic descriptions. According to specific application scenarios and business requirements, the above-mentioned data objects and data relationships may also be data of other contents.

在一些实施例中,具体实施前,可以按照以下方式训练得到预设的三元组抽取模型:获取样本文本数据;标注出样本文本数据中存在数据关系的两个数据对象,得到标注后的样本文本数据;利用标注后的样本文本数据进行模型训练,以得到预设的三元组抽取模型。In some embodiments, before the specific implementation, a preset triplet extraction model can be obtained by training in the following ways: obtaining sample text data; marking two data objects with data relationships in the sample text data, and obtaining the marked sample Text data; use the labeled sample text data for model training to obtain a preset triple extraction model.

在一些实施例中,在确定目标源数据的数据结构类型之后,所述方法具体实施时,还可以包括以下内容:根据所述目标源数据的数据结构类型,从多个预设的知识提取单元中筛选出推荐的知识提取单元;向用户展示所述推荐的知识提取单元;将用户选中的推荐的知识提取单元确定为所述目标知识提取单元。In some embodiments, after the data structure type of the target source data is determined, when the method is specifically implemented, the method may further include the following content: extracting units from a plurality of preset knowledge according to the data structure type of the target source data The recommended knowledge extraction unit is screened out from the system; the recommended knowledge extraction unit is displayed to the user; the recommended knowledge extraction unit selected by the user is determined as the target knowledge extraction unit.

通过上述实施例,具体实施前,可以根据历史处理记录,针对多种相对较常见的目标源数据,以及相对较常见的业务需求,预先配置好多个预设的知识提取单元;具体实施时,可以先根据目标源数据的数据结构类型,从多个预设的知识提取单元中筛选出与目标源数据的数据结构类型匹配的预设的知识提取单元作为推荐的知识提取单元供用户选择;相应的,用户只需要根据具体的业务需求,从多个已有的推荐的知识提取单元中选出符合自己的业务需求的推荐知识提取单元作为目标知识提取单元即可。从而可以更加高效、便捷地得到符合用户的业务需求的目标知识提取单元。Through the above embodiment, before the specific implementation, a plurality of preset knowledge extraction units can be pre-configured according to historical processing records for various relatively common target source data and relatively common business requirements; First, according to the data structure type of the target source data, a preset knowledge extraction unit matching the data structure type of the target source data is selected from a plurality of preset knowledge extraction units as the recommended knowledge extraction unit for the user to select; corresponding , the user only needs to select a recommended knowledge extraction unit that meets his own business requirements from a plurality of existing recommended knowledge extraction units according to specific business requirements as the target knowledge extraction unit. Therefore, the target knowledge extraction unit that meets the user's business requirements can be obtained more efficiently and conveniently.

在一些实施例中,在构建得到目标知识提取单元之后,可以调用该目标知识提取单元处理目标源数据,以从目标源数据中提取出三元数据组;再从三元数据组中筛选出与用户的业务需求关联的三元数据组,构建得到符合要求的实体关系文件。其中,上述实体关系文件具体可以包含有多个与用户的业务需求关联的三元数据组。In some embodiments, after the target knowledge extraction unit is constructed and obtained, the target knowledge extraction unit can be called to process the target source data, so as to extract a triple data group from the target source data; The triple data group associated with the user's business requirements is constructed to obtain an entity relationship file that meets the requirements. Wherein, the above entity relationship file may specifically include a plurality of triple data groups associated with the user's business requirements.

在一些实施例中,根据所述实体关系文件,上述构建与所述目标源数据关联的目标知识图谱,具体实施时,可以包括以下内容:In some embodiments, according to the entity relationship file, the above-mentioned construction of the target knowledge graph associated with the target source data may include the following content during specific implementation:

S1:获取关于目标知识图谱的定义参数文件;其中,所述定义参数文件包括:数据对象的定义参数和/或数据关系的定义参数;S1: Obtain a definition parameter file about the target knowledge graph; wherein, the definition parameter file includes: definition parameters of data objects and/or definition parameters of data relationships;

S2:根据所述实体关系文件和所述定义参数文件,通过进行数据映射,生成与所述目标数据源关联的目标知识图谱。S2: Generate a target knowledge graph associated with the target data source by performing data mapping according to the entity relationship file and the definition parameter file.

通过上述实施例,可以利用实体关系文件和定义参数文件,通过数据映射,高效、准确地构建得到用户所需要的目标知识图谱。Through the above embodiments, the entity relationship file and the definition parameter file can be used to efficiently and accurately construct the target knowledge graph required by the user through data mapping.

在一些实施例中,上述目标知识图谱具体可以是一种包含有多个节点和连接边的图。其中,每一个节点对应一个数据对象,每一个连接边对应至少一个数据关系。并且,节点之间通过连接边相连。In some embodiments, the above-mentioned target knowledge graph may specifically be a graph including a plurality of nodes and connecting edges. Among them, each node corresponds to a data object, and each connection edge corresponds to at least one data relationship. And, the nodes are connected by connecting edges.

在一些实施例中,在根据所述实体关系文件和所述定义参数文件,具体进行数据映射时,可以根据实体关系文件,将定义参数文件中的数据对象映射成一个节点,将数据关系映射成一个连接边,并转换成对应的图数据,从而可以构建得到目标知识图谱。In some embodiments, when performing data mapping according to the entity relationship file and the definition parameter file, the data object in the definition parameter file may be mapped to a node according to the entity relationship file, and the data relationship may be mapped to a node. A connected edge is converted into the corresponding graph data, so that the target knowledge graph can be constructed.

在一些实施例中,在具体构建目标知识图谱时,还可以根据实体关系文件和定义参数文件,确定出节点的属性信息和/或连接边的属性信息;并对知识图谱中对应节点和/或连接边进行属性信息标注,从而可以得到数据内容相对更加丰富、效果相对更好的目标知识图谱。In some embodiments, when specifically constructing the target knowledge graph, the attribute information of the node and/or the attribute information of the connecting edge can also be determined according to the entity relationship file and the definition parameter file; The attribute information is labeled by connecting the edges, so that the target knowledge graph with relatively richer data content and better effect can be obtained.

在一些实施例中,所述定义参数文件具体还可以包括:索引定义参数;相应的,在根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱的过程中,所述方法具体实施时,还可以包括:根据所述索引定义参数,利用数据对象的定义参数和/或数据关系的定义参数,构建针对所述目标知识图谱的目标查询索引。In some embodiments, the definition parameter file may further include: index definition parameters; correspondingly, in the process of constructing a target knowledge graph associated with the target source data according to the entity relationship file, the method In a specific implementation, the method may further include: constructing a target query index for the target knowledge graph by using the definition parameters of the data object and/or the definition parameters of the data relationship according to the index definition parameters.

通过上述实施例,在构建目标知识图谱的同时,还可以根据定义参数文件中的索引定义参数,构建得到针对该目标知识图谱的目标查询索引,以便后续可以利用目标查询索引,更加高效地使用和查询该目标知识图谱。Through the above embodiment, while constructing the target knowledge graph, the target query index for the target knowledge graph can also be constructed and obtained according to the index definition parameters in the definition parameter file, so that the target query index can be used later to more efficiently use and Query the target knowledge graph.

在一些实施例中,具体实施时,可以将所构建得到的目标知识图谱,连同对应的目标查询索引一同存入图数据库中,便于后续使用。In some embodiments, during specific implementation, the constructed target knowledge graph may be stored in the graph database together with the corresponding target query index, so as to facilitate subsequent use.

在一些实施例中,考虑到在批量构建多个数据量较大的目标源数据的目标知识图谱时,往往需要耗费大量的数据处理资源,容易对系统(或者服务器、终端设备等)形成较大的处理负荷,影响系统整体运行的稳定性。因此,在批量构建多个目标知识图谱时,系统还可以被设置为先预估各个目标知识图谱构建时所需要数据处理量是否大于预设的阈值处理量。其中,上述预设的阈值处理量具体可以根据系统的整体处理性能确定。In some embodiments, considering that when constructing multiple target knowledge graphs of target source data with a large amount of data in batches, a large amount of data processing resources are often consumed, which is easy to cause a large amount of damage to the system (or server, terminal device, etc.). The processing load affects the stability of the overall operation of the system. Therefore, when constructing multiple target knowledge graphs in batches, the system can also be set to first estimate whether the data processing amount required for constructing each target knowledge graph is greater than a preset threshold processing amount. The above-mentioned preset threshold processing amount may be specifically determined according to the overall processing performance of the system.

在确定目标知识图谱构建时所需要的数据处理量小于预设的阈值处理量时,系统可以正常加载数据,处理并构建得到对应的目标知识图谱。When it is determined that the data processing amount required for the construction of the target knowledge graph is less than the preset threshold processing amount, the system can load the data normally, process and construct the corresponding target knowledge graph.

在确定目标知识图谱构建时所需要的数据处理量大于或等于预设的阈值处理时,系统可以暂停加载数据,以及目标知识图谱的构建处理,并提示发起该目标知识图谱的用户,该目标知识图谱的构建处理需要先进行审批,在审批通过的情况下才能正常执行。此外,系统也可以实时监测系统的负荷状态,在确定系统的负荷状态允许构建处理该目标知识图谱的情况下,再恢复加载数据,并进行相应的目标知识图谱的构建处理。从而可以保护系统整体的运行稳定、可靠。When it is determined that the amount of data processing required for the construction of the target knowledge graph is greater than or equal to the preset threshold processing, the system can suspend the loading of data and the construction processing of the target knowledge graph, and prompt the user who initiated the target knowledge graph, the target knowledge graph The construction and processing of the graph needs to be approved first, and can be executed normally only after the approval is passed. In addition, the system can also monitor the load status of the system in real time. When the load status of the system is determined to allow the construction and processing of the target knowledge graph, the loaded data is restored and the corresponding target knowledge graph is constructed and processed. Thereby, the stable and reliable operation of the whole system can be protected.

在一些实施例中,在根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱之后,所述方法具体实施时,还可以包括以下内容:接收目标查询语句;其中,所述目标查询语句至少携带有目标知识图谱的目标标识;根据所述目标标识,检索图数据库,以确定出目标知识图谱;响应所述目标查询语句,对所述目标知识图谱进行查询操作,以得到对应的查询结果;反馈所述查询结果。In some embodiments, after the target knowledge graph associated with the target source data is constructed according to the entity relationship file, when the method is specifically implemented, the method may further include the following content: receiving a target query statement; wherein, the The target query sentence carries at least the target identification of the target knowledge graph; according to the target identification, the graph database is retrieved to determine the target knowledge graph; in response to the target query sentence, a query operation is performed on the target knowledge graph to obtain the corresponding the query result; feedback the query result.

通过上述实施例,可以响应用户发起的目标查询语句,高效地从图数据库中找出对应的目标知识图谱进行查询操作,以及时地向用户反馈相关的查询结果。Through the above embodiment, it is possible to efficiently find out the corresponding target knowledge graph from the graph database in response to the target query statement initiated by the user, and perform the query operation, and timely feedback the relevant query result to the user.

在一些实施例中,在确定出目标知识图谱之后,还可以检测图数据库中是否存储有目标知识图谱的目标查询索引;在检测到目标查询索引的情况下,可以响应目标查询语句,结合目标查询索引,更加高效、精准地对目标知识图谱进行查询操作,从而可以进一步提高查询效率,改善用户的查询体验。In some embodiments, after the target knowledge graph is determined, it can also be detected whether the target query index of the target knowledge graph is stored in the graph database; when the target query index is detected, the target query statement can be responded to, combined with the target query The index can be used to query the target knowledge graph more efficiently and accurately, which can further improve the query efficiency and improve the user's query experience.

在一些实施例中,所述目标源数据包括客户的交易数据的流水记录;相应的,所述查询结果包括目标客户的交易数据的流向图。In some embodiments, the target source data includes a flow record of the customer's transaction data; correspondingly, the query result includes a flow diagram of the target customer's transaction data.

具体的,例如,在客户的交易风险预测场景中,上述交易数据可以是资金数据,查询结果可以是目标客户的资金数据的流向图。具体实施时,可以根据目标客户的资金数据的流向图分析该目标客户的资金数据的流转是否存在异常,进而可以判断该目标客户是否存在相应的交易风险(例如,洗钱风险、赌博风险、欺诈风险等)。Specifically, for example, in a client's transaction risk prediction scenario, the transaction data may be capital data, and the query result may be a flow chart of the target client's capital data. During specific implementation, it is possible to analyze whether the flow of the target customer's capital data is abnormal according to the flow diagram of the target customer's capital data, and then it can be judged whether the target customer has corresponding transaction risks (for example, money laundering risk, gambling risk, fraud risk) Wait).

通过上述实施例,可以较好地将本说明书实施例所提供的知识图谱的构建方法应用于客户的交易风险的预测场景中,以利用所构建出的目标知识图谱来准确、高效地预测目标客户是否存在相应的交易风险。Through the above embodiments, the construction method of the knowledge graph provided by the embodiments of this specification can be better applied to the prediction scenario of the customer's transaction risk, so as to use the constructed target knowledge graph to accurately and efficiently predict the target customer Whether there are corresponding transaction risks.

由上可见,本说明书实施例提供的知识图谱的构建方法,基于该知识图谱的构建方法,可以先确定出待处理的目标源数据的数据结构类型;再根据预设的构建规则和目标源数据的数据结构类型,构建得到与该目标源数据相匹配的目标知识提取单元;进一步,可以调用上述目标知识提取单元来具体处理目标源数据,得到包含有多个三元数据组的符合要求的实体关系文件;再根据上述实体关系文件,构建得到与所述目标源数据关联的目标知识图谱。从而可以有效地简化用户侧操作,降低知识图谱的构建难度,使得用户可以高效、准确地构建得到满足多样化业务需求的、效果较好的知识图谱。It can be seen from the above that the construction method of the knowledge graph provided by the embodiments of this specification, based on the construction method of the knowledge graph, can first determine the data structure type of the target source data to be processed; then according to the preset construction rules and target source data The target knowledge extraction unit that matches the target source data is constructed and obtained; further, the above target knowledge extraction unit can be called to specifically process the target source data, and an entity that meets the requirements containing multiple triple data groups can be obtained. relationship file; and then construct a target knowledge graph associated with the target source data according to the entity relationship file. This can effectively simplify user-side operations, reduce the difficulty of building knowledge graphs, and enable users to efficiently and accurately build knowledge graphs that meet diverse business needs and have better effects.

参阅图2所示,本说明书实施例还提供了一种知识图谱的构建工具。该知识图谱的构建工具至少可以包括:源数据导入接口、第一处理界面、第二处理界面;其中,Referring to FIG. 2 , an embodiment of the present specification further provides a knowledge graph construction tool. The knowledge graph construction tool may at least include: a source data import interface, a first processing interface, and a second processing interface; wherein,

所述源数据导入接口,具体可以用于支持用户导入目标源数据;The source data import interface can specifically be used to support users to import target source data;

所述第一处理界面,具体可以用于支持用户设置目标知识图谱中的数据对象的定义参数和/或数据关系的定义参数,以生成关于目标知识图谱的定义参数文件;The first processing interface can specifically be used to support the user to set the definition parameters of the data objects and/or the definition parameters of the data relationships in the target knowledge graph, so as to generate a definition parameter file about the target knowledge graph;

所述第二处理界面,具体可以用于支持用户根据预设的构建规则,确定并组合相匹配的目标源算子、目标数据处理结构、标识终止算子,以得到与目标源数据匹配的目标知识提取单元;The second processing interface can specifically be used to support the user to determine and combine matching target source operators, target data processing structures, and identification termination operators according to preset construction rules, so as to obtain targets matching the target source data. knowledge extraction unit;

所述知识图谱的构建工具用于调用目标知识提取单元处理目标源数据,得到对应的实体关系文件;并根据所述实体关系文件和所述定义参数文件,通过进行数据映射,生成与所述目标数据源关联的目标知识图谱。The construction tool of the knowledge graph is used to call the target knowledge extraction unit to process the target source data, and obtain the corresponding entity relationship file; and according to the entity relationship file and the definition parameter file, by performing data mapping, generate a The target knowledge graph associated with the data source.

通过上述实施例,用户可以利用上述知识图谱的构建工具,高效、便捷地实现一站式构建得到满足多样化业务需求的目标知识图谱,从而可以有效地简化用户侧操作,降低知识图谱的构建难度,改善了用户的使用体验。Through the above embodiments, users can use the above knowledge graph construction tools to efficiently and conveniently realize one-stop construction to obtain target knowledge graphs that meet diverse business needs, thereby effectively simplifying user-side operations and reducing the difficulty of building knowledge graphs , which improves the user experience.

本说明书实施例还提供一种服务器,包括处理器以及用于存储处理器可执行指令的存储器,所述处理器具体实施时可以根据指令执行以下步骤:获取目标源数据;确定目标源数据的数据结构类型;根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。Embodiments of the present specification further provide a server, including a processor and a memory for storing instructions executable by the processor. When specifically implemented, the processor may perform the following steps according to the instructions: acquiring target source data; determining data of the target source data structure type; according to the preset construction rule and the data structure type of the target source data, construct a target knowledge extraction unit matching the target source data; call the target knowledge extraction unit to process the target source data to obtain An entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of ternary data groups; the ternary data group includes at least two data objects connected by a data relationship; according to the entity relationship file, constructing A target knowledge graph associated with the target source data.

为了能够更加准确地完成上述指令,参阅图4所示,本说明书实施例还提供了另一种具体的服务器,其中,所述服务器包括网络通信端口401、处理器402以及存储器403,上述结构通过内部线缆相连,以便各个结构可以进行具体的数据交互。In order to more accurately complete the above instructions, referring to FIG. 4 , the embodiment of this specification also provides another specific server, wherein the server includes a network communication port 401 , a processor 402 and a memory 403 , and the above structure is achieved by Internal cables are connected so that each structure can carry out specific data interaction.

其中,所述网络通信端口401,具体可以用于获取目标源数据。Specifically, the network communication port 401 may be used to acquire target source data.

所述处理器402,具体可以用于确定目标源数据的数据结构类型;根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。The processor 402 can specifically be used to determine the data structure type of the target source data; build a target knowledge extraction unit matching the target source data according to a preset construction rule and the data structure type of the target source data; Invoke the target knowledge extraction unit to process the target source data to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of triple data groups; Two data objects connected by a relationship; build a target knowledge graph associated with the target source data according to the entity relationship file.

所述存储器403,具体可以用于存储相应的指令程序。The memory 403 may specifically be used to store corresponding instruction programs.

在本实施例中,所述网络通信端口401可以是与不同的通信协议进行绑定,从而可以发送或接收不同数据的虚拟端口。例如,所述网络通信端口可以是负责进行web数据通信的端口,也可以是负责进行FTP数据通信的端口,还可以是负责进行邮件数据通信的端口。此外,所述网络通信端口还可以是实体的通信接口或者通信芯片。例如,其可以为无线移动网络通信芯片,如GSM、CDMA等;其还可以为Wifi芯片;其还可以为蓝牙芯片。In this embodiment, the network communication port 401 may be a virtual port bound with different communication protocols, so that different data can be sent or received. For example, the network communication port may be a port responsible for web data communication, a port responsible for FTP data communication, or a port responsible for mail data communication. In addition, the network communication port may also be a physical communication interface or a communication chip. For example, it can be a wireless mobile network communication chip, such as GSM, CDMA, etc.; it can also be a Wifi chip; it can also be a Bluetooth chip.

在本实施例中,所述处理器402可以按任何适当的方式实现。例如,处理器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application SpecificIntegrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式等等。本说明书并不作限定。In this embodiment, the processor 402 may be implemented in any suitable manner. For example, a processor may take the form of, for example, a microprocessor or a processor and a computer readable medium storing computer readable program code (eg software or firmware) executable by the (micro)processor, logic gates, switches, application specific integrated circuits ( Application Specific Integrated Circuit, ASIC), programmable logic controller and embedded microcontroller form, etc. This manual is not limited.

在本实施例中,所述存储器403可以包括多个层次,在数字系统中,只要能保存二进制数据的都可以是存储器;在集成电路中,一个没有实物形式的具有存储功能的电路也叫存储器,如RAM、FIFO等;在系统中,具有实物形式的存储设备也叫存储器,如内存条、TF卡等。In this embodiment, the memory 403 may include multiple layers. In a digital system, as long as it can store binary data, it can be a memory; in an integrated circuit, a circuit with a storage function without physical form is also called a memory , such as RAM, FIFO, etc.; in the system, the storage device with physical form is also called memory, such as memory stick, TF card, etc.

本说明书实施例还提供了一种基于上述知识图谱的构建方法的计算机存储介质,所述计算机存储介质存储有计算机程序指令,在所述计算机程序指令被执行时实现:获取目标源数据;确定目标源数据的数据结构类型;根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。The embodiments of this specification also provide a computer storage medium based on the above-mentioned method for constructing a knowledge graph, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, realizes: acquiring target source data; determining a target The data structure type of the source data; according to the preset construction rules and the data structure type of the target source data, construct a target knowledge extraction unit that matches the target source data; call the target knowledge extraction unit to process the target source data to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of triple data groups; the triple data group includes at least two data objects connected by a data relationship; according to the entity A relationship file to construct a target knowledge graph associated with the target source data.

在本实施例中,上述存储介质包括但不限于随机存取存储器(Random AccessMemory,RAM)、只读存储器(Read-Only Memory,ROM)、缓存(Cache)、硬盘(Hard DiskDrive,HDD)或者存储卡(Memory Card)。所述存储器可以用于存储计算机程序指令。网络通信单元可以是依照通信协议规定的标准设置的,用于进行网络连接通信的接口。In this embodiment, the above-mentioned storage medium includes but is not limited to random access memory (Random Access Memory, RAM), read-only memory (Read-Only Memory, ROM), cache (Cache), hard disk (Hard DiskDrive, HDD) or storage Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set according to a standard specified by a communication protocol.

在本实施例中,该计算机存储介质存储的程序指令具体实现的功能和效果,可以与其它实施方式对照解释,在此不再赘述。In this embodiment, the functions and effects specifically implemented by the program instructions stored in the computer storage medium can be explained in comparison with other embodiments, and will not be repeated here.

参阅图5所示,在软件层面上,本说明书实施例还提供了一种知识图谱的构建装置,该装置具体可以包括以下的结构模块:Referring to FIG. 5 , at the software level, the embodiments of this specification also provide a knowledge graph construction device, which may specifically include the following structural modules:

获取模块501,具体可以用于获取目标源数据;Obtaining module 501, which can specifically be used to obtain target source data;

确定模块502,具体可以用于确定目标源数据的数据结构类型;A determination module 502, which can specifically be used to determine the data structure type of the target source data;

第一构建模块503,具体可以用于根据预设的构建规则和所述目标源数据的数据结构类型,构建与所述目标源数据匹配的目标知识提取单元;The first construction module 503 can be specifically configured to construct a target knowledge extraction unit matching the target source data according to the preset construction rule and the data structure type of the target source data;

调用模块504,具体可以用于调用所述目标知识提取单元处理所述目标源数据,以得到符合要求的实体关系文件;其中,所述实体关系文件包含有多个三元数据组;所述三元数据组至少包括通过一个数据关系相连的两个数据对象;The calling module 504 can be specifically configured to call the target knowledge extraction unit to process the target source data to obtain an entity relationship file that meets the requirements; wherein, the entity relationship file contains a plurality of triple data groups; the three The metadata group includes at least two data objects connected by a data relationship;

第二构建模块505,具体可以用于根据所述实体关系文件,构建与所述目标源数据关联的目标知识图谱。The second building module 505 may be specifically configured to build a target knowledge graph associated with the target source data according to the entity relationship file.

需要说明的是,上述实施例阐明的单元、装置或模块等,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书时可以把各模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。It should be noted that the units, devices or modules described in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. For the convenience of description, when describing the above device, the functions are divided into various modules and described respectively. Of course, when implementing this specification, the functions of each module can be implemented in the same one or more software and/or hardware, and the modules that implement the same function can also be implemented by a combination of multiple sub-modules or sub-units. The apparatus embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

由上可见,本说明书实施例提供的知识图谱的构建装置,可以有效地简化用户侧操作,降低知识图谱的构建难度,使得用户可以高效、准确地构建得到满足多样化业务需求的、效果较好的知识图谱。It can be seen from the above that the apparatus for constructing a knowledge graph provided by the embodiments of this specification can effectively simplify user-side operations, reduce the difficulty of constructing a knowledge graph, and enable users to efficiently and accurately construct solutions that meet diverse business needs with better effects. knowledge graph.

在一个具体的场景示例中,可以应用本说明书实施例提供的知识图谱的构建方法导入数据以构建得到对应的知识图谱。具体实施过程可以参阅图6所示,包括以下步骤。In a specific scenario example, the method for constructing a knowledge graph provided in the embodiments of this specification can be used to import data to construct a corresponding knowledge graph. The specific implementation process can be referred to as shown in FIG. 6, including the following steps.

步骤1:将各类型数据(例如,多种不同数据结构类型的目标源数据)导入系统。Step 1: Import various types of data (eg, target source data of multiple different data structure types) into the system.

步骤2:根据场景需求构建图谱结构(例如,生成对应的定义参数文件)。Step 2: Build a graph structure according to the scene requirements (for example, generate a corresponding definition parameter file).

在本场景示例中,图谱结构的构建可以包括:定义图谱中包含的实体信息(例如,数据对象的定义参数)、关系信息(例如,数据关系的定义参数)、实体关系的属性信息以及索引信息。具体的,例如,可以定义实体VERTEX包括但不限VERTEX的类型标签、VERTEX的各类属性;定义关系EDGE包括但不限于EDGE的类型标签、EDGE的起始点类型、EDGE的各类属性。对于有特定查询需求的场景,可通过构建索引(例如,目标查询索引)以提升后续查询的效率,具体可以构建在实体、关系或属性及三者的组合上。例如,可以在VERTEX上构建点索引已提升有以点开始查询需求的场景的查询效率。In this scenario example, the construction of the graph structure may include: defining entity information contained in the graph (for example, definition parameters of data objects), relationship information (for example, definition parameters of data relationships), attribute information of entity relationships, and index information . Specifically, for example, the entity VERTEX can be defined to include but not limited to the type label of VERTEX and various attributes of VERTEX; the definition relation EDGE includes but not limited to the type label of EDGE, the starting point type of EDGE, and various attributes of EDGE. For scenarios with specific query requirements, an index (for example, a target query index) can be constructed to improve the efficiency of subsequent queries, which can be specifically constructed on entities, relationships or attributes, and combinations of the three. For example, a point index can be built on VERTEX to improve query efficiency in scenarios that require a query to start with a point.

步骤3:对各类型数据进行结构化处理(以得到对应的实体关系文件)。Step 3: Perform structured processing on various types of data (to obtain corresponding entity relationship files).

在本场景示例中,对于结构化数据,首先可以在(第二处理界面中的)主侧边栏选择需要处理的结构化数据DATAS算子(例如,目标源算子),拖入主画布。其次在主侧边栏选择数据处理算子,如SQL算子,在配置侧边栏中填写SQL算子具体处理逻辑(得到目标数据处理结构),点击运行算子。运行成功后选择标识终止算子,填写终止算子名称MDATAS(得到目标标识终止算子),点击运行算子直至运行成功。In this scenario example, for structured data, you can first select the structured data DATAS operator (for example, the target source operator) to be processed in the main sidebar (in the second processing interface), and drag it into the main canvas. Next, select a data processing operator in the main sidebar, such as an SQL operator, fill in the specific processing logic of the SQL operator (get the target data processing structure) in the configuration sidebar, and click Run the operator. After the operation is successful, select the identification termination operator, fill in the termination operator name MDATAS (get the target identification termination operator), and click the operation operator until the operation is successful.

对于非结构化数据或半结构化数据,类似的,首先拖入非结构化数据DATAU,然后选择以训练好的模型算子(例如,预设的三元组抽取模型),点击运行预测,待算子运行成功后,选择标识终止算子MDATAU直至运行成功。For unstructured data or semi-structured data, similarly, first drag in the unstructured data DATAU, then select the trained model operator (for example, the preset triple extraction model), click to run the prediction, wait After the operator runs successfully, select the flag to terminate the operator MDATAU until the operation is successful.

步骤4:将本体与数据进行知识映射。Step 4: Perform knowledge mapping on ontology and data.

在本场景示例中,首先,可以在全量数据中选择将要使用的数据源作为候选数据源,其次选择即将被映射的本体模型。然后,选择本体模型中的某一实体VERTEX,选择VERTEX对应的数据源MDATAS。最后,对于VERTEX的每一个属性,选择MDATAS的一个字段与之一一映射。以此类推,将所有的实体关系与实体关系数据源文件进行映射。In this scenario example, first, the data source to be used can be selected as a candidate data source from the full data, and secondly, the ontology model to be mapped can be selected. Then, select an entity VERTEX in the ontology model, and select the data source MDATAS corresponding to VERTEX. Finally, for each attribute of VERTEX, choose a field of MDATAS to map to one of them. And so on, map all entity relationships with entity relationship data source files.

步骤5:将图结构与数据导入数据库(生成对应的知识图谱,并存入图数据库)。Step 5: Import the graph structure and data into the database (generate the corresponding knowledge graph and store it in the graph database).

在本场景实施例中,在生成并存储知识图谱时,还可以填写图谱的一些配置信息,包括但不限于图名称等。再点击图导入一键批量将本体模型及数据导入知识图谱。In the embodiment of this scenario, when generating and storing the knowledge graph, some configuration information of the graph can also be filled in, including but not limited to the graph name and the like. Then click on the image import button to import the ontology model and data into the knowledge graph in batches.

步骤6:通过可视化模块对图谱进行可视化展示。Step 6: Visually display the map through the visualization module.

在本场景示例中,用户需要查询图谱数据时,可以填写并发送相应的查询语句,对图谱数据进行查询并对查询结果进行可视化展示。In this scenario example, when the user needs to query the graph data, he can fill in and send the corresponding query statement to query the graph data and visualize the query results.

通过上述场景示例,验证了本说明书实施例所提供的知识图谱的构建方法是一种一站式,较为简便、高效的方法,具有如下优势:一是为使用知识图谱技术进行分析探查的无技术背景的业务人员提供简单高效的图谱构建与可视化展示平台,对于构建的每个环节都提出了易用性优化,解决了图谱有大量可用场景却技术高门槛的劣势;二是综合考虑并总结提取了图谱构建过程中不可或缺的几大方面,组成简单易用低门槛的一站式图谱构建系统,图谱构建各流程参考ETL进行模块拆分,相较业内已有流程,更清晰明了展示图谱构建的各个流程,契合用户思维认知逻辑,为图谱构建工具的打造提供了新思路;三是对于知识抽取模块,提出一种基于DAG的数据处理流程,相较常见的规则模型,更加强大易用。Through the above scenario examples, it is verified that the construction method of the knowledge graph provided by the embodiments of this specification is a one-stop, relatively simple and efficient method, and has the following advantages: First, it is a non-technical method for analyzing and exploring using the knowledge graph technology. The background business personnel provide a simple and efficient graph construction and visual display platform, and proposes ease of use optimization for each link of the construction, which solves the disadvantage that the graph has a large number of available scenarios but a high technical threshold; the second is to comprehensively consider and summarize the extraction. The indispensable aspects of the map construction process are formed into a one-stop map construction system that is simple and easy to use The construction processes are in line with the user's cognitive and cognitive logic, providing new ideas for the creation of graph construction tools; thirdly, for the knowledge extraction module, a DAG-based data processing process is proposed, which is more powerful and easier than common rule models. use.

虽然本说明书提供了如实施例或流程图所述的方法操作步骤,但基于常规或者无创造性的手段可以包括更多或者更少的操作步骤。实施例中列举的步骤顺序仅仅为众多步骤执行顺序中的一种方式,不代表唯一的执行顺序。在实际中的装置或客户端产品执行时,可以按照实施例或者附图所示的方法顺序执行或者并行执行(例如并行处理器或者多线程处理的环境,甚至为分布式数据处理环境)。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、产品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、产品或者设备所固有的要素。在没有更多限制的情况下,并不排除在包括所述要素的过程、方法、产品或者设备中还存在另外的相同或等同要素。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。Although the present specification provides method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-inventive means. The sequence of steps enumerated in the embodiments is only one of the execution sequences of many steps, and does not represent the only execution sequence. When an actual device or client product is executed, the methods shown in the embodiments or the accompanying drawings may be executed sequentially or in parallel (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, product or device comprising a list of elements includes not only those elements, but also others not expressly listed elements, or also include elements inherent to such a process, method, product or device. Without further limitation, it does not preclude the presence of additional identical or equivalent elements in a process, method, product or apparatus comprising the stated elements. The terms first, second, etc. are used to denote names and do not denote any particular order.

本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内部包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, the controller can be implemented as logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded devices by logically programming the method steps. The same function can be realized in the form of a microcontroller, etc. Therefore, such a controller can be regarded as a hardware component, and the devices included therein for realizing various functions can also be regarded as a structure within the hardware component. Or even, the means for implementing various functions can be regarded as both a software module implementing a method and a structure within a hardware component.

本说明书可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构、类等等。也可以在分布式计算环境中实践本说明书,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.

通过以上的实施例的描述可知,本领域的技术人员可以清楚地了解到本说明书可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本说明书的技术方案本质上可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,移动终端,服务器,或者网络设备等)执行本说明书各个实施例或者实施例的某些部分所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that this specification can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solutions of this specification can be embodied in the form of software products in essence, and the computer software products can be stored in storage media, such as ROM/RAM, magnetic disks, optical disks, etc., including several instructions to make a A computer device (which may be a personal computer, a mobile terminal, a server, or a network device, etc.) executes the methods described in various embodiments or some parts of the embodiments in this specification.

本说明书中的各个实施例采用递进的方式描述,各个实施例之间相同或相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。本说明书可用于众多通用或专用的计算机系统环境或配置中。例如:个人计算机、服务器计算机、手持设备或便携式设备、平板型设备、多处理器系统、基于微处理器的系统、置顶盒、可编程的电子设备、网络PC、小型计算机、大型计算机、包括以上任何系统或设备的分布式计算环境等等。The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. This specification can be used in numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable electronics, network PCs, minicomputers, mainframe computers, including the above Distributed computing environment of any system or device, etc.

虽然通过实施例描绘了本说明书,本领域普通技术人员知道,本说明书有许多变形和变化而不脱离本说明书的精神,希望所附的权利要求包括这些变形和变化而不脱离本说明书的精神。Although this specification has been described by way of examples, those of ordinary skill in the art will recognize that there are many modifications and changes to this specification without departing from the spirit of the specification, and it is intended that the appended claims include such modifications and changes without departing from the spirit of the specification.

Claims (15)

1. A method for constructing a knowledge graph, comprising:
acquiring target source data;
determining a data structure type of target source data;
constructing a target knowledge extraction unit matched with the target source data according to a preset construction rule and the data structure type of the target source data;
calling the target knowledge extraction unit to process the target source data to obtain an entity relationship file meeting the requirements; wherein, the entity relation file comprises a plurality of ternary data groups; the ternary data set at least comprises two data objects connected through a data relationship;
and constructing a target knowledge graph associated with the target source data according to the entity relationship file.
2. The method of claim 1, wherein the data structure type of the target source data comprises at least one of: structured data, unstructured data, semi-structured data.
3. The method of claim 2, wherein constructing a target knowledge extraction unit matched with the target source data according to a preset construction rule and a data structure type of the target source data comprises:
screening a target source operator corresponding to target source data from a plurality of preset data source operators according to a preset construction rule; the target source operator is used for accessing the target source data to a target knowledge extraction unit;
determining a matched target data processing structure according to the data structure type of the target source data; the target data processing structure is used for processing target source data to obtain a plurality of ternary data groups;
determining and configuring a target identifier termination operator; the target identification termination operator is used for extracting a ternary data group meeting the requirement from a plurality of ternary data groups output by the target data processing structure so as to obtain a corresponding entity relationship file;
and combining the target source operator, the target data processing structure and the target identification termination operator to obtain a target knowledge extraction unit matched with the target data source.
4. The method of claim 3, wherein determining a matching target data processing structure based on the data structure type of the target source data comprises:
screening an initial processing operator from a plurality of preset data processing operators under the condition that the data structure type of the target source data is determined to be structured data;
correspondingly configuring the initial processing operator to obtain a target processing operator; and determining the target processing operator as a matched target data processing structure.
5. The method of claim 4, wherein the predetermined data processing operator comprises at least one of: SQL operator, HIVE operator and SPARK operator.
6. The method of claim 3, wherein determining a matching target data processing structure based on the data structure type of the target source data comprises:
and under the condition that the data structure type of the target source data is determined to be unstructured data or semi-structured data, determining a preset triple extraction model as a matched target data processing structure.
7. The method of claim 1, wherein after determining the data structure type of the target source data, the method further comprises:
screening recommended knowledge extraction units from a plurality of preset knowledge extraction units according to the data structure type of the target source data;
presenting the recommended knowledge extraction unit to a user;
and determining the recommended knowledge extraction unit selected by the user as the target knowledge extraction unit.
8. The method of claim 1, wherein constructing a target knowledge-graph associated with the target source data from the entity relationship file comprises:
acquiring a definition parameter file related to a target knowledge graph; wherein the defining parameter file comprises: defining parameters of data objects and/or defining parameters of data relations;
and generating a target knowledge graph associated with the target data source by performing data mapping according to the entity relation file and the definition parameter file.
9. The method of claim 8, wherein the definition parameter file further comprises an index definition parameter;
correspondingly, in the process of constructing the target knowledge graph associated with the target source data according to the entity relationship file, the method further comprises the following steps:
and constructing a target query index aiming at the target knowledge graph by using the definition parameters of the data objects and/or the definition parameters of the data relation according to the index definition parameters.
10. The method of claim 1, wherein after constructing a target knowledge-graph associated with the target source data from the entity relationship file, the method further comprises:
receiving a target query statement; the target query statement at least carries a target identification of a target knowledge graph;
retrieving a graph database according to the target identification to determine a target knowledge graph;
responding to the target query statement, and performing query operation on the target knowledge graph to obtain a corresponding query result;
and feeding back the query result.
11. The method of claim 10, wherein the target source data comprises a running record of the customer's transaction data; correspondingly, the query result comprises a flow chart of the transaction data of the target customer.
12. A knowledge graph building tool, comprising at least: the system comprises a source data import interface, a first processing interface and a second processing interface; wherein,
the source data import interface is used for supporting a user to import target source data;
the first processing interface is used for supporting a user to set definition parameters of data objects and/or definition parameters of data relations in the target knowledge graph so as to generate a definition parameter file related to the target knowledge graph;
the second processing interface is used for supporting a user to determine and combine a matched target source operator, a target data processing structure and an identifier termination operator according to a preset construction rule so as to obtain a target knowledge extraction unit matched with the target source data;
the knowledge graph construction tool is also used for calling a target knowledge extraction unit to process target source data to obtain a corresponding entity relationship file; and generating a target knowledge graph associated with the target data source by performing data mapping according to the entity relationship file and the definition parameter file.
13. An apparatus for constructing a knowledge graph, comprising:
the acquisition module is used for acquiring target source data;
the determining module is used for determining the data structure type of the target source data;
the first construction module is used for constructing a target knowledge extraction unit matched with the target source data according to a preset construction rule and the data structure type of the target source data;
the calling module is used for calling the target knowledge extraction unit to process the target source data so as to obtain an entity relationship file meeting the requirements; wherein, the entity relation file comprises a plurality of ternary data groups; the ternary data set at least comprises two data objects connected through a data relationship;
and the second construction module is used for constructing a target knowledge graph associated with the target source data according to the entity relationship file.
14. A server comprising a processor and a memory for storing processor-executable instructions which, when executed by the processor, implement the steps of the method of any one of claims 1 to 11.
15. A computer storage medium having stored thereon computer instructions which, when executed, implement the steps of the method of any one of claims 1 to 11.
CN202110551912.8A 2021-05-20 2021-05-20 Knowledge graph construction method, tool, device and server Active CN113157947B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110551912.8A CN113157947B (en) 2021-05-20 2021-05-20 Knowledge graph construction method, tool, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110551912.8A CN113157947B (en) 2021-05-20 2021-05-20 Knowledge graph construction method, tool, device and server

Publications (2)

Publication Number Publication Date
CN113157947A true CN113157947A (en) 2021-07-23
CN113157947B CN113157947B (en) 2024-12-17

Family

ID=76876764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110551912.8A Active CN113157947B (en) 2021-05-20 2021-05-20 Knowledge graph construction method, tool, device and server

Country Status (1)

Country Link
CN (1) CN113157947B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609308A (en) * 2021-08-12 2021-11-05 脸萌有限公司 Knowledge graph construction method, device, storage medium and electronic device
CN114153990A (en) * 2021-12-07 2022-03-08 支付宝(杭州)信息技术有限公司 Knowledge production pipeline construction method, system and device
CN114385829A (en) * 2022-01-12 2022-04-22 北京百度网讯科技有限公司 Knowledge graph creating method, device, equipment and storage medium
CN114780752A (en) * 2022-05-12 2022-07-22 招商银行股份有限公司 Method, system, equipment and storage medium for establishing federal knowledge graph
CN115760181A (en) * 2022-11-14 2023-03-07 国网重庆市电力公司营销服务中心 Knowledge map construction method, device, and storage medium based on multidimensional charging behavior
CN116028637A (en) * 2022-12-06 2023-04-28 中电科大数据研究院有限公司 Map construction method and device, and data retrieval method and device
CN116028652A (en) * 2023-03-29 2023-04-28 新华三工业互联网有限公司 Method and device for constructing knowledge map based on industrial enterprise data
CN116303516A (en) * 2023-04-21 2023-06-23 中信证券股份有限公司 Method, device and related equipment for updating knowledge graph
CN116756088A (en) * 2023-08-21 2023-09-15 湖南云档信息科技有限公司 Method for analyzing character relationship in file and related equipment
CN117009452A (en) * 2023-07-25 2023-11-07 浪潮智慧科技有限公司 Hydrologic service data acquisition method, equipment and medium
CN117271801A (en) * 2023-06-12 2023-12-22 上海数慧系统技术有限公司 Knowledge graph construction method, device, electronic device and readable storage medium
CN120409649A (en) * 2025-05-06 2025-08-01 苏州中格软件有限公司 Adaptive knowledge graph construction and in-depth analysis method supporting multiple types of files

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247738A (en) * 2017-05-10 2017-10-13 浙江大学 A kind of extensive knowledge mapping semantic query method based on spark
CN110119473A (en) * 2019-05-23 2019-08-13 北京金山数字娱乐科技有限公司 A kind of construction method and device of file destination knowledge mapping
CN110197280A (en) * 2019-05-20 2019-09-03 中国银行股份有限公司 A kind of knowledge mapping construction method, apparatus and system
CN110489561A (en) * 2019-07-12 2019-11-22 平安科技(深圳)有限公司 Knowledge mapping construction method, device, computer equipment and storage medium
CN110609906A (en) * 2019-09-16 2019-12-24 金色熊猫有限公司 Knowledge map construction method and device, storage medium and electronic terminal
CN111428048A (en) * 2020-03-20 2020-07-17 厦门渊亭信息科技有限公司 Cross-domain knowledge graph construction method and device based on artificial intelligence
CN111813963A (en) * 2020-09-10 2020-10-23 平安国际智慧城市科技股份有限公司 Knowledge graph construction method and device, electronic equipment and storage medium
CN112463980A (en) * 2020-11-25 2021-03-09 南京摄星智能科技有限公司 Intelligent plan recommendation method based on knowledge graph
CN112732945A (en) * 2021-03-30 2021-04-30 中国电子技术标准化研究院 Standard knowledge graph construction and standard query method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107247738A (en) * 2017-05-10 2017-10-13 浙江大学 A kind of extensive knowledge mapping semantic query method based on spark
CN110197280A (en) * 2019-05-20 2019-09-03 中国银行股份有限公司 A kind of knowledge mapping construction method, apparatus and system
CN110119473A (en) * 2019-05-23 2019-08-13 北京金山数字娱乐科技有限公司 A kind of construction method and device of file destination knowledge mapping
CN110489561A (en) * 2019-07-12 2019-11-22 平安科技(深圳)有限公司 Knowledge mapping construction method, device, computer equipment and storage medium
CN110609906A (en) * 2019-09-16 2019-12-24 金色熊猫有限公司 Knowledge map construction method and device, storage medium and electronic terminal
CN111428048A (en) * 2020-03-20 2020-07-17 厦门渊亭信息科技有限公司 Cross-domain knowledge graph construction method and device based on artificial intelligence
CN111813963A (en) * 2020-09-10 2020-10-23 平安国际智慧城市科技股份有限公司 Knowledge graph construction method and device, electronic equipment and storage medium
CN112463980A (en) * 2020-11-25 2021-03-09 南京摄星智能科技有限公司 Intelligent plan recommendation method based on knowledge graph
CN112732945A (en) * 2021-03-30 2021-04-30 中国电子技术标准化研究院 Standard knowledge graph construction and standard query method and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12386902B2 (en) 2021-08-12 2025-08-12 Lemon Inc. Method and apparatus for knowledge graph construction, storage medium, and electronic device
CN113609308B (en) * 2021-08-12 2023-04-21 脸萌有限公司 Knowledge graph construction method and device, storage medium and electronic equipment
CN113609308A (en) * 2021-08-12 2021-11-05 脸萌有限公司 Knowledge graph construction method, device, storage medium and electronic device
CN114153990A (en) * 2021-12-07 2022-03-08 支付宝(杭州)信息技术有限公司 Knowledge production pipeline construction method, system and device
CN114385829A (en) * 2022-01-12 2022-04-22 北京百度网讯科技有限公司 Knowledge graph creating method, device, equipment and storage medium
CN114780752A (en) * 2022-05-12 2022-07-22 招商银行股份有限公司 Method, system, equipment and storage medium for establishing federal knowledge graph
CN115760181A (en) * 2022-11-14 2023-03-07 国网重庆市电力公司营销服务中心 Knowledge map construction method, device, and storage medium based on multidimensional charging behavior
CN116028637A (en) * 2022-12-06 2023-04-28 中电科大数据研究院有限公司 Map construction method and device, and data retrieval method and device
CN116028652A (en) * 2023-03-29 2023-04-28 新华三工业互联网有限公司 Method and device for constructing knowledge map based on industrial enterprise data
CN116303516A (en) * 2023-04-21 2023-06-23 中信证券股份有限公司 Method, device and related equipment for updating knowledge graph
CN117271801A (en) * 2023-06-12 2023-12-22 上海数慧系统技术有限公司 Knowledge graph construction method, device, electronic device and readable storage medium
CN117271801B (en) * 2023-06-12 2026-03-24 上海数慧系统技术有限公司 Methods, devices, electronic equipment, and readable storage media for constructing knowledge graphs
CN117009452A (en) * 2023-07-25 2023-11-07 浪潮智慧科技有限公司 Hydrologic service data acquisition method, equipment and medium
CN116756088A (en) * 2023-08-21 2023-09-15 湖南云档信息科技有限公司 Method for analyzing character relationship in file and related equipment
CN120409649A (en) * 2025-05-06 2025-08-01 苏州中格软件有限公司 Adaptive knowledge graph construction and in-depth analysis method supporting multiple types of files

Also Published As

Publication number Publication date
CN113157947B (en) 2024-12-17

Similar Documents

Publication Publication Date Title
CN113157947A (en) Knowledge graph construction method, tool, device and server
US11670288B1 (en) Generating predicted follow-on requests to a natural language request received by a natural language processing system
US11886464B1 (en) Triage model in service monitoring system
US11645471B1 (en) Determining a relationship recommendation for a natural language request
EP3244312B1 (en) A personal digital assistant
US11921799B1 (en) Generating and using alert definitions
US20180349482A1 (en) Automatic triage model execution in machine data driven monitoring automation apparatus with visualization
US9098314B2 (en) Systems and methods for web based application modeling and generation
US11676345B1 (en) Automated adaptive workflows in an extended reality environment
CN116594683A (en) Code annotation information generation method, device, equipment and storage medium
CN114676786A (en) Annotation template generation method, data annotation method and device
CN114238745B (en) Method and device for providing search results, electronic device and medium
CN112818197B (en) Search methods, devices, electronic devices and storage media
US10365925B2 (en) Merging applications
CN108694227A (en) Label for the supply of automatic cloud resource
CN115686660A (en) Method, apparatus, device and medium for determining automation component
US20210397646A1 (en) Method, electronic device, and storage medium for processing visual data of deep model
CN109992614B (en) Data acquisition method, device and server
CN115687631B (en) Rapidly develop user intent and analytical specifications in complex data spaces
US20140089207A1 (en) System and method for providing high level view tracking of changes in sca artifacts
CN116521616A (en) Baseline management method, device, electronic equipment and storage medium
CN115129730A (en) Flow data identification method and device, storage medium and computer equipment
CN117807188B (en) Search information processing method, apparatus, electronic device and storage medium
CN105701243A (en) Control method and device based on metadata model
US12547593B2 (en) Method and apparatus for sharing favorite

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant