[go: up one dir, main page]

CN114564515A - Unified storage method, device and medium for multi-version knowledge graph - Google Patents

Unified storage method, device and medium for multi-version knowledge graph Download PDF

Info

Publication number
CN114564515A
CN114564515A CN202210199599.0A CN202210199599A CN114564515A CN 114564515 A CN114564515 A CN 114564515A CN 202210199599 A CN202210199599 A CN 202210199599A CN 114564515 A CN114564515 A CN 114564515A
Authority
CN
China
Prior art keywords
knowledge
version
time
entities
versions
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.)
Pending
Application number
CN202210199599.0A
Other languages
Chinese (zh)
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.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
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 Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CN202210199599.0A priority Critical patent/CN114564515A/en
Publication of CN114564515A publication Critical patent/CN114564515A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • 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/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a unified storage method, a device and a medium for multi-version knowledge maps, wherein the method comprises the following steps: acquiring a plurality of knowledge map databases of different time versions based on the same ontology data source; adding time range attributes to all entities and relations based on a multi-version unified knowledge graph data structure according to the version time of the data of the knowledge graph, wherein the time range attributes comprise starting time and ending time; based on a knowledge map database with multiple versions and a uniform structure, calculating the difference relationship between knowledge maps of every two adjacent versions according to a difference comparison rule, and determining the evolution relationship of each entity; and updating the knowledge map database based on the knowledge map database of the first version according to the evolution relation, thereby constructing the knowledge map with multiple versions and unified storage. The invention can completely and accurately analyze the development elements of the autonomous traffic in each generation base, and can be widely applied to the technical fields of knowledge maps and data storage.

Description

一种多版本知识图谱的统一存储方法、装置及介质A unified storage method, device and medium for multi-version knowledge graph

技术领域technical field

本发明涉及知识图谱以及数据存储技术领域,尤其是一种多版本知识图谱的统一存储方法、装置及介质。The invention relates to the technical field of knowledge graphs and data storage, in particular to a unified storage method, device and medium for multi-version knowledge graphs.

背景技术Background technique

知识图谱,本质是结构化的语义网络知识库,包含有:有向图结构、用节点表示的实体和用边表示的实体之间的语义关系。知识图谱由最初的语义网络,经过图结构的数据拓展,最终形成知识图谱的概念。The knowledge graph is essentially a structured semantic network knowledge base, including: directed graph structure, semantic relationships between entities represented by nodes and entities represented by edges. The knowledge graph is expanded from the initial semantic network through the data expansion of the graph structure, and finally the concept of knowledge graph is formed.

随着时间的推移和本体数据库的扩展,知识图谱中的实体和实体之间的关系,会不断变化,知识图谱的结构由此发生动态变化,这样的知识图谱可以称为动态知识图谱。分析基于同一本体数据源,相同数据结构,不同时间版本的知识图谱,可以推断知识图谱的演进规律。目前国内外的知识图谱研究大多关注静态知识图谱,较少关注动态知识图谱,关于动态知识图谱的存储,现存的主流方法仍然是将不同版本的静态知识图谱各自以图的形式存储起来,形成多份不同版本的图数据库,现存方法具有存储开销大,不同版本间的图数据库冗余大,演进分析复杂度高等缺点。With the passage of time and the expansion of the ontology database, the relationship between entities and entities in the knowledge graph will continue to change, and the structure of the knowledge graph will change dynamically. Such a knowledge graph can be called a dynamic knowledge graph. By analyzing the knowledge graphs based on the same ontology data source, the same data structure, and different time versions, the evolution law of the knowledge graph can be inferred. At present, knowledge graph research at home and abroad mostly focuses on static knowledge graphs, and less attention on dynamic knowledge graphs. Regarding the storage of dynamic knowledge graphs, the existing mainstream method is still to store different versions of static knowledge graphs in the form of graphs. The existing methods have the disadvantages of high storage overhead, large redundancy of graph databases between different versions, and high complexity of evolution analysis.

为了说明统一知识图谱的用处,以智能交通系统为例,随着智能交通系统的部分领域自主化水平提高,并沿着“辅助自主-高度自主-完全自主”的方向发展。以自主化水平划分代基的自主式交通系统成为了交通系统发展的一大趋势。基于自主式交通系统的知识库,抽取其中的要素,构建各个代基的知识图谱,可以作为一种有效通用的语言,应用在人类和计算机对于自主式交通系统开发过程中。但分别构建各个代基的知识图谱,不能直观地展现出自主式交通系统的动态变化,演进分析过程复杂。In order to illustrate the usefulness of the unified knowledge graph, taking the intelligent transportation system as an example, with the improvement of the level of autonomy in some fields of the intelligent transportation system, it develops along the direction of "assisted autonomy-high autonomy-complete autonomy". The autonomous transportation system that divides the generation base according to the level of autonomy has become a major trend in the development of the transportation system. Based on the knowledge base of autonomous transportation system, extracting the elements and constructing the knowledge graph of each generation base can be used as an effective and common language in the development process of autonomous transportation system by humans and computers. However, the knowledge graph of each generation base is constructed separately, which cannot intuitively show the dynamic changes of the autonomous transportation system, and the evolution analysis process is complicated.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本发明实施例提供一种多版本知识图谱的统一存储方法、装置及介质,能够将多个版本的知识图谱存储在同一份图数据库。In view of this, the embodiments of the present invention provide a unified storage method, device and medium for a multi-version knowledge graph, which can store knowledge graphs of multiple versions in the same graph database.

本发明的一方面提供了一种多版本知识图谱的统一存储方法,包括:One aspect of the present invention provides a unified storage method for a multi-version knowledge graph, including:

基于同一本体数据源,获得多个不同时间版本的知识图谱数据库,其中,知识图谱的要素包括实体和关系的集合,以及各个实体的属性;Based on the same ontology data source, multiple knowledge graph databases of different time versions are obtained, wherein the elements of the knowledge graph include a set of entities and relationships, as well as the attributes of each entity;

