WO2023024098A1 - 生成知识图谱的方法、装置和计算机可读介质 - Google Patents

生成知识图谱的方法、装置和计算机可读介质 Download PDF

Info

Publication number
WO2023024098A1
WO2023024098A1 PCT/CN2021/115120 CN2021115120W WO2023024098A1 WO 2023024098 A1 WO2023024098 A1 WO 2023024098A1 CN 2021115120 W CN2021115120 W CN 2021115120W WO 2023024098 A1 WO2023024098 A1 WO 2023024098A1
Authority
WO
WIPO (PCT)
Prior art keywords
target system
knowledge graph
relationship
objects
picture
Prior art date
Application number
PCT/CN2021/115120
Other languages
English (en)
French (fr)
Inventor
赵芳
Original Assignee
西门子股份公司
西门子(中国)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to EP21954621.5A priority Critical patent/EP4372582A1/en
Priority to PCT/CN2021/115120 priority patent/WO2023024098A1/zh
Priority to CN202180098441.8A priority patent/CN117396861A/zh
Publication of WO2023024098A1 publication Critical patent/WO2023024098A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5854Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using shape and object relationship

Definitions

  • the embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device and computer-readable medium for generating a knowledge map.
  • Embodiments of the present invention provide a method, device, and computer-readable medium for generating a knowledge map, which can quickly obtain accurate information about objects and their relationships in a target system, so as to automatically generate a knowledge map.
  • a method for generating a knowledge graph is provided.
  • a picture of the target system is obtained; target recognition is performed on the picture to obtain the category of each object in the target system and the position information of each object in the picture; according to the position information of each object in the picture, The location information determines the relative positional relationship among the objects in the target system; the knowledge graph of the target system is generated according to the relative positional relationship and the identified categories of the objects.
  • an apparatus including a module for executing each step in the method provided in the first aspect.
  • an apparatus including: at least one memory configured to store computer-readable codes; at least one processor configured to call the computer-readable codes to execute the steps in the method provided in the first aspect .
  • a computer-readable medium where computer-readable code is stored on the computer-readable medium, and when the computer-readable code is executed by a processor, the processor executes the method provided in the first aspect. steps in the method.
  • a computer program product including computer readable codes, and when the computer readable codes are executed by a processor, each step in the method provided in the first aspect is implemented.
  • the knowledge map is automatically generated based on computer vision technology, wherein the object category in the target system and the relative positional relationship between objects are determined through target recognition, and the knowledge map is automatically generated based on this, with accurate information acquisition and generation process Efficient advantages.
  • the categories of the identified objects are the knowledge of the target system Entities in the map; determine the relationship between the entities in the knowledge map corresponding to the objects in the target system according to the relative positional relationship between the objects; according to the entities in the knowledge map of the target system and the entities The relationship between generates the knowledge graph of the target system.
  • the category of the object obtained by target recognition is used as the entity in the knowledge map, and the relationship between the entities in the knowledge map is determined according to the relative position relationship between objects, and the results of the target system are skillfully applied to the generation of the knowledge map. , using the method of object recognition to solve the problem of natural language processing.
  • the common sense of the mutual relationship between the identified objects can also be obtained; according to the relative positional relationship between the objects, determine each entity in the knowledge map corresponding to each object in the target system The relationship between entities, including: determining the relationship between entities in the knowledge map according to the relative positional relationship between the identified objects and the acquired common sense. Among them, common sense is combined to further determine the relationship between entities, making the information content of the generated knowledge map more accurate.
  • the target system is a factory, a production line or a process.
  • the target system is not limited to the industrial field, but can also be a system in other technical fields.
  • FIG. 1 is a schematic structural diagram of an apparatus for generating a knowledge map provided by an embodiment of the present invention.
  • FIG. 2 is a flow chart of a method for generating a knowledge map provided by an embodiment of the present invention.
  • Fig. 3 shows the process of generating a knowledge map in one embodiment.
  • Fig. 4 shows a process of performing target recognition on a picture of a target system in an embodiment.
  • Fig. 5 shows the process of determining the relationship among entities in the knowledge map of the target system in one embodiment.
  • Image acquisition module 112 Target recognition module 113: Position relationship determination module
  • the term “comprising” and its variants represent open terms meaning “including but not limited to”.
  • the term “based on” means “based at least in part on”.
  • the terms “one embodiment” and “an embodiment” mean “at least one embodiment.”
  • the term “another embodiment” means “at least one other embodiment.”
  • the terms “first”, “second”, etc. may refer to different or the same object. The following may include other definitions, either express or implied. Unless the context clearly indicates otherwise, the definition of a term is consistent throughout the specification.
  • FIG. 1 is a schematic structural diagram of an apparatus for generating a knowledge map provided by an embodiment of the present invention.
  • the device 10 for generating a knowledge graph can be implemented as a network of computer processors to execute the method 200 for generating a knowledge graph in the embodiment of the present invention, or it can also be a single computer, a single-chip microcomputer or a processing chip as shown in FIG. 1 , including At least one memory 101 comprising computer readable media such as random access memory (RAM).
  • Apparatus 10 also includes at least one processor 102 coupled with at least one memory 101 .
  • Computer executable code is stored in at least one memory 101 and, when executed by at least one processor 102, causes at least one processor 102 to perform the steps described herein.
  • At least one memory 101 shown in FIG. 1 may contain a program 11 for generating a knowledge graph, so that at least one processor 102 executes the method 200 for generating a knowledge graph described in the embodiment of the present invention.
  • the program 11 for generating a knowledge graph may include: an image acquisition module 111 , an object recognition module 112 , a location relationship determination module 113 and a knowledge graph generation module 114 . As shown in Figure 3, the operations performed by each module are as follows:
  • the picture acquiring module 111 configured to acquire a picture 20 of the target system; wherein, the target system can be a factory, a production line or a process, and any part of the industrial system. Of course, the target system can also be other systems or components other than the industrial system.
  • the target recognition module 112 configured to perform target recognition on the picture 20 to obtain the category 31 of each object in the target system and the position information 32 of each object in the picture 20 .
  • the relative positional relationship 42 includes but not limited to: angle information between objects, the distance between the center points of the identified candidate areas (bounding boxes) of each object, and the positions of the identified candidate areas of each object The relative relationship of the points, the size of the overlapping area between the candidate areas, the relative positional relationship between the overlapping areas, etc. Due to the different angles of the lens shooting target system, the proportional relationship between objects may not match the actual situation.
  • the relative position relationship 42 includes various position information, so that feature variables can be extracted according to different business requirements, and finally get Relatively accurate relationships between objects.
  • a knowledge graph generating module 114 configured to generate a knowledge graph 50 of the target system according to the relative positional relationship 42 and the recognized category 31 of each object.
  • the knowledge graph generating module 114 may include: an entity relationship determining unit 1142 and a knowledge graph generating unit 1141 .
  • the entity relationship determination unit 1142 can determine the relationship 42' between entities in the knowledge graph corresponding to each object in the target system according to the relative position relationship 42 between the objects
  • the knowledge graph generation unit 1141 can determine the identified
  • the object category 31 is each entity in the knowledge graph of the target system
  • the knowledge graph 50 of the target system is generated according to each entity in the knowledge graph of the target system and the relationship 42 ′ between the entities.
  • the device 10 may further include a commonsense acquisition module 115 configured to acquire the commonsense 60 of the mutual relationship between identified objects as an input of the entity relationship determination unit 1142 .
  • the entity relationship determination unit 1142 can determine the relationship 42' between entities in the knowledge graph according to the identified relative positional relationship 42 between objects and common sense 60.
  • the category 31 of each object can also be used as an input to help determine the relationship between objects.
  • entity recognition and knowledge map generation are no longer regarded as two independent issues from a traditional perspective.
  • the process of generating a knowledge graph the relationship between entities is obtained while acquiring entity information, thereby automatically generating a knowledge graph.
  • object recognition techniques in computer vision are used to identify entities in pictures or videos, and then the relationship between entities is determined based on the relative positional relationship between detected objects in the picture, optionally also using common sense To further determine the relationship between entities.
  • a table including the entity pair and the relationship between the entities in the entity pair can be generated, and finally a knowledge map is automatically generated based on the table.
  • only pictures need to be input, which skillfully avoids the difficulty of extracting entity information from different data sources. The whole process can be completed automatically, which significantly reduces human participation, greatly improves the efficiency of knowledge map generation, and reduces economic costs.
  • the target recognition module 112 in an embodiment of the present invention will be described below with reference to FIG. 4 .
  • the target system is a production line in the automobile manufacturing workshop, wherein, you can choose to speed up-region RCNN (Faster Regions with CNN features, Faster-RCNN) with CNN features as the target recognition model used by the target recognition module 112 .
  • RCNN Faster Regions with CNN features, Faster-RCNN
  • Image 20 includes a car, two tires, a car logo and a mechanical arm.
  • Faster-RCNN can include four parts.
  • the convolutional neural network (Convolutional Neural Networks, CNN) is used to extract features from the picture 20, its input is the entire picture 20, and the output is the extracted feature, that is, the feature map (feature map) shown in Figure 4, and the output Including multiple candidate regions (ie bounding boxes).
  • Region of interest pooling (Region of interest pooling, ROI pooling) is used to convert bounding boxes of different sizes into the same size, that is, to unify the image size and output, which is beneficial to subsequent classification tasks.
  • the other part is classification and regression, which classifies each bounding box and can give the final position information.
  • a complete object recognition model requires the mutual coordination of the above components. For the trained model, it only needs to input some pictures to quickly identify all objects on the production line. Using an object recognition model avoids manual entry of entities to generate a knowledge graph. It should be noted that Quicken-RCNN is only an example of a target recognition model, and other CNN-based models can also be used to recognize objects and location information in the picture 20 .
  • the relationship between entities can be obtained from the relative positional relationship between objects.
  • both the tire and the car logo are within the location of the car, which means that the car can include the tire and the car logo, and the entity "car” has the attributes "tyre” and "car logo". Therefore, it is feasible to obtain the corresponding relationship between entities from the relative positional relationship between objects.
  • location information is important but prior knowledge about images is also informative, here called “common sense”. Therefore, in some embodiments of the present invention, the relative positional relationship between objects and common sense can be used to jointly identify the relationship between entities.
  • the entity relationship determining unit 1142 can perform classification based on sufficient core features.
  • An example of the entity relationship determination unit 1142 is an artificial neural network (Artificial Neural Network, ANN), which is used to identify the relationship between the entities corresponding to the objects in the picture 20.
  • the input of the ANN includes the relative position relationship 42 between objects in the picture, and the possible relationship between two entities from common sense 60, and the output is the relationship 42' between the entities.
  • ANN Artificial Neural Network
  • the positional relationship determining module 113 performs feature extraction on the positional information 32 of each object in the picture 20, and obtains the relative positional relationship 42 between the objects in the target system, and the extracted feature of the relative positional relationship 42 includes at least one of the following information one item:
  • the entity relationship determining unit 1142 can infer the relationship between entities through the entity relationship prediction model (ie, the aforementioned ANN).
  • the entity relationship prediction model ie, the aforementioned ANN.
  • the relationship between the car and the tire is that the car includes the tire
  • the relationship between the car and the robotic arm is that the robotic arm grabs the car
  • the two tires are the same entity.
  • a table including entity A, entity B and the relationship between entities can be obtained, and the table can be output by the entity relationship determining unit 1142 .
  • the script can be triggered to automatically connect to the neo4j database and generate a knowledge graph 50 based on the table.
  • the picture 20 is taken as an example here, but in actual processing, the embodiment of the present invention can process the video, because the video can be regarded as composed of frames of pictures.
  • the above-mentioned modules included in the program 11 of the knowledge map can also be implemented by hardware, and the device 10 for executing the knowledge map generation is performing various operations of the method for generating the knowledge map, such as pre-setting the control logic of each process involved in the method Burn into such as Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) chip or Complex Programmable Logic Device (Complex Programmable Logic Device, CPLD), and these chips or devices perform the functions of the above-mentioned modules.
  • the method can be determined according to engineering practice.
  • the apparatus 10 for generating a knowledge graph may further include a communication module 103 for communicating with other devices.
  • the embodiments of the present invention may include devices having architectures different from those shown in FIG. 1 .
  • the above architecture is only exemplary, and is used to explain the method 200 for generating a knowledge map provided by the embodiment of the present invention.
  • At least one processor 102 may include a microprocessor, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a central processing unit (CPU), a graphics processing unit (GPU), a state machine, and the like.
  • ASIC application specific integrated circuit
  • DSP digital signal processor
  • CPU central processing unit
  • GPU graphics processing unit
  • Examples of computer readable media include, but are not limited to, floppy disks, CD-ROMs, magnetic disks, memory chips, ROM, RAM, ASICs, configured processors, all-optical media, magnetic tape or other magnetic media, or from which a computer processor can Any other medium that reads the code.
  • various other forms of computer-readable media can transmit or carry the code to the computer, including routers, private or public networks, or other wired and wireless transmission devices or channels.
  • Code may include code in any computer programming language, including C, C++, C++, Visual Basic, java, and JavaScript.
  • FIG. 2 is a flow chart of a method for generating a knowledge map provided by an embodiment of the present invention.
  • the method 200 may be executed by the aforementioned device 10 for generating a knowledge graph, and may include the following steps:
  • -S202 Perform target recognition on the picture 20 to obtain the category 31 of each object in the target system and the position information 32 of each object in the picture 20;
  • step S204 may include:
  • the method may include:
  • Embodiments of the present invention further provides a computer-readable medium, on which computer-readable codes are stored; and a computer program product, including the computer-readable codes.
  • the computer readable code implements the method 200 when executed by a processor.
  • Examples of computer readable media include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tape, non- Volatile memory card and ROM.
  • the computer readable codes can be downloaded from a server computer or cloud by a communication network.

