System and Method for Parallel Processing and Stitching of Document Pages
The parallel processing system with a binary search tree enhances OCR efficiency by segmenting, scoring, and dynamically rebalancing documents, addressing inefficiencies in large document processing and improving accuracy and speed.
Patent Information
- Application Number
- US19/213238
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Filing Date
- 2025-05-20
- Publication Date
- 2026-11-26
AI Technical Summary
Existing optical character recognition (OCR) systems for document digitization are inefficient and time-consuming, especially when processing large multi-page documents in a serial fashion, lacking scalability and efficiency.
A system utilizing a parallel processing approach with a binary search tree to segment documents, extract features, determine similarity scores, and reorder segments for efficient stitching, incorporating dynamic rebalancing and error correction to enhance processing speed and accuracy.
The system significantly reduces processing time and improves efficiency by optimizing document alignment and accuracy, particularly for large-scale multi-page documents, while maintaining computational efficiency and scalability.
Smart Images

Figure US20260377419A1-D00000_ABST
Abstract
Description
BACKGROUND1. Technical Field
[0001] This disclosure relates generally to document processing technologies, particularly to systems and methods for parallel processing and stitching of document pages.2. Technical Considerations
[0002] Optical Character Recognition (OCR) has become an essential tool in document digitization, enabling text extraction from scanned images or PDFs, but processing large documents in this way can be time-consuming and inefficient, especially when done in a serial fashion. There exists a need for a scalable, parallel processing system that can efficiently handle OCR tasks on multi-page documents, particularly large ones, with minimal processing time and maximum efficiency.SUMMARY
[0003] According to non-limiting embodiments or aspects, provided is a system comprising: at least one processor configured to: segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; process, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments; determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sort the plurality of similarity scores to determine a sequence of segments; and generate an output document based on ordering each processed segment according to the sequence of segments.
[0004] In non-limiting embodiments or aspects, the set of features comprises text density and spacing of content found in each segment of the plurality of segments. In non-limiting embodiments or aspects, the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing. In non-limiting embodiments or aspects, the plurality of similarity scores are sorted with a binary search tree with at least one root node. In non-limiting embodiments or aspects, the at least one processor is further configured to: apply in-order traversal to stitch text blocks in logical order; merge overlapping regions and correct text fragmentation using node adjacency; and dynamically rebalance the binary search tree for outlier pages or errors. In non-limiting embodiments or aspects, the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density. In non-limiting embodiments or aspects, the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold. In non-limiting embodiments or aspects, a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left. In non-limiting embodiments or aspects, a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right. In non-limiting embodiments or aspects, each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop. In non-limiting embodiments or aspects, AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments. In non-limiting embodiments or aspects, the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0005] According to non-limiting embodiments or aspects, provided is a method comprising: segmenting, with at least one processor, at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; processing, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extracting, with at least one processor, a set of features from each segment of the plurality of segments; determining, with at least one processor, a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sorting, with at least one processor, the plurality of similarity scores to determine a sequence of segments; and generating, with at least one processor, an output document based on ordering each processed segment according to the sequence of segments.
[0006] In non-limiting embodiments or aspects, the set of features comprises text density and spacing of content found in each segment of the plurality of segments. In non-limiting embodiments or aspects, the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing. In non-limiting embodiments or aspects, the plurality of similarity scores are sorted with a binary search tree with at least one root node. In non-limiting embodiments or aspects, the method further comprises applying in-order traversal to stitch text blocks in logical order; merging overlapping regions and correcting text fragmentation using node adjacency; and dynamically rebalancing the binary search tree for outlier pages or errors. In non-limiting embodiments or aspects, the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density. In non-limiting embodiments or aspects, the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold. In non-limiting embodiments or aspects, a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left. In non-limiting embodiments or aspects, a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right. In non-limiting embodiments or aspects, each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop. In non-limiting embodiments or aspects, AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments. In non-limiting embodiments or aspects, the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0007] According to non-limiting embodiments or aspects, provided is a computer program product comprising at least one non-transitory computer-readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to: segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; process, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments; determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sort the plurality of similarity scores to determine a sequence of segments; and generate an output document based on ordering each processed segment according to the sequence of segments.
[0008] In non-limiting embodiments or aspects, the set of features comprises text density and spacing of content found in each segment of the plurality of segments. In non-limiting embodiments or aspects, the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing. In non-limiting embodiments or aspects, the plurality of similarity scores are sorted with a binary search tree with at least one root node. In non-limiting embodiments or aspects, the at least one processor is further configured to: apply in-order traversal to stitch text blocks in logical order; merge overlapping regions and correct text fragmentation using node adjacency; and dynamically rebalance the binary search tree for outlier pages or errors. In non-limiting embodiments or aspects, the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density. In non-limiting embodiments or aspects, the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold. In non-limiting embodiments or aspects, a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left. In non-limiting embodiments or aspects, a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right. In non-limiting embodiments or aspects, each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop. In non-limiting embodiments or aspects, AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments. In non-limiting embodiments or aspects, the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0009] Further non-limiting embodiments or aspects are set forth in the following numbered clauses:
[0010] Clause 1: A system comprising: at least one processor configured to: segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; process, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments; determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sort the plurality of similarity scores to determine a sequence of segments; and generate an output document based on ordering each processed segment according to the sequence of segments.
[0011] Clause 2: The system of clause 1, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
[0012] Clause 3: The system of clause 1 or 2, wherein the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
[0013] Clause 4: The system of any of clauses 1-3, wherein the plurality of similarity scores are sorted with a binary search tree with at least one root node.
[0014] Clause 5: The system of any of clauses 1-4, wherein the at least one processor is further configured to: apply in-order traversal to stitch text blocks in logical order; merge overlapping regions and correct text fragmentation using node adjacency; and dynamically rebalance the binary search tree for outlier pages or errors.
[0015] Clause 6: The system of any of clauses 1-5, wherein the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density.
[0016] Clause 7: The system of any of clauses 1-6, wherein the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold.
[0017] Clause 8: The system of any of clauses 1-7, wherein a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left.
[0018] Clause 9: The system of any of clauses 1-8, wherein a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right.
[0019] Clause 10: The system of any of clauses 1-9, wherein each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop.
[0020] Clause 11: The system of any of clauses 1-10, wherein AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments.
[0021] Clause 12: The system of any clauses 1-11, wherein the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0022] Clause 13: A method comprising: segmenting, with at least one processor, at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; processing, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extracting, with at least one processor, a set of features from each segment of the plurality of segments; determining, with at least one processor, a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sorting, with at least one processor, the plurality of similarity scores to determine a sequence of segments; and generating, with at least one processor, an output document based on ordering each processed segment according to the sequence of segments.
[0023] Clause 14: The method of clause 13, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
[0024] Clause 15: The method of clause 13 or 14, wherein the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
[0025] Clause 16: The method of any of clauses 13-15, further comprising: applying in-order traversal to stitch text blocks in logical order; merging overlapping regions and correcting text fragmentation using node adjacency; and dynamically rebalancing the binary search tree for outlier pages or errors.
[0026] Clause 17: The method of any of clauses 13-16, wherein the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density.
[0027] Clause 18: The method of any of clauses 13-17, wherein, the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold.
[0028] Clause 19: The method of any of clauses 13-18, wherein a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left.
[0029] Clause 20: The method of any of clauses 13-19, wherein a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right.
[0030] Clause 21: The method of any of clauses 13-20, wherein each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop.
[0031] Clause 22: The method of any of clauses 13-21, wherein AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments.
[0032] Clause 23: The method of any of clauses 13-22, wherein the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0033] Clause 24: A computer program product comprising at least one non-transitory computer-readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to: segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document; process, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments; determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores; sort the plurality of similarity scores to determine a sequence of segments; and generate an output document based on ordering each processed segment according to the sequence of segments.
[0034] Clause 25: The computer program product of clause 24, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
[0035] Clause 26: The computer program product of clause 24 or 25, wherein the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
[0036] Clause 27: The computer program product of any of clauses 24-26, wherein the plurality of similarity scores are sorted with a binary search tree with at least one root node.
[0037] Clause 28: The computer program product of any of clauses 24-27, wherein the at least one processor is further caused to: apply in-order traversal to stitch text blocks in logical order; merge overlapping regions and correct text fragmentation using node adjacency; and dynamically rebalance the binary search tree for outlier pages or errors.
[0038] Clause 29: The computer program product of any of clauses 24-28, wherein the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density.
[0039] Clause 30: The computer program product of any of clauses 24-29, wherein the left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold.
[0040] Clause 31: The computer program product of any of clauses 24-30, wherein a segment in the plurality of segments with lower similarity scores when compared to the root node of the binary search tree go to the left.
[0041] Clause 32: The computer program product of any of clauses 24-31, wherein a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right.
[0042] Clause 33: The computer program product of any of clauses 24-32, wherein each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop.
[0043] Clause 34: The computer program product of any of clauses 24-33, wherein AVL Tree-based balancing is implemented to maintain the efficiency of the dynamic rebalancing and append nodes to the binary search tree dynamically as similarity scores are updated or as new segments are added to the plurality of segments.
[0044] Clause 35: The computer program product of any of clauses 24-34, wherein the reinsertion of misaligned nodes of the binary search tree and the identification and reprocessing of low-confidence optical character recognition regions identified in each segment in the plurality of segments is facilitated with a feedback loop.
[0045] These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structures and the combination of parts and economies of manufacture, will become more apparent upon consideration of the following description and the appended claims with reference to the accompanying drawings, all of which form a part of this specification, wherein like reference numerals designate corresponding parts in the various figures. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the disclosed subject matter.BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Additional advantages and details are explained in greater detail below with reference to the non-limiting, exemplary embodiments that are illustrated in the accompanying schematic figures, in which:
[0047] FIG. 1 is a schematic diagram of a system for parallel processing and stitching of document pages according to non-limiting embodiments or aspects;
[0048] FIG. 2 is a flow diagram of a method for parallel processing and stitching of document pages according to non-limiting embodiments or aspects;
[0049] FIG. 3 is a diagram of an example payment processing network in which systems, methods, and / or computer program products, described herein, may be implemented, according to non-limiting embodiments or aspects;
[0050] FIG. 4 is a schematic diagram of example components of one or more devices of FIG. 1 and / or FIG. 3, according to non-limiting embodiments or aspects; and
[0051] FIG. 5 shows an example binary search tree 500 with similarity scores according to non-limiting embodiments or aspects.DETAILED DESCRIPTION
[0052] For purposes of the description hereinafter, the terms “end,”“upper,”“lower,”“right,”“left,”“vertical,”“horizontal,”“top,”“bottom,”“lateral,”“longitudinal,” and derivatives thereof shall relate to the embodiments as they are oriented in the drawing figures. However, it is to be understood that the present disclosure may assume various alternative variations and step sequences, except where expressly specified to the contrary. It is also to be understood that the specific devices and processes illustrated in the attached drawings, and described in the following specification, are simply exemplary and non-limiting embodiments or aspects of the disclosed subject matter. Hence, specific dimensions and other physical characteristics related to the embodiments or aspects disclosed herein are not to be considered as limiting.
[0053] Some non-limiting embodiments or aspects are described herein in connection with thresholds. As used herein, satisfying a threshold may refer to a value being greater than the threshold, more than the threshold, higher than the threshold, greater than or equal to the threshold, less than the threshold, fewer than the threshold, lower than the threshold, less than or equal to the threshold, equal to the threshold, etc.
[0054] No aspect, component, element, structure, act, step, function, instruction, and / or the like used herein should be construed as critical or essential unless explicitly described as such. Also, as used herein, the articles “a” and “an” are intended to include one or more items and may be used interchangeably with “one or more” and “at least one.” Furthermore, as used herein, the term “set” is intended to include one or more items (e.g., related items, unrelated items, a combination of related and unrelated items, and / or the like) and may be used interchangeably with “one or more” or “at least one.” Where only one item is intended, the term “one” or similar language is used. Also, as used herein, the terms “has,”“have,”“having,” or the like are intended to be open-ended terms. Further, the phrase “based on” is intended to mean “based at least partially on” unless explicitly stated otherwise. In addition, reference to an action being “based on” a condition may refer to the action being “in response to” the condition. For example, the phrases “based on” and “in response to” may, in some non-limiting embodiments or aspects, refer to a condition for automatically triggering an action (e.g., a specific operation of an electronic device, such as a computing device, a processor, and / or the like).
[0055] As used herein, the term “communication” may refer to the reception, receipt, transmission, transfer, provision, and / or the like of data (e.g., information, signals, messages, instructions, commands, and / or the like). For one unit (e.g., a device, a system, a component of a device or system, combinations thereof, and / or the like) to be in communication with another unit means that the one unit is able to directly or indirectly receive information from and / or transmit information to the other unit. This may refer to a direct or indirect connection (e.g., a direct communication connection, an indirect communication connection, and / or the like) that is wired and / or wireless in nature. Additionally, two units may be in communication with each other even though the information transmitted may be modified, processed, relayed, and / or routed between the first and second unit. For example, a first unit may be in communication with a second unit even though the first unit passively receives information and does not actively transmit information to the second unit. As another example, a first unit may be in communication with a second unit if at least one intermediary unit processes information received from the first unit and communicates the processed information to the second unit. In some non-limiting embodiments or aspects, a message may refer to a network packet (e.g., a data packet and / or the like) that includes data. It will be appreciated that numerous other arrangements are possible.
[0056] As used herein, the term “computing device” may refer to one or more electronic devices configured to process data. A computing device may, in some examples, include the necessary components to receive, process, and output data, such as a processor, a display, a memory, an input device, a network interface, and / or the like. A computing device may be a mobile device. As an example, a mobile device may include a cellular phone (e.g., a smartphone or standard cellular phone), a portable computer, a wearable device (e.g., watches, glasses, lenses, clothing, and / or the like), a personal digital assistant (PDA), and / or other like devices. A computing device may also be a desktop computer or other form of non-mobile computer.
[0057] As used herein, the term “server” may refer to or include one or more computing devices that are operated by or facilitate communication and processing for multiple parties in a network environment, such as the Internet, although it will be appreciated that communication may be facilitated over one or more public or private network environments and that various other arrangements are possible. Further, multiple computing devices (e.g., servers, point-of-sale (POS) devices, mobile devices, etc.) directly or indirectly communicating in the network environment may constitute a “system.”
[0058] As used herein, the term “system” may refer to one or more computing devices or combinations of computing devices (e.g., processors, servers, client devices, software applications, components of such, and / or the like). Reference to “a device,”“a server,”“a processor,” and / or the like, as used herein, may refer to a previously-recited device, server, or processor that is recited as performing a previous step or function, a different device, server, or processor, and / or a combination of devices, servers, and / or processors. For example, as used in the specification and the claims, a first device, a first server, or a first processor that is recited as performing a first step or a first function may refer to the same or different device, server, or processor recited as performing a second step or a second function.
[0059] Non-limiting embodiments provide for systems and methods for parallel processing and stitching of document pages using a binary search tree in connection with optical character recognition (OCR). In some non-limiting embodiments, an algorithm such as a binary search tree traversal algorithm may be used. Non-limiting embodiments provide for a hierarchical binary search tree structure used in an OCR process that minimizes redundant comparisons and reduces latency. Non-limiting embodiments provide for logical ordering and traversal of the binary search tree to improve the coherence of stitched OCR-documents and improve accuracy. Non-limiting embodiments provide for efficient processing of large datasets with minimal performance degradation and improved scalability. Non-limiting embodiments provide for computational efficiency resulting from reduced complexity of pairwise comparison and dynamic rebalancing, which handles missing or misaligned binary search tree nodes without requiring complete reprocessing. Non-limiting embodiments provide for memory optimization resulting from operating on partial datasets. By leveraging the hierarchical organization of OCR-extracted text blocks as nodes in a binary search tree, non-limiting embodiments optimize alignment of pages, reduce processing times, and provides more accuracy than linear or heuristic-based approaches. Non-limiting embodiments outperform other OCR methods in terms of efficiency, accuracy, and scalability. These advantages are particularly helpful for large-scale, multi-page documents. For example, non-limiting embodiments may be used in document digitization, archival systems, and legal repositories, as examples. Other advantages will be apparent to those skilled in the art.
[0060] Referring now to FIG. 1, shown is a system 100 for system for parallel processing and stitching of document pages. A parallel processing system 100 may include one or more computing devices executing one or more software applications, as an example. In some non-limiting embodiments, the parallel processing system 100 may be integrated with another system or systems, such as but not limited to a structuring engine 112, an OCR engine 114, and / or the like. A structuring engine 112 may include one or more computing devices executing one or more software applications, as an example. In some examples, the structuring engine 112 may be a function and / or process of the parallel processing system 100. An OCR engine 114 may include one or more computing devices executing one or more software applications. In some examples, the OCR engine 114 may be a function and / or process of the parallel processing system 100, such as a software application executed by the parallel processing system 100. In some non-limiting embodiments, the structuring engine 112 and OCR engine 114 may represent two different processing engines which may, in non-limiting embodiments, include two or more computing devices.
[0061] With continued reference to FIG. 1, a document database 104 may include one or more data structures stored by data storage devices, such as a hard disk and / or memory. A segmentation system 108 may include one or more computing devices executing one or more software applications, as an example. A stitching system 118 may include one or more computing devices executing one or more software applications, as an example. A user computer 122 may include one or more computing devices executing one or more software applications, as an example.
[0062] With continued reference to FIG. 1, the user computer 122 may generate a query configured to prompt the processing of multi-page documents using OCR by the parallel processing system 100. The document database 104 may provide the user computer 122 with a plurality of document pages 106 used by the user computer 122 to form the query, which may be sent from the user computer 122 to the segmentation system 108 with the query. The segmentation system 108 may transform the plurality of document pages 106 into a plurality of segments 110 to be processed by the parallel processing system 100. The segments may include one or more pages and / or batches of pages. In non-limiting embodiments, the document pages 106 may include pages from one or multiple different documents. For example, the document pages 106 may include a plurality of different documents relating to a user, an account (e.g., an account identifier), an entity (e.g., a merchant or issuer), and / or the like. In some examples, the documents relate to an event, such as a chargeback in which the documents may include a receipt, a customer complaint, a merchant response, a transaction history, and / or the like. It will be appreciated that various other events and / or documents may be used.
[0063] Still referring to FIG. 1, the parallel processing system 100 may include structuring engine 112 and the OCR engine 114, making up the distributed computing platform. The parallel processing system 100 may include a plurality of processors and / or processor cores configured for multi-thread processing. In some examples, the OCR engine 114 and structuring engine 112 may be separate computing devices although it will be appreciated that a single computing device with multiple processing cores and processing threads may be used. The structuring engine 112 may process segments of document data to form a binary search tree for arranging the segments. The OCR engine 114 of the parallel processing system 100 may receive raw OCR page data (e.g., such as images, including but not limited to PDF, TIFF, JPEG, and / or the like) in the form of the plurality of segments 110 input into the parallel processing system 100. The OCR engine 114 may perform OCR operations to extract text from each segment. The OCR engine 114 may extract text from the segments before the processing performed by the structuring engine 112. In non-limiting embodiments, the OCR engine 114 may extract text from multiple segments in parallel. For example, the text from each segment may be simultaneously extracted using the OCR engine 114 via multi-threading and / or a distributed computing framework.
[0064] In non-limiting embodiments, the structuring engine 112 may extract a set of low-level features found in each segment of the plurality of segments 110 after the segments 110 are processed with the OCR engine 114 into OCR segment data, including, for example, text density, spacing of content, keywords, text alignment, structural patterns (e.g., headers and / or footers), and / or the like. In non-limiting embodiments, the structuring engine 112 may process the plurality of segments 110 immediately after the segments are processed by the OCR engine 114. For example, while the OCR engine 114 is actively processing segments, the completed segments (e.g., the segments with extracted text) may be processed by the structuring engine 112 in real-time with the OCR engine 114. The structuring engine 112 may use the set of low-level features extracted from each segment to compute similarity scores between each segment in the plurality of segments 110. For example, if there are ten (10) segments, the structuring engine may compute a similarity score between a first and second segment, between a first and third segment, between a first and fourth segment, and the like, such that there is a score for every pair of segments. After the similarity scores are determined, the structuring engine 112 inserts the pages into a binary search tree (e.g., logically arranges the segments as nodes in a binary search tree) based on the similarity scores. The structuring of the binary search tree may occur in real-time while additional segments are still being processed by the OCR engine 114 as an ongoing process. In some non-limiting embodiments, the root node of the tree structure contains the segment from the plurality of segments 110 with the highest text density. The structuring engine 112 may assign left and right children to each node of the binary search tree based on content similarity thresholds, where the segments in the plurality of segments 110 with higher similarity scores when compared to the root (or parent) node go to the right from the parent node of the binary search tree and the segments with lower similarity scores when compared to the root node go to the left from the parent node of the binary search tree. It will be appreciated that various other implementations are possible for arranging the segments in a binary search tree and / or other data structure based on similarity.
[0065] Still referring to FIG. 1, the structuring engine 112 may apply in-order traversal of the binary search tree to sort each segment of the plurality of segments 110 into a logical order. The structuring engine 112 may merge any overlapping regions found using the binary search tree and correct text fragmentation using node adjacency, as an example. The structuring engine 112 may also dynamically rebalance the binary search tree for outlier pages or segments and / or errors. The structuring engine 112 may output a newly ordered plurality of segments 116 based on the order of nodes when traversing the binary search tree.
[0066] With continued reference to FIG. 1, the newly ordered plurality of segments 116 may be input into the stitching system 118. The stitching system 118 may include one or more computing devices and / or software applications executed by computing device(s) configured to combine the newly ordered plurality of segments 116 into a coherent, logically ordered text document 120. In some examples, the stitching system 118 may be part of the parallel processing system 100, such as a software application and / or process executed by a computing device of the parallel processing system 100. The stitching system 118 may concatenate pages and / or segments from one or multiple different documents into a sequence of pages forming a single textual document. The ordered text document 120 is returned to the user via the user computer 122. In non-limiting embodiments, multiple different textual documents may be processed by the system 1000 to result in a single textual document that combines pages and / or segments from all the multiple documents.
[0067] In some non-limiting embodiments, the error correction for low confidence OCR regions may be flagged for correction or human review and subsequently integrated with an external API (e.g., Google Vision or AWS Textract, as examples) to improve text accuracy.
[0068] With continued reference to FIG. 1, in non-limiting embodiments the system 100 may include one or more error handling protocols to improve the parallel processing system 100 and the outputs. For example, the structuring engine 112 applies a feedback loop to dynamically check the binary search tree for any errors and applies any updates and changes as needed as the similarity scores are updated or as new segments are added to the plurality of segments 110. This feedback loop additionally reinserts any misaligned nodes and identifies and reprocesses low-confidence optical character recognition regions in the binary search tree. In some examples, the structuring engine 112 may use AVL tree-based balancing to maintain efficiency while dynamically rebalancing and appending nodes to the binary search tree. It will be appreciated that various error handling protocols may be implemented to handle misaligned nodes and / or to identify and reprocess low-confidence OCR regions of the segments (e.g., where the extracted text is associated with an uncertainty meeting a threshold).
[0069] Referring now to FIG. 2, shown is a flow diagram for a method for the efficient and fast processing of multi-page documents according to non-limiting embodiments or aspects. The steps shown in FIG. 2 are for example purposes only. It will be appreciated that additional, fewer, different, and / or a different order of steps may be used in some non-limiting embodiments or aspects. In some non-limiting embodiments or aspects, a step may be automatically performed in response to performance and / or completion of a prior step. At a first step 202, a plurality of pages (e.g., such as a plurality of multi-page documents) to be processed using OCR may be inputted to the user computer from a document database and / or another source. At this step 202, metadata for each page is collected and / or maintained, such as page numbers, estimated content similarity, and / or the like. At step 204, the pages in the plurality of multi-page documents may be preprocessed into a plurality of segments, and the similarity scores between each segment in the plurality of segments may be computed. The segments may each include one or more pages. The preprocessing may include cleaning the input pages (e.g., removing noise, normalizing text, and / or the like), and the similarity scores may be based on content overlap between each segment. These similarity scores may be computed using content similarity or visual feature similarity. Shown below is an example similarity scoring formula according to a non-limiting embodiment:def calculate_similarity(text1,text2): return len(set(text1.split( )) & set(text2.split( ))) / len(set(text1.split( )) | set(text2.split( )))
[0070] It will be appreciated that various similarity scoring algorithms may be used. At step 206, the similarity scores between each segment may be used to construct a binary search tree, with each segment of the plurality of segments comprising each node in the binary search tree. In non-limiting embodiments, the root node of this binary search tree may include the page with the highest text density. Segments with a higher similarity score when compared to the root node may be appended to the right side of the binary search tree, while segments with a lower similarity score when compared to the root node may be appended to the left side of the binary search tree. Steps 202-206 include a pre-OCR structuring process that outputs a structured binary search tree representing the raw scanned pages as nodes containing each segment in the plurality of segments. Shown below is example Python code for the binary search tree construction of the pre-OCR structuring process:class Node: def _init_(self,page_id,feature_score): self.page_id = page_id self.feature_score = feature_score self.left = None self.right = Nonedef insert_into_bst(root,node): if not root: return node if node.feature_score < root.feature_score: root.left = insert_into_bst(root.left,node) else: root.right = insert_into_bst(root.right,node) return rootdef bst_to_list_in_order(root,result = None): if result is None: result = [ ] if root: bst_to_list_in_order(root.left,result) result.append(root.page_id) bst_to_list_in_order(root.right,result) return result# Example Usagepages = [ {“page_id”:1,“feature_score”:0.85}, {“page_id”:2,“feature_score”:0.90}, {“page_id”:3,“feature_score”:0.80}, {“page_id”:4,“feature_score”:0.95},]root = Nonefor page in pages: node = Node(page[“page_id”],page[“feature_score”]) root = insert_into_bst(root,node)# Retrieve the ordered page sequenceordered_pages = bst_to_list_in_order(root)print(Ordered Pages (Before OCR):,orderedpages)The above Python code uses the scanned pages as input and extracts the text and a set of low-level features, including, for example, text density and / or spacing of content found in each segment of the plurality of segments. It then uses a function (i.e., insert_into_bst) to construct a binary search tree using the text and set of low-level features, outputting the ordered page sequence for OCR processing in the form of a binary search tree.
[0071] With continued reference to FIG. 2, at step 208 in-order traversal is performed on the binary search tree. The segments in the plurality of segments may include, for example, text blocks. At step 210, which may be performed during the traversal of step 208, the binary search tree may be checked for missing and / or misaligned nodes. If missing nodes are found, at step 212, the missing nodes may be skipped and / or identified for later review and the binary search tree may be rebalanced. This rebalancing is done dynamically using a dynamic rebalancing algorithm such that the binary search tree is adjusted if a segment is misaligned based on updated similarity scores. For example, AVL Tree logic is implemented for self-balancing. At the step 212, overlapping regions of the binary search tree may be merged and any text fragmentation found in the binary search tree is corrected using node adjacency. Once the missing nodes are processed, or if there are no missing nodes found, at step 214, the newly ordered plurality of segments may be stitched (e.g., combined) into a singular output. Steps 208-214 result in a coherent, logically ordered text document formed from multiple different input pages, including multiple different documents in some non-limiting embodiments. Shown below is example Python code for the binary search tree post-OCR stitching process:class TextNode: def _init_(self,page_id,text_content,similarity_score): self.page_id = page_id self.text_content = text_content self.similarity_score = similarity_score self.left = None self.right = Nonedef calculate_similarity_score(text1,text2): # Placeholder function for content similarity (e.g.,Jaccard index,cosine similarity) return len(set(text1.split( )) & set(text2.split( ))) / len(set(text1.split( )) | set(text2.split( )))def insert_text_into_bst(root,node): if not root: return node if node.similarity_score < root.similarity_score: root.left = insert_text_into_bst(root.left,node) else: root.right = insert_text_into_bst(root.right,node) return rootdef stitch_text_in_order(root,result = None): if result is None: result = [ ] if root: stitch_text_in_order(root.left,result) result.append(root.text_content) stitch_text_in_order(root.right,result) return result# Example Usageocr_pages = [ {“page_id”: 1,“text_content”: “Introduction to Python”,“next_page_content”: “Python is a programming language.”}, {“page_id”: 2,“text_content”: “Python is a programming language.”, “next_page_content”: “It is popular for data science.”}, {“page_id”: 3,“text_content”: “It is popular for data science.”,“next_page_content”: “Python has a rich ecosystem.”},]root = Nonefor i in range(len(ocr_pages) − 1): similarity_score = calculate_similarity_score( ocr_pages[i][“text_content”],ocr_pages[i][“next_page_content”] ) node= TextNode(ocr_pages[i][“page_id”],ocr_pages[i][“text_content”],similarity_score) root = insert_text_into_bst(root,node)# Retrieve the stitched textstitched_document = “”.join(stitch_text_in_order(root))print(“Stitched Document (After OCR):”,stitched_document)The above example Python code takes in the OCR-processed text data and calculates the content similarity for adjacent pages. It then reconstructs the binary search tree using the function insert_text_into_bst and performs in-order traversal of the binary search tree using stitch_text_in_order to stitch the segments together during the traversal. The output of this Python code is a coherent stitched document made up of the segments in the plurality of segments. Shown below is the Python code for addressing missing nodes in non-limiting embodiments:def handle_missing_nodes(node): if not node: return “Missing Node” return node.text_contentdef stitch_text_with_error_handling(root,result = None): if result is None: result = [ ] if root: # Handle missing left child if root.left: stitch_text_with_error_handling(root.left,result) else: result.append(handle_missing_nodes(root.left)) # Process current node result.append(handle_missing_nodes(root)) # Handle missing right child if root.right: stitch_text_with_error_handling(root.right,result) else: result.append(handle_missing_nodes(root.right)) return result# Example Usagestitched_document_with_errors = “”.join(stitch_text_with_error_handling(root))print(“Stitched Document with Error Handling:”,stitched_document_with_errors)Shown below is example Python code for Rebalancing with AVL Tree in non-limiting embodiments:class AVLNode: def _init_(self,page_id,text_content,similarity_score): self.page_id = page_id self.text_content = text_content self.similarity_score = similarity_score self.left = None self.right = None self.height = 1def get_height(node): if not node: return 0 return node.heightdef get_balance(node): if not node: return 0 return get_height(node.left) − get_height(node.right)def rotate_right(y): x = y.left T2 = x.right x.right = y y.left = T2 y.height = 1 + max(get_height(y.left),get_height(y.right)) x.height = 1 + max(get_height(x.left),get_height(x.right)) return xdef rotate_left(x): y = x.right T2 = y.left y.left = x x.right = T2 x.height = 1 + max(get_height(x.left),get_height(x.right)) y.height = 1 + max(get_height(y.left),get_height(y.right)) return ydef insert_into_avl(root,node): if not root: return node # Normal BST insertion if node.similarity_score < root.similarity_score: root.left = insert_into_avl(root.left,node) else: root.right = insert_into_avl(root.right,node) # Update height root.height = 1 + max(get_height(root.left),get_height(root.right)) # Check balance and rotate if necessary balance = get_balance(root) # Left − Left Case if balance > 1 and node.similarity_score < root.left.similarity_score: return rotate_right(root) # Right − Right Case if balance <−1 and node.similarity_score > root.right.similarity_score: return rotate_left(root) # Left − Right Case if balance > 1 and node.similarity_score > root.left.similarity_score: root.left = rotate_left(root.left) return rotate_right(root) # Right − Left Case if balance <−1 and node.similarity_score < root.right.similarity_score: root.right = rotate_right(root.right) return rotate_left(root) return root# Example Usagenew_pages = [ {“page_id”: 5, “text_content”: “Advanced Python Topics”, “similarity_score”: 0.87}, {“page_id”: 6, “text_content”: “Data Science Techniques”, “similarity_score”: 0.88},]# Insert new pages dynamically and rebalancefor page in new_pages: new_node= AVLNode(page[“page_id”],page [“text_content”],page[“similarity_score”]) root = insert_into_avl(root,new_node)# Output the rebalanced stitched documentbalanced_stitched_document = “”.join(stitch_text_in_order(root))print(“Balanced Stitched Document:”,balanced_stitched_document)With continued reference to FIG. 2, at step 216 any errors identified in the stitched singular output may be automatically corrected prior to the output of the stitched singular document. This may be performed by incorporating a feedback loop that reinserts misaligned nodes of the binary search tree, and subsequently re-stitching the stitched singular output. This feedback loop also identifies and reprocess low-confidence OCR regions to obtain as accurate results as possible. Shown below is example Python code for error correction using confidence-based error handling according to non-limiting embodiments:def correct_low_confidence_text(text,confidence_threshold = 0.8): # Placeholder for an external API integration if text[“confidence”]< confidence_threshold: print(f“Low confidence detected: {text[‘text’]}.Sending for review.”) # Simulate correction return f“(Corrected) {text[‘text’]]” return text [“text”]# Example Usageocr_text_blocks = [ {“text”: “Introduction to Pyhton”,“confidence”: 0.7}, {“text”: “Python is a programming language.”,“confidence”: 0.95},]corrected_texts = [correct_low_confidence_text(block) for block in ocr_text_blocks]print(“Corrected OCR Texts:”,corrected_texts)FIG. 5 shows an example binary search tree 500 with similarity scores according to non-limiting embodiments or aspects. The binary search tree shown in FIG. 5 is small for illustrative purposes, with the root node including the segment with the highest text density. It will be appreciated that various data structures and forms of binary search trees may be used in non-limiting embodiments.Referring now to FIG. 3, depicted is a diagram of an example payment processing network 300, according to non-limiting embodiments or aspects. In some non-limiting embodiments or aspects, payment processing network 300 may be used in conjunction with the systems, methods, and / or computer program products described herein, and / or the systems, methods, and / or computer program products described herein may be implemented in payment processing network 300. As shown in FIG. 3, payment processing network 300 may include transaction processing system 301, payment gateway system 302, merchant system 304, issuer system 306, acquirer system 308, and / or consumer device 310. In some non-limiting embodiments or aspects, the parallel processing system 100 of FIG. 1 may be implemented by (e.g., part of) transaction processing system 301. In some non-limiting embodiments or aspects, the parallel processing system 100 of FIG. 1 may be implemented by (e.g., part of) another system, another device, another group of systems, or another group of devices, separate from or including transaction processing system 301, such as merchant system 304, issuer system 306, acquirer system 308, consumer device 310, and / or the like.
[0075] Transaction processing system 301 may include one or more devices capable of receiving information from and / or communicating information to payment gateway system 302, merchant system 304, issuer system 306, acquirer system 308, consumer device 310, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, transaction processing system 301 may be in communication with one or more issuer systems (e.g., issuer system 306), one or more acquirer systems (e.g., acquirer system 308), and / or one or more payment gateway systems (e.g., payment gateway system 302). Although only a single issuer system 306, single acquirer system 308, and single payment gateway system 302 are shown, it will be appreciated that transaction processing system 301 may be in communication with a plurality of issuer systems, a plurality of acquirer systems, and / or a plurality of payment gateways. In some non-limiting embodiments or aspects, transaction processing system 301 may include a computing device, such as a server (e.g., a transaction processing server), a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, transaction processing system 301 may be in communication with a data storage device, which may be local or remote to transaction processing system 301. In some non-limiting embodiments or aspects, transaction processing system 301 may be capable of receiving information from, storing information in, communicating information to, or searching information stored in the data storage device. In some non-limiting embodiments or aspects, transaction processing system 301 may be associated with a transaction service provider, as described herein. In some non-limiting embodiments or aspects, transaction processing system 301 may also operate as an issuer system such that both transaction processing system 301 and issuer system 306 are a single system and / or controlled by a single entity.
[0076] Payment gateway system 302 may include one or more devices capable of receiving information from and / or communicating information to transaction processing system 301, merchant system 304, issuer system 306, acquirer system 308, consumer device 310, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, payment gateway system 302 may be in communication with one or more merchant systems (e.g., merchant system 304), one or more acquirer systems (e.g., acquirer system 308), and / or one or more transaction processing systems (e.g., transaction processing system 301). Although only a single merchant system 304, single acquirer system 308, and single transaction processing system 301 are shown, it will be appreciated that payment gateway system 302 may be in communication with a plurality of merchant systems, a plurality of acquirer systems, and / or a plurality of transaction processing systems. In some non-limiting embodiments or aspects, payment gateway system 302 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, payment gateway system 302 may be associated with a payment gateway, as described herein.
[0077] Merchant system 304 may include one or more devices capable of receiving information from and / or communicating information to transaction processing system 301, payment gateway system 302, issuer system 306, acquirer system 308, consumer device 310, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, merchant system 304 may be in communication with one or more payment gateway systems (e.g., payment gateway system 302), one or more acquirer systems (e.g., acquirer system 308), and / or one or more consumer devices (e.g., consumer device 310). Although only a single payment gateway system 302, single acquirer system 308, and single consumer device 310 are shown, it will be appreciated that merchant system 304 may be in communication with a plurality of payment gateway systems, a plurality of acquirer systems, and / or a plurality of consumer devices. In some non-limiting embodiments or aspects, merchant system 304 may include a computing device, such as a server, a group of servers, a client device, a group of client devices, a POS device, a POS system, computers, computer systems, peripheral devices, and / or other like devices. In some non-limiting embodiments or aspects, merchant system 304 may be associated with a merchant, as described herein. In some non-limiting embodiments or aspects, merchant system 304 may include a device capable of receiving information from and / or communicating information to consumer device 310 via a short-range communication connection (e.g., an NFC communication connection, an RFID communication connection, a Bluetooth® communication connection, a Zigbee® communication connection, and / or the like) with consumer device 310 and / or the like. In some non-limiting embodiments or aspects, merchant system 304 may include one or more client devices. For example, merchant system 304 may include a client device that allows a merchant to communicate information to transaction processing system 301 (e.g., via at least one of acquirer system 308 and / or payment gateway system 302). In some non-limiting embodiments or aspects, merchant system 304 (e.g., a client device thereof, a POS device thereof, and / or the like) may also operate as a payment gateway system such that both merchant system 304 and payment gateway system 302 are a single system and / or controlled by a single entity.
[0078] Issuer system 306 may include one or more devices capable of receiving information and / or communicating information to transaction processing system 301, payment gateway system 302, merchant system 304, acquirer system 308, consumer device 310, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, issuer system 306 may be in communication with one or more transaction processing systems (e.g., transaction processing system 301) and / or one or more consumer devices (e.g., consumer device 310). Although only a single transaction processing system 301 and a single consumer device 310 are shown, it will be appreciated that issuer system 306 may be in communication with a plurality of transaction processing systems and / or a plurality of consumer devices 310. In some non-limiting embodiments or aspects, issuer system 306 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, issuer system 306 may be associated with an issuer institution, as described herein. For example, issuer system 306 may be associated with an issuer institution that issued a credit account, a debit account, a credit card, a debit card, a payment device, and / or the like to a user associated with consumer device 310. Issuer system 306 may include one or more issuer systems associated with one or more respective issuers.
[0079] Acquirer system 308 may include one or more devices capable of receiving information from and / or communicating information to transaction processing system 301, payment gateway system 302, merchant system 304, issuer system 306, consumer device 310, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, acquirer system 308 may be in communication with one or more transaction processing systems (e.g., transaction processing system 301), one or more payment gateway systems (e.g., payment gateway system 302), and / or one or more merchant systems (e.g., merchant system 304). Although only a single transaction processing system 301, a single payment gateway system 302, and a single merchant system 304 are shown, it will be appreciated that acquirer system 308 may be in communication with a plurality of transaction processing systems, a plurality of payment gateway systems, and / or a plurality of merchant systems. In some non-limiting embodiments or aspects, acquirer system 308 may include a computing device, such as a server, a group of servers, and / or other like devices. In some non-limiting embodiments or aspects, acquirer system 308 may be associated with an acquirer institution, as described herein.
[0080] Consumer device 310 may include one or more devices capable of receiving information from and / or communicating information to transaction processing system 301, payment gateway system 302, merchant system 304, issuer system 306, acquirer system 308, and / or the like (e.g., directly, indirectly, via a public and / or private communication network connection, and / or the like). For example, as shown in FIG. 3, consumer device 310 may be in communication with one or more merchant systems (e.g., merchant system 304) and / or one or more issuer systems (e.g., issuer system 306). Although only a single merchant system 304 and a single issuer system 306 are shown, it will be appreciated that consumer device 310 may be in communication with a plurality of merchant systems and / or a plurality of issuer systems. In some non-limiting embodiments or aspects, consumer device 310 may be associated with a user to whom a credit account, a debit account, a credit card, a debit card, a payment device, and / or the like has been issued. In some non-limiting embodiments or aspects, consumer device 310 may include a computing device, such as a computer, a portable computer, a laptop computer, a tablet computer, a mobile device, a cellular phone, a smartphone, a wearable device (e.g., watches, glasses, lenses, clothing, and / or the like), a PDA, a client device, and / or other like devices. In some non-limiting embodiments or aspects, consumer device 310 may include a payment device, as described herein. In some non-limiting embodiments or aspects, consumer device 310 may include a device capable of receiving information from and / or communicating information to other consumer devices 310 (e.g., directly, indirectly, via a public and / or private communication network connection, a short-range communication connection, and / or the like). In some non-limiting embodiments or aspects, consumer device 310 may include a device capable of receiving information from and / or communicating information to merchant system 304 via a short-range communication connection (e.g., an NFC communication connection, an RFID communication connection, a Bluetooth® communication connection, a Zigbee® communication connection, and / or the like) with merchant system 304 and / or the like. In some non-limiting embodiments or aspects, consumer device 310 may include a client device.
[0081] In some non-limiting embodiments or aspects, transaction processing system 301 may communicate with merchant system 304 directly (e.g., via a public and / or private communication network connection and / or the like). Additionally, or alternatively, transaction processing system 301 may communicate with merchant system 304 through payment gateway system 302 and / or acquirer system 308. In some non-limiting embodiments or aspects, acquirer system 308 associated with merchant system 304 may operate as payment gateway system 302 to facilitate the communication of transaction messages (e.g., authorization requests) from merchant system 304 to transaction processing system 301. In some non-limiting embodiments or aspects, merchant system 304 may communicate with payment gateway system 302 directly (e.g., via a public and / or private communication network connection and / or the like). For example, merchant system 304, that includes a physical POS device, may communicate with payment gateway system 302 through a public or private network to conduct card-present transactions. As another example, merchant system 304 may include a server (e.g., a web server) which may communicate with payment gateway system 302 through a public or private network, such as the Internet, to conduct card-not-present transactions.
[0082] For the purpose of illustration, processing a transaction (e.g., a payment transaction) may include generating a transaction message (e.g., authorization request and / or the like) based on an account identifier of a consumer (e.g., accountholder associated with consumer device 310 and / or the like) and / or transaction data associated with the transaction. For example, merchant system 304 (e.g., a client device of merchant system 304, a POS device of merchant system 304, and / or the like) may initiate the transaction, e.g., by generating an authorization request (e.g., in response to receiving the account identifier from a payment device and / or a portable financial device of the customer and / or the like). Merchant system 304 may communicate the authorization request to payment gateway system 302 and / or acquirer system 308. In some non-limiting embodiments or aspects, payment gateway system 302 may communicate the authorization request to acquirer system 308 and / or transaction processing system 301. Additionally, or alternatively, acquirer system 308 (and / or payment gateway system 302) may communicate the authorization request to transaction processing system 301. After receiving the authorization request from merchant system 304 that identifies the account identifier of the customer (e.g., the accountholder associated with consumer device 310 and / or the account identifier), transaction processing system 301 may communicate the authorization request to issuer system 306 (e.g., the issuer system that issued the payment device and / or account identifier). Issuer system 306 may determine an authorization decision (e.g., approve, deny, and / or the like) based on the authorization request, and / or issuer system 306 may generate an authorization response based on the authorization decision and / or the authorization request. Issuer system 306 may communicate the authorization response to transaction processing system 301. Transaction processing system 301 may communicate the authorization response to acquirer system 308 and / or payment gateway system 302. In some non-limiting embodiments or aspects, acquirer system 308 may communicate the authorization response to payment gateway system 302 and / or merchant system 304. Additionally, or alternatively, payment gateway system 302 (and / or acquirer system 308) may communicate the authorization response to merchant system 304.
[0083] In some non-limiting embodiments or aspects, transaction processing system 301 and / or issuer system 306 may include at least one machine learning model (e.g., at least one of a fraud detection model, a risk detection model, a transaction authorization model, a credit approval model, a product recommendation model, a classifier model, an anomaly detection model, an authentication model, any combination thereof, and / or the like). For example, the machine learning model(s) may be trained based on transaction data and / or synthetic data (e.g., synthetic transaction data), as described herein. Transaction processing system 301 and / or issuer system 306 may perform at least one task (e.g., generate a prediction and / or generate synthetic transaction data) based on the authorization request and the machine learning model(s). For example, performing the task(s) may include generating at least one prediction associated with fraud detection, risk detection, transaction authorization, credit approval, product recommendation, classification, anomaly detection, authentication, any combination thereof, and / or the like. In some non-limiting embodiments or aspects, transaction processing system 301 may communicate at least one message based on performing the task (e.g., generating the prediction and / or generating the synthetic data) to issuer system 306 (e.g., along with the authorization request). In some non-limiting embodiments or aspects, issuer system 306 may determine the authorization decision (e.g., approve, deny, and / or the like) based on the authorization request and the performance of the task (e.g., generation of the prediction and / or generation of the synthetic data).
[0084] For the purpose of illustration, clearing and / or settlement of a transaction may include generating a message (e.g., clearing message and / or the like) based on an account identifier of a consumer (e.g., associated with consumer device 310 and / or the like) and / or transaction data associated with the transaction. For example, merchant system 304 may generate at least one clearing message (e.g., a plurality of clearing messages, a batch of clearing messages, and / or the like). Merchant system 304 may communicate the clearing message(s) to acquirer system 308 (and / or payment gateway system 302, which may communicate the clearing message(s) to acquirer system 308). Acquirer system 308 may communicate the clearing message(s) to transaction processing system 301. Transaction processing system 301 may communicate the clearing message(s) to issuer system 306. Issuer system 306 may generate at least one settlement message based on the clearing message(s). In some non-limiting embodiments or aspects, issuer system 306 may communicate the settlement message(s) and / or funds to transaction processing system 301 (and / or a settlement bank system associated with transaction processing system 301), and transaction processing system 301 (and / or the settlement bank system) may communicate the settlement message(s) and / or funds to acquirer system 308. Additionally, or alternatively, issuer system 306 may communicate the settlement message(s) and / or funds to acquirer system 308. In some non-limiting embodiments or aspects, acquirer system 308 may communicate settlement message(s) and / or funds to merchant system 304 (and / or an account associated with merchant system 304).
[0085] The systems and / or devices of FIG. 3 may communicate via one or more wired and / or wireless communication networks. For example, the communication network(s) may include a cellular network (e.g., a long-term evolution (LTE®) network, a third generation (3G) network, a fourth generation (4G) network, a fifth generation (5G) network, a code division multiple access (CDMA) network, and / or the like), a public land mobile network (PLMN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), a telephone network (e.g., the public switched telephone network (PSTN)), a private network (e.g., a private network associated with a transaction service provider), an ad hoc network, an intranet, the Internet, a fiber optic-based network, a cloud computing network, and / or the like, and / or a combination of these or other types of networks.
[0086] The number and arrangement of systems, devices, and / or networks shown in FIG. 3 are provided as an example. There may be additional systems, devices, and / or networks; fewer systems, devices, and / or networks; different systems, devices, and / or networks; and / or differently arranged systems, devices, and / or networks than those shown in FIG. 3. Furthermore, two or more systems or devices shown in FIG. 3 may be implemented within a single system or device, or a single system or device shown in FIG. 3 may be implemented as multiple, distributed systems or devices. Additionally, or alternatively, a set of systems (e.g., one or more systems) or a set of devices (e.g., one or more devices) of payment processing network 300 may perform one or more functions described as being performed by another set of systems or another set of devices of payment processing network 300.
[0087] Referring now to FIG. 4, shown is a diagram of example components of a device 400, according to non-limiting embodiments or aspects. Device 400 may correspond to parallel processing system 100 of FIG. 1 and / or transaction processing system 301, payment gateway system 302, merchant system 304, issuer device 306, acquirer system 308, and consumer device 310 of FIG. 3, as an example. In some non-limiting embodiments, such systems or devices may include at least one device 400 and / or at least one component of device 400. The number and arrangement of components shown are provided as an example. In some non-limiting embodiments, device 400 may include additional components, fewer components, different components, or differently arranged components than those shown. Additionally, or alternatively, a set of components (e.g., one or more components) of device 400 may perform one or more functions described as being performed by another set of components of device 400.
[0088] As shown in FIG. 4, device 400 may include a bus 402, a processor 404, memory 406, a storage component 408, an input component 410, an output component 412, and a communication interface 414. Bus 402 may include a component that permits communication among the components of device 400. In some non-limiting embodiments, processor 404 may be implemented in hardware, firmware, or a combination of hardware and software. For example, processor 404 may include a processor (e.g., a central processing unit (CPU), a graphics processing unit (GPU), an accelerated processing unit (APU), etc.), a microprocessor, a digital signal processor (DSP), and / or any processing component (e.g., a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), etc.) that can be programmed to perform a function. Memory 406 may include random access memory (RAM), read only memory (ROM), and / or another type of dynamic or static storage device (e.g., flash memory, magnetic memory, optical memory, etc.) that stores information and / or instructions for use by processor 404.
[0089] With continued reference to FIG. 4, storage component 408 may store information and / or software related to the operation and use of device 400. For example, storage component 408 may include a hard disk (e.g., a magnetic disk, an optical disk, a magneto-optic disk, a solid-state disk, etc.) and / or another type of computer-readable medium. Input component 410 may include a component that permits device 400 to receive information, such as via user input (e.g., a touch screen display, a keyboard, a keypad, a mouse, a button, a switch, a microphone, etc.). Additionally, or alternatively, input component 410 may include a sensor for sensing information (e.g., a global positioning system (GPS) component, an accelerometer, a gyroscope, an actuator, etc.). Output component 412 may include a component that provides output information from device 400 (e.g., a display, a speaker, one or more light-emitting diodes (LEDs), etc.). Communication interface 414 may include a transceiver-like component (e.g., a transceiver, a separate receiver and transmitter, etc.) that enables device 400 to communicate with other devices, such as via a wired connection, a wireless connection, or a combination of wired and wireless connections. Communication interface 414 may permit device 400 to receive information from another device and / or provide information to another device. For example, communication interface 414 may include an Ethernet interface, an optical interface, a coaxial interface, an infrared interface, a radio frequency (RF) interface, a universal serial bus (USB) interface, a Wi-Fi® interface, a cellular network interface, and / or the like.
[0090] Device 400 may perform one or more processes described herein. Device 400 may perform these processes based on processor 404 executing software instructions stored by a computer-readable medium, such as memory 406 and / or storage component 408. A computer-readable medium may include any non-transitory memory device. A memory device includes memory space located inside of a single physical storage device or memory space spread across multiple physical storage devices. Software instructions may be read into memory 406 and / or storage component 408 from another computer-readable medium or from another device via communication interface 414. When executed, software instructions stored in memory 406 and / or storage component 408 may cause processor 404 to perform one or more processes described herein. Additionally, or alternatively, hardwired circuitry may be used in place of or in combination with software instructions to perform one or more processes described herein. Thus, embodiments described herein are not limited to any specific combination of hardware circuitry and software. The term “configured to,” as used herein, may refer to an arrangement of software, device(s), and / or hardware for performing and / or enabling one or more functions (e.g., actions, processes, steps of a process, and / or the like). For example, “a processor configured to” may refer to a processor that executes software instructions (e.g., program code) that cause the processor to perform one or more functions.
[0091] Although embodiments have been described in detail for the purpose of illustration, it is to be understood that such detail is solely for that purpose and that the disclosure is not limited to the disclosed embodiments or aspects, but, on the contrary, is intended to cover modifications and equivalent arrangements that are within the spirit and scope of the appended claims. For example, it is to be understood that the present disclosure contemplates that, to the extent possible, one or more features of any embodiment or aspect can be combined with one or more features of any other embodiment or aspect
Claims
1. A system comprising:at least one processor configured to:segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document;process, with a parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm;extract a set of features from each segment of the plurality of segments;determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores;sort the plurality of similarity scores to determine a sequence of segments, wherein the plurality of similarity scores are sorted with a binary search tree with at least one root node;dynamically rebalance the binary search tree for outlier pages or errors to adjust the binary search tree based on missing nodes or misaligned nodes;merge overlapping regions and correct text fragmentation using node adjacency while dynamically rebalancing the binary search to account for missing nodes or misaligned nodes;apply in-order traversal of the binary search tree to determine a logical order for the sequence of segments; andstitch text blocks of the segments in the logical order to generate an output document based on ordering each processed segment into a single stitched document.
2. The system of claim 1, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
3. The system of claim 1, wherein the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
4. (canceled)5. (canceled)6. The system of claim 1, wherein the root node of the binary search tree contains the segment, from the plurality of segments, with the highest text density.
7. The system of claim 1, wherein left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold.
8. The system of claim 7, wherein a segment in the plurality of segments with higher similarity scores when compared to the root node of the binary search tree go to the right.
9. The system of claim 1, wherein each node in the plurality of nodes of the binary tree is dynamically checked for errors using a feedback loop.
10. A method comprising:segmenting, with at least one processor, at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document;processing, with at least one parallel processing system, each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments;determining, with at least one processor, a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores;sorting, with at least one processor, the plurality of similarity scores to determine a sequence of segments, wherein the plurality of similarity scores are sorted with a binary search tree with at least one root node;dynamically rebalancing the binary search tree for outlier pages or errors to adjust the binary search tree based on missing nodes or misaligned nodes;merging overlapping regions and correct text fragmentation using node adjacency while dynamically rebalancing the binary search to account for missing nodes or misaligned nodes;applying, with at least one processor, in-order traversal of the binary search tree to determine a logical order for the sequence of segments; andstitch text blocks of the segments in the logical order to generate an output document based on ordering each processed segment into a single stitched document.
11. The method of claim 10, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
12. The method of claim 10, wherein the parallel processing system comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
13. (canceled)14. (canceled)15. The method of claim 10, wherein the root node of the binary search tree contains the segment, from the plurality of segments, with a highest text density.
16. The method of claim 10, wherein left and right children of the binary search tree are assigned based on comparing each segment in the plurality of segments to at least one content similarity threshold.
17. The method of claim 10, further comprising dynamically checking each node in the plurality of nodes of the binary tree for errors using a feedback loop.
18. A computer program product comprising at least one non-transitory computer-readable medium including program instructions which, when executed by at least one processor, cause the at least one processor to:segment at least one document into a plurality of segments, each segment comprising a page or a set of pages of the at least one document;process each segment of the plurality of segments with at least one optical character recognition algorithm; extract a set of features from each segment of the plurality of segments;determine a similarity score for each pair of segments of the plurality of segments based on comparing the set of features for each segment, resulting in a plurality of similarity scores;sort the plurality of similarity scores to determine a sequence of segments;dynamically rebalance the binary search tree for outlier pages or errors to adjust the binary search tree based on missing nodes or misaligned nodes;merge overlapping regions and correct text fragmentation using node adjacency while dynamically rebalancing the binary search to account for missing nodes or misaligned nodes;apply in-order traversal of the binary search tree to determine a logical order for the sequence of segments; andstitch text blocks of the segments in the logical order to generate an output document based on ordering each processed segment into a single stitched document.
19. The computer program product of claim 18, wherein the set of features comprises text density and spacing of content found in each segment of the plurality of segments.
20. The computer program product of claim 18, wherein the at least one processor comprises a distributed computing platform and / or a plurality of processors or processor cores configured for multi-thread processing.