基于多版本统一的知识图谱数据结构,根据知识图谱的数据的版本时间,给所有的实体和关系添加时间范围属性,所述时间范围属性包括起始时间和终止时间;Based on the multi-version unified knowledge graph data structure, according to the version time of the knowledge graph data, add a time range attribute to all entities and relationships, and the time range attribute includes a start time and an end time;

基于多个版本且结构统一的知识图谱数据库,根据差异比较规则,计算两两相邻版本的知识图谱之间差异关系,确定各个实体的演进关系;Based on a knowledge graph database with multiple versions and a unified structure, according to the difference comparison rules, the difference relationship between the knowledge graphs of two adjacent versions is calculated, and the evolution relationship of each entity is determined;

基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,从而构建出多版本统一存储的知识图谱。Based on the first version of the knowledge graph database, according to the evolution relationship, the knowledge graph database is updated, so as to construct a multi-version unified storage knowledge graph.

可选地,所述构建出多版本统一存储的知识图谱,具体为:Optionally, constructing a multi-version unified storage knowledge graph is specifically:

构建基于同一本体数据源、不同时间版本的知识图谱;Build a knowledge graph based on the same ontology data source and different time versions;

通过时间范围选择指令,可以还原不同版本的知识图谱;Through the time range selection command, different versions of the knowledge graph can be restored;

或者,查询某个实体或关系在不同版本中的演化路径。Or, query the evolution path of an entity or relationship in different versions.

可选地,所述多版本统一的知识图谱数据结构基于普通的知识图谱数据结构,在基于普通的知识图谱数据结构的实体和关系上添加时间戳属性,所述时间戳属性包含起始时间和终止时间。Optionally, the multi-version unified knowledge graph data structure is based on a common knowledge graph data structure, and a timestamp attribute is added to the entities and relationships based on the common knowledge graph data structure, and the timestamp attribute includes a start time and stop the time.

可选地,所述方法还包括以下至少之一:Optionally, the method also includes at least one of the following:

根据预设差异规则,确定各组相邻版本的实体的添加;Determine the addition of entities of each group of adjacent versions according to the preset difference rules;

或者,根据预设差异规则,确定各组相邻版本的实体的删除;Or, according to a preset difference rule, determine the deletion of entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体属性的修改;Or, according to the preset difference rule, determine the modification of the entity attributes of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的修改;Or, according to the preset difference rule, determine the modification of the relationship between the entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的添加;Or, according to a preset difference rule, determine the addition of the relationship between entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的删除。Or, according to a preset difference rule, the deletion of the relationship between entities of each group of adjacent versions is determined.

可选地,所述方法还包括以下至少之一:Optionally, the method also includes at least one of the following:

根据演进关系规则,确定各组相邻版本的实体的添加;According to the evolution relationship rules, determine the addition of entities of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体的删除;Or, according to the evolution relationship rule, determine the deletion of the entities of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体属性的更新;Or, according to the evolution relationship rule, determine the update of the entity attributes of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体间关系的更新。Or, according to the evolution relationship rule, the update of the relationship between entities of each group of adjacent versions is determined.

可选地,所述基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,包括以下至少之一:Optionally, the knowledge graph database is updated based on the first version of the knowledge graph database according to the evolution relationship, including at least one of the following:

根据演进分析结果,增加新的实体;According to the evolution analysis results, add new entities;

或者,根据演进分析结果,增加新的关系;Or, according to the evolution analysis result, add a new relationship;

或者,根据当前的知识图谱的版本时间确定实体或关系的起始时间属性,如果某个实体或关系在当前版本的知识图谱中首次出现,则将起始时间的值记为当前版本序号;Or, determine the start time attribute of the entity or relationship according to the version time of the current knowledge graph, if an entity or relationship appears for the first time in the current version of the knowledge graph, the value of the start time is recorded as the current version serial number;

或者,根据当前的知识图谱的版本时间确定实体或关系的终止时间属性,如果某个实体或关系在当前版本的知识图谱中最后一次出现,则将终止时间属性记为当前版本序号。Alternatively, the termination time attribute of an entity or relationship is determined according to the version time of the current knowledge graph. If an entity or relationship appears for the last time in the current version of the knowledge graph, the termination time attribute is recorded as the current version serial number.

可选地,所述方法还包括:Optionally, the method further includes:

响应于时间范围选择指令,将图数据库中的实体和关系按照时间属性进行过滤,得到的实体和关系的起始时间不大于指定版本序号,且终止时间不小于指定版本序号,滤出对应时间范围的单个版本或者多个版本的知识图谱数据,进行演进分析;In response to the time range selection command, the entities and relationships in the graph database are filtered according to the time attribute, the start time of the obtained entities and relationships is not greater than the specified version number, and the end time is not less than the specified version number, and the corresponding time range is filtered out. A single version or multiple versions of knowledge graph data for evolution analysis;

响应于实体和关系选择指令,按照标识符将图数据库中的实体和关系过滤出对应的单个版本或者多个版本的实体和关系。In response to the entity and relationship selection instruction, the entities and relationships in the graph database are filtered out corresponding single version or multiple versions of the entities and relationships according to the identifiers.

本发明实施例的另一方面还提供了一种多版本知识图谱的统一存储装置,包括:Another aspect of the embodiments of the present invention also provides a unified storage device for a multi-version knowledge graph, including:

第一模块,用于基于同一本体数据源,获得多个不同时间版本的知识图谱数据库,其中,知识图谱的要素包括实体和关系的集合,以及各个实体的属性;The first module is used to obtain knowledge graph databases of multiple different time versions based on the same ontology data source, wherein the elements of the knowledge graph include a set of entities and relationships, and attributes of each entity;