Landscapes

  • Engineering & Computer Science (AREA)
  • Library & Information Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

一种生成知识图谱的方法、装置和计算机可读介质。其中方法包括:获取(S201)目标系统的一张图片;对所述图片进行(S202)目标识别得到所述目标系统中各物体的类别以及各物体在所述图片中的位置信息;根据各物体在所述图片中的位置信息确定(S203)所述目标系统中各物体之间的相对位置关系;根据所述相对位置关系以及识别出的各物体的类别生成(S204)所述目标系统的知识图谱。能够快速获取目标系统中物体及相互关系的准确信息,以自动生成知识图谱。

Description

生成知识图谱的方法、装置和计算机可读介质 技术领域
本发明实施例涉及计算机技术领域,尤其涉及一种生成知识图谱的方法、装置和计算机可读介质。
背景技术
随着科学技术的发展,对传统工厂进行数字化改造已迫在眉睫。数字化转型的关键是打破各种数据格式之间的壁垒,收集各种信息以建立全面的知识图谱(Knowledge Graph,KG),这可以使工厂生产能力更加透明,又能够提高管理效率。然而,在创建KG的过程中,不同领域的工厂在生产线和设备方面存在巨大差异,使得很难有一种通用的方法能够为不同的工厂快速创建知识图谱。
以生产线的信息获取为例,在实际应用中通常有两种方法:一、手工输入,二、从不同数据源中提取信息。对于大型复杂的生产线,手工输入需要花费大量的时间和人力成本。而由于不同数据源的数据格式不同,信息类型多样(比如:包括图片、表格等信息),现有的技术和方案很难快速提取准确信息。
发明内容
本发明实施例提供了一种生成知识图谱的方法、装置和计算机可读介质,能够快速获取目标系统中物体及相互关系的准确信息,以自动生成知识图谱。
第一方面,提供一种生成知识图谱的方法。该方法中,获取目标系统的一张图片;对所述图片进行目标识别得到所述目标系统中各物体的类别以及各物体在所述图片中的位置信息;根据各物体在所述图片中的位置信息确定所述目标系统中各物体之间的相对位置关系;根据所述相对位置关系以及识别出的各物体的类别生成所述目标系统的知识图谱。
第二方面,提供一种装置,包括用于执行第一方面提供的方法中各步骤的模块。
第三方面,提供一种装置,包括:至少一个存储器,被配置为存储计算机可读代码;至少一个处理器,被配置为调用所述计算机可读代码,执行第一方面提供的方法中各步骤。
第四方面,提供一种计算机可读介质,所述计算机可读介质上存储有计算机可读代码,所述计算机可读代码在被处理器执行时,使所述处理器执行第一方面提供的方法中各步骤。
第五方面,提供一种计算机程序产品,包括计算机可读代码,所述计算机可读代码被处 理器执行时实现第一方面提供的方法中各步骤。
本发明实施例中,基于计算机视觉技术自动生成知识图谱,其中通过目标识别确定目标系统中的物体类别和物体之间的相对位置关系,并基于此自动生成知识图谱,具有信息获取准确,生成过程高效的优点。
对于上述任一方面,可选地,在根据所述相对位置关系以及识别出的各物体的类别生成所述目标系统的知识图谱时,确定识别出的各物体的类别为所述目标系统的知识图谱中的各实体;根据各物体之间的相对位置关系确定所述目标系统中各物体所对应知识图谱中各实体之间的关系;根据所述目标系统的知识图谱中的各实体以及各实体之间的关系生成所述目标系统的知识图谱。其中,将目标识别得到的物体的类别作为知识图谱中的实体,而根据物体之间的相对位置关系确定知识图谱中实体之间的关系,巧妙地将目标系统的结果运用到知识图谱的生成中,利用目标识别的方法解决了自然语言处理的问题。
对于上述任一方面,可选地,还可获取识别出的各物体之间的相互关系的常识;根据各物体之间的相对位置关系确定所述目标系统中各物体所对应知识图谱中各实体之间的关系,包括:根据识别出的各物体之间的相对位置关系以及获取的常识确定知识图谱中各实体之间的关系。其中,结合了常识来进一步确定实体间的关系,使得生成的知识图谱信息内容更加精确。
对于上述任一方面,可选地,目标系统为一个工厂、一条生产线或一道工序。当然,目标系统不仅限于工业领域,也可以是其他技术领域中的系统。
附图说明
图1为本发明实施例提供的生成知识图谱的装置的结构示意图。
图2为本发明实施例提供的生成知识图谱的方法的流程图。
图3示出了一个实施例中生成知识图谱的过程。
图4示出了一个实施例中对目标系统的图片进行目标识别的过程。
图5示出了一个实施例中确定目标系统的知识图谱中各实体间关系的过程。
附图标记列表:
10:生成知识图谱的装置
101:存储器 102:处理器 103:通信模块
11:生成知识图谱的程序
111:图片获取模块 112:目标识别模块 113:位置关系确定模块
114:知识图谱生成模块 1142:实体关系确定单元 1141:知识图谱生成单元
115:常识获取模块
200:生成知识图谱的方法 S201~S205:方法步骤
20:图片 31:目标识别得到的目标系统中各物体的类别
32:目标系统得到的目标系统中各物体在图片 20中的位置信息
42:目标系统中各物体之间的相对位置关系
42’:目标系统的知识图谱中各实体之间的关系
50:目标系统的知识图谱 60:常识
具体实施方式
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本发明实施例内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。例如,所描述的方法可以按照与所描述的顺序不同的顺序来执行,以及各个步骤可以被添加、省略或者组合。另外,相对一些示例所描述的特征在其它例子中也可以进行组合。
如本文中使用的,术语“包括”及其变型表示开放的术语,含义是“包括但不限于”。术语“基于”表示“至少部分地基于”。术语“一个实施例”和“一实施例”表示“至少一个实施例”。术语“另一个实施例”表示“至少一个其他实施例”。术语“第一”、“第二”等可以指代不同的或相同的对象。下面可以包括其他的定义,无论是明确的还是隐含的。除非上下文中明确地指明,否则一个术语的定义在整个说明书中是一致的。
下面,结合图1~图5对本发明实施例进行详细说明。
图1为本发明实施例提供的生成知识图谱的装置的结构示意图。生成知识图谱的装置10可实现为计算机处理器的网络,以执行本发明实施例中的生成知识图谱的方法200,或者也可以是如图1所示的单台计算机、单片机或处理芯片,包括至少一个存储器101,其包括计算机可读介质,例如随机存取存储器(RAM)。装置10还包括与至少一个存储器101耦合的至少一个处理器102。计算机可执行代码存储在至少一个存储器101中,并且当由至少一个处理器102执行时,可以使至少一个处理器102执行本文所述的步骤。
图1中所示的至少一个存储器101可以包含生成知识图谱的程序11,使得至少一个处理 器102执行本发明实施例中所述的生成知识图谱的方法200。如图1所示,生成知识图谱的程序11可以包括:图像获取模块111、目标识别模块112、位置关系确定模块113和知识图谱生成模块114。如图3所示,各模块执行的操作如下:
-图片获取模块111,被配置为获取目标系统的一张图片20;其中,目标系统可为一个工厂、一条生产线或一道工序以及工业系统中的任何一部分。当然,目标系统也可为工业系统之外的其他系统或其组成部分。
-目标识别模块112,被配置为对图片20进行目标识别得到目标系统中各物体的类别31以及各物体在图片20中的位置信息32。
-位置关系确定模块113,被配置为根据各物体在图片中的位置信息32确定目标系统中各物体之间的相对位置关系42。其中,该相对位置关系42包括但不限于:物体之间的角度信息,识别出的各物体的候选区域(bounding box)的中心点之间的距离,识别出的各物体的候选区域的各个位置点的相对关系,候选区域之间的重叠区域大小、重叠区域之间的相对位置关系等。由于镜头拍摄目标系统的角度不同,可能导致物体之间的比例关系等与实际不相符,相对位置关系42包括各种不同的位置信息,这样就可以根据不同的业务需求来提取特征变量,最终得到物体之间相对准确的关系。
-知识图谱生成模块114,被配置为根据相对位置关系42以及识别出的各物体的类别31生成目标系统的知识图谱50。
其中,知识图谱生成模块114可包括:实体关系确定单元1142和知识图谱生成单元1141。其中,实体关系确定单元1142可根据各物体之间的相对位置关系42确定目标系统中各物体所对应知识图谱中各实体之间的关系42’,而知识图谱生成单元1141可确定识别出的各物体的类别31为目标系统的知识图谱中的各实体,并根据目标系统的知识图谱中的各实体以及各实体之间的关系42’生成目标系统的知识图谱50。
可选地,装置10还可包括常识获取模块115,被配置为获取识别出的各物体之间的相互关系的常识60,作为实体关系确定单元1142的输入。实体关系确定单元1142可根据识别出的各物体之间的相对位置关系42以及常识60确定知识图谱中各实体之间的关系42’。
在位置关系确定模块113、实体关系确定单元1142的处理过程中,各物体的类别31也可作为输入,帮助确定物体之间的相互关系。
本发明实施例中,不再从传统角度将实体识别和知识图谱生成视为两个独立的问题。相反,在生成知识图谱的过程中,在获取实体信息的同时获取实体之间的关系,从而自动生成知识图谱。首先,将计算机视觉中的目标识别技术用于识别图片或视频中的实体,然后,根据检测到的图片中物体之间的相对位置关系来确定实体之间的关系,可选地,还使用常识来 进一步确定实体之间的关系。接下来可生成包括了实体对和实体对中实体之间关系的表,最终基于该表自动生成知识图谱。本发明实施例中,仅需要输入图片,这巧妙地避免了从不同数据源中提取实体信息的困难。整个过程可自动完成,显著降低了人的参与,极大提高了知识图谱的生成效率,降低了经济成本。
下面,结合图4说明本发明的一个实施例中,目标识别模块112执行的详细操作。该实施例中,目标系统为汽车制造车间中的一条生产线,其中,可选择加快-具有CNN特征的区域RCNN(Faster Regions with CNN features,Faster-RCNN)作为目标识别模块112所使用的目标识别模型。
如图4所示,生产线日常工作维护过程中拍摄的图片20中的物体均可由目标识别模块112识别。图片20包括一辆汽车、两个轮胎、一个汽车标志和一个机械臂。Faster-RCNN可包括四部分。卷积神经网络(Convolutional Neural Networks,CNN)用于从图片20中提取特征,其输入是整个图片20,输出是提取出的特征,即图4中所示的特征图(feature map),并且输出包括多个候选区域(即bounding box)。感兴趣区域池化(Region of interest pooling,ROI pooling)用于将大小不同的bounding box转换成相同大小,即统一图片大小并输出,这有利于后续的分类任务。另一部分是分类和回归,其为各bounding box分类并能给出最终的位置信息。完整的目标识别模型需要上述各组成部分的相互协调。对于已训练好的模型,仅需要输入一些图片,就能快速识别生产线上的所有物体。使用目标识别模型可避免手动输入实体来生成知识图谱。需要说明的是,加快-RCNN仅为目标识别模型的一个例子,其他基于CNN的模型也可用于识别图片20中的物体和位置信息。
实体之间的关系可由物体之间的相对位置关系得到。比如:在图片20中,轮胎和汽车标志都在汽车的位置范围内,这意味着汽车可以包括轮胎和汽车标志,实体“汽车”具有属性“轮胎”和“汽车标志”。因此,从物体之间的相对位置关系得到对应的实体之间的关系是可行的。并且,由经验可知,对于同一个物体从不同角度拍摄的图片存在显著区别。位置信息很重要但关于图片的先验知识也具有参考意义,这里称为“常识”。因此,本发明的一些实施例中,可以使用物体之间的相对位置关系和常识来共同识别出实体之间的关系。
结合常识60,本发明的一些实施例中,可借鉴生产线上实体之间的关系(如下表中所示)
Figure PCTCN2021115120-appb-000001
Figure PCTCN2021115120-appb-000002
Figure PCTCN2021115120-appb-000003
通过增加常识60,实体关系确定单元1142则能够基于足够的核心特征来进行分类。实体关系确定单元1142的一个例子是人工神经网络(Artificial Neural Network,ANN),用于识别图片20中各物体所对应实体之间的关系。该ANN的输入包括图片中各物体之间的相对位置关系42,以及来自常识60的两个实体之间可能的关系,输出是实体之间的关系42’。
位置关系确定模块113对各物体在图片20中的位置信息32进行特征提取,得到目标系统中各物体之间的相对位置关系42,该相对位置关系42即提取出的特征包括下列信息中的至少一项:
-物体之间的角度信息;
-识别出的各物体的候选区域(bounding box)的中心点之间的距离;
-识别出的各物体的候选区域的各个位置点的相对关系;
-候选区域之间的重叠区域大小;
-重叠区域之间的相对位置关系等。
上述信息对于发现实体之间的关系非常重要。下表中是一些新特征的定义:
特征 定义
重叠率 重叠区域占总候选区域的比率
相对位置-L(左) 实体A在实体B的左侧
相对位置-R(右) 实体A在实体B的右侧
相对位置-U(上) 实体A在实体B的前面
相对位置-D(下) 实体A在实体B的后面
相对距离 实体A的中心与实体B的中心之间的距离
需要说明的是不同工厂或不同技术领域需要提取的特征不同,这里举例说明了特征提取在整个确定实体之间关系的过程中的作用。
下面,结合图5介绍实体关系确定单元1142是如何基于常识60和提取出的特征来确定实体间关系的。实体关系确定单元1142可通过实体关系预测模型(即前述的ANN)来推测实体之间的关系。在图片20中,汽车和轮胎之间的关系是汽车包括轮胎,汽车和机械臂之间的关系是机器臂抓取汽车,两个轮胎是相同的实体。这样即可得到包括实体A、实体B和实体间关系的表,该表可由实体关系确定单元1142输出。最终,可触发脚本自动连接neo4j数据库并基于该表生成知识图谱50。
需要说明的是,这里以图片20为例,但实际在处理时,本发明实施例可对视频进行处理,因为视频可视为是一帧帧的图片所组成的。
知识图谱的程序11中包括的上述各模块也可由硬件实现,用于执行生成知识图谱的装置10在执行生成知识图谱的方法的各项操作,比如预先将该方法中涉及的各流程的控制逻辑烧制到诸如现场可编程门阵列(Field-Programmable Gate Array,FPGA)芯片或复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)中,而由这些芯片或器件执行上述各模块的功能,具体实现方式可依工程实践而定。
此外,生成知识图谱的装置10还可包括一个通信模块103,用于与其他设备之间进行通信。
应当提及的是,本发明实施例可以包括具有不同于图1所示架构的装置。上述架构仅仅是示例性的,用于解释本发明实施例提供的生成知识图谱的方法200。
其中,至少一个处理器102可以包括微处理器、专用集成电路(ASIC)、数字信号处理器(DSP)、中央处理单元(CPU)、图形处理单元(GPU)、状态机等。计算机可读介质的实施例包括但不限于软盘、CD-ROM、磁盘,存储器芯片、ROM、RAM、ASIC、配置的处理器、全光介质、所有磁带或其他磁性介质,或计算机处理器可以从中读取代码的任何其他介质。此外,各种其它形式的计算机可读介质可以向计算机发送或携带代码,包括路由器、专 用或公用网络、或其它有线和无线传输设备或信道。代码可以包括任何计算机编程语言的代码,包括C、C++、C语言、Visual Basic、java和JavaScript。
图2为本发明实施例提供的生成知识图谱的方法的流程图。该方法200可由前述的生成知识图谱的装置10执行,可包括如下步骤:
-S201:获取目标系统的一张图片20;
-S202:对图片20进行目标识别得到目标系统中各物体的类别31以及各物体在图片20中的位置信息32;
-S203:根据各物体在图片中的位置信息32确定目标系统中各物体之间的相对位置关系42;
-S204:根据相对位置关系42以及识别出的各物体的类别31生成目标系统的知识图谱50。
可选地,步骤S204可包括:
-S2041:确定识别出的各物体的类别31为目标系统的知识图谱中的各实体;
-S2042:根据各物体之间的相对位置关系42确定目标系统中各物体所对应知识图谱中各实体之间的关系42’;
-S2043:根据目标系统的知识图谱中的各实体以及各实体之间的关系生成目标系统的知识图谱50。
此外,该方法还可包括:
-S205:获取识别出的各物体之间的相互关系的常识60;
-在步骤S2042中根据各物体之间的相对位置关系确定目标系统中各物体所对应知识图谱中各实体之间的关系时,可根据识别出的各物体之间的相对位置关系42以及获取的常识60确定知识图谱中各实体之间的关系42’。
本发明实施例实施例还提供一种计算机可读介质,该计算机可读介质上存储有计算机可读代码;以及计算机程序产品,包括计算机可读代码。所述计算机可读代码被处理器执行时实现方法200。计算机可读介质的实施例包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD+RW)、磁带、非易失性存储卡和ROM。可选地,可以由通信网络从服务器计算机上或云上下载计算机可读代码。
需要说明的是,上述各流程和各系统结构图中不是所有的步骤和模块都是必须的,可以 根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。上述各实施例中描述的系统结构可以是物理结构,也可以是逻辑结构,即,有些模块可能由同一物理实体实现,或者,有些模块可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。

