WO2023045233A1 - 数据增强方法及装置 - Google Patents

数据增强方法及装置 Download PDF

Info

Publication number
WO2023045233A1
WO2023045233A1 PCT/CN2022/077042 CN2022077042W WO2023045233A1 WO 2023045233 A1 WO2023045233 A1 WO 2023045233A1 CN 2022077042 W CN2022077042 W CN 2022077042W WO 2023045233 A1 WO2023045233 A1 WO 2023045233A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
entity
relationship information
information
concept
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.)
Ceased
Application number
PCT/CN2022/077042
Other languages
English (en)
French (fr)
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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to US18/695,242 priority Critical patent/US20240273886A1/en
Publication of WO2023045233A1 publication Critical patent/WO2023045233A1/zh
Anticipated expiration legal-status Critical
Ceased 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/26Techniques for post-processing, e.g. correcting the recognition result
    • G06V30/262Techniques for post-processing, e.g. correcting the recognition result using context analysis, e.g. lexical, syntactic or semantic context
    • G06V30/274Syntactic or semantic context, e.g. balancing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • G06F16/355Creation or modification of classes or clusters
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/532Query formulation, e.g. graphical querying
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/55Clustering; Classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/809Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data
    • G06V10/811Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of classification results, e.g. where the classifiers operate on the same input data the classifiers operating on different input data, e.g. multi-modal recognition