第二模块,用于基于多版本统一的知识图谱数据结构,根据知识图谱的数据的版本时间,给所有的实体和关系添加时间范围属性,所述时间范围属性包括起始时间和终止时间;The second module is used to add a time range attribute to all entities and relationships based on the version time of the knowledge map data based on the multi-version unified knowledge graph data structure, and the time range attribute includes a start time and an end time;

第三模块,用于基于多个版本且结构统一的知识图谱数据库,根据差异比较规则,计算两两相邻版本的知识图谱之间差异关系,确定各个实体的演进关系;The third module is used to calculate the difference relationship between the knowledge maps of two adjacent versions based on the knowledge map database with multiple versions and a unified structure, according to the difference comparison rule, and determine the evolution relationship of each entity;

第四模块,用于基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,从而构建出多版本统一存储的知识图谱。The fourth module is used to update the knowledge graph database based on the first version of the knowledge graph database according to the evolution relationship, so as to construct a multi-version unified storage knowledge graph.

本发明实施例的另一方面还提供了一种电子设备,包括处理器以及存储器;Another aspect of the embodiments of the present invention further provides an electronic device, including a processor and a memory;

所述存储器用于存储程序;the memory is used to store programs;

所述处理器执行所述程序实现如前面所述的方法。The processor executes the program to implement the method as described above.

本发明实施例的另一方面还提供了一种计算机可读存储介质,所述存储介质存储有程序,所述程序被处理器执行实现如前面所述的方法。Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, where the storage medium stores a program, and the program is executed by a processor to implement the aforementioned method.

本发明实施例还公开了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前面的方法。The embodiment of the present invention also discloses a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The computer instructions can be read from the computer readable storage medium by a processor of the computer device, and the processor executes the computer instructions to cause the computer device to perform the foregoing method.

本发明的实施例基于同一本体数据源,获得多个不同时间版本的知识图谱数据库,其中,知识图谱的要素包括实体和关系的集合,以及各个实体的属性;基于多版本统一的知识图谱数据结构,根据知识图谱的数据的版本时间,给所有的实体和关系添加时间范围属性,所述时间范围属性包括起始时间和终止时间;基于多个版本且结构统一的知识图谱数据库,根据差异比较规则,计算两两相邻版本的知识图谱之间差异关系,确定各个实体的演进关系;基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,从而构建出多版本统一存储的知识图谱。本发明基于统一知识图谱构建出多个版本的自主式交通系统知识图谱数据库,可以完整准确地分析自主式交通在各个代基的发展要素。The embodiment of the present invention obtains knowledge graph databases of multiple different time versions based on the same ontology data source, wherein the elements of the knowledge graph include a set of entities and relationships, as well as the attributes of each entity; based on a unified knowledge graph data structure of multiple versions , according to the version time of the data of the knowledge graph, add a time range attribute to all entities and relationships, and the time range attribute includes the start time and the end time; based on the knowledge graph database with multiple versions and a unified structure, according to the difference comparison rules , calculate the difference relationship between two adjacent versions of the knowledge map, and determine the evolution relationship of each entity; based on the knowledge map database of the first version, update the knowledge map database according to the evolution relationship, so as to build a multi-version unified storage knowledge map . The invention constructs multiple versions of the knowledge map database of the autonomous traffic system based on the unified knowledge map, and can completely and accurately analyze the development elements of the autonomous traffic in each generation base.

附图说明Description of drawings

为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort.

图1为本发明实施例提供的整体步骤流程图;1 is a flow chart of the overall steps provided by an embodiment of the present invention;

图2为本发明实施例提供的多版本知识图谱统一结构示意图;2 is a schematic diagram of a unified structure of a multi-version knowledge graph provided by an embodiment of the present invention;

图3为本发明实施例提供的差异关系比较流程示意图;3 is a schematic flowchart of a difference relationship comparison provided by an embodiment of the present invention;

图4为驾驶自动化L3级别的知识图谱示意图;Figure 4 is a schematic diagram of the knowledge map of the L3 level of driving automation;

图5为驾驶自动化L4级别的知识图谱示意图。Figure 5 is a schematic diagram of the knowledge graph at the L4 level of driving automation.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

针对现有技术存在的问题,本发明实施例提供了一种多版本知识图谱的统一存储方法,包括:In view of the problems existing in the prior art, an embodiment of the present invention provides a unified storage method for a multi-version knowledge graph, including:

基于同一本体数据源,获得多个不同时间版本的知识图谱数据库,其中,知识图谱的要素包括实体和关系的集合,以及各个实体的属性;Based on the same ontology data source, multiple knowledge graph databases of different time versions are obtained, wherein the elements of the knowledge graph include a set of entities and relationships, as well as the attributes of each entity;

基于多版本统一的知识图谱数据结构,根据知识图谱的数据的版本时间,给所有的实体和关系添加时间范围属性,所述时间范围属性包括起始时间和终止时间;Based on the multi-version unified knowledge graph data structure, according to the version time of the knowledge graph data, add a time range attribute to all entities and relationships, and the time range attribute includes a start time and an end time;

基于多个版本且结构统一的知识图谱数据库,根据差异比较规则,计算两两相邻版本的知识图谱之间差异关系,确定各个实体的演进关系;Based on a knowledge graph database with multiple versions and a unified structure, according to the difference comparison rules, the difference relationship between the knowledge graphs of two adjacent versions is calculated, and the evolution relationship of each entity is determined;

基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,从而构建出多版本统一存储的知识图谱。Based on the first version of the knowledge graph database, according to the evolution relationship, the knowledge graph database is updated, so as to construct a multi-version unified storage knowledge graph.

可选地,所述构建出多版本统一存储的知识图谱,具体为:Optionally, constructing a multi-version unified storage knowledge graph is specifically:

构建基于同一本体数据源、不同时间版本的知识图谱;Build a knowledge graph based on the same ontology data source and different time versions;

通过时间范围选择指令,可以还原不同版本的知识图谱;Through the time range selection command, different versions of the knowledge graph can be restored;

或者,查询某个实体或关系在不同版本中的演化路径。Or, query the evolution path of an entity or relationship in different versions.

可选地,所述多版本统一的知识图谱数据结构基于普通的知识图谱数据结构,在基于普通的知识图谱数据结构的实体和关系上添加时间戳属性,所述时间戳属性包含起始时间和终止时间。Optionally, the multi-version unified knowledge graph data structure is based on a common knowledge graph data structure, and a timestamp attribute is added to the entities and relationships based on the common knowledge graph data structure, and the timestamp attribute includes a start time and stop the time.

可选地,所述方法还包括以下至少之一:Optionally, the method also includes at least one of the following:

根据预设差异规则,确定各组相邻版本的实体的添加;Determine the addition of entities of each group of adjacent versions according to the preset difference rules;

或者,根据预设差异规则,确定各组相邻版本的实体的删除;Or, according to a preset difference rule, determine the deletion of entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体属性的修改;Or, according to the preset difference rule, determine the modification of the entity attributes of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的修改;Or, according to the preset difference rule, determine the modification of the relationship between the entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的添加;Or, according to a preset difference rule, determine the addition of the relationship between entities of each group of adjacent versions;

或者,根据预设差异规则,确定各组相邻版本的实体间关系的删除。Or, according to a preset difference rule, the deletion of the relationship between entities of each group of adjacent versions is determined.

可选地,所述方法还包括以下至少之一:Optionally, the method also includes at least one of the following:

根据演进关系规则,确定各组相邻版本的实体的添加;According to the evolution relationship rules, determine the addition of entities of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体的删除;Or, according to the evolution relationship rule, determine the deletion of the entities of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体属性的更新;Or, according to the evolution relationship rule, determine the update of the entity attributes of each group of adjacent versions;

或者,根据演进关系规则,确定各组相邻版本的实体间关系的更新。Or, according to the evolution relationship rule, the update of the relationship between entities of each group of adjacent versions is determined.

可选地,所述基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,包括以下至少之一:Optionally, the knowledge graph database is updated based on the first version of the knowledge graph database according to the evolution relationship, including at least one of the following:

根据演进分析结果,增加新的实体;According to the evolution analysis results, add new entities;

或者,根据演进分析结果,增加新的关系;Or, according to the evolution analysis result, add a new relationship;

或者,根据当前的知识图谱的版本时间确定实体或关系的起始时间属性,如果某个实体或关系在当前版本的知识图谱中首次出现,则将起始时间的值记为当前版本序号;Or, determine the start time attribute of the entity or relationship according to the version time of the current knowledge graph, if an entity or relationship appears for the first time in the current version of the knowledge graph, the value of the start time is recorded as the current version serial number;

或者,根据当前的知识图谱的版本时间确定实体或关系的终止时间属性,如果某个实体或关系在当前版本的知识图谱中最后一次出现,则将终止时间属性记为当前版本序号。Alternatively, the termination time attribute of an entity or relationship is determined according to the version time of the current knowledge graph. If an entity or relationship appears for the last time in the current version of the knowledge graph, the termination time attribute is recorded as the current version serial number.

可选地,所述方法还包括:Optionally, the method further includes:

响应于时间范围选择指令,将图数据库中的实体和关系按照时间属性进行过滤,得到的实体和关系的起始时间不大于指定版本序号,且终止时间不小于指定版本序号,滤出对应时间范围的单个版本或者多个版本的知识图谱数据,进行演进分析;In response to the time range selection command, the entities and relationships in the graph database are filtered according to the time attribute, the start time of the obtained entities and relationships is not greater than the specified version number, and the end time is not less than the specified version number, and the corresponding time range is filtered out. A single version or multiple versions of knowledge graph data for evolution analysis;

响应于实体和关系选择指令,按照标识符将图数据库中的实体和关系过滤出对应的单个版本或者多个版本的实体和关系。In response to the entity and relationship selection instruction, the entities and relationships in the graph database are filtered out corresponding single version or multiple versions of the entities and relationships according to the identifiers.

本发明实施例的另一方面还提供了一种多版本知识图谱的统一存储装置,包括:Another aspect of the embodiments of the present invention also provides a unified storage device for a multi-version knowledge graph, including:

第一模块,用于基于同一本体数据源,获得多个不同时间版本的知识图谱数据库,其中,知识图谱的要素包括实体和关系的集合,以及各个实体的属性;The first module is used to obtain knowledge graph databases of multiple different time versions based on the same ontology data source, wherein the elements of the knowledge graph include a set of entities and relationships, and attributes of each entity;

第二模块,用于基于多版本统一的知识图谱数据结构,根据知识图谱的数据的版本时间,给所有的实体和关系添加时间范围属性,所述时间范围属性包括起始时间和终止时间;The second module is used to add a time range attribute to all entities and relationships based on the version time of the knowledge map data based on the multi-version unified knowledge graph data structure, and the time range attribute includes a start time and an end time;

第三模块,用于基于多个版本且结构统一的知识图谱数据库,根据差异比较规则,计算两两相邻版本的知识图谱之间差异关系,确定各个实体的演进关系;The third module is used to calculate the difference relationship between the knowledge maps of two adjacent versions based on the knowledge map database with multiple versions and a unified structure, according to the difference comparison rule, and determine the evolution relationship of each entity;

第四模块,用于基于首个版本的知识图谱数据库,根据演进关系,更新知识图谱数据库,从而构建出多版本统一存储的知识图谱。The fourth module is used to update the knowledge graph database based on the first version of the knowledge graph database according to the evolution relationship, so as to construct a multi-version unified storage knowledge graph.

本发明实施例的另一方面还提供了一种电子设备,包括处理器以及存储器;Another aspect of the embodiments of the present invention further provides an electronic device, including a processor and a memory;

所述存储器用于存储程序;the memory is used to store programs;

所述处理器执行所述程序实现如前面所述的方法。The processor executes the program to implement the method as described above.

本发明实施例的另一方面还提供了一种计算机可读存储介质,所述存储介质存储有程序,所述程序被处理器执行实现如前面所述的方法。Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, where the storage medium stores a program, and the program is executed by a processor to implement the aforementioned method.

本发明实施例还公开了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前面的方法。The embodiment of the present invention also discloses a computer program product or computer program, where the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The computer instructions can be read from the computer readable storage medium by a processor of the computer device, and the processor executes the computer instructions to cause the computer device to perform the foregoing method.

下面结合说明书附图,对本发明的具体实现过程和实现原理进行详细说明:Below in conjunction with the accompanying drawings of the description, the specific implementation process and implementation principle of the present invention are described in detail:

图1所示为本发明实施例提供的多版本知识图谱统一存储方法的流程图,方法包括:1 shows a flowchart of a method for unified storage of multi-version knowledge graphs provided by an embodiment of the present invention, and the method includes:

获取同一本体数据源的多个不同版本的知识图谱数据库;Obtain knowledge graph databases of multiple different versions from the same ontology data source;

根据差异计算规则,确定两两相邻知识图谱数据库的差异关系表;According to the difference calculation rule, determine the difference relationship table of the adjacent knowledge graph databases;

根据差异关系表,确定两两相邻知识图谱数据库的演进关系表;According to the difference relationship table, determine the evolution relationship table of the two adjacent knowledge graph databases;

将首个版本的知识图谱数据库作为基础数据库,存入图数据库中;Use the first version of the knowledge graph database as the basic database and store it in the graph database;

根据演进关系表,更新图数据库,包括:添加新的实体和关系,更新实体和关系的终止时间,更新实体和关系的起始时间。According to the evolution relationship table, update the graph database, including: adding new entities and relationships, updating the end time of entities and relationships, and updating the start time of entities and relationships.

其中,本发明的多版本知识图谱统一结构的结构示意图如图2所示,该结构基于普通的知识图谱数据结构,在基于普通的知识图谱数据结构的实体和关系上添加时间戳属性,所述时间戳属性包含起始时间和终止时间。Among them, a schematic structural diagram of the unified structure of the multi-version knowledge graph of the present invention is shown in FIG. 2 . The structure is based on a common knowledge graph data structure, and a timestamp attribute is added to the entities and relationships based on the common knowledge graph data structure. The timestamp property contains the start time and end time.

需要说明的是,所述的本体数据源可以是CSV(Comma-Separated Va l ues逗号/字符分隔值)文件和数据库。当数据源为数据库时,存储类型是图数据库。It should be noted that the ontology data source may be a CSV (Comma-Separated Values comma/character separated value) file and a database. When the data source is a database, the storage type is a graph database.

需要说明的是,所述的差异比较发生在数据源为CSV文件的时候,流程如图3所示。预设的差异规则包括以下至少之一:It should be noted that the difference comparison occurs when the data source is a CSV file, and the process is shown in FIG. 3 . The preset difference rules include at least one of the following:

前一个版本知识图谱的某个实体或关系在下一个版本中消失,记作删除类型的差异关系;If an entity or relationship of the previous version of the knowledge graph disappears in the next version, it is recorded as a difference relationship of deletion type;

某个实体或关系在某个版本知识图谱中首次出现,记作新增类型的差异关系;When an entity or relationship appears for the first time in a certain version of the knowledge graph, it is recorded as a new type of difference relationship;

前一个版本的知识图谱的某个实体的属性与下一个版本不相同,记作删除加新增类型的组合差异关系。The attributes of an entity in the previous version of the knowledge graph are different from those of the next version, which is recorded as a combined difference relationship of deletion and new types.

两两相邻的知识图谱数据库中所有的实体和关系,根据预设的差异规则,得到所有的差异关系的集合,表示两两相邻的知识图谱数据库的差异关系表。For all entities and relationships in the pairwise adjacent knowledge graph databases, according to a preset difference rule, a set of all difference relations is obtained, representing the difference relation table of the pairwise adjacent knowledge graph databases.

根据所述差异关系,进一步确定相邻版本的演进关系表,包括以下至少之一:According to the difference relationship, further determine the evolution relationship table of adjacent versions, including at least one of the following:

删除类型的差异关系记作删除类型的演进关系;The difference relationship of deletion type is recorded as the evolution relationship of deletion type;

新增类型的差异关系记作新增类型的演进关系;The difference relationship of the new type is recorded as the evolution relationship of the new type;

删除加新增类型的组合差异关系记作更新类型的演进关系。The combined difference relationship of deletion, addition and new type is recorded as the evolution relationship of update type.

需要说明的是,根据演进关系表,更新图数据库这一步骤,包括以下至少之一:It should be noted that the step of updating the graph database according to the evolution relation table includes at least one of the following:

根据删除类型的演进关系,确定对应实体或关系的终止时间;Determine the termination time of the corresponding entity or relationship according to the evolution relationship of the deletion type;

根据新增类型的演进关系,增加新的对应实体或关系;Add a new corresponding entity or relationship according to the newly added type of evolution relationship;

根据实体属性更新类型的演进关系,确定对应实体的终止时间,并且备份新的对应实体,修改相关的属性;According to the evolution relationship of the entity attribute update type, determine the termination time of the corresponding entity, back up the new corresponding entity, and modify the related attributes;

根据实体间关系更新类型的演进关系,确定对应实体的终止时间,并且备份新的对应实体,修改相关的实体间关系。According to the evolution relationship of the update type of the relationship between entities, the termination time of the corresponding entity is determined, a new corresponding entity is backed up, and the related inter-entity relationship is modified.

需要说明的是,所述的更新图数据库的操作过程不会删除已有的图数据库中的任何数据,而是保留所有版本的操作数据,当实体或关系在下一个版本中不会出现时,更新对应的终止时间会使得该实体或关系在下一个版本中不被检索到。当实体的属性发生改变时,更新原有实体的终止时间,并备份新的实体,仅更新需要改变的属性,更新备份实体的起始时间。It should be noted that the operation process of updating the graph database will not delete any data in the existing graph database, but retain the operation data of all versions. When the entity or relationship does not appear in the next version, update the data. The corresponding termination time will prevent the entity or relationship from being retrieved in the next version. When the attributes of the entity change, the end time of the original entity is updated, and the new entity is backed up, only the properties that need to be changed are updated, and the start time of the backup entity is updated.

下面以一具体的知识图谱版本管理为例,结合附图和具体数据对本发明作进一步的详细说明。应当理解,此处所描述的具体实施例仅用于解释本发明,并不用于限定本发明。Taking a specific knowledge graph version management as an example, the present invention will be further described in detail with reference to the accompanying drawings and specific data. It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.

以自动驾驶相关的本体数据库为例,SAE(Society of Automot ive Engineer)将驾驶的自动化水平分级定义为L0到L5,针对不同等级的自动驾驶,构建出不同版本的知识图谱,用来表示各个等级的自动驾驶所需的关键技术和驾驶环境。如图4、图5,其中,图4表示L3等级的自动驾驶知识图谱,图5表示L4等级的自动驾驶知识图谱。Taking the autonomous driving-related ontology database as an example, SAE (Society of Automotive Engineer) defines the level of driving automation as L0 to L5. For different levels of autonomous driving, different versions of the knowledge map are constructed to represent each level. key technologies and driving environments required for autonomous driving. Figure 4 and Figure 5, wherein, Figure 4 represents the L3 level automatic driving knowledge map, and Figure 5 represents the L4 level automatic driving knowledge map.

首先获取等级L0到等级L4,共5个版本的知识图谱后,根据差异规则比较两两相邻的知识图谱,例如比较等级L0和等级L1的知识图谱,比较等级L1和等级L2的知识图谱等等,分别汇总得到差异关系表。再根据演进分析规则,得到演进关系表,等级L3和等级L4的知识图谱演进关系表结果如表1所示。First, after obtaining the knowledge graphs of level L0 to level L4, a total of 5 versions, compare the two adjacent knowledge graphs according to the difference rules, such as comparing the knowledge graphs of level L0 and level L1, comparing the knowledge graphs of level L1 and level L2, etc. and so on, respectively summarizing the difference relationship table. Then, according to the evolution analysis rules, an evolution relationship table is obtained. The results of the knowledge graph evolution relationship table of level L3 and level L4 are shown in Table 1.

表1Table 1

Figure BDA0003527027260000081
Figure BDA0003527027260000081

汇总演进关系表之后,先将等级L0的知识图谱存储在图数据库中,根据演进关系表依次更新图数据库,就可以将等级L2到L4的知识图谱数据存储在图数据库中,最终得到等级L0到等级L4的5个版本的统一知识图谱。After summarizing the evolution relation table, first store the knowledge graph of level L0 in the graph database, and then update the graph database in turn according to the evolution relation table, then the knowledge graph data of levels L2 to L4 can be stored in the graph database, and finally get levels L0 to L4. Unified knowledge graph of 5 versions of level L4.

综上所述,本发明首先获取多个版本的知识图谱数据库,其中,所述知识图谱的版本数据包括以节点和关系表示并用于表达特定事物所需要的各实体及实体属性相关的信息集合;接着,根据所述相邻版本知识图谱的差异关系,确定各组相邻版本知识图谱的差异关系表;然后,根据相邻版本知识图谱的差异关系表,确定所述各组相邻版本的演进关系表;接着,将第一个版本的知识图谱存入图数据库中,根据各组相邻版本的演进关系表,更新图数据库。本发明基于同一知识图谱数据库的不同版本,依据相邻版本间的差异关系,进一步确定演进关系,将各个版本的知识图谱数据库统一存储在同一数据库中,能够准确还原各个版本的知识图谱数据库,并完整分析知识图谱的演进关系。To sum up, the present invention first obtains multiple versions of the knowledge graph database, wherein the version data of the knowledge graph includes the information collections related to each entity and entity attributes required for expressing specific things, which are represented by nodes and relationships; Next, according to the difference relationship between the knowledge maps of the adjacent versions, determine the difference relationship table of the knowledge maps of each group of adjacent versions; then, according to the difference relationship table of the knowledge maps of the adjacent versions, determine the evolution of the adjacent versions of the groups Relation table; then, store the knowledge graph of the first version in the graph database, and update the graph database according to the evolution relation table of each group of adjacent versions. Based on different versions of the same knowledge map database, the invention further determines the evolution relationship according to the difference relationship between adjacent versions, stores the knowledge map database of each version in the same database uniformly, and can accurately restore the knowledge map database of each version, and Completely analyze the evolution relationship of the knowledge graph.

在一些可选择的实施例中,在方框图中提到的功能/操作可以不按照操作示图提到的顺序发生。例如,取决于所涉及的功能/操作,连续示出的两个方框实际上可以被大体上同时地执行或所述方框有时能以相反顺序被执行。此外,在本发明的流程图中所呈现和描述的实施例以示例的方式被提供,目的在于提供对技术更全面的理解。所公开的方法不限于本文所呈现的操作和逻辑流程。可选择的实施例是可预期的,其中各种操作的顺序被改变以及其中被描述为较大操作的一部分的子操作被独立地执行。In some alternative implementations, the functions/operations noted in the block diagrams may occur out of the order noted in the operational diagrams. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/operations involved. Furthermore, the embodiments presented and described in the flowcharts of the present invention are provided by way of example in order to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of the various operations are altered and in which sub-operations described as part of larger operations are performed independently.

此外,虽然在功能性模块的背景下描述了本发明,但应当理解的是,除非另有相反说明,所述的功能和/或特征中的一个或多个可以被集成在单个物理装置和/或软件模块中,或者一个或多个功能和/或特征可以在单独的物理装置或软件模块中被实现。还可以理解的是,有关每个模块的实际实现的详细讨论对于理解本发明是不必要的。更确切地说,考虑到在本文中公开的装置中各种功能模块的属性、功能和内部关系的情况下,在工程师的常规技术内将会了解该模块的实际实现。因此,本领域技术人员运用普通技术就能够在无需过度试验的情况下实现在权利要求书中所阐明的本发明。还可以理解的是,所公开的特定概念仅仅是说明性的,并不意在限制本发明的范围,本发明的范围由所附权利要求书及其等同方案的全部范围来决定。Furthermore, while the invention is described in the context of functional modules, it is to be understood that, unless stated to the contrary, one or more of the described functions and/or features may be integrated in a single physical device and/or or software modules, or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to understand the present invention. Rather, given the attributes, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the modules will be within the routine skill of the engineer. Accordingly, those skilled in the art, using ordinary skill, can implement the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are illustrative only and are not intended to limit the scope of the invention, which is to be determined by the appended claims along with their full scope of equivalents.

所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-On ly Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The functions, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk, etc. medium.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。Logic and/or steps represented in flowcharts or otherwise described herein, for example, may be considered an ordered listing of executable instructions for implementing the logical functions, may be embodied in any computer-readable medium, For use with, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions from an instruction execution system, apparatus, or apparatus) or equipment. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in conjunction with an instruction execution system, apparatus, or apparatus.

计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections with one or more wiring (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), Read Only Memory (ROM), Erasable Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, followed by editing, interpretation, or other suitable medium as necessary process to obtain the program electronically and then store it in computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

尽管已经示出和描述了本发明的实施例,本领域的普通技术人员可以理解:在不脱离本发明的原理和宗旨的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由权利要求及其等同物限定。Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, The scope of the invention is defined by the claims and their equivalents.

以上是对本发明的较佳实施进行了具体说明,但本发明并不限于所述实施例,熟悉本领域的技术人员在不违背本发明精神的前提下还可做出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments, and those skilled in the art can also make various equivalent deformations or replacements on the premise of not violating the spirit of the present invention, These equivalent modifications or substitutions are all included within the scope defined by the claims of the present application.

Claims (10)

1. A unified storage method of multi-version knowledge graph is characterized by comprising the following steps:
acquiring a plurality of knowledge graph databases of different time versions based on the same ontology data source, wherein elements of the knowledge graph comprise entities, a set of relations and attributes of each entity;
adding time range attributes to all entities and relations based on a multi-version unified knowledge graph data structure according to the version time of the data of the knowledge graph, wherein the time range attributes comprise starting time and ending time;
based on a knowledge map database with multiple versions and a uniform structure, calculating the difference relationship between knowledge maps of every two adjacent versions according to a difference comparison rule, and determining the evolution relationship of each entity;
and updating the knowledge map database based on the knowledge map database of the first version according to the evolution relation, thereby constructing the knowledge map with multiple versions and unified storage.
2. The method for uniformly storing multi-version knowledge graphs according to claim 1, wherein the method for constructing the multi-version knowledge graph for uniform storage specifically comprises the following steps:
constructing knowledge graphs based on the same ontology data source and different time versions;
through the time range selection instruction, the knowledge maps of different versions can be restored;
or querying the evolution path of a certain entity or relationship in different versions.
3. The method of claim 1, wherein the multi-version unified knowledge-graph data structure is based on a common knowledge-graph data structure, and timestamp attributes are added to the entities and relationships based on the common knowledge-graph data structure, wherein the timestamp attributes comprise a start time and an end time.
4. The method of claim 1, wherein the method further comprises at least one of:
determining addition of entities of each group of adjacent versions according to a preset difference rule;
or determining deletion of entities of each group of adjacent versions according to a preset difference rule;
or determining modification of the entity attributes of each group of adjacent versions according to a preset difference rule;
or determining the modification of the relationship between the entities of each group of adjacent versions according to a preset difference rule;
or determining addition of the relationship between the entities of each group of adjacent versions according to a preset difference rule;
or determining the deletion of the relationship between the entities of each group of adjacent versions according to a preset difference rule.
5. The method of claim 1, wherein the method further comprises at least one of:
determining addition of entities of each group of adjacent versions according to the evolution relation rule;
or determining deletion of each group of entities of adjacent versions according to the evolution relation rule;
or determining the updating of the entity attributes of each group of adjacent versions according to the evolution relation rule;
or determining the updating of the relationship between the entities of each group of adjacent versions according to the evolution relationship rule.
6. The method of claim 1, wherein the first version-based knowledge-graph database updates the knowledge-graph database according to an evolution relationship, and comprises at least one of:
adding a new entity according to the evolution analysis result;
or adding a new relationship according to the evolution analysis result;
or, determining the initial time attribute of the entity or relationship according to the version time of the current knowledge graph, and recording the value of the initial time as the sequence number of the current version if a certain entity or relationship appears in the knowledge graph of the current version for the first time;
or determining the ending time attribute of the entity or the relation according to the version time of the current knowledge graph, and recording the ending time attribute as the sequence number of the current version if a certain entity or relation appears in the knowledge graph of the current version for the last time.
7. The method of claim 1, wherein the method further comprises:
responding to a time range selection instruction, filtering the entities and the relations in the graph database according to time attributes, obtaining that the starting time of the entities and the relations is not more than the serial number of the appointed version, the ending time of the entities and the relations is not less than the serial number of the appointed version, filtering knowledge map data of a single version or a plurality of versions corresponding to the time range, and performing evolution analysis;
in response to the entity and relationship selection instructions, the entities and relationships in the graph database are filtered by the identifiers out of corresponding single or multiple versions of the entities and relationships.
8. A unified storage device for multi-version knowledge graphs, comprising:
the system comprises a first module, a second module and a third module, wherein the first module is used for obtaining a knowledge graph database of a plurality of different time versions based on the same ontology data source, and elements of the knowledge graph comprise entities, a set of relations and attributes of each entity;
a second module for adding time range attributes to all entities and relationships based on a multi-version unified knowledge graph data structure according to the version time of the data of the knowledge graph, the time range attributes including a start time and an end time;
the third module is used for calculating the difference relation between knowledge maps of every two adjacent versions based on a knowledge map database with a plurality of versions and a uniform structure according to a difference comparison rule and determining the evolution relation of each entity;
and the fourth module is used for updating the knowledge map database based on the knowledge map database of the first version according to the evolution relation so as to construct a knowledge map with multiple versions and unified storage.
9. An electronic device comprising a processor and a memory;
the memory is used for storing programs;
the processor executing the program realizes the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the storage medium stores a program, which is executed by a processor to implement the method according to any one of claims 1 to 7.
CN202210199599.0A 2022-03-01 2022-03-01 Unified storage method, device and medium for multi-version knowledge graph Pending CN114564515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210199599.0A CN114564515A (en) 2022-03-01 2022-03-01 Unified storage method, device and medium for multi-version knowledge graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210199599.0A CN114564515A (en) 2022-03-01 2022-03-01 Unified storage method, device and medium for multi-version knowledge graph

Publications (1)

Publication Number Publication Date
CN114564515A true CN114564515A (en) 2022-05-31

Family

ID=81716075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210199599.0A Pending CN114564515A (en) 2022-03-01 2022-03-01 Unified storage method, device and medium for multi-version knowledge graph

Country Status (1)

Country Link
CN (1) CN114564515A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115687656A (en) * 2022-11-15 2023-02-03 上海识装信息科技有限公司 Method, device, electronic device and storage medium for backtracking knowledge map
CN116756052A (en) * 2023-08-18 2023-09-15 建信金融科技有限责任公司 Data processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160217163A1 (en) * 2015-01-26 2016-07-28 Datos IO Inc. Infinite versioning by automatic coalescing
CN111475602A (en) * 2020-06-23 2020-07-31 成都数联铭品科技有限公司 Multi-version knowledge graph storage method and device, storage medium and electronic equipment
WO2020239965A1 (en) * 2019-05-31 2020-12-03 Luxembourg Institute Of Science And Technology (List) Method for consolidating dynamic knowledge organization systems
CN113901231A (en) * 2021-09-29 2022-01-07 中山大学 Method, device and medium for evolution analysis of knowledge graph

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160217163A1 (en) * 2015-01-26 2016-07-28 Datos IO Inc. Infinite versioning by automatic coalescing
WO2020239965A1 (en) * 2019-05-31 2020-12-03 Luxembourg Institute Of Science And Technology (List) Method for consolidating dynamic knowledge organization systems
CN111475602A (en) * 2020-06-23 2020-07-31 成都数联铭品科技有限公司 Multi-version knowledge graph storage method and device, storage medium and electronic equipment
CN113901231A (en) * 2021-09-29 2022-01-07 中山大学 Method, device and medium for evolution analysis of knowledge graph

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115687656A (en) * 2022-11-15 2023-02-03 上海识装信息科技有限公司 Method, device, electronic device and storage medium for backtracking knowledge map
CN116756052A (en) * 2023-08-18 2023-09-15 建信金融科技有限责任公司 Data processing method and device
CN116756052B (en) * 2023-08-18 2023-11-14 建信金融科技有限责任公司 Data processing method and device

Similar Documents

Publication Publication Date Title
US20140351241A1 (en) Identifying and invoking applications based on data in a knowledge graph
JP2004234567A (en) Transaction processing system, parallel control method and program
CA2659743A1 (en) Primenet data management system
CN114564515A (en) Unified storage method, device and medium for multi-version knowledge graph
US10599614B1 (en) Intersection-based dynamic blocking
US20220414157A1 (en) Apparatus and method for maintaining a machine learning model repository
CN114329096A (en) Method and system for processing native map database
CN109635119B (en) Industrial big data integration system based on ontology fusion
CN118210816A (en) Spark engine-based data blood-edge static analysis method and device, medium and product
CN117193802A (en) Merge space providing access to multiple instances of application content
US8548980B2 (en) Accelerating queries based on exact knowledge of specific rows satisfying local conditions
CN110851515B (en) A large data ETL model execution method and medium based on Spark distributed environment
CN106445913A (en) MapReduce-based semantic inference method and system
CN111831696A (en) Asset Information Storage Method and System Based on Graph Theory
CN104050264A (en) Method and device for generating SQL statement
JPH0550774B2 (en)
CN110647423A (en) Method, device and readable medium for creating storage volume mirror image based on application
Bronselaer et al. Propagation of data fusion
CN119621788A (en) Data lineage graph generation method, device, equipment, storage medium and program product
US20190303478A1 (en) Path query evaluation in graph databases
WO2016073198A1 (en) Systems, methods, and computer medium to optimize the storage of hydrocarbon reservoir simulation data
CN117743190A (en) Verification method and device for interface data flow playback and computer equipment
CN113626642B (en) Method, system and electronic device for assembling semantic structure of video script
CN115203488B (en) A graph database management method, device and electronic equipment
CN117851341B (en) Metadata indexing method, apparatus, computer device and storage medium

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