Claims (11)

  1. 一种生成知识图谱的方法(200),其特征在于,包括:
    -获取(S201)目标系统的一张图片(20);
    -对所述图片(20)进行(S202)目标识别得到所述目标系统中各物体的类别(31)以及各物体在所述图片(20)中的位置信息(32);
    -根据各物体在所述图片中的位置信息(32)确定(S203)所述目标系统中各物体之间的相对位置关系(42);
    -根据所述相对位置关系(42)以及识别出的各物体的类别(31)生成(S204)所述目标系统的知识图谱(50)。
  2. 如权利要求1所述的方法,其特征在于,根据所述相对位置关系(42)以及识别出的各物体的类别(31)生成(S204)所述目标系统的知识图谱,包括:
    -确定(S2041)识别出的各物体的类别(31)为所述目标系统的知识图谱中的各实体;
    -根据各物体之间的相对位置关系(42)确定(S2042)所述目标系统中各物体所对应知识图谱中各实体之间的关系(42’);
    -根据所述目标系统的知识图谱中的各实体以及各实体之间的关系生成(S2043)所述目标系统的知识图谱(50)。
  3. 如权利要求1所述的方法,其特征在于,
    -所述方法还包括:获取(S205)识别出的各物体之间的相互关系的常识(60);
    -根据各物体之间的相对位置关系确定(S2042)所述目标系统中各物体所对应知识图谱中各实体之间的关系,包括:根据识别出的各物体之间的相对位置关系(42)以及获取的常识(60)确定知识图谱中各实体之间的关系(42’)。
  4. 如权利要求1所述的方法,所述目标系统为一个工厂、一条生产线或一道工序。
  5. 一种生成知识图谱的装置(10),其特征在于,包括:
    -图片获取模块(111),被配置为获取目标系统的一张图片(20);
    -目标识别模块(112),被配置为对所述图片(20)进行目标识别得到所述目标系统中各物体的类别(31)以及各物体在所述图片(20)中的位置信息(32);
    -位置关系确定模块(113),被配置为根据各物体在所述图片中的位置信息(32)确定所述目标系统中各物体之间的相对位置关系(42);
    -知识图谱生成模块(114),被配置为根据所述相对位置关系(42)以及识别出的各物体的类别(31)生成所述目标系统的知识图谱(50)。
  6. 如权利要求5所述的装置(10),其特征在于,所述知识图谱生成模块(114),包括:实体关系确定单元(1142)和知识图谱生成单元(1141),
    -所述实体关系确定单元(1142),被配置为:根据各物体之间的相对位置关系(42)确定所述目标系统中各物体所对应知识图谱中各实体之间的关系(42’);
    -所述知识图谱生成单元(1141),被配置为:确定识别出的各物体的类别(31)为所述目标系统的知识图谱中的各实体;以及根据所述目标系统的知识图谱中的各实体以及各实体之间的关系(42’)生成所述目标系统的知识图谱(50)。
  7. 如权利要求5所述的装置(10),其特征在于,
    -还包括:常识获取模块(115),被配置为获取识别出的各物体之间的相互关系的常识(60);
    -所述实体关系确定单元(1142),被具体配置为:根据识别出的各物体之间的相对位置关系(42)以及获取的常识(60)确定知识图谱中各实体之间的关系(42’)。
  8. 如权利要求5所述的装置(10),所述目标系统为一个工厂、一条生产线或一道工序。
  9. 一种生成知识图谱的装置(10),其特征在于,包括:
    至少一个存储器(101),被配置为存储计算机可读代码;
    至少一个处理器(102),被配置为调用所述计算机可读代码,执行如权利要求1~4中任一项所述方法的步骤。
  10. 一种计算机可读介质,其特征在于,所述计算机可读介质上存储有计算机可读代码,所述计算机可读代码在被处理器执行时,使所述处理器执行如权利要求1~4任一项所述方法的步骤。
  11. 一种计算机程序产品,包括计算机可读代码,其特征在于,所述计算机可读代码被处理器执行时实现如权利要求1~4任一项所述方法的步骤。
PCT/CN2021/115120 2021-08-27 2021-08-27 生成知识图谱的方法、装置和计算机可读介质 WO2023024098A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP21954621.5A EP4372582A1 (en) 2021-08-27 2021-08-27 Knowledge graph generation method and apparatus and computer readable medium
PCT/CN2021/115120 WO2023024098A1 (zh) 2021-08-27 2021-08-27 生成知识图谱的方法、装置和计算机可读介质
CN202180098441.8A CN117396861A (zh) 2021-08-27 2021-08-27 生成知识图谱的方法、装置和计算机可读介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/115120 WO2023024098A1 (zh) 2021-08-27 2021-08-27 生成知识图谱的方法、装置和计算机可读介质

Publications (1)

Publication Number Publication Date
WO2023024098A1 true WO2023024098A1 (zh) 2023-03-02

Family

ID=85322409

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/115120 WO2023024098A1 (zh) 2021-08-27 2021-08-27 生成知识图谱的方法、装置和计算机可读介质

Country Status (3)

Country Link
EP (1) EP4372582A1 (zh)
CN (1) CN117396861A (zh)
WO (1) WO2023024098A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160203137A1 (en) * 2014-12-17 2016-07-14 InSnap, Inc. Imputing knowledge graph attributes to digital multimedia based on image and video metadata
CN106355627A (zh) * 2015-07-16 2017-01-25 中国石油化工股份有限公司 一种用于生成知识图谱的方法及系统
CN109635121A (zh) * 2018-11-07 2019-04-16 平安科技(深圳)有限公司 医疗知识图谱创建方法及相关装置
CN110457403A (zh) * 2019-08-12 2019-11-15 南京星火技术有限公司 图网络决策系统、方法及知识图谱的构建方法
CN110598021A (zh) * 2018-05-25 2019-12-20 阿里巴巴集团控股有限公司 获取图片的知识图谱的方法、装置和系统
US20200233899A1 (en) * 2019-01-17 2020-07-23 International Business Machines Corporation Image-based ontology refinement
CN111967367A (zh) * 2020-08-12 2020-11-20 维沃移动通信有限公司 图像内容提取方法、装置及电子设备
CN112069326A (zh) * 2020-09-03 2020-12-11 Oppo广东移动通信有限公司 知识图谱的构建方法、装置、电子设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160203137A1 (en) * 2014-12-17 2016-07-14 InSnap, Inc. Imputing knowledge graph attributes to digital multimedia based on image and video metadata
CN106355627A (zh) * 2015-07-16 2017-01-25 中国石油化工股份有限公司 一种用于生成知识图谱的方法及系统
CN110598021A (zh) * 2018-05-25 2019-12-20 阿里巴巴集团控股有限公司 获取图片的知识图谱的方法、装置和系统
CN109635121A (zh) * 2018-11-07 2019-04-16 平安科技(深圳)有限公司 医疗知识图谱创建方法及相关装置
US20200233899A1 (en) * 2019-01-17 2020-07-23 International Business Machines Corporation Image-based ontology refinement
CN110457403A (zh) * 2019-08-12 2019-11-15 南京星火技术有限公司 图网络决策系统、方法及知识图谱的构建方法
CN111967367A (zh) * 2020-08-12 2020-11-20 维沃移动通信有限公司 图像内容提取方法、装置及电子设备
CN112069326A (zh) * 2020-09-03 2020-12-11 Oppo广东移动通信有限公司 知识图谱的构建方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN117396861A (zh) 2024-01-12
EP4372582A1 (en) 2024-05-22

Similar Documents

Publication Publication Date Title
WO2021022970A1 (zh) 一种基于多层随机森林的零部件识别方法及系统
CN111461245A (zh) 一种融合点云和图像的轮式机器人语义建图方法及系统
CN103208123B (zh) 图像分割方法与系统
JP2018200685A (ja) 完全教師あり学習用のデータセットの形成
CN110765922A (zh) 一种agv用双目视觉物体检测障碍物系统
CN106951830B (zh) 一种基于先验条件约束的图像场景多对象标记方法
CN105528588A (zh) 一种车道线识别方法及装置
CN112232293A (zh) 图像处理模型训练、图像处理方法及相关设备
CN110232379A (zh) 一种车辆姿态检测方法及系统
WO2021151277A1 (zh) 目标物损伤程度判定方法、装置、电子设备及存储介质
CN104992147A (zh) 一种基于快慢结合云计算环境的深度学习的车牌识别方法
TW201937405A (zh) 物件標示系統及方法
Yang et al. Multi-view semantic learning network for point cloud based 3D object detection
EP4105600A2 (en) Method for automatically producing map data, related apparatus and computer program product
CN112052855A (zh) 一种基于深度学习的车牌识别方法及装置
TW202121331A (zh) 基於機器學習的物件辨識系統及其方法
Lv et al. A novel approach for detecting road based on two-stream fusion fully convolutional network
Mo et al. Point-by-point feature extraction of artificial intelligence images based on the Internet of Things
CN114708566A (zh) 一种基于改进YOLOv4的自动驾驶目标检测方法
KR20230132350A (ko) 연합 감지 모델 트레이닝, 연합 감지 방법, 장치, 설비 및 매체
GB2572025A (en) Urban environment labelling
Yang et al. C-RPNs: Promoting object detection in real world via a cascade structure of Region Proposal Networks
WO2024093641A1 (zh) 多模态融合的高精地图要素识别方法、装置、设备及介质
Kong et al. PASS3D: Precise and accelerated semantic segmentation for 3D point cloud
WO2023024098A1 (zh) 生成知识图谱的方法、装置和计算机可读介质

Legal Events

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

Ref document number: 21954621

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180098441.8

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2021954621

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021954621

Country of ref document: EP

Effective date: 20240216

NENP Non-entry into the national phase

Ref country code: DE