Definitions

  • the present application relates to the field of software technology, and more specifically, to a data enhancement method and device.
  • the internal information of different modalities in the multimodal training data has certain limitations, and only using a single technology to process it will waste the supplementary information between different modalities.
  • the present application provides a data enhancement method, the method comprising:
  • the first data includes sub-data of multiple modalities, the sub-data of one modal corresponds to one data type, and the data types between different modalities are different;
  • Entity objects corresponding to different modalities are reasoned based on entity relationship information in the knowledge graph to obtain second data, where the second data is different from the first data.
  • the second data is obtained based at least on the target instance relationship information.
  • the two entity objects as instances in the new instance relationship information are the two entity objects corresponding to the target concept information, and the new instance relationship information
  • the relationship between instances is the relationship between concepts in the target concept information.
  • the entity relationship information also includes instance-concept relationship information, the two entities in the instance-concept relationship information are instances and concepts respectively, and the The target instance relationship information matched by the entity object, including:
  • the second data is obtained by reasoning sub-data of different modalities by using the target description information.
  • the second data is obtained by reasoning sub-data of different modalities by using the target description information and the common sense information.
  • the multiple modals include a text modal and an image modal, and determining an entity object matching its data type in the sub-data of each modal includes:
  • the first semantic model also outputs first intent information corresponding to the text modality, and the second semantic model further outputs second intent information corresponding to the image modality;
  • the determining the entity object matching its data type in the sub-data of each modality also includes:
  • a target image entity matching the second intent information among the image entities is obtained.
  • Another aspect of the present application provides a data enhancement device, the device comprising:
  • An entity determination module configured to determine an entity object matching its data type in the sub-data of each modality
  • Fig. 3 is an example of the sub-data of the image modality provided by the embodiment of the present application.
  • Fig. 5 is a partial method flowchart of a data enhancement method provided by another embodiment of the present application.
  • the present application provides a data enhancement method, which can be applied to electronic equipment, referring to the hardware structure block diagram of the electronic equipment shown in Figure 1, the hardware structure of the electronic equipment can include: a processor 11, a communication interface 12, a memory 13 and Communication bus 14;
  • the memory 13 stores the application program and the data generated by the operation of the application program, and the processor 11 executes the application program to realize the functions:
  • the first data contains sub-data of multiple modalities, the sub-data of one modal corresponds to one data type, and the data types between different modalities are different; An entity object whose data type matches; based on the entity relationship information in the knowledge graph, reasoning is performed on entity objects corresponding to different modalities to obtain second data, and the second data is different from the first data.
  • Step S102 Determine the entity object matching its data type in the sub-data of each modality.
  • the semantic model in the embodiment of the present application can further output intent information.
  • the first semantic model also outputs the first intention information corresponding to the text modality;
  • the second semantic model also outputs the second intention information corresponding to the image modality.
  • semantic model corresponding to the text mode such as SVM (Support Vector Machines, support vector machine), TextCNN (Text Convolutional Neural Network, text convolutional neural network), LSTM (Long Short-Term Memory, long Short-term memory network), BERT (Bidirectional Encoder Representations for Transformers, bidirectional encoder representation based on Transformers), etc. for intent recognition.
  • SVM Serial Vector Machines, support vector machine
  • TextCNN Text Convolutional Neural Network, text convolutional neural network
  • LSTM Long Short-Term Memory, long Short-term memory network
  • BERT Bidirectional Encoder Representations for Transformers, bidirectional encoder representation based on Transformers
  • the matching entity object is the target text entity matching the first intent information in the text entity; for the image modality, the matching entity object is the target text entity matching the second intent information information to match the target image entity.
  • the second data of the text mode may be obtained, such as "a man is walking on the Champs-Elysées in Paris in the rain”.
  • the entity relationship information in the knowledge graph includes instance relationship information, that is, "instance-relationship-instance". Therefore, for the entity objects corresponding to each modality in the first data, firstly determine the entity objects belonging to the instance, and then determine the instance relationship of the entity objects (belonging to the instance) between different modalities, that is, the target instance relationship information, the target In the instance relationship information, the two entity objects as instances belong to two modes.
  • Step S204 Obtain second data based at least on the target instance relationship information, where the second data is different from the first data.
  • Step S301 Determine the concept to which the entity object corresponding to each modality belongs in the knowledge graph.
  • the respective concepts of each text instance and each image instance can be obtained.
  • the concept of the text instance "man” is “person”
  • the concept of the text instance “Paris” is “city”
  • the image instance The concept of the example “Champs Elysees” is “street”
  • the concept of “La Rose Chinese Restaurant” is “restaurant”.
  • Step S302 Determine the target concept relationship information matching the entity objects corresponding to different modalities in the concept relationship information, and the two entity objects corresponding to the concepts in the target concept relationship information correspond to the two modalities.
  • the entity relationship information in the knowledge graph includes not only instance relationship information, but also concept relationship information, that is, "concept-relationship-concept".
  • concept relationship information that is, "concept-relationship-concept”.
  • Step S303 Determine new instance relationship information according to the target concept information, the two entity objects as instances in the new instance relationship information are the two entity objects corresponding to the target concept information, and the relationship between instances in the new instance relationship information is The relationship between concepts in the target concept information.
  • the description is continued by taking the first data including the sub-data of the text mode and the sub-data of the image mode as an example.
  • the text instance "man” belongs to the concept "person”
  • the text instance “Paris” belongs to the concept "city”
  • the image instance “Champs Elysees” belongs to the concept “street”
  • “La Rose Chinese restaurant” belongs to The concept of "restaurant”.
  • the instance relationship information “Champs Avenue Les Lis insomnia-Subordinate-Paris”, and the instance relation information "La Rose Chinese restaurant-located-Paris” can be determined according to the conceptual relational information of "restaurant-located-city”.
  • "Champs-Elysees-affiliated-Paris” and "La Rose Chinese restaurant-located in Paris” are new instance relationship information inferred based on the conceptual relationship information in the knowledge graph. The new instance relationship information is added to the knowledge map, and the knowledge map is supplemented and perfected.
  • the data enhancement method provided by the embodiment of this application can deduce new instance relationship information based on the existing concept relationship information in the knowledge graph, so as to continuously supplement and improve the knowledge graph.
  • instance relationship reasoning With the integration of more business knowledge, instance relationship reasoning The result is also more reasonable, and the present application has good practicability and effectiveness.
  • the entity relationship information also includes instance-concept relationship information, and the two entities in the instance-concept relationship information are instances and concepts respectively.
  • step S203 determining in the instance relationship information the target instance relationship information that matches the entity objects corresponding to different modalities"
  • Step S401 Determine the concept to which the entity object corresponding to each modality belongs in the knowledge graph.
  • the first data includes the sub-data of the text mode and the sub-data of the image mode as an example.
  • the subdata of the text modal "a man walking on the streets of Paris in the rain” contains text entities of "man”, “Paris” and “street”, where the text instances include “man” and “Paris”; the subdata of the image modal
  • the image entities in the data include “person”, “Champs Elysees” and “La Rose Chinese restaurant”, and the image instances include “Champs Elysees” and "La Rose Chinese restaurant”.
  • the respective concepts of each text instance and each image instance can be obtained.
  • the concept of the text instance "man” is “person”
  • the concept of the text instance “Paris” is "city”
  • the image instance The concept of the example “Champs Elysees” is “street”
  • the concept of "La Rose Chinese Restaurant” is "restaurant”.
  • the text entity "street” can also be determined as a concept (hereinafter referred to as a text concept for convenience of description)
  • the image entity "person” is also a concept (hereinafter referred to as an image concept for convenience of description).
  • Step S402 Determine the target instance-concept relationship information that matches the entity objects corresponding to different modalities in the instance-concept relationship information, and the two entity objects corresponding to instances and concepts in the target instance-concept relationship information correspond to two modalities.
  • the entity relationship information in the knowledge graph includes not only the instance relationship information, but also the instance-concept relationship information, that is, "instance-relationship-concept". Therefore, corresponding to the entity object corresponding to each modality in the first data, after determining the concept to which it belongs, the relationship between instances and concepts between different modalities can be further determined, that is, the target instance concept relationship information, the target instance concept relationship information In , the two entity objects as instances and as concepts belong to two modes.
  • the first data includes the sub-data of the text mode and the sub-data of the image mode as an example.
  • the concept-concept relationship information that contains a text instance and a concept to which an image instance belongs, or that contains an image instance and
  • the instance concept relationship information of the concept to which a certain text instance belongs that is, the target instance concept relationship information, which can be "text instance-relationship-concept to which the image instance belongs", or "image instance-relationship-concept to which the text instance belongs ".
  • Step S403 Determine new instance relationship information according to the target instance concept relationship information, and the two entity objects as instances in the new instance relationship information are the two entity objects corresponding to the target instance concept relationship information.
  • Another embodiment of the present application provides a data enhancement method, referring to the method flow chart shown in Figure 7, the method includes the following steps:
  • Step S501 Obtain first data.
  • the first data includes sub-data of multiple modalities.
  • the sub-data of one modal corresponds to one data type, and the data types are different among different modalities.
  • the target instance relationship information can be combined with common sense information to obtain enhanced data with smooth and coherent semantics.
  • the first data includes the sub-data of the text mode and the sub-data of the image mode as an example.
  • Text entities include “man”, “Paris” and “street”
  • image entities include “person”, “Champs Elysees”, “La Rose Chinese restaurant”
  • common sense information matching text entities and image entities can be obtained.
  • the matched common sense information includes "a city is composed of many streets", “people walk on the streets", " The restaurant is a kind of building on the street”, etc.
  • the description is continued by taking the first data including the sub-data of the text mode and the sub-data of the image mode as an example.
  • the target instance relationship information includes the two instance relationship information of "Champs Elysees - located in - Paris” and "La Rose Chinese restaurant - located in - Paris”
  • it can be based on common sense information "a city is composed of many streets” and "People walk on the street” to get “A man walking on the Champs Elysees in the rain”, and you can also get "There is a La Rose Chinese restaurant on the street in Paris” based on the common sense information "The restaurant is a kind of building on the street”.
  • the data enhancement method of the embodiment of the present application can combine the instance relationship information and common sense information of the knowledge graph to generate semantically coherent and correct enhanced data, and improve the overall accuracy and diversity of downstream tasks.
  • the entity relationship information includes concept information, and the concept information is used to represent the description information of the concept.
  • step S103 obtaining second data by inferring entity objects corresponding to different modalities based on the entity relationship information in the knowledge graph"
  • Step S602 According to the concept of matching entity objects corresponding to different modalities, determine target description information matching entity objects corresponding to different modalities.
  • common sense information matching entity objects corresponding to different modalities can also be obtained when inferring the second data, and further use target description information and common sense The information performs reasoning on the sub-data of different modalities to obtain the second data.
  • the first data includes the sub-data of the text mode and the sub-data of the image mode as an example.
  • Text entities include “man”, “Paris” and “street”
  • image entities include “person”, “Champs Elysees”, “La Rose Chinese restaurant”
  • common sense information matching text entities and image entities can be obtained.
  • the matched common sense information includes "a city is composed of many streets", “people walk on the streets”, “ The restaurant is a kind of building on the street”, etc.
  • the target description information corresponding to the "city” is obtained "the rainy season of the French city-Paris is concentrated in winter, and the rainy season of the Chinese city-Beijing is concentrated in summer".
  • the associated target description information “French city—the rainy season in Paris is concentrated in winter” can be obtained in combination with the text instance "Paris”.
  • the data enhancement method of the embodiment of the present application can combine the conceptual information and common sense information of the knowledge graph to generate semantically coherent and correct enhanced data, and improve the overall accuracy and diversity of downstream tasks.
  • the embodiment of the present application also discloses a data enhancement device, as shown in Figure 9, the data enhancement device includes:
  • the data obtaining module 10 is used to obtain the first data, the first data includes sub-data of multiple modalities, the sub-data of one modal corresponds to one data type, and the data types between different modalities are different;
  • the corresponding two entity objects correspond to two modes; determine the new instance relationship information according to the concept relationship information of the target instance, and the two entity objects as instances in the new instance relationship information are the two entities corresponding to the concept relationship information of the target instance object.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Animal Behavior & Ethology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

本申请提供的数据增强方法,对于第一数据中所包含的多个模态的子数据,能够从中确定与子数据的数据类型相匹配的实体对象,进而基于知识图谱的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,第二数据与第一数据不同,这就可以实现不同模态间的信息补充,从而增强数据的语义。

Description

数据增强方法及装置
本申请要求于2021年9月27日提交中国专利局、申请号为202111135302.6、发明名称为“数据增强方法及装置”的国内申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及软件技术领域,更具体地说,涉及一种数据增强方法及装置。
背景技术
在AI子任务中,数据增强一直是提高精度、解决数据偏移问题的常用手段。计算机视觉中常采用图像旋转、平移等处理手段;自然语言处理不同于计算机视觉,更改或删除句子内的词组可能会影响语义的连贯性和正确性。
多模态训练数据中不同模态内部的信息具有一定的局限性,只利用单一技术处理则会浪费不同模态间的信息补充。
发明内容
有鉴于此,为解决上述问题,本申请提供一种数据增强方法及装置,技术方案如下:
本申请一方面提供一种数据增强方法,所述方法包括:
获得第一数据,所述第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;
在每个模态的子数据中确定与其数据类型相匹配的实体对象;
基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,所述第二数据与所述第一数据不同。
可选的,所述实体关系信息中包含实例关系信息,所述实例关系信息 中的两个实体均为实例,所述基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,所述目标实例关系信息中作为实例的两个实体对象对应两个模态;
至少基于所述目标实例关系信息获得所述第二数据。
可选的,所述实体关系信息中还包含概念关系信息,所述概念关系信息中的两个实体均为概念,所述在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
确定各模态对应的实体对象在所述知识图谱中所属的概念;
在所述概念关系信息中确定与不同模态对应的实体对象相匹配的目标概念关系信息,所述目标概念关系信息中与概念相应的两个实体对象对应两个模态;
根据所述目标概念信息确定新的实例关系信息,所述新的实例关系信息中作为实例的两个实体对象为所述目标概念信息对应的两个实体对象、且所述新的实例关系信息中实例间的关系为所述目标概念信息中概念间的关系。
可选的,所述实体关系信息中还包含实例概念关系信息,所述实例概念关系信息中的两个实体分别为实例和概念,所述在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
确定各模态对应的实体对象在所述知识图谱中所属的概念;
在所述实例概念关系信息中确定与不同模态对应的实体对象相匹配的目标实例概念关系信息,所述目标实例概念关系信息中与实例和概念相对应的两个实体对象对应两个模态;
根据所述目标实例概念关系信息确定新的实例关系信息,所述新的实例关系信息中作为实例的两个实体对象为所述目标实例概念关系信息对应 的两个实体对象。
可选的,所述至少基于所述目标实例关系信息获得所述第二数据,包括:
获得与不同模态对应的实体对象相匹配的常识信息;
利用所述目标实例关系信息和所述常识信息对不同模态的子数据进行推理得到所述第二数据。
可选的,所述实体关系信息中包含概念信息,所述概念信息用于表征概念的描述信息,所述基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
在所述概念信息中确定不同模态对应的实体对象相匹配的概念;
根据不同模态对应的实体对象相匹配的概念,确定与不同模态对应的实体对象相匹配的目标描述信息;
利用所述目标描述信息对不同模态的子数据进行推理得到所述第二数据。
可选的,所述利用所述目标描述信息对不同模态的子数据进行推理得到所述第二数据,包括:
获得与不同模态对应的实体对象相匹配的常识信息;
利用所述目标描述信息和所述常识信息对不同模态的子数据进行推理得到所述第二数据。
可选的,所述多个模态中包含文本模态和图像模态,所述在每个模态的子数据中确定与其数据类型相匹配的实体对象,包括:
获得所述文本模态对应的第一语义模型;将所述文本模态的子数据输入至所述第一语义模型中,获得所述第一语义模型输出的文本实体;以及
获得所述图像模态对应的第二语义模型;将所述图像模态的子数据输入至所述第二语义模型中,获得所述第二语义模型输出的图像实体。
可选的,所述第一语义模型还输出所述文本模态对应的第一意图信息,所述第二语义模型还输出所述图像模态对应的第二意图信息;
所述在每个模态的子数据中确定与其数据类型相匹配的实体对象,还包括:
获得所述文本实体中与所述第一意图信息相匹配的目标文本实体;以及
获得所述图像实体中与所述第二意图信息相匹配的目标图像实体。
本申请另一方面提供一种数据增强装置,所述装置包括:
数据获得模块,用于获得第一数据,所述第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;
实体确定模块,用于在每个模态的子数据中确定与其数据类型相匹配的实体对象;
数据推理模块,用于基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,所述第二数据与所述第一数据不同。
经由上述的技术方案可知,本申请提供的数据增强方法,对于第一数据中所包含的多个模态的子数据,能够从中确定与子数据的数据类型相匹配的实体对象,进而基于知识图谱的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,第二数据与第一数据不同,这就可以实现不同模态间的信息补充,从而增强数据的语义。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。
图1为本申请实施例提供的电子设备的硬件结构框图;
图2为本申请实施例提供的数据增强方法的方法流程图;
图3为本申请实施例提供的图像模态的子数据的示例;
图4为本申请另一实施例提供的数据增强方法的方法流程图;
图5为本申请另一实施例提供的数据增强方法的部分方法流程图;
图6为本申请另一实施例提供的数据增强方法的部分方法流程图;
图7为本申请另一实施例提供的数据增强方法的方法流程图;
图8为本申请另一实施例提供的数据增强方法的部分方法流程图;
图9为本申请实施例提供的数据增强装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
本申请提供一种数据增强方法,该方法可以应用于电子设备,参见图1所示的电子设备的硬件结构框图,该电子设备的硬件结构可以包括:处理器11、通信接口12,存储器13和通信总线14;
在本申请实施例中,处理器11、通信接口12、存储器13、通信总线14的数量为至少一个,且处理器11、通信接口12、存储器13通过通信总线14完成相互间的通信。
处理器11可以是一个中央处理器CPU、GPU(Graphics Processing Unit,图形处理器),或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路等。
存储器13可以包括高速RAM存储器,也可以还包括非易失性存储器 (non-volatile memory)等,例如至少一个磁盘存储器。
其中,存储器13存储应用程序及应用程序运行所产生的数据,处理器11则执行应用程序,以实现功能:
获得第一数据,第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;在每个模态的子数据中确定与其数据类型相匹配的实体对象;基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,第二数据与第一数据不同。
需要说明的是,处理器执行应用程序所实现功能的细化和扩展,可以参见下文描述。
本申请实施例提供一种数据增强方法,参见图2所示的方法流程图,该方法包括如下步骤:
步骤S101:获得第一数据,第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同。
本申请实施例中,第一数据由多个模态的子数据所组成,并且每个模态的子数据属于一个数据类型、任意两个模态间的数据类型不同。不同模态的数据类型可以包括但不局限于图像、文本、音频、视频。
以图像和文本两种数据类型举例来说,第一数据由图像模态的子数据(该子数据即图像)和文本模态的子数据(该子数据即文本)所组成,其中,文本模态的子数据作为图像模态的子数据的文本描述。
步骤S102:在每个模态的子数据中确定与其数据类型相匹配的实体对象。
本申请实施例中,对于第一数据中每个模态的子数据,可以采用与其数据类型相匹配的实体抽取手段确定其中的实体对象。以数据类型为图像举例来说,图像模态的子数据可以通过图像识别技术获得其中的图像特征,该图像特征即可作为图像模态的实体对象,即图像实体。继续以数据类型 为文本举例来说,文本模态的子数据可以通过自然语言处理技术获得其中的文本特征,该文本特征即可作为文本模态的实体对象,即文本实体。
而对于音频这一数据类型来说,音频模态的子数据可以通过语音识别技术将其转换为文本模态的子数据,进而通过自然语言处理技术获得其中的文本特征,该文本特征即可作为音频模态的实体对象,即音频实体本质上也为文本实体。同样的,对于视频这一数据类型来说,视频模态的子数据可以被拆解为图像模态的子数据,与图像模态的子数据处理方式相同,可以通过图像识别技术获得其中的图像特征(该图像特征是对特定物体或部分的表示),该图像特征即可作为视频模态的实体对象,即视频实体本质上也为图像实体。
具体实现过程中,为实现精确的实体抽取,对于文本模态和图像模态可以通过语义模型提取各自的实体对象。对于文本模态来说,获得文本模态对应的第一语义模型;将文本模态的子数据输入至第一语义模型中,获得第一语义模型输出的文本实体;对于图像模态来说,获得图像模态对应的第二语义模型;将图像模态的子数据输入至第二语义模型中,获得第二语义模型输出的图像实体。
本申请实施例中,可以对文本模态和图像模态分别训练各自的语义模型,还可以通过联合训练的方式为两者训练同一语义模型,本申请对此不做限定。在训练语义模型之前,针对历史用户输入进行人工标注,以文本模态来说明,作为历史用户输入的文本模态的子数据中包含至少一个文本实体,人工标注时需要精确标注出每个文本实体,进一步,在完成人工标注后,以带有(文本实体)标注的文本模态的子数据进行语义模型的训练,训练结束后语义模型能够对后续输入的文本模态的子数据抽取其中的文本实体,当然,图像模态的语义模型的训练过程也是如此,在此不再赘述。
需要说明的是,文本模态对应的语义模型中可以采用如BERT(Bidirectional Encoder Representations for Transformers,基于Transformers的双向编码器表示)+CRF(Conditional Random Field,条件随机场)、MRC(Machine Reading Comprehension,机器阅读理解)等进行实体抽取,而 图像模态对应的语义模型则可以采用ImageNET等方案。
在此基础上,考虑到数据增强的不同应用场景,为保证实体对象与应用场景相适应,本申请实施例中语义模型还可以进一步输出意图信息。具体的,对于文本模态来说,第一语义模型还输出文本模态对应的第一意图信息;对于图像模态来说,第二语义模型还输出图像模态对应的第二意图信息。
本申请实施例中,在训练语义模型之前,针对历史用户输入进行人工标注,以文本模态来说明,作为历史用户输入的文本模态的子数据中包含一个意图,人工标注每个文本实体的同时、还需要标注出意图信息,进一步,在完成人工标注后,以带有(文本实体和意图信息)标注的文本模态的子数据进行语义模型的训练,训练结束后语义模型能够对后续输入的文本模态的子数据抽取其中文本实体的同时、还识别其中的意图信息。当然,意图信息可以采用分类标签来表示。
需要说明的是,文本模态对应的语义模型中可以采用如SVM(Support Vector Machines,支持向量机)、TextCNN(Text Convolutional Neural Network,文本卷积神经网络)、LSTM(Long Short-Term Memory,长短期记忆网络)、BERT(Bidirectional Encoder Representations for Transformers,基于Transformers的双向编码器表示)等进行意图识别。
相应的,对于文本模态来说,与其相匹配的实体对象为文本实体中与第一意图信息相匹配的目标文本实体;对于图像模态来说,与其相匹配的实体对象为与第二意图信息相匹配的目标图像实体。
为方便理解,以图像模态为例,假设输入至第二语义模型的图像模态的子数据为超市水果区的一张图像,经第二语义模型确定其中包含的图像实体包括货架上的“苹果”、“香蕉”、“葡萄”、“西瓜”等、以及画报上的“苹果”、并且其中的意图信息为超市-水果。因此,基于该意图信息就可以将画报上的“苹果”剔除。
步骤S103:基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,第二数据与第一数据不同。
本申请实施例中,知识图谱为指定应用场景下的语义网络结构,其节点代表实体、边代表实体间的关系,其中由“节点-边-节点”组成的三元组即“实体-关系-实体”。其中,实体可以为实例,比如人名、地名、机构名等具有特定属性的集合;实体还可以为概念,比如国家、民族、城市等具有某种特性的实例构成的集合,举例来说,某一风景图像中包含的图像实体有“树”、“房屋”这两个概念。由此,知识图谱中的实体关系信息即其中节点-边-节点组成的三元组信息。
为方便理解,以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。假设文本模态的子数据包括“一个男子在雨中巴黎的街道上散步”、图像模态的子数据如图3所示,经过步骤S102可以获得文本模态对应的文本实体包括“男子”、“巴黎”和“街道”,而图像模态的子数据中可以识别到人、标有街道名称(后续以香榭丽舍大街来说明)的路标和标有La Rose中餐厅的建筑,此时图像模态对应的图像实体包括“人”、“香榭丽舍大街”、“La Rose中餐厅”。
对此,可以基于知识图谱中已有的实体关系信息推理出文本模态对应的文本实体和图像模态对应的图像实体间的实体关系,以推理出的该实体关系来对第一数据中文本模态的子数据或者图像模态的子数据进行补充,以此得到新的数据,即第二数据,该第二数据可以为文本模态、也可以为图像模态。假设,知识图谱中已有“香榭丽舍大街-位于-巴黎”这一实体关系信息,则基于此可以确定文本实体“巴黎”与图像实体“香榭丽舍大街”间的关系,由此可以获得文本模态的第二数据,比如“一个男子在雨中巴黎的香榭丽舍大街上散步”。
本申请实施例的数据增强方法,结合知识图谱和实体抽取捕捉多模态之间的互补信息,以此生成增强数据,提高下游任务的整体准确率和多样性。
本申请另一实施例提供一种数据增强方法,参见图4所示的方法流程图,该方法包括如下步骤:
步骤S201:获得第一数据,第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同。
步骤S202:在每个模态的子数据中确定与其数据类型相匹配的实体对象。
步骤S203:在实体关系信息中包含实例关系信息、且实例关系信息中的两个实体均为实例的情况下,在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,目标实例关系信息中作为实例的两个实体对象对应两个模态。
本申请实施例中,知识图谱中的实体关系信息包含实例关系信息,即“实例-关系-实例”。由此,对于第一数据中各模态对应的实体对象,首先确定其中属于实例的实体对象,进而确定不同模态间(属于实例的)实体对象的实例关系,即目标实例关系信息,该目标实例关系信息中作为实例的两个实体对象分属于两个模态。
为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本模态的子数据“一个男子在雨中巴黎的街道上散步”中属于实例的文本实体包括“男子”和“巴黎”(为方便描述后续称为文本实例)、图像模态对应的属于实例的图像实体包括“香榭丽舍大街”和“La Rose中餐厅”(为方便描述后续称为图像实例)。
通过匹配文本实例和图像实例,从知识图谱中确定包含某一文本实例和某一图像实例的实例关系信息,即目标实例关系信息,其可以为“文本实例-关系-图像实例”、还可以为“图像实例-关系-文本实例”。
步骤S204:至少基于目标实例关系信息获得第二数据,第二数据与第一数据不同。
本申请实施例中,为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。假设通过匹配文本实例和图像实例,确定知识图谱中包含的目标实例关系信息为“香榭丽舍大街-位于-巴黎”和“La Rose中餐厅-位于-巴黎”这两个实例关系信息,则通过将“香榭丽 舍大街”替换“街道”可以获得“一个男子在雨中巴黎的香榭丽舍大街上散步”、还可以根据这两个实例关系信息获得“La Rose中餐厅位于巴黎的香榭丽舍大街”等文本模态的第二数据。
本申请实施例的数据增强方法,能够基于知识图谱中的实例关系信息捕捉多模态间的互补信息,以此生成与实例相关的增强数据,提高下游任务的整体准确率和多样性。
本申请另一实施例中,实体关系信息中还包含概念关系信息、且概念关系信息中的两个实体均为概念。作为步骤S203“在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息”的一种实现方式,包括如下步骤,方法流程图如图5所示:
步骤S301:确定各模态对应的实体对象在知识图谱中所属的概念。
本申请实施例中,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本模态的子数据“一个男子在雨中巴黎的街道上散步”中文本实例包括“男子”和“巴黎”、图像模态对应的图像实例包括“香榭丽舍大街”和“La Rose中餐厅”。
通过知识图谱中的概念信息,可以获得各文本实例和各图像实例各自所属的概念,比如文本实例“男子”所属的概念为“人”、文本实例“巴黎”所属的概念为“城市”、图像实例“香榭丽舍大街”所属的概念为“街道”、“La Rose中餐厅”所属的概念为“餐厅”。
步骤S302:在概念关系信息中确定与不同模态对应的实体对象相匹配的目标概念关系信息,目标概念关系信息中与概念相应的两个实体对象对应两个模态。
本申请实施例中,知识图谱中的实体关系信息除包含实例关系信息外,还包含概念关系信息,即“概念-关系-概念”。由此,对于第一数据中各模态对应的实体对象,在确定其所属的概念后,可以进一步确定不同模态间概念的关系,即目标概念关系信息,该目标概念信息中作为概念的两个实 体对象分属于两个模态。
为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。通过匹配文本实例所属的概念和图像实例所属的概念,从知识图谱中确定包含某一文本实例所属的概念和某一图像实例所属的概念的概念关系信息,即目标概念关系信息,其可以为“文本实例所属的概念-关系-图像实例所属的概念”、还可以为“图像实例所属的概念-关系-文本实例所属的概念”。
步骤S303:根据目标概念信息确定新的实例关系信息,新的实例关系信息中作为实例的两个实体对象为目标概念信息对应的两个实体对象、且新的实例关系信息中实例间的关系为目标概念信息中概念间的关系。
本申请实施例中,为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本实例“男子”所属的概念为“人”、文本实例“巴黎”所属的概念为“城市”、图像实例“香榭丽舍大街”所属的概念为“街道”、“La Rose中餐厅”所属的概念为“餐厅”。
假设经步骤S302已确定的目标概念关系信息包括“街道-从属-城市”和“餐厅-位于-城市”,则根据“街道-从属-城市”这一概念关系信息可以确定实例关系信息“香榭丽舍大街-从属-巴黎”、根据“餐厅-位于-城市”这一概念关系信息可以确定实例关系信息“La Rose中餐厅-位于-巴黎”。由此,“香榭丽舍大街-从属-巴黎”和“La Rose中餐厅-位于巴黎”为基于知识图谱中概念关系信息所推断出的新的实例关系信息。将新的实例关系信息补充至知识图谱中,对知识图谱进行补充和完善。
本申请实施例提供的数据增强方法,能够基于知识图谱中已有的概念关系信息推断出新的实例关系信息,以此不断补充和完善知识图谱,随着更多业务知识的融入,实例关系推理结果也就更加合理,本申请具有良好的实用性和有效性。
本申请另一实施例中,实体关系信息中还包含实例概念关系信息、且 实例概念关系信息中的两个实体分别为实例和概念。作为步骤S203“在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息”的一种实现方式,包括如下步骤,方法流程图如图6所示:
步骤S401:确定各模态对应的实体对象在知识图谱中所属的概念。
本申请实施例中,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本模态的子数据“一个男子在雨中巴黎的街道上散步”中文本实体包括“男子”、“巴黎”和“街道”,其中文本实例包括“男子”和“巴黎”;图像模态的子数据中图像实体包括“人”、“香榭丽舍大街”和“La Rose中餐厅”,其中图像实例包括“香榭丽舍大街”和“La Rose中餐厅”。
通过知识图谱中的概念信息,可以获得各文本实例和各图像实例各自所属的概念,比如文本实例“男子”所属的概念为“人”、文本实例“巴黎”所属的概念为“城市”、图像实例“香榭丽舍大街”所属的概念为“街道”、“La Rose中餐厅”所属的概念为“餐厅”。当然,也可以确定文本实体“街道”为概念(为方便描述后续称为文本概念)、以及图像实体“人”也为概念(为方便描述后续称为图像概念)。
步骤S402:在实例概念关系信息中确定与不同模态对应的实体对象相匹配的目标实例概念关系信息,目标实例概念关系信息中与实例和概念相对应的两个实体对象对应两个模态。
本申请实施例中,知识图谱中的实体关系信息除包含实例关系信息外,还包含实例概念关系信息,即“实例-关系-概念”。由此,对应第一数据中各模态对应的实体对象,在确定其所属的概念后,可以进一步确定不同模态间实例与概念的关系,即目标实例概念关系信息,该目标实例概念关系信息中作为实例和作为概念的两个实体对象分属于两个模态。
为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。通过匹配文本实例和图像实例所属的概念或者匹配图像实例和文本实例所属的概念,从知识图谱中确定包含某一文本实例和某 一图像实例所属的概念的实例概念关系信息、或者包含图像实例和某一文本实例所属的概念的实例概念关系信息,即目标实例概念关系信息,其可以为“文本实例-关系-图像实例所属的概念”、还可以为“图像实例-关系-文本实例所属的概念”。
步骤S403:根据目标实例概念关系信息确定新的实例关系信息,新的实例关系信息中作为实例的两个实体对象为目标实例概念关系信息对应的两个实体对象。
本申请实施例中,为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。通过匹配文本实体和图像概念、以及图像实体和文本概念,确定知识图谱中包含的目标实例概念关系信息为“男子-属于-人”、“香榭丽舍大街-属于-街道”。假设知识图谱中已包含概念实体关系信息,即“概念-关系-实例”这类实体关系信息,如“人-行走-香榭丽舍大街”、以及“街道-位于-巴黎”,需要说明的是,所确定的概念实体关系信息中的概念和实体属于同一模态。则:
根据“男子-属于-人”、以及“人-散步-香榭丽舍大街”,将图像实例“香榭丽舍大街”作为图像概念“人”对应的实体对象、并结合“人-行走-香榭丽舍大街”中的关系“行走”,即可获得“男子-散步-香榭丽舍大街”这一新的实例关系信息;同样的,根据“香榭丽舍大街-属于-街道”、以及“街道-位于-巴黎”,将文本实例“巴黎”作为文本概念“街道”对应的实体对象,并结合“街道-位于-巴黎”中的关系“位于”获得“香榭丽舍大街-位于-巴黎”这一新的实例关系信息。
本申请实施例提供的数据增强方法,能够基于知识图谱中已有的实例概念关系信息推断出新的实例关系信息,以此不断补充和完善知识图谱,随着更多业务知识的融入,实例关系推理结果也就更加合理,本申请具有良好的实用性和有效性。
本申请另一实施例提供一种数据增强方法,参见图7所示的方法流程 图,该方法包括如下步骤:
步骤S501:获得第一数据,第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同。
步骤S502:在每个模态的子数据中确定与其数据类型相匹配的实体对象。
步骤S503:在实体关系信息中包含实例关系信息、且实例关系信息中的两个实体均为实例的情况下,在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,目标实例关系信息中作为实例的两个实体对象对应两个模态。
步骤S504:获得与不同模态对应的实体对象相匹配的常识信息。
本申请实施例中,可以将目标实例关系信息配合常识信息得到语义通顺连贯的增强数据。为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本实体包括“男子”、“巴黎”和“街道”,图像实体包括“人”、“香榭丽舍大街”、“La Rose中餐厅”,通过在知识图谱中的常识信息中匹配文本实体和图像实体,可以获得与文本实体相匹配的常识信息、以及与图像实体相匹配的常识信息,比如匹配到的常识信息包括“城市是由许多条街道组成”、“人行走在街道上”、“餐厅为街道上的一种建筑”等。
步骤S505:利用目标实例关系信息和常识信息对不同模态的子数据进行推理得到第二数据,第二数据与第一数据不同。
本申请实施例中,为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。假设目标实例关系信息包括“香榭丽舍大街-位于-巴黎”和“La Rose中餐厅-位于-巴黎”这两个实例关系信息,则可以根据常识信息“城市是由许多条街道组成”和“人行走在街道上”获得“一个男子在雨中的香榭丽舍大街上行走”,还可以根据常识信息“餐厅为街道上的一种建筑”获得“巴黎的街道上有一个La Rose中餐厅”、或者“La Rose中餐厅在巴黎的香榭丽舍大街上”、还可以结合文本模态的 子数据获得“一个男子在香榭丽舍大街的La Rose中餐厅周边散步”、以及“一个男子刚刚路过了一个La Rose中餐厅”。
本申请实施例的数据增强方法,能够结合知识图谱的实例关系信息和常识信息生成语义连贯、正确的增强数据,提高下游任务的整体准确率和多样性。
本申请另一实施例中,实体关系信息中包含概念信息、且概念信息用于表征概念的描述信息。作为步骤S103“基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据”的一种实现方式,包括如下步骤,方法流程图如图8所示:
步骤S601:在概念信息中确定不同模态对应的实体对象相匹配的概念。
本申请实施例中,知识图谱的概念信息能够描述知识图谱中作为实体的概念。为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本实例包括“男子”和“巴黎”、文本概念包括“街道”、图像实例包括“香榭丽舍大街”和“La Rose中餐厅”、图像概念包括、图像概念包括“人”,进一步,文本实例“男子”所属的概念为“人”、文本实例“巴黎”所属的概念为“城市”、图像实例“香榭丽舍大街”所属的概念为“街道”、图像实例“La Rose中餐厅”所属的概念为“餐厅”。
步骤S602:根据不同模态对应的实体对象相匹配的概念,确定与不同模态对应的实体对象相匹配的目标描述信息。
本申请实施例中,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本模态所对应实体对象相匹配的概念包括“人”、“城市”和“街道”,图像模态所对应实体对象相匹配的概念包括“人”、“街道”和“餐厅”。由此,通过在知识图谱中的概念信息中匹配概念可以获得描述“人”、“城市”、“街道”和“餐厅”中一个或多个概念的描述信息,即目标描述信息。
步骤S603:利用目标描述信息对不同模态的子数据进行推理得到第二数据。
本申请实施例中,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。假设获得“城市”对应的目标描述信息“法国城市-巴黎的雨季集中在冬季,中国城市-北京的雨季集中在夏季”。由此,结合文本实例“巴黎”可以获得相关联的目标描述信息“法国城市-巴黎的雨季集中在冬季”,结合文本模态的子数据“一个男子在雨中巴黎的街道上散步”中可以获得文本模态的第二数据,即“一个男子在冬季巴黎的街道上散步”、或者“一个男子在冬季巴黎的雨中散步”等。
在其它一些实施例中,在保证增强数据语义的连贯性和正确性,在推理第二数据时,还可以获得与不同模态对应的实体对象相匹配的常识信息,进一步利用目标描述信息和常识信息对不同模态的子数据进行推理得到第二数据。
为方便理解,继续以第一数据中包含文本模态的子数据和图像模态的子数据为例来说明。文本实体包括“男子”、“巴黎”和“街道”,图像实体包括“人”、“香榭丽舍大街”、“La Rose中餐厅”,通过在知识图谱中的常识信息中匹配文本实体和图像实体,可以获得与文本实体相匹配的常识信息、以及与图像实体相匹配的常识信息,比如匹配到的常识信息包括“城市是由许多条街道组成”、“人行走在街道上”、“餐厅为街道上的一种建筑”等。
继续假设获得“城市”对应的目标描述信息“法国城市-巴黎的雨季集中在冬季,中国城市-北京的雨季集中在夏季”。由此,结合文本实例“巴黎”可以获得相关联的目标描述信息“法国城市-巴黎的雨季集中在冬季”。由此,根据文本模态和图像模态的子数据,再结合常识信息“城市是由许多条街道组成”和“人行走在街道上”,可以获得“一个男子在冬季巴黎的街道上行走”;结合常识信息“餐厅为街道上的一种建筑”可以获得“一个男子在冬季的香榭丽舍大街上散步,香榭丽舍大街上有一个La Rose中餐厅”。
本申请实施例的数据增强方法,能够结合知识图谱的概念信息和常识信息生成语义连贯、正确的增强数据,提高下游任务的整体准确率和多样性。
与上述数据增强方法对应的,本申请实施例还公开一种数据增强装置,如图9所示,该数据增强装置包括:
数据获得模块10,用于获得第一数据,第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;
实体确定模块20,用于在每个模态的子数据中确定与其数据类型相匹配的实体对象;
数据推理模块30,用于基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,第二数据与第一数据不同。
在本申请实施例公开的数据增强装置的另一实施例中,实体关系信息中包含实例关系信息,实例关系信息中的两个实体均为实例,数据推理模块30基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,目标实例关系信息中作为实例的两个实体对象对应两个模态;至少基于目标实例关系信息获得第二数据。
在本申请实施例公开的数据增强装置的另一实施例中,实体关系信息中还包含概念关系信息,概念关系信息中的两个实体均为概念,数据推理模块30在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
确定各模态对应的实体对象在知识图谱中所属的概念;在概念关系信息中确定与不同模态对应的实体对象相匹配的目标概念关系信息,目标概 念关系信息中与概念相应的两个实体对象对应两个模态;根据目标概念信息确定新的实例关系信息,新的实例关系信息中作为实例的两个实体对象为目标概念信息对应的两个实体对象、且新的实例关系信息中实例间的关系为目标概念信息中概念间的关系。
在本申请实施例公开的数据增强装置的另一实施例中,实体关系信息中还包含实例概念关系信息,实例概念关系信息中的两个实体分别为实例和概念,数据推理模块30在实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
确定各模态对应的实体对象在知识图谱中所属的概念;在实例概念关系信息中确定与不同模态对应的实体对象相匹配的目标实例概念关系信息,目标实例概念关系信息中与实例和概念相对应的两个实体对象对应两个模态;根据目标实例概念关系信息确定新的实例关系信息,新的实例关系信息中作为实例的两个实体对象为目标实例概念关系信息对应的两个实体对象。
在本申请实施例公开的数据增强装置的另一实施例中,数据推理模块30至少基于目标实例关系信息获得第二数据,包括:
获得与不同模态对应的实体对象相匹配的常识信息;利用目标实例关系信息和常识信息对不同模态的子数据进行推理得到第二数据。
在本申请实施例公开的数据增强装置的另一实施例中,实体关系信息中包含概念信息,概念信息用于表征概念的描述信息,数据推理模块30基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
在概念信息中确定不同模态对应的实体对象相匹配的概念;根据不同模态对应的实体对象相匹配的概念,确定与不同模态对应的实体对象相匹配的目标描述信息;利用目标描述信息对不同模态的子数据进行推理得到第二数据。
在本申请实施例公开的数据增强装置的另一实施例中,数据推理模块 30利用目标描述信息对不同模态的子数据进行推理得到第二数据,包括:
获得与不同模态对应的实体对象相匹配的常识信息;利用目标描述信息和常识信息对不同模态的子数据进行推理得到第二数据。
在本申请实施例公开的数据增强装置的另一实施例中,多个模态中包含文本模态和图像模态,实体确定模块20在每个模态的子数据中确定与其数据类型相匹配的实体对象,包括:
获得文本模态对应的第一语义模型;将文本模态的子数据输入至第一语义模型中,获得第一语义模型输出的文本实体;以及获得图像模态对应的第二语义模型;将图像模态的子数据输入至第二语义模型中,获得第二语义模型输出的图像实体。
在本申请实施例公开的数据增强装置的另一实施例中,第一语义模型还输出文本模态对应的第一意图信息,第二语义模型还输出图像模态对应的第二意图信息;
实体确定模块20在每个模态的子数据中确定与其数据类型相匹配的实体对象,还包括:
获得文本实体中与第一意图信息相匹配的目标文本实体;以及获得图像实体中与第二意图信息相匹配的目标图像实体。
以上对本申请所提供的一种数据增强方法及装置进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即 可。
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备所固有的要素,或者是还包括为这些过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本申请。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下,在其它实施例中实现。因此,本申请将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。

Claims (10)

  1. 一种数据增强方法,所述方法包括:
    获得第一数据,所述第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;
    在每个模态的子数据中确定与其数据类型相匹配的实体对象;
    基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,所述第二数据与所述第一数据不同。
  2. 根据权利要求1所述的方法,所述实体关系信息中包含实例关系信息,所述实例关系信息中的两个实体均为实例,所述基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
    在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,所述目标实例关系信息中作为实例的两个实体对象对应两个模态;
    至少基于所述目标实例关系信息获得所述第二数据。
  3. 根据权利要求2所述的方法,所述实体关系信息中还包含概念关系信息,所述概念关系信息中的两个实体均为概念,所述在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
    确定各模态对应的实体对象在所述知识图谱中所属的概念;
    在所述概念关系信息中确定与不同模态对应的实体对象相匹配的目标概念关系信息,所述目标概念关系信息中与概念相应的两个实体对象对应两个模态;
    根据所述目标概念信息确定新的实例关系信息,所述新的实例关系信息中作为实例的两个实体对象为所述目标概念信息对应的两个实体对象、且所述新的实例关系信息中实例间的关系为所述目标概念信息中概念间的关系。
  4. 根据权利要求2所述的方法,所述实体关系信息中还包含实例概念关系信息,所述实例概念关系信息中的两个实体分别为实例和概念,所述在所述实例关系信息中确定与不同模态对应的实体对象相匹配的目标实例关系信息,包括:
    确定各模态对应的实体对象在所述知识图谱中所属的概念;
    在所述实例概念关系信息中确定与不同模态对应的实体对象相匹配的目标实例概念关系信息,所述目标实例概念关系信息中与实例和概念相对应的两个实体对象对应两个模态;
    根据所述目标实例概念关系信息确定新的实例关系信息,所述新的实例关系信息中作为实例的两个实体对象为所述目标实例概念关系信息对应的两个实体对象。
  5. 根据权利要求2所述的方法,所述至少基于所述目标实例关系信息获得所述第二数据,包括:
    获得与不同模态对应的实体对象相匹配的常识信息;
    利用所述目标实例关系信息和所述常识信息对不同模态的子数据进行推理得到所述第二数据。
  6. 根据权利要求1所述的方法,所述实体关系信息中包含概念信息,所述概念信息用于表征概念的描述信息,所述基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,包括:
    在所述概念信息中确定不同模态对应的实体对象相匹配的概念;
    根据不同模态对应的实体对象相匹配的概念,确定与不同模态对应的实体对象相匹配的目标描述信息;
    利用所述目标描述信息对不同模态的子数据进行推理得到所述第二数据。
  7. 根据权利要求6所述的方法,所述利用所述目标描述信息对不同模 态的子数据进行推理得到所述第二数据,包括:
    获得与不同模态对应的实体对象相匹配的常识信息;
    利用所述目标描述信息和所述常识信息对不同模态的子数据进行推理得到所述第二数据。
  8. 根据权利要求1所述的方法,所述多个模态中包含文本模态和图像模态,所述在每个模态的子数据中确定与其数据类型相匹配的实体对象,包括:
    获得所述文本模态对应的第一语义模型;将所述文本模态的子数据输入至所述第一语义模型中,获得所述第一语义模型输出的文本实体;以及
    获得所述图像模态对应的第二语义模型;将所述图像模态的子数据输入至所述第二语义模型中,获得所述第二语义模型输出的图像实体。
  9. 根据权利要求8所述的方法,所述第一语义模型还输出所述文本模态对应的第一意图信息,所述第二语义模型还输出所述图像模态对应的第二意图信息;
    所述在每个模态的子数据中确定与其数据类型相匹配的实体对象,还包括:
    获得所述文本实体中与所述第一意图信息相匹配的目标文本实体;以及
    获得所述图像实体中与所述第二意图信息相匹配的目标图像实体。
  10. 一种数据增强装置,所述装置包括:
    数据获得模块,用于获得第一数据,所述第一数据中包含多个模态的子数据,一个模态的子数据对应一个数据类型、且不同模态间的数据类型不同;
    实体确定模块,用于在每个模态的子数据中确定与其数据类型相匹配的实体对象;
    数据推理模块,用于基于知识图谱中的实体关系信息对不同模态对应的实体对象进行推理得到第二数据,所述第二数据与所述第一数据不同。
PCT/CN2022/077042 2021-09-27 2022-02-21 数据增强方法及装置 Ceased WO2023045233A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/695,242 US20240273886A1 (en) 2021-09-27 2022-02-21 Data enhancement method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111135302.6 2021-09-27
CN202111135302.6A CN113849577A (zh) 2021-09-27 2021-09-27 数据增强方法及装置

Publications (1)

Publication Number Publication Date
WO2023045233A1 true WO2023045233A1 (zh) 2023-03-30

Family

ID=78979934

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/077042 Ceased WO2023045233A1 (zh) 2021-09-27 2022-02-21 数据增强方法及装置

Country Status (3)

Country Link
US (1) US20240273886A1 (zh)
CN (1) CN113849577A (zh)
WO (1) WO2023045233A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118116087A (zh) * 2024-04-29 2024-05-31 广东康软科技股份有限公司 应用于数字化医疗服务的活体身份验证方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113849577A (zh) * 2021-09-27 2021-12-28 联想(北京)有限公司 数据增强方法及装置
CN116543273B (zh) * 2022-01-24 2024-10-22 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机、可读存储介质及程序产品

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019843A (zh) * 2018-09-30 2019-07-16 北京国双科技有限公司 知识图谱的处理方法及装置
CN112148887A (zh) * 2020-09-16 2020-12-29 珠海格力电器股份有限公司 设备故障诊断方法、装置、存储介质和电子设备
CN112200317A (zh) * 2020-09-28 2021-01-08 西南电子技术研究所(中国电子科技集团公司第十研究所) 多模态知识图谱构建方法
CN113849577A (zh) * 2021-09-27 2021-12-28 联想(北京)有限公司 数据增强方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11881287B2 (en) * 2016-11-10 2024-01-23 Precisionlife Ltd Control apparatus and method for processing data inputs in computing devices therefore
US10963273B2 (en) * 2018-04-20 2021-03-30 Facebook, Inc. Generating personalized content summaries for users
CN110489395B (zh) * 2019-07-27 2022-07-29 西南电子技术研究所(中国电子科技集团公司第十研究所) 自动获取多源异构数据知识的方法
CN111221984B (zh) * 2020-01-15 2024-03-01 北京百度网讯科技有限公司 多模态内容处理方法、装置、设备及存储介质
CN111816301B (zh) * 2020-07-07 2024-07-02 平安科技(深圳)有限公司 医疗问诊辅助方法、装置、电子设备及介质
CN112001368A (zh) * 2020-09-29 2020-11-27 北京百度网讯科技有限公司 文字结构化提取方法、装置、设备以及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110019843A (zh) * 2018-09-30 2019-07-16 北京国双科技有限公司 知识图谱的处理方法及装置
US20210342371A1 (en) * 2018-09-30 2021-11-04 Beijing Gridsum Technology Co., Ltd. Method and Apparatus for Processing Knowledge Graph
CN112148887A (zh) * 2020-09-16 2020-12-29 珠海格力电器股份有限公司 设备故障诊断方法、装置、存储介质和电子设备
CN112200317A (zh) * 2020-09-28 2021-01-08 西南电子技术研究所(中国电子科技集团公司第十研究所) 多模态知识图谱构建方法
CN113849577A (zh) * 2021-09-27 2021-12-28 联想(北京)有限公司 数据增强方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118116087A (zh) * 2024-04-29 2024-05-31 广东康软科技股份有限公司 应用于数字化医疗服务的活体身份验证方法及系统

Also Published As

Publication number Publication date
CN113849577A (zh) 2021-12-28
US20240273886A1 (en) 2024-08-15

Similar Documents

Publication Publication Date Title
CN112329467B (zh) 地址识别方法、装置、电子设备以及存储介质
CN107391505B (zh) 一种图像处理方法及系统
WO2023045233A1 (zh) 数据增强方法及装置
CN110619051B (zh) 问题语句分类方法、装置、电子设备及存储介质
CN113268606A (zh) 知识图谱构建的方法和装置
CN111680504B (zh) 法律信息抽取模型及方法及系统及装置及辅助系统
CN111782769A (zh) 基于关系预测的知识图谱智能问答方法
CN111488467A (zh) 地理知识图谱的构建方法、装置、存储介质及计算机设备
CN111539197A (zh) 文本匹配方法和装置以及计算机系统和可读存储介质
WO2021082086A1 (zh) 机器阅读方法、系统、装置及存储介质
CN116258147B (zh) 一种基于异构图卷积的多模态评论情感分析方法及系统
CN102314440B (zh) 利用网络维护语言模型库的方法和系统
CN110874534A (zh) 数据处理方法和数据处理装置
CN112948505A (zh) 一种实体关系分类的模型构建方法、设备及存储介质
CN113407704A (zh) 文本匹配方法、装置、设备及计算机可读存储介质
Jain et al. Vishit: A visualizer for hindi text
Dethlefs Domain transfer for deep natural language generation from abstract meaning representations
CN113343670A (zh) 基于隐马尔可夫与分类算法耦合的地址文本要素提取方法
CN119739834A (zh) 一种提示词的生成方法、装置、设备、介质和程序产品
CN110347401B (zh) 一种基于语义相似度的API Framework服务发现方法
CN107590121A (zh) 文本规整方法及系统
CN111460169B (zh) 语义表达式生成方法、装置及设备
CN106897274B (zh) 一种跨语种的点评复述方法
CN115858733A (zh) 跨语言实体词检索方法、装置、设备及存储介质
CN115631331A (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: 22871299

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18695242

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 05/07/2024)

122 Ep: pct application non-entry in european phase

Ref document number: 22871299

Country of ref document: EP

Kind code of ref document: A1