A method for structuring order data based on four-point selection and OCR recognition

By combining four-point selection with high-precision OCR recognition, the problems of low efficiency and poor accuracy in processing unstructured order data are solved, enabling accurate structuring and automatic uploading of order data, which is applicable to enterprise management systems in multiple industries.

CN123115260APending Publication Date: 2026-11-17Shanghai Institute of Basic Aerospace Technology
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611117534.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-27
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In existing technologies, unstructured order data processing is inefficient, manual input is prone to errors, traditional OCR recognition cannot accurately locate key information, and there is a lack of automatic data uploading and matching mechanisms, resulting in long data processing cycles and poor accuracy.

Method used

By employing a four-point bounding box technique to locate key information areas, combined with high-precision OCR recognition and line-by-line reconstruction, a tag library and management system field mapping are established to achieve accurate structured processing and one-click uploading of order data.

Benefits of technology

Significantly improves processing efficiency, reducing processing time to within 1 minute, significantly enhances data accuracy, is easy to operate, applicable to various unstructured order formats and enterprise management systems, and supports multiple industry scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123115260A_ABST
    Figure CN123115260A_ABST
Patent Text Reader

Abstract

This invention provides a method for structuring order data based on four-point selection and OCR recognition. The method comprises the following steps: Step 1: Importing and parsing unstructured order data; Step 2: Establishing a tag library; based on the general scenario of enterprise order business, a tag library is constructed, and the correspondence between tags and fields in the management system upload request is preset; Step 3: Four-point selection of key areas and tag annotation; Step 4: OCR recognition and line-by-line reconstruction of the selected area; Step 5: One-click import of order data into the management system. Compared with existing technologies, this invention has the following significant advantages: Significantly improved processing efficiency: average processing time is reduced to less than 1 minute; Significantly improved data accuracy: four-point selection avoids redundant information interference, and line-by-line reconstruction ensures correct text order, far superior to the error rate of manual input; Strong ease of operation; Wide compatibility, adaptable to different enterprise management system request templates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a method for structuring order data based on four-point selection and OCR recognition. Background Technology

[0002] In business operations, order data is the core data carrier connecting procurement, production, and sales. However, in actual business, a large amount of order data exists in unstructured form, such as photo orders sent by customers via WeChat or image files generated from scanning traditional paper orders. This unstructured order data cannot be directly identified and parsed by existing enterprise management systems (such as ERP and SCM systems), resulting in data processing relying on manual intervention.

[0003] Existing technologies for processing unstructured order data have the following significant drawbacks:

[0004] Manual data entry is inefficient: Manually reading key information (such as order number, product details, amount, etc.) from order images line by line and entering it into the system is prone to data errors due to visual fatigue and operational mistakes, requiring additional time for verification and correction.

[0005] Traditional OCR recognition has limitations: Traditional global OCR recognition technology extracts text from the entire order image, but cannot distinguish between key information areas and redundant information, resulting in chaotic recognition results. For example, it mixes the text of the "product name" and "unit price" fields and outputs them, requiring manual secondary screening and sorting, and cannot achieve structured processing.

[0006] Lack of automatic data matching mechanism for uploaded data: Even if text information is obtained through OCR, it is still necessary to manually compare it with the data structure template uploaded by the management system (such as XML or JSON format) and manually fill the text into the corresponding fields. The process is cumbersome and prone to field mismatch, which further prolongs the data processing cycle.

[0007] Therefore, there is an urgent need for a processing method that can accurately locate key order information, automatically perform structured transformation, and match the uploaded data with the relevant organizations, in order to solve the problem of inefficient utilization of unstructured order data. Summary of the Invention

[0008] This invention aims to overcome the shortcomings of low efficiency in manual order data entry, unstructured OCR full-image recognition, and ineffective utilization of recognition results. It provides a method for structuring order data based on four-point selection and OCR recognition, which enables accurate recognition, structured transformation, and one-click integration with management systems for order data, thereby reducing labor costs, shortening processing time, and improving data accuracy and business efficiency.

[0009] The technical solution of this invention is as follows:

[0010] A method for structuring order data based on four-point bounding selection and OCR recognition, characterized by comprising the following steps:

[0011] Step 1: Importing and parsing unstructured order data;

[0012] Step 2: Create a tag library:

[0013] Based on the common scenarios of enterprise order business, a tag library is built, and the correspondence between tags and the fields of upload requests in the management system is preset.

[0014] Step 3: Use four points to select the key area and add labels:

[0015] In the system's interactive interface, users can select key information areas in an order image by clicking with the mouse to form a closed rectangular selection area. The system automatically records the coordinates of the four vertices of each selected area and associates them with the corresponding label, generating a "region coordinates-label" mapping table for subsequent OCR recognition and data matching.

[0016] Step 4: Selected area OCR recognition and line-by-line restoration:

[0017] The system performs OCR recognition on the selected areas labeled in step 2, and binds the recognition task of each selected area to the corresponding label according to the "area coordinates-label" mapping table generated in step 3; for the OCR recognition results of each selected area, the system performs line-by-line restoration processing from top to bottom according to the original order layout, and displays them on the page in the order of area selection for the user to modify;

[0018] Step 5: Transfer order data to the management system with one click:

[0019] The system calls the preset mapping relationship of "label-data field" in step 2, matches the labels in the "region coordinate-label" mapping table generated in step 3, and fills the text data restored line by line in step 4 into the corresponding fields of the upload request template according to the "line alignment" principle. After filling, the user clicks the "one-click upload" button on the interactive interface, and the system transmits the data packet to the enterprise management system through the preset API interface.

[0020] Compared with the prior art, the present invention has the following significant advantages:

[0021] Processing efficiency has been greatly improved: the entire process, from importing order data to uploading it to the management system with one click, has been shortened to less than 1 minute on average.

[0022] Data accuracy is significantly improved: the four-point selection avoids interference from redundant information, and restoring the text line by line ensures the correct text order, which is far superior to the error rate of manual entry.

[0023] Highly user-friendly: Users only need to master the basic operations of four-point selection, label setting, and one-click upload. No professional technical background is required. The system interface is simple and intuitive, reducing personnel training costs.

[0024] Wide compatibility: Supports multiple unstructured order data formats (images, scans, screenshots), adapts to different enterprise management system request templates, and is suitable for multiple industry scenarios such as retail, e-commerce, and manufacturing, with strong versatility. Attached Figure Description

[0025] Figure 1 This is a flowchart of the present invention.

[0026] Figure 2 This is a diagram of an order.

[0027] Figure 3 This is a diagram showing the selection of orders.

[0028] Figure 4 The results are presented in a structured manner. Detailed Implementation

[0029] The specific embodiments of the present invention will now be described in further detail with reference to the accompanying drawings.

[0030] This invention provides a structured processing method for unstructured order data (such as image orders, scanned orders, screenshot orders, etc.). It uses a four-point bounding box to locate key information areas, label annotation, OCR recognition and line-by-line reconstruction, and combines the matching of data messages uploaded by the system to achieve one-click import of order data into the management system. It is suitable for enterprise scenarios that require efficient processing of order data.

[0031] Figure 1 This is an overall flowchart of the method of the present invention. Figure 1 As shown, the present invention includes five steps: tag library data creation → import and parsing → key area selection → OCR recognition and restoration → one-click data packet upload.

[0032] Order images such as Figure 2 As shown in the diagram, the four-point selection interface is illustrated below. Figure 3 As shown, the order image and four selected areas are displayed (labeled with "Order Number", "Customer Name", "Product Details", and "Total Amount" respectively). The structured data of the recognition result is as follows: Figure 4 As shown.

[0033] Specifically, the present invention provides a method for structuring order data based on four-point selection and OCR recognition, comprising the following steps:

[0034] Step 1: Importing and parsing unstructured order data

[0035] Import the unstructured order data to be processed (including but not limited to JPG, PNG image orders, PDF scanned orders, and system screenshot orders) into the data processing system; the system parses the imported data, automatically converts PDF files into multiple PNG images, and performs the following preprocessing operations:

[0036] Image noise reduction: Gaussian filtering algorithm is used to remove blemishes, noise and other interfering elements in the image while preserving the integrity of the text information;

[0037] Clarity Enhancement: Histogram equalization technology is used to improve image contrast and sharpen the edges of blurry text.

[0038] After preprocessing, the system displays multiple order images on the interactive interface for users to select specific regions.

[0039] Step 2: Build a tag library

[0040] Based on the common scenario of enterprise order business, a tag library is built, and the correspondence between tags and upload request fields in the management system is preset. Specifically, the following operations are included:

[0041] Tag library construction: The default tag library contains key information tags that are frequently used in order processing scenarios, covering two categories: basic tags and industry-customized tags.

[0042] Category 1: Basic Tags: Applicable to order scenarios across all industries, including 9 core tags: "Order Number", "Customer Name", "Customer Contact Information", "Product Name", "Product Unit Price", "Quantity", "Subtotal Amount", "Total Amount" and "Order Date", covering the core dimensions of order data.

[0043] Category 2: Industry-Customized Tags: The system supports enterprises to add customized tags according to their own industry characteristics. For example, manufacturing companies can add "material code" and "production batch" tags, enter the tag name, and save it to the tag library.

[0044] Tag-Data Field Preset Correspondence:

[0045] The system uploads request templates and automatically parses the data template's structure tree, extracting each field to form a "field information table." Users set corresponding data fields for each tag in the tag library, such as "unit price" corresponding to the "price" field, ensuring a direct association between tags and data fields.

[0046] Step 3: Use four points to select the key area and add labels.

[0047] In the system's interactive interface, users can select key information areas (such as order number area, customer information area, product details area, total amount area, etc.) in the order image by clicking with the mouse to form a closed rectangular selection area. If the area is tilted, the user can adjust the position of the four corner points of the rectangle to achieve precise positioning of the key information area.

[0048] Tag selection adopts the method of "prioritizing existing tags + supplementing with custom tags":

[0049] Existing tag selection: After the user selects a key area, the system automatically pops up a list of existing tags. The user can directly select a tag that matches the type of information in the area (e.g., when selecting the "Order Number" area, select the "Order Number" tag from the list), without having to manually enter the tag name, thus improving tagging efficiency.

[0050] Custom Tag Supplement: If there is no matching tag in the default tag library (such as the "Material Number" area in a manufacturing order), users can click the "Add Tag" button, enter a custom tag name (such as "Material Number"), and the system will automatically add the custom tag to the tag list, while prompting the user to select the corresponding data field.

[0051] The system automatically records the coordinates of the four vertices of each selected area and associates them with the corresponding labels, generating a "region coordinates-label" mapping table for subsequent OCR recognition and data matching.

[0052] Users can select multiple areas in an image until all areas are selected.

[0053] Step 4: Selected Area OCR Recognition and Line-by-Line Restoration

[0054] The system calls the high-precision OCR recognition module to perform local text extraction on the selected areas labeled in step 2, eliminating redundant information interference. Based on the "region coordinates-label" mapping table generated in step 3, the recognition task for each selected area is bound to the corresponding label.

[0055] For each selected area, the system performs line-by-line restoration based on the original order layout, and displays the results on the page in the order of the selected areas, which can then be modified by the user.

[0056] Step 5: Transfer order data to the management system with one click

[0057] The system calls the preset correspondence between "label-data field" in step 2, matches the labels in the "region coordinate-label" mapping table generated in step 3, and fills the text data restored by row in step 4 into the corresponding fields of the upload request template according to the "row alignment" principle.

[0058] After the data is filled in, the system generates a structured order that meets the format requirements of the management system. When the user clicks the "One-Click Upload" button on the interactive interface, the system transmits the data packet to the enterprise management system through a preset API interface.

[0059] After receiving the data packet, the management system automatically performs format and data integrity checks. The management system then returns a "Import successful" response, automatically completing the import of the order data.

[0060] The features of this invention are:

[0061] It provides a flexible and customizable tag library system, building a tag library that includes basic tags and customized tags. Basic tags cover common key information in the industry, while customized tags support personalized additions by enterprises through reserved custom interfaces. At the same time, it extracts the upload request fields from the management system through the parsing module and establishes a "tag-request field" mapping database to realize the association between tags and structured input.

[0062] It provides a precise method for labeling key areas, allowing users to select key information areas with their mouse in the interactive interface. It also offers a function to adjust the four corner points of the rectangle to address area tilting issues, ensuring accurate positioning. It has dual capabilities for label matching and custom label addition, recording key information areas and labels as a "region coordinates-label" mapping relationship, providing clear location and attribute basis for text extraction.

[0063] It provides an intelligent text processing workflow, calling a high-precision OCR recognition module to extract local text using a "region coordinate-label" mapping table, and then restoring the text sequence line by line according to the original order layout. It supports user modification and confirmation, ensuring the quality of text information.

[0064] It provides an automatic mechanism for generating and uploading structured request bodies. Based on the "tag-request field" mapping relationship, it uses a "line alignment" filling algorithm to match text data to the corresponding fields in the request template, generating structured data that conforms to the management system format. "One-click upload" is achieved through a preset API interface, automating the data conversion and import process.

[0065] It should be noted that the above description is merely illustrative and explanatory of the present invention. Those skilled in the art should understand that any modifications and substitutions to the present invention fall within the scope of protection of the present invention.

Claims

1. A method for structuring order data based on four-point bounding box selection and OCR recognition, characterized in that, Includes the following steps: Step 1: Importing and parsing unstructured order data; Step 2: Create a tag library: Based on the common scenarios of enterprise order business, a tag library is built, and the correspondence between tags and the fields of upload requests in the management system is preset. Step 3: Use four points to select the key area and add labels: In the system's interactive interface, users can select key information areas in an order image by clicking with the mouse to form a closed rectangular selection area. The system automatically records the coordinates of the four vertices of each selected area and associates them with the corresponding label, generating a "region coordinates-label" mapping table for subsequent OCR recognition and data matching. Step 4: Selected area OCR recognition and line-by-line restoration: The system performs OCR recognition on the selected areas labeled in step 2, and binds the recognition task of each selected area to the corresponding label according to the "area coordinates-label" mapping table generated in step 3; for the OCR recognition results of each selected area, the system performs line-by-line restoration processing from top to bottom according to the original order layout, and displays them on the page in the order of area selection for the user to modify. Step 5: Transfer order data to the management system with one click: The system calls the preset mapping relationship of "label-data field" in step 2, matches the labels in the "region coordinate-label" mapping table generated in step 3, and fills the text data restored line by line in step 4 into the corresponding fields of the upload request template according to the "line alignment" principle. After filling, the user clicks the "one-click upload" button on the interactive interface, and the system transmits the data packet to the enterprise management system through the preset API interface.

2. The method for structuring order data based on four-point selection and OCR recognition according to claim 1, characterized in that, Step 1 includes: importing the unstructured order data to be processed into the data processing system; the system parses the imported data, automatically converting the PDF file into multiple PNG images, and performing preprocessing operations; after preprocessing, the system presents multiple order images on the interactive interface for the user to select regions.

3. The method for structuring order data based on four-point selection and OCR recognition according to claim 2, characterized in that, In step 1, the unstructured order data includes JPG, PNG format image orders, PDF scanned orders, and system screenshot orders; the preprocessing operations include image noise reduction and sharpness enhancement.

4. The method for structuring order data based on four-point selection and OCR recognition according to claim 1, characterized in that, In step 2, the tag library contains key information tags that are frequently used in order processing scenarios, covering two categories: basic tags and industry-customized tags. The basic tags are applicable to order scenarios across all industries. The industry-customized tags are custom tags added by enterprises according to their own industry characteristics.

5. The method for structuring order data based on four-point selection and OCR recognition according to claim 1, characterized in that, In step 2, the correspondence between the preset tags and the upload request fields of the management system includes: the automatic parsing module of the upload request template of the management system traverses the data template's structure tree, extracts each field to form a "field information table", and the user sets the corresponding data field for each tag in the tag library to ensure the direct association between the tag and the data field.

6. The method for structuring order data based on four-point bounding box selection and OCR recognition according to claim 1, characterized in that, In step 3, the key information area includes the order number area, customer information area, product details area, and total amount area. When a closed rectangular selection area is formed by clicking the mouse, if the area is tilted, the key information area can be accurately positioned by adjusting the positions of the four corner points of the rectangle.

7. The method for structuring order data based on four-point selection and OCR recognition according to claim 1, characterized in that, In step 3, the tag selection adopts the method of "prioritizing existing tags + supplementing with custom tags": Existing tag selection: After the user selects a key area, the system automatically pops up a list of existing tags, and the user can directly select a tag that matches the type of area information; Custom tag addition: If there is no matching tag in the default tag library, the user can click the "Add Tag" button, enter a custom tag name, and the system will automatically add the custom tag to the tag list, while prompting the user to select the corresponding data field.

8. The method for structuring order data based on four-point selection and OCR recognition according to claim 1, characterized in that, Step 5 further includes: after receiving the data packet, the management system automatically performs format verification and data integrity verification, and the management system returns a "successful import" response, automatically completing the import of order data.