WO2025201019A1 - 图像处理 - Google Patents

图像处理

Info

Publication number
WO2025201019A1
WO2025201019A1 PCT/CN2025/081607 CN2025081607W WO2025201019A1 WO 2025201019 A1 WO2025201019 A1 WO 2025201019A1 CN 2025081607 W CN2025081607 W CN 2025081607W WO 2025201019 A1 WO2025201019 A1 WO 2025201019A1
Authority
WO
WIPO (PCT)
Prior art keywords
features
page
visual
feature
text
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
PCT/CN2025/081607
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Publication of WO2025201019A1 publication Critical patent/WO2025201019A1/zh
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/1918Fusion techniques, i.e. combining data from various sources, e.g. sensor fusion
    • 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/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • 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/12Detection or correction of errors, e.g. by rescanning the pattern

Definitions

  • This document relates to the field of image processing technology, and in particular to methods and devices for image processing.
  • One or more embodiments of the present specification provide an image processing method, comprising: acquiring multiple page images and questions of a document, and performing character recognition on each page image to obtain character information; performing text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and performing visual feature extraction on each page image to obtain visual features of each page image; performing feature fusion processing on a visual feature sequence composed of the text features and the visual features of each page image to obtain fused features; performing character prediction on the fused features based on the question, and determining the answer content of the question based on the character prediction result.
  • One or more embodiments of the present specification provide an image processing device, comprising: a character recognition module, configured to obtain multiple page images and questions of a document, and perform character recognition on each page image to obtain character information; a feature extraction module, configured to perform text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and perform visual feature extraction on each page image to obtain visual features of each page image; a feature fusion module, configured to perform feature fusion processing on a visual feature sequence composed of the text features and the visual features of each page image to obtain fused features; and a character prediction module, configured to perform character prediction on the fused features based on the question, and determine the answer content of the question according to the character prediction result.
  • One or more embodiments of the present specification provide an image processing device, comprising a processor and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to: obtain multiple page images and questions of a document, and perform character recognition on each page image to obtain character information; perform text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and perform visual feature extraction on each page image to obtain visual features of each page image; perform feature fusion processing on a visual feature sequence composed of the text features and the visual features of each page image to obtain fused features; perform character prediction on the fused features based on the question, and determine the answer content of the question based on the character prediction result.
  • One or more embodiments of the present specification provide a computer-readable storage medium for storing computer-executable instructions, which implement the following steps when executed: obtaining multiple page images and questions of a document, and performing character recognition on each page image to obtain character information; performing text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and performing visual feature extraction on each page image to obtain visual features of each page image; performing feature fusion processing on a visual feature sequence composed of the text features and the visual features of each page image to obtain fused features; performing character prediction on the fused features based on the question, and determining the answer content of the question based on the character prediction result.
  • FIG1 is a schematic diagram of an implementation environment of an image processing method provided by one or more embodiments of this specification.
  • FIG2 is a flowchart of an image processing method provided by one or more embodiments of this specification.
  • FIG3 is a flowchart of an image processing method applied to a security application scenario provided by one or more embodiments of this specification.
  • FIG4 is a schematic diagram of an embodiment of an image processing device provided by one or more embodiments of this specification.
  • the image parsing model can be deployed on a server, which can be a single server, a server cluster consisting of several servers, or one or more cloud servers in a cloud computing platform.
  • One or more embodiments of an image processing method provided in this specification are as follows.
  • the image processing method provided in this embodiment specifically includes steps S202 to S208 .
  • the document in this embodiment refers to a document to be processed.
  • the document can be the same document file (the same document file), such as a case document of a user in a security application project, or a resource data document of a user in a resource service, or specifically a fund data document of a user in a loan service; the document can also be the same web page, that is, the entire web page.
  • the multiple page images of the document include multiple page images corresponding to multiple document page numbers in the same document or multiple screenshot images of the web page of the same web page.
  • the multiple document page numbers can be multiple consecutive document page numbers, such as document page numbers 1, 2, and 3;
  • the multiple screenshot images can be obtained after continuous screenshots of the web page, that is, the total image content of the multiple screenshot images can constitute the entire web page or a part of the web page, but the total image content of the multiple screenshot images is continuous and uninterrupted; for example, there are multiple document page numbers 1, 2, and 3 in the same document, and the multiple page images corresponding to the multiple document page numbers are the document.
  • a question about multiple page images of a document can be introduced, that is, the answer content of the question is obtained from multiple page images of a document; in an optional implementation provided by this embodiment, the question is obtained in the following manner: obtaining the question input for the multiple page images; or determining the object type to which the object input into the multiple page images belongs, and determining the question based on the object type.
  • the objects include institutions or users; the object types include institution types or user types, and the institution type may be the field in which the institution is located, such as the institution type being a resource institution type (insurance institution type), a real estate transaction institution type, etc.; the user type may be a user occupation type, a user growth time type (a type corresponding to the time period of the user's growth time), etc.
  • questions can be input for multiple page images.
  • the object type to which the object for which multiple page images are input belongs can be determined, and the question can be determined in the question pool according to the object type;
  • an insurance institution can input questions for multiple page images, and can also determine the type of insurance institution to which the insurance institution for which multiple page images are input belongs, and determine in the question pool according to the type of insurance institution that questions include "What is the name" and "What is the disease”;
  • a lending institution can input questions for multiple page images, and can also determine the type of lending institution to which the lending institution for which multiple page images are input belongs, and determine in the question pool according to the type of lending institution that questions include "How many times is the user overdue?" and "What is the user's overdue amount.”
  • the problem can also be determined based on the object identifier of the object. For example, different insurance institutions need to know different user information during the claims process, so the problem can be determined in the problem pool corresponding to the object type based on the object identifier.
  • character recognition can be performed on each of the multiple page images to obtain character information;
  • the character information refers to the character information obtained after character recognition;
  • the character recognition can be OCR (Optical Character Recognition);
  • each of the multiple page images can also be input into a character recognition network in an image parsing model to perform character recognition to obtain character information;
  • the character recognition network can be a character recognition algorithm, which can be an OCR recognition algorithm, which can be obtained after the network to be trained is trained using multiple page image samples.
  • Step S204 performing text feature extraction on the spliced text obtained by splicing the character information to obtain text features, and performing visual feature extraction on the page images to obtain visual features of the page images.
  • the above-mentioned process obtains multiple page images and questions of the document, and performs character recognition on each page image in the multiple page images to obtain character information.
  • text feature extraction is performed on the spliced text obtained by splicing the character information of each page image to obtain text features.
  • visual feature extraction is performed on each page image to obtain visual features of each page image.
  • the spliced text can be input into a text feature extraction network in the image parsing model to extract text features and obtain text features.
  • the text feature extraction network here can be a text encoder, specifically a Longformer (long document converter), which is a model that can efficiently process long text.
  • text feature extraction can also be performed directly on the character information of each page image obtained by character recognition to obtain text features for each page image.
  • the character information obtained by character recognition may be erroneous, and further, the text features obtained by text feature extraction of the spliced text may also be erroneous.
  • visual features can be introduced; in an optional implementation provided by this embodiment, in the process of performing visual feature extraction on the page images and obtaining the visual features of the page images, the following operations are performed: performing layout feature extraction on the page images and obtaining the page layout features of the page images; performing text feature extraction on the page images and obtaining the text visual features of the page images, and using the page layout features and the text visual features as the visual features.
  • Step S206 performing feature fusion processing on the visual feature sequence composed of the text features and the visual features of the page images to obtain fused features.
  • the text features of the spliced text obtained by splicing character information are extracted to obtain text features.
  • the visual features of each page image are extracted to obtain the visual features of each page image.
  • the visual feature sequence composed of the text features and the visual features of each page image can be subjected to feature fusion processing to obtain fusion features. In this way, the answer to the question can be determined through the fusion features of the two modalities of text modality and visual modality, thereby improving the comprehensiveness of the answer.
  • the visual feature sequence in this embodiment refers to a feature sequence in which the visual features of each page image are arranged in the order of each page.
  • the fusion feature includes a multimodal fusion feature.
  • the visual feature sequence composed of the text features and the visual features of each page image can be summed at the same feature position to obtain the fused feature; or the visual feature sequence composed of the text features and the visual features of each page image can be input into a feature fusion network for feature fusion processing to obtain the fused feature; in the first optional implementation provided by this embodiment, in the process of performing feature fusion processing on the visual feature sequence composed of the text features and the visual features of each page image to obtain the fused feature, the following operation is performed: the text features and the visual feature sequence are input into a feature fusion network for feature fusion to obtain the fused feature; optionally, the feature fusion network includes a fully connected network.
  • the feature fusion network can be a feature fusion network in an image parsing model.
  • invalid features may exist in the visual feature sequence and text features, such as page numbers and headers, which may lead to deviations in the fused features, and may have a negative impact on the subsequent determination of the answer content of the question.
  • the invalid character features in the text features can be detected based on the page layout features in the visual feature sequence, and the visual feature sequence and text features can be updated according to the invalid character features to obtain the target visual feature sequence and target text features.
  • the target text features and the target visual feature sequence are then fused to obtain the fused features.
  • the configuration information is obtained in the following manner: determining the target visual feature among the visual features of each page image based on the invalid character feature; using the adjacent background visual feature of the target visual feature as the configuration information; or using the preset visual feature as the configuration information.
  • the third optional implementation method for feature fusion processing can also be performed on the basis of the optional implementation method of extracting visual features from the page images to obtain the visual features of the page images.
  • Step S208 performing character prediction on the fused features based on the question, and determining the answer content of the question according to the character prediction result.
  • the question and fusion features can be input into the character prediction network in the image parsing model for character prediction, and the answer content of the question can be determined based on the character prediction results;
  • the character prediction network can be a decoding network or a decoder, and the network structure of the character prediction network can be Bart (Bidirectional and Auto-Regressive Transformers, a Transformer with both bidirectional language modeling and autoregressive mechanism) or a variant structure of Bart.
  • the answer content may include the actual answer to the question and answer details that specifically describe the answer to the question.
  • Different objects, different object types or different question classifications may result in different answer contents to the question.
  • this embodiment provides an optional implementation method.
  • the process of determining the answer content of the question based on the character prediction result the following operations are performed: based on the object type and/or the question classification of the question, a reply strategy for answering the question is determined; based on the reply strategy and the character prediction result, the question answer to the question is generated and/or the answer details of the question answer are extracted from the character prediction result.
  • this embodiment provides an optional implementation method, in the process of determining the reply strategy for replying to the question based on the object type and/or the question classification of the question, the following operations are performed: if the object type is the first object type and the question classification is the first question classification, the reply strategy is determined to be the answer reply strategy and the detail reply strategy; if the object type is the second object type or the question classification is the second question classification, the reply strategy is determined to be the answer reply strategy.
  • the answer reply strategy refers to a reply strategy for generating an answer to a question
  • the detail reply strategy refers to a reply strategy for extracting the answer details of the answer to the question from the character prediction result.
  • the first question classification can be a question type corresponding to other questions except user attribute questions
  • the second question classification can be a question type corresponding to user attribute questions, such as user attribute questions including what is the name and how long is the growth time.
  • the object in this embodiment can be an organization or a user
  • the first object type can be a resource organization type, such as an insurance organization
  • the second object type can be a remaining organization type except the resource organization type or a user type of the user.
  • the reply strategy is determined to be the answer reply strategy and the detail reply strategy, and the question answer to the question is generated according to the reply strategy and the character prediction result, and the answer details of the question answer are extracted from the character prediction result.
  • the reply strategy is determined to be the answer reply strategy, and the question answer to the question is generated according to the reply strategy and the character prediction result.
  • the answer to the question can also be generated based on the reply strategy and the character prediction results and/or the answer details of the answer to the question can be extracted from the character prediction results.
  • the reply strategy here can be a reply strategy input at the same time as inputting multiple page images and questions, that is, obtaining multiple page images and questions of the document can be replaced by obtaining multiple page images of the document, questions and reply strategies.
  • the present embodiment provides one or more image processing methods, first, obtaining multiple page images and questions of a document, and performing character recognition on each page image to obtain character information, secondly, performing text feature extraction on the spliced text obtained by splicing the character information to obtain text features, and performing visual feature extraction on each page image to obtain visual features of each page image, thirdly, based on each page layout feature in the visual feature sequence, performing character positioning on the text features to obtain character features within the page unit corresponding to each page layout feature in the text features, performing feature fusion on the visual features in the visual feature sequence and the character features within the page unit to obtain fused features, thereby recognizing the character features within the page unit in the text features with the help of the page layout features in the visual feature sequence, realizing feature alignment of the visual features and the character features within the page unit, and improving the effectiveness and accuracy of the fused features; or, based on each page layout feature in the visual feature sequence, detecting invalid character features in the text features.
  • Step S302 Acquire multiple page images and questions of the security application document, and perform character recognition on each page image to obtain character information.
  • Step S304 performing text feature extraction on the spliced text obtained by splicing the character information to obtain text features, and performing visual feature extraction on each page image to obtain visual features of each page image.
  • Step S310 filling the visual features of each page image in the visual feature sequence according to the configuration information to obtain a target visual feature sequence.
  • step S314 character prediction is performed on the fused features based on the question, and the answer content of the question is determined according to the character prediction result, so as to perform guarantee processing based on the answer content.
  • the protection processing here can be claim processing.
  • the object type here can be determined based on the object of inputting multiple page images and questions.
  • steps S302 to S314 or any combination of multiple steps can be replaced by the corresponding technical means provided in the above steps S202 to S208 according to the needs of implementation and deployment, and will not be described one by one here.
  • the description is relatively simple.
  • the device embodiment described below is only illustrative.
  • This embodiment provides an image processing device, including: a character recognition module 402, configured to obtain multiple page images and questions of a document, and perform character recognition on each page image to obtain character information; a feature extraction module 404, configured to perform text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and perform visual feature extraction on each page image to obtain visual features of each page image; a feature fusion module 406, configured to perform feature fusion processing on a visual feature sequence composed of the text features and the visual features of each page image to obtain fusion features; a character prediction module 408, configured to perform character prediction on the fusion feature based on the question, and determine the answer content of the question according to the character prediction result.
  • a character recognition module 402 configured to obtain multiple page images and questions of a document, and perform character recognition on each page image to obtain character information
  • a feature extraction module 404 configured to perform text feature extraction on a spliced text obtained by splicing the character information to obtain text features, and perform visual feature extraction on
  • FIG. 5 is a structural schematic diagram of an image processing device provided by one or more embodiments of this specification.
  • the image processing device may vary greatly due to different configurations or performances, and may include one or more processors 501 and a memory 502.
  • the memory 502 may store one or more applications or data.
  • the memory 502 may be a temporary storage or a persistent storage.
  • the application stored in the memory 502 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in the image processing device.
  • the processor 501 may be configured to communicate with the memory 502 to execute the series of computer-executable instructions in the memory 502 on the image processing device.
  • the image processing device may also include one or more power supplies 503, one or more wired or wireless network interfaces 504, one or more input/output interfaces 505, one or more keyboards 506, and the like.
  • the image processing device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the image processing device, and is configured to be executed by one or more processors.
  • one or more embodiments of this specification further provide a computer-readable storage medium.
  • a programmable logic device (such as a field programmable gate array (FPGA)) is an integrated circuit whose logical function is determined by user programming of the device.
  • HDL Hardware Description Language

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Character Discrimination (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本说明书实施例提供了图像处理方法及装置。其中,一种图像处理方法包括:获取到文档的多个页面图像和问题后,对各页面图像进行字符识别获得字符信息,一方面对字符信息进行拼接获得的拼接文本进行文本特征提取获得文本特征,另一方面对各页面图像进行视觉特征提取,获得各页面图像的视觉特征,结合文本特征和各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,基于问题对融合特征进行字符预测,根据字符预测结果确定问题的答案内容。

Description

图像处理 技术领域
本文件涉及图像处理技术领域,尤其涉及用于图像处理的方法及装置。
背景技术
随着数字化的不断发展,各行各业中存在着大量的文档识别、从文档中提取关键信息等情况,文档理解逐渐成为众多行业、领域的重大需求;但在文档理解的过程中,不同的文档样式对于理解、进行关键信息提取的难易程度也不同,也即简单的文档样式比较容易理解且容易从文档中提取需要的信息,复杂的文档样式也就较难理解,比如文档中前一页内容未完,在下一页需要继续展示的情况,即代表文档中存在跨页内容的情况,属于复杂的文档样式,针对于此,对于文档处理方而言依然面临较大的文档理解挑战。
发明内容
本说明书一个或多个实施例提供了一种图像处理方法,包括:获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
本说明书一个或多个实施例提供了一种图像处理装置,包括:字符识别模块,被配置为获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;特征提取模块,被配置为对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;特征融合模块,被配置为对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;字符预测模块,被配置为基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
本说明书一个或多个实施例提供了一种图像处理设备,包括处理器以及被配置为存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器:获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
本说明书一个或多个实施例提供了一种计算机可读存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现以下步骤:获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
附图说明
为了更清楚地说明本说明书一个或多个实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本说明书中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本说明书一个或多个实施例提供的一种图像处理方法实施环境的示意图。
图2为本说明书一个或多个实施例提供的一种图像处理方法处理流程图。
图3为本说明书一个或多个实施例提供的一种应用于保障申请场景的图像处理方法处理流程图。
图4为本说明书一个或多个实施例提供的一种图像处理装置实施例的示意图。
图5为本说明书一个或多个实施例提供的一种图像处理设备的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书一个或多个实施例中的技术方案,下面将结合本说明书一个或多个实施例中的附图,对本说明书一个或多个实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书的一部分实施例,而不是全部的实施例。基于本说明书一个或多个实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本文件的保护范围。
本说明书一个或多个实施例提供的图像处理方法,可适用于图像处理这一实施环境,参照图1,该实施环境至少包括图像解析模型,图像解析模型中可包含进行字符识别的识别网络101、文本特征提取网络102、视觉特征提取网络103、特征融合网络104、答案确定网络105。
图像解析模型可部署在服务器上,该服务器可以是一台服务器,或者由若干台服务器组成的服务器集群,或者是云计算平台中的一个或者多个云服务器。
该实施环境中,识别网络101获取到文档的多个页面图像和问题后,对多个页面图像中的各页面图像进行字符识别获得字符信息,文本特征提取网络102对字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,视觉特征提取网络103对各页面图像进行视觉特征提取,获得各页面图像的视觉特征,特征融合网络104对文本特征和各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,答案确定网络105借助输入的问题对融合特征进行字符预测,并根据字符预测结果来确定问题的答案内容。
本说明书提供的一种图像处理方法的一个或多个实施例如下。
参照图2,本实施例提供的图像处理方法,具体包括步骤S202至步骤S208。
步骤S202,获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息。
本实施例所述文档是指待处理的文档,所述文档可以是同一文档文件(同一个文档文件),比如保障申请项目中用户的病例文档,再比如资源服务中用户的资源数据文档,具体比如贷款服务中用户的资金数据文档;所述文档还可以是同一网页页面,即整个网页页面。所述多个页面图像是指文档中多个页面的页面图像,也即所述文档为存在多个页面的文档,所述多个页面图像可以是文档中多个连续页面的页面图像,比如文档中页码为1、2、3的多个页面图像;本实施例中文档的多个页面图像可以是存在跨页内容的页面图像,比如多个页面图像中的第一页的页面图像的内容未完,在第二页的页面图像中继续进行展示,即内容存在跨页的情况,即文档的多个跨页的页面图像。
可选的,所述文档的多个页面图像包括同一文档中多个文档页码对应的多个页面图像或者同一网页的网页页面的多个截屏图像,具体的,所述多个文档页码可以是多个连续文档页码,比如文档页码1、2、3;所述多个截屏图像可以在对所述网页页面进行连续截屏后获得,即多个截屏图像的总图像内容可以组成整个网页页面或者网页页面的一部分,但是多个截屏图像的总图像内容为连续不中断的;例如同一文档中存在多个文档页码1、2、3,多个文档页码对应的多个页面图像即为文档中文档页码为1的页面图像、文档页码为2的页面图像、文档页码为3的页面图像;再比如对同一网页的网页页面进行截屏获得截屏图像1和截屏图像2,截屏图像1和截屏图像2是按网页页面内容的排布顺序截屏获得的图像,即截屏图像1和截屏图像2组成的图像内容属于网页页面内容,且图像内容在网页页面内容中连续不中断;也即文档的多个页面图像包括文档的多个文档页码对应的多个页面图像或者网页的多个截屏图像;本实施例提供的图像处理方法可基于图像解析模型执行。
所述问题是指通过所述文档的多个页面图像需要进行回答的题目,比如文档是用户的病例文档或者理赔文档,问题为“患者的出院诊断是什么”。所述问题可以是一个或者多个,再比如文档是用户的资金数据文档,问题为“用户的逾期次数是多少”。
实际应用中,存在通过文档的多个页面图像获得所需信息的需求,针对于此,为了满足从文档的多个页面图像得到所需信息的多样化需求,可引入文档的多个页面图像的问题,即从文档的多个页面图像中得到问题的答案内容;本实施例提供的一种可选实施方式中,所述问题,通过如下方式获得:获取针对所述多个页面图像输入的所述问题;或者,确定输入所述多个页面图像的对象所属的对象类型,并根据所述对象类型确定所述问题。
所述对象包括机构或者用户;所述对象类型包括机构类型或者用户类型,所述机构类型可以是机构所处的领域,比如机构类型为资源机构类型(保险机构类型)、房地产交易机构类型等;所述用户类型可以是用户职业类型、用户生长时间类型(用户的生长时间所处的时间段对应的类型)等。
具体的,一种情况下,可针对多个页面图像输入问题,另一种情况下,为了避免对象手动输入,提升问题确定的灵活性,实现问题确定的自动化和智能化,可确定输入多个页面图像的对象所属的对象类型,并根据对象类型在问题池中确定所述问题;例如,保险机构可针对多个页面图像输入问题,也可确定输入多个页面图像的保险机构所属的保险机构类型,并根据保险机构类型在问题池中确定问题包括“姓名是什么”、“疾病是什么”;再例如,贷款机构可针对多个页面图像输入问题,也可确定输入多个页面图像的贷款机构所属的贷款机构类型,并根据贷款机构类型在问题池中确定问题包括“用户的逾期次数是多少”、“用户的逾期金额是多少”。
此外,所述问题还可根据所述对象的对象标识确定,比如不同的保险机构在理赔过程中所需了解的用户信息不同,所以可根据对象标识在对象类型对应的问题池中确定所述问题。
具体实施时,在获取到文档的多个页面图像和问题后,可先对多个页面图像中的各页面图像进行字符识别获得字符信息;所述字符信息是指进行字符识别后得到的字符信息;所述字符识别可以是OCR(Optical Character Recognition,光学字符识别);此外,在对多个页面图像中的各页面图像进行字符识别获得字符信息的过程中,也可将多个页面图像中的各页面图像输入图像解析模型中的字符识别网络进行字符识别,获得字符信息;其中的字符识别网络可以是字符识别算法,该字符识别算法可以是OCR识别算法,所述OCR识别算法可以在通过多个页面图像样本对待训练网络进行网络训练后获得。
步骤S204,对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征。
上述获取文档的多个页面图像和问题,并对多个页面图像中的各页面图像进行字符识别获得字符信息,本步骤中,一方面对各页面图像的字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,另一方面,对各页面图像进行视觉特征提取,获得各页面图像的视觉特征。
本实施例所述文本特征是指文本模态维度的特征向量;所述各页面图像的视觉特征是指各页面图像的在视觉模态维度的特征向量,比如视觉特征包括页面布局特征和文字视觉特征,所述页面布局特征是指各页面图像的图像内容的布局特征,比如文字位置特征等;所述文字视觉特征包括文字的轮廓特征、文字的颜色特征、文字的大小特征等。
实际应用中,多个页面图像中的各页面图像存在跨页内容的情况,比如多个页面图像中的第一页的页面图像的内容未完,在第二页的页面图像中继续进行展示,即内容存在跨页的情况,针对于此,为了能够结合上下文更好地进行文本特征提取,使得提取获得的文本特征能够更好地刻画多个页面图像中的字符,本实施例可对上述各页面图像的字符信息进行拼接处理获得拼接文本,并对拼接文本进行文本特征提取获得文本特征,以此通过多个页面图像的完整的拼接文本,避免对单个页面图像的字符信息进行文本特征提取而造成信息损失,结合多个页面图像的拼接文本能够更好地理解文档,使得提取获得的文本特征更加有效和精确。
在对字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征的过程中,可将拼接文本输入图像解析模型中的文本特征提取网络进行文本特征提取,获得文本特征;此处的文本特征提取网络可以是文本编码器,具体可以是Longformer(长文档转换器),Longformer为可高效处理长文本的模型。此外,也可直接对字符识别获得的各页面图像的字符信息进行文本特征提取,获得各页面图像的文本特征。
具体执行过程中,由于各页面图像的图像容量可能较大,所以为了提升视觉特征提取效率,可对各页面图像进行视觉特征提取,获得各页面图像的视觉特征,具体可将各页面图像输入视觉特征提取网络进行视觉特征提取,获得各页面图像的视觉特征;所述视觉特征提取网络可以由一个或者多个视觉编码器组成,在视觉编码器为多个情况下,可将各页面图像输入多个视觉编码器中的各视觉编码器进行视觉特征提取,获得各视觉编码器输出的各页面图像的视觉特征;各视觉编码器的参数可以是共享参数;所述视觉特征提取网络可以是视觉编码器,该视觉编码器可以采用基于CNN(Convolutional Neural Network,卷积神经网络)的视觉backbone(主干网络),也可以采用基于Transformer架构的视觉Backbone,比如可以采用Swin Transformer(深度学习模型)。
实际应用中,由于文档的多个页面图像中的文字可能存在倾斜等情况,导致进行字符识别获得的字符信息可能存在误差,进而导致对拼接文本进行文本特征提取获得的文本特征也可能存在误差,针对于此,为了避免基于单一的文本特征确定的问题的答案内容存在误差,可引入视觉特征;本实施例提供的一种可选实施方式中,在对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征的过程中,执行如下操作:对所述各页面图像进行布局特征提取,获得所述各页面图像的页面布局特征;对所述各页面图像进行文字特征提取,获得所述各页面图像的文字视觉特征,并将所述页面布局特征和所述文字视觉特征作为所述视觉特征。
步骤S206,对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征。
上述一方面从文本维度出发,对字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,另一方面从视觉维度出发,对各页面图像进行视觉特征提取,获得各页面图像的视觉特征,本步骤中,为了提升后续确定问题的答案内容的精确度,可对文本特征和各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,以此通过文本模态和视觉模态两个模态的融合特征确定问题的答案,提升答案的全面性。
本实施例所述视觉特征序列是指各页面图像的视觉特征按照各页面顺序排列的特征序列。所述融合特征包括多模态融合特征。
具体实施时,可对文本特征和各页面图像的视觉特征组成的视觉特征序列在相同特征位置进行加和处理,获得所述融合特征;或者,将文本特征和各页面图像的视觉特征组成的视觉特征序列输入特征融合网络进行特征融合处理,获得融合特征;本实施例提供的第一种可选实施方式中,在对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征的过程中,执行如下操作:将所述文本特征和所述视觉特征序列输入特征融合网络进行特征融合,获得所述融合特征;可选的,所述特征融合网络包括全连接网络。特征融合网络可以是图像解析模型中的特征融合网络。
实际应用中,由于文本特征为对拼接文本进行文本特征提取获得的特征,所以文本特征不存在多个页面图像的布局信息,为了更好地将文本特征与视觉特征序列进行融合,提升特征融合的便捷性和准确度,可基于视觉特征序列中的各页面布局特征对文本特征进行字符定位,并根据字符定位结果对视觉特征序列与文本特征进行特征融合,获得融合特征;具体的,本实施例提供的第二种可选实施方式中,在对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征的过程中,执行如下操作:基于所述视觉特征序列中的各页面布局特征,对所述文本特征进行字符定位,获得所述文本特征中所述各页面布局特征对应的页面单元内的字符特征;对所述视觉特征序列中的所述视觉特征与所述页面单元内的字符特征进行特征融合,获得所述融合特征。
其中,所述各页面布局特征可以是视觉特征序列中各页面图像的视觉特征中的页面布局特征。所述各页面布局特征对应的页面单元包括各页面布局特征对应的每一页,即一个页面单元为各页面布局特征对应的每一页。所述页面单元内的字符特征包括文本特征中每一个页面单元内的字符特征,即文本特征中每一页内的字符特征。
具体的,可基于视觉特征序列中各页面图像的视觉特征中的页面布局特征,对文本特征进行字符定位,获得文本特征中各页面图像对应的页面单元内的字符特征,对视觉特征序列中的各页面图像的视觉特征与各页面单元内的字符特征进行特征融合,获得融合特征。
实际应用场景中,视觉特征序列以及文本特征中可能存在无效特征,比如页码、页眉这些无效特征,导致融合特征可能存在偏差,进而可能对后续确定问题的答案内容造成负面影响,针对于此,为了提升融合特征的全面性和有效性,可基于视觉特征序列中的各页面布局特征,检测文本特征中的无效字符特征,根据无效字符特征对视觉特征序列与文本特征进行更新处理,获得目标视觉特征序列和目标文本特征,对目标文本特征和目标视觉特征序列进行特征融合,获得融合特征。
本实施例提供的第三种可选实施方式中,在对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征的过程中,执行如下操作:基于所述视觉特征序列中的各页面布局特征,检测所述文本特征中的无效字符特征,并将所述无效字符特征从所述文本特征中进行删除,获得目标文本特征;根据配置信息对所述视觉特征序列中各页面图像的视觉特征进行填充处理,获得目标视觉特征序列;对所述目标文本特征和所述目标视觉特征序列进行特征融合,获得所述融合特征。
其中,所述无效字符特征是指在文本特征中没有作用的字符特征,比如无效字符特征可以是页码特征、页眉特征等。
具体的,可基于视觉特征序列中各页面图像的视觉特征中的页面布局特征,检测文本特征中的无效字符特征,并将无效字符特征从文本特征中进行删除获得目标文本特征,将各页面图像的视觉特征中无效字符特征对应的目标视觉特征替换为配置信息,获得目标视觉特征序列,对目标文本特征和目标视觉特征序列进行特征融合,获得融合特征;在对目标文本特征和目标视觉特征序列进行特征融合,获得融合特征的过程中,可基于目标视觉特征序列中的各页面布局特征对目标文本特征进行字符定位,获得目标文本特征中各页面单元内的字符特征,对目标视觉特征序列中的各页面图像的更新视觉特征与各页面单元内的字符特征进行特征融合,获得所述融合特征;此处的各页面图像的更新视觉特征是指对各页面图像的视觉特征中的目标视觉特征替换为配置信息后获得的各页面图像的更新视觉特征。
在此基础上,本实施例提供的一种可选实施方式中,所述配置信息,通过如下方式获得:基于所述无效字符特征确定所述各页面图像的视觉特征中的目标视觉特征;将所述目标视觉特征的邻近背景视觉特征作为所述配置信息;或者,将预设视觉特征作为所述配置信息。
其中,所述预设视觉特征是指预先设置的视觉特征,比如白色视觉特征、黑色视觉特征等。所述目标视觉特征的邻近背景视觉特征包括目标视觉特征的周围背景的背景视觉特征,比如目标视觉特征的周围背景为白色,则邻近背景视觉特征即为白色视觉特征。
具体的,在基于所述无效字符特征确定所述各页面图像的视觉特征中的目标视觉特征的过程中,可在各页面图像的视觉特征中确定无效字符特征对应的目标视觉特征。
需要说明的是,上述提供的第三种进行特征融合处理的可选实施方式也可在上述对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征过程的可选实施方式的基础上执行。
步骤S208,基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
上述对文本特征和各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,本步骤中,通过结合文本特征和视觉特征序列得到的融合特征进行字符预测,并根据字符预测结果确定问题的答案内容。
上述提到本实施例提供的图像处理方法可基于图像解析模型执行,在此基础上,所述图像解析模型的输入可包括所述多个页面图像和所述问题;所述图像解析模型的输出可包括所述答案内容。所述答案内容包括问题答案和答案详情,比如问题为患者有几种疾病,问题答案为2种,答案详情为疾病1和疾病2。
具体实施时,可将问题和融合特征输入图像解析模型中的字符预测网络进行字符预测,并根据字符预测结果确定问题的答案内容;所述字符预测网络可以是解码网络或者解码器,该字符预测网络的网络结构可以是Bart(Bidirectional and Auto-Regressive Transformers,兼有双向语言建模和自回归机制的Transformer)或者Bart的变体结构。
本实施例提供的一种可选实施方式中,在基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容的过程中,执行如下操作:将所述融合特征和保障项目文档的问题输入解码网络进行解码处理,获得问题答案和关键保障内容,以基于所述问题答案和所述关键保障内容进行保障申请处理。
其中,所述解码网络可以是图像解析模型中的解码网络。本实施例中的问题可以是保障项目文档的问题,具体可以是保障申请问题,即保障申请项目文档的问题。所述关键保障内容是指对问题答案进行具体描述的关键内容,关键保障内容可以从字符预测结果中提取获得,此处的关键保障内容可以是本实施中提到的答案详情。本实施例中的保障申请项目可以是理赔项目,保障申请处理可以是理赔处理。
实际应用中,答案内容可能存在实际的问题答案以及对问题答案进行具体描述的答案详情,而不同的对象、不同的对象类型或者不同的问题分类可能导致问题的答案内容不同,针对于此,为了提升确定的问题的答案内容的灵活性,本实施例提供的一种可选实施方式中,在根据字符预测结果确定所述问题的答案内容的过程中,执行如下操作:基于所述对象类型和/或所述问题的问题分类,确定对所述问题进行答复的答复策略;根据所述答复策略和所述字符预测结果生成所述问题的问题答案和/或从所述字符预测结果中提取所述问题答案的答案详情。
进一步,为了提升答复策略的精细化程度,本实施例提供的一种可选实施方式中,在基于所述对象类型和/或所述问题的问题分类,确定对所述问题进行答复的答复策略的过程中,执行如下操作:若所述对象类型为第一对象类型且所述问题分类为第一问题分类,确定所述答复策略为答案答复策略和详情答复策略;若所述对象类型为第二对象类型或者所述问题分类为第二问题分类,确定所述答复策略为答案答复策略。
其中,所述答案答复策略是指生成问题的问题答案的答复策略;所述详情答复策略是指从所述字符预测结果中提取所述问题答案的答案详情的答复策略。所述第一问题分类可以是除用户属性问题之外的其他问题对应的问题类型,所述第二问题分类可以是用户属性问题对应的问题类型,比如用户属性问题包括姓名是什么、生长时间是多少。本实施例中的对象可以是机构或者用户;所述第一对象类型可以是资源机构类型,比如保险机构,所述第二对象类型可以是除资源机构类型之外的剩余机构类型或者用户的用户类型。
具体的,若所述对象类型为第一对象类型且所述问题分类为第一问题分类,确定所述答复策略为答案答复策略和详情答复策略,根据所述答复策略和所述字符预测结果生成所述问题的问题答案以及从所述字符预测结果中提取所述问题答案的答案详情,若所述对象类型为第二对象类型或者所述问题分类为第二问题分类,确定所述答复策略为答案答复策略,根据所述答复策略和所述字符预测结果生成所述问题的问题答案。
此外,在根据字符预测结果确定所述问题的答案内容的过程中,也可根据所述答复策略和所述字符预测结果生成所述问题的问题答案和/或从所述字符预测结果中提取所述问题答案的答案详情,此处的答复策略可以是输入多个页面图像和问题的同时,输入的答复策略,也即获取文档的多个页面图像和问题可替换为获取文档的多个页面图像、问题以及答复策略。
综上所述,本实施例提供的一种或者多种图像处理方法,首先,获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息,其次,对字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对各页面图像进行视觉特征提取,获得各页面图像的视觉特征,再次,基于视觉特征序列中的各页面布局特征,对文本特征进行字符定位,获得文本特征中各页面布局特征对应的页面单元内的字符特征,对视觉特征序列中的视觉特征与页面单元内的字符特征进行特征融合,获得融合特征,以此借助视觉特征序列中的页面布局特征对文本特征中页面单元内的字符特征进行识别,实现对视觉特征和页面单元内的字符特征的特征对齐,提升融合特征的有效性和精确度;或者,基于视觉特征序列中的各页面布局特征,检测文本特征中的无效字符特征,并将无效字符特征从文本特征中进行删除,获得目标文本特征,根据配置信息对视觉特征序列中各页面图像的视觉特征进行填充处理,获得目标视觉特征序列,对目标文本特征和目标视觉特征序列进行特征融合,获得融合特征,通过无效字符特征减少目标文本特征和目标视觉特征序列的特征偏差,提升融合特征的精准性;最后,基于所述问题对融合特征进行字符预测,基于对象类型(可基于输入多个页面图像和问题的对象确定)和问题的问题分类,确定对问题进行答复的答复策略,根据答复策略和字符预测结果生成问题的问题答案和/或从字符预测结果中提取问题答案的答案详情,以此通过答复策略提升确定答案内容的灵活性和多样化,实现对多个页面图像这种跨页图像的智能理解,以及从智能理解结果中获取问题的答案内容,提升跨页图像的识别便捷性。
下述以本实施例提供的一种图像处理方法在保障申请场景的应用为例,对本实施例提供的图像处理方法进行进一步说明,参见图3,应用于保障申请场景的图像处理方法,具体包括如下步骤。
步骤S302,获取保障申请文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息。
步骤S304,对字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对各页面图像进行视觉特征提取,获得各页面图像的视觉特征。
步骤S306,基于各页面图像的视觉特征组成的视觉特征序列中的各页面布局特征,检测文本特征中的无效字符特征,并将无效字符特征从文本特征中进行删除,获得目标文本特征。
步骤S308,基于无效字符特征确定各页面图像的视觉特征中的目标视觉特征,将目标视觉特征的邻近背景视觉特征作为配置信息。
步骤S310,根据配置信息对视觉特征序列中各页面图像的视觉特征进行填充处理,获得目标视觉特征序列。
步骤S312,对目标文本特征和目标视觉特征序列进行特征融合,获得融合特征。
步骤S314,基于问题对融合特征进行字符预测,并根据字符预测结果确定问题的答案内容,以基于答案内容进行保障处理。
此处的保障处理可以是理赔处理。
其中,所述根据字符预测结果确定问题的答案内容可包括:基于对象类型和/或问题的问题分类,确定对问题进行答复的答复策略;根据答复策略和字符预测结果生成问题的问题答案和/或从字符预测结果中提取问题答案的答案详情。
此处的对象类型可基于输入多个页面图像和问题的对象确定。
需要说明的是,步骤S302至步骤S314任意一个步骤或者任意多个步骤的组合,均可根据实施部署的需要被替换为上述步骤S202至步骤S208中提供的相应技术手段,此处不再一一赘述。
本说明书提供的一种图像处理装置实施例如下。
在上述的实施例中,提供了一种图像处理方法,与之相对应的,还提供了一种图像处理装置,下面结合附图进行说明。
参照图4,其示出了本实施例提供的一种图像处理装置实施例的示意图。
由于装置实施例对应于方法实施例,所以描述得比较简单,相关的部分请参见上述提供的方法实施例的对应说明即可。下述描述的装置实施例仅仅是示意性的。
本实施例提供一种图像处理装置,包括:字符识别模块402,被配置为获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;特征提取模块404,被配置为对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;特征融合模块406,被配置为对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;字符预测模块408,被配置为基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
本说明书提供的一种图像处理设备实施例如下。
对应上述描述的一种图像处理方法,基于相同的技术构思,本说明书一个或多个实施例还提供一种图像处理设备,该图像处理设备用于执行上述提供的一种图像处理方法,图5为本说明书一个或多个实施例提供的一种图像处理设备的结构示意图。
本实施例提供的一种图像处理设备,如图5所示,图像处理设备可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上的处理器501和存储器502,存储器502中可以存储有一个或一个以上存储应用程序或数据。其中,存储器502可以是短暂存储或持久存储。存储在存储器502的应用程序可以包括一个或一个以上模块(图示未示出),每个模块可以包括图像处理设备中的一系列计算机可执行指令。更进一步地,处理器501可以设置为与存储器502通信,在图像处理设备上执行存储器502中的一系列计算机可执行指令。图像处理设备还可以包括一个或一个以上电源503,一个或一个以上有线或无线网络接口504,一个或一个以上输入/输出接口505,一个或一个以上键盘506等。
在一个具体的实施例中,图像处理设备包括有存储器,以及一个或一个以上的程序,其中一个或者一个以上程序存储于存储器中,且一个或者一个以上程序可以包括一个或一个以上模块,且每个模块可以包括对图像处理设备中的一系列计算机可执行指令,且经配置以由一个或者一个以上处理器执行该一个或者一个以上程序包含用于进行以下计算机可执行指令:获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
本说明书提供的一种计算机可读存储介质实施例如下。
对应上述描述的一种图像处理方法,基于相同的技术构思,本说明书一个或多个实施例还提供一种计算机可读存储介质。
本实施例提供的计算机可读存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现以下步骤:获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
需要说明的是,本说明书中关于一种计算机可读存储介质的实施例与本说明书中关于一种图像处理方法的实施例基于同一发明构思,因此该实施例的具体实施可以参见前述对应方法的实施,重复之处不再赘述。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同或者相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处,比如装置实施例、设备实施例和计算机可读存储介质实施例,三者均相似于方法实施例,所以描述地比较简单,阅读装置实施例、设备实施例和计算机可读存储介质实施例中的相关内容请参照方法实施例的部分说明即可。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
在20世纪30年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由用户对器件编程来确定。由设计人员自行编程来把一个数字系统“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机。具体的,计算机例如可以为个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任何设备的组合。
为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本说明书实施例时可以把各单元的功能在同一个或多个软件和/或硬件中实现。
本领域内的技术人员应明白,本说明书一个或多个实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本说明书可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书是参照根据本说明书实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程图像处理设备的处理器以产生一个机器,使得通过计算机或其他可编程图像处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程图像处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程图像处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。
本说明书一个或多个实施例可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本说明书的一个或多个实施例,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本文件的实施例而已,并不用于限制本文件。对于本领域技术人员来说,本文件可以有各种更改和变化。凡在本文件的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本文件的权利要求范围之内。

Claims (15)

  1. 一种图像处理方法,包括:
    获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;
    对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;
    对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;
    基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
  2. 根据权利要求1所述的图像处理方法,所述对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,包括:
    基于所述视觉特征序列中的各页面布局特征,对所述文本特征进行字符定位,获得所述文本特征中所述各页面布局特征对应的页面单元内的字符特征;
    对所述视觉特征序列中的所述视觉特征与所述页面单元内的字符特征进行特征融合,获得所述融合特征。
  3. 根据权利要求1所述的图像处理方法,所述对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征,包括:
    对所述各页面图像进行布局特征提取,获得所述各页面图像的页面布局特征;
    对所述各页面图像进行文字特征提取,获得所述各页面图像的文字视觉特征,并将所述页面布局特征和所述文字视觉特征作为所述视觉特征。
  4. 根据权利要求3所述的图像处理方法,所述对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,包括:
    基于所述视觉特征序列中的各页面布局特征,检测所述文本特征中的无效字符特征,并将所述无效字符特征从所述文本特征中进行删除,获得目标文本特征;
    根据配置信息对所述视觉特征序列中各页面图像的视觉特征进行填充处理,获得目标视觉特征序列;
    对所述目标文本特征和所述目标视觉特征序列进行特征融合,获得所述融合特征。
  5. 根据权利要求4所述的图像处理方法,所述配置信息,通过如下方式获得:
    基于所述无效字符特征确定所述各页面图像的视觉特征中的目标视觉特征;
    将所述目标视觉特征的邻近背景视觉特征作为所述配置信息;
    或者,
    将预设视觉特征作为所述配置信息。
  6. 根据权利要求1所述的图像处理方法,所述问题,通过如下方式获得:
    获取针对所述多个页面图像输入的所述问题;或者,确定输入所述多个页面图像的对象所属的对象类型,并根据所述对象类型确定所述问题。
  7. 根据权利要求6所述的图像处理方法,所述根据字符预测结果确定所述问题的答案内容,包括:
    基于所述对象类型和/或所述问题的问题分类,确定对所述问题进行答复的答复策略;
    根据所述答复策略和所述字符预测结果生成所述问题的问题答案和/或从所述字符预测结果中提取所述问题答案的答案详情。
  8. 根据权利要求7所述的图像处理方法,所述基于所述对象类型和/或所述问题的问题分类,确定对所述问题进行答复的答复策略,包括:
    若所述对象类型为第一对象类型且所述问题分类为第一问题分类,确定所述答复策略为答案答复策略和详情答复策略;
    若所述对象类型为第二对象类型或者所述问题分类为第二问题分类,确定所述答复策略为答案答复策略。
  9. 根据权利要求1所述的图像处理方法,所述基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容,包括:
    将所述融合特征和保障项目文档的问题输入解码网络进行解码处理,获得问题答案和关键保障内容,以基于所述问题答案和所述关键保障内容进行保障申请处理。
  10. 根据权利要求1所述的图像处理方法,所述方法基于图像解析模型执行;
    所述图像解析模型的输入包括所述多个页面图像和所述问题;所述图像解析模型的输出包括所述答案内容。
  11. 根据权利要求1所述的图像处理方法,所述对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征,包括:
    将所述文本特征和所述视觉特征序列输入特征融合网络进行特征融合,获得所述融合特征;所述特征融合网络包括全连接网络。
  12. 根据权利要求1所述的图像处理方法,所述文档的多个页面图像包括同一文档中多个文档页码对应的多个页面图像或者同一网页的网页页面的多个截屏图像。
  13. 一种图像处理装置,包括:
    字符识别模块,被配置为获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;
    特征提取模块,被配置为对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;
    特征融合模块,被配置为对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;
    字符预测模块,被配置为基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
  14. 一种图像处理设备,包括:
    处理器;以及,被配置为存储计算机可执行指令的存储器,所述计算机可执行指令在被执行时使所述处理器:
    获取文档的多个页面图像和问题,并对各页面图像进行字符识别获得字符信息;
    对所述字符信息进行拼接获得的拼接文本进行文本特征提取,获得文本特征,以及对所述各页面图像进行视觉特征提取,获得所述各页面图像的视觉特征;
    对所述文本特征和所述各页面图像的视觉特征组成的视觉特征序列进行特征融合处理,获得融合特征;
    基于所述问题对所述融合特征进行字符预测,并根据字符预测结果确定所述问题的答案内容。
  15. 一种计算机可读存储介质,用于存储计算机可执行指令,所述计算机可执行指令在被执行时实现权利要求1所述方法的步骤。
PCT/CN2025/081607 2024-03-26 2025-03-10 图像处理 Pending WO2025201019A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202410353969.0 2024-03-26
CN202410353969.0A CN118172783A (zh) 2024-03-26 2024-03-26 图像处理方法及装置

Publications (1)

Publication Number Publication Date
WO2025201019A1 true WO2025201019A1 (zh) 2025-10-02

Family

ID=91356383

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2025/081607 Pending WO2025201019A1 (zh) 2024-03-26 2025-03-10 图像处理

Country Status (2)

Country Link
CN (1) CN118172783A (zh)
WO (1) WO2025201019A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118172783A (zh) * 2024-03-26 2024-06-11 支付宝(杭州)信息技术有限公司 图像处理方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688784A (zh) * 2017-08-23 2018-02-13 福建六壬网安股份有限公司 一种基于深层特征和浅层特征融合的字符识别方法及存储介质
CN113989314A (zh) * 2021-10-26 2022-01-28 深圳前海环融联易信息科技服务有限公司 一种基于霍夫变换直线检测去除页眉页脚的方法
US20230267267A1 (en) * 2022-02-18 2023-08-24 Nlmatics Corp. Knowledge discovery based on user-posed queries
CN117573839A (zh) * 2024-01-12 2024-02-20 阿里云计算有限公司 文档检索方法、人机交互方法、电子设备及存储介质
CN118172783A (zh) * 2024-03-26 2024-06-11 支付宝(杭州)信息技术有限公司 图像处理方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688784A (zh) * 2017-08-23 2018-02-13 福建六壬网安股份有限公司 一种基于深层特征和浅层特征融合的字符识别方法及存储介质
CN113989314A (zh) * 2021-10-26 2022-01-28 深圳前海环融联易信息科技服务有限公司 一种基于霍夫变换直线检测去除页眉页脚的方法
US20230267267A1 (en) * 2022-02-18 2023-08-24 Nlmatics Corp. Knowledge discovery based on user-posed queries
CN117573839A (zh) * 2024-01-12 2024-02-20 阿里云计算有限公司 文档检索方法、人机交互方法、电子设备及存储介质
CN118172783A (zh) * 2024-03-26 2024-06-11 支付宝(杭州)信息技术有限公司 图像处理方法及装置

Also Published As

Publication number Publication date
CN118172783A (zh) 2024-06-11

Similar Documents

Publication Publication Date Title
JP2022177242A (ja) テキスト認識モデルの訓練方法、テキスト認識方法及び装置
CN111563551A (zh) 一种多模态信息融合方法、装置及电子设备
CN117076650B (zh) 一种基于大语言模型的智能对话方法、装置、介质及设备
CN112632961A (zh) 基于上下文推理的自然语言理解处理方法、装置以及设备
CN110008991B (zh) 风险事件的识别、风险识别模型的生成方法、装置、设备及介质
CN113191908B (zh) 理赔审核处理方法及装置
CN116188971A (zh) 一种机器人物体识别方法、装置及存储介质
Kishor et al. Develop model for recognition of handwritten equation using machine learning
WO2025201019A1 (zh) 图像处理
CN118709766A (zh) 一种遥感问题回答生成方法、装置、介质及设备
CN117787418A (zh) 一种风险识别方法、装置、存储介质及电子设备
CN117369783B (zh) 一种安全代码生成模型的训练方法及装置
WO2025180484A1 (zh) 资源服务的检测处理
CN117952229A (zh) 一种模型训练方法、业务风控方法、装置以及存储介质
CN115147227B (zh) 一种交易风险的检测方法、装置及设备
WO2025152543A1 (zh) 一种模型训练和信息检索的方法及装置
CN113687893A (zh) 远程协助处理方法及装置
CN115759070B (zh) 一种意图识别的方法、装置、存储介质及电子设备
CN115358777B (zh) 虚拟世界的广告投放处理方法及装置
CN117743824A (zh) 一种模型训练、业务执行方法、装置、存储介质及设备
CN117034942A (zh) 一种命名实体识别方法、装置、设备及可读存储介质
CN117349402A (zh) 一种基于机器阅读理解的情绪原因对识别方法及系统
CN116246276A (zh) 一种信息识别方法、装置、设备及可读存储介质
CN115658891B (zh) 一种意图识别的方法、装置、存储介质及电子设备
CN119398174B (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: 25775633

Country of ref document: EP

Kind code of ref document: A1