An order data processing method and system based on multi-language intelligent recognition
By employing a multilingual intelligent recognition method, combined with image preprocessing and a deep fusion architecture, the problems of low accuracy and poor process integration in multilingual order recognition have been solved, enabling accurate extraction of key order information and fully automated processing throughout the entire process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG WEIQIAO JIAJIA HOME TEXTILES CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies suffer from low recognition accuracy, lack of semantic understanding capabilities, poor process integration, and inability to achieve fully automated processing when handling multilingual orders.
Employing multilingual intelligent recognition methods, including image preprocessing, multilingual OCR recognition, order semantic understanding, translation, and confidence assessment, an end-to-end automated process is constructed. Through correction, noise reduction, contrast enhancement, an improved ResNet-18 network, and a feature pyramid fusion network, combined with natural language processing and computer vision technologies, the system achieves accurate extraction and system input of key information.
It improved the accuracy of multilingual order recognition, achieved precise capture and understanding of key order information, automated the entire order processing process, reduced manual intervention, and enhanced the system's recognition stability and process integration.
Smart Images

Figure CN122336768A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of enterprise information data processing technology, and relates to an order data processing method and system, especially an order data processing method and system based on multilingual intelligent recognition. Background Technology
[0002] In the context of deepening globalization in manufacturing, manufacturing enterprises are constantly expanding their business scope and need to handle orders from customers in different countries and regions around the world. These orders are transmitted in various ways, mainly via email with attachments such as PDFs, Word documents, and images. Furthermore, due to the different languages spoken by customers in different regions, the language of order documents is also diverse, including several commonly used languages.
[0003] Currently, optical character recognition (OCR) technology and simple form recognition tools are mainly used for recognition. However, existing optical character recognition (OCR) technology and form recognition tools have significant limitations when processing multilingual orders. Low accuracy in multilingual recognition: OCR technology performs well in recognizing a single language, but its accuracy drops significantly when dealing with order documents containing multiple languages, making it difficult to meet the needs of practical applications.
[0004] Lack of semantic understanding: Existing form recognition tools can only recognize and extract text, but cannot understand the contextual semantics of order documents, make it difficult to accurately identify key information in orders, and cannot intelligently match the recognized information with the standard fields required by the MES system (Manual Input Manufacturing Execution System).
[0005] Poor process integration: OCR technology cannot integrate functions such as order recognition, language translation, format conversion, and system entry into a complete automated process. It still requires manual intervention and operation at different stages, and cannot achieve full-process automation.
[0006] This is a shortcoming of existing technology.
[0007] In view of this, it is very necessary to provide an order data processing method and system based on multilingual intelligent recognition to solve the above-mentioned defects in the prior art. Summary of the Invention
[0008] The purpose of this invention is to address the shortcomings of existing technologies, such as low multilingual recognition accuracy (significantly reduced accuracy, making it difficult to meet practical application needs), lack of semantic understanding (inability to comprehend the contextual semantics of order documents, making it difficult to accurately identify key information in orders), and poor process integration (inability to integrate order recognition, language translation, format conversion, and system input functions into a complete automated process, requiring manual intervention and operation at different stages, and failing to achieve full-process automation). This invention provides a method and system for order data processing based on multilingual intelligent recognition to solve these technical problems.
[0009] To achieve the above objectives, the present invention provides the following technical solution: A method for processing order data based on multilingual intelligent recognition includes the following steps: Step S1: Obtain image data of paper order documents from the physical scanning device and image data of electronic order documents from the email address as raw image data; Step S2: Perform preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data obtained in step S1 to obtain preprocessed image data, so as to improve the quality of the original image data. Step S3: Input the preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; Step S4: Input the source language text data into the order semantic understanding model, locate and identify the key field information of the source language data, and map the located and identified key field information into standard field information based on the multilingual keyword mapping library; Step S5: Based on standard field information, translate the source language text data into target language data, and convert the format of the translated target language data into a standard format compatible with the EMS system; Step S6: Compare and verify the target language data after it has been converted to the standard format with the basic database data of the MES system to obtain the verification data; assign confidence values to the standard field information through the confidence evaluation model; Step S7: If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order converted into target language data adapted to the EMS system standard format will be written into the MES system order creation module; otherwise, the order will be returned.
[0010] As a preferred embodiment, in step S2: the skew correction processing of the original image data specifically involves: using the Hough Transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, so that the corrected text lines are arranged horizontally; the line detection formula of the Hough Transform algorithm is:
[0011] In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.0 (default 0.8). The contrast enhancement process after denoising is specifically as follows: Adaptive Histogram Equalization (CLAHE) algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: The original image data of the order is divided into non-overlapping rectangular blocks. For each rectangular block (No. Line 1 Calculate the grayscale histogram for each block:
[0012] In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0013] The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is:
[0014] In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows:
[0015] Redistribute the overflow frequencies that exceed the maximum allowed frequency:
[0016]
[0017] In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged (still ). ); Indicates the frequency of overflow Total number of gray levels Take the mold.
[0018] Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram:
[0019]
[0020] In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value (range [0, 255]).
[0021] The technical advantages of this preferred solution are as follows: it performs a combination of preprocessing, including correction, noise reduction, and contrast enhancement, on the original image data, forming a complete optimization chain of "spatial regularization - noise reduction - feature enhancement". The OCR recognition accuracy of the preprocessed image data obtained after the preprocessing operation is significantly improved, providing high-quality data input for subsequent steps. At the same time, it lowers the technical threshold for multilingual processing and weakens the differences between orders in different languages and formats. Character features (such as stroke thickness and structural shape) in high-contrast images are more distinct, and the order semantic understanding model can more accurately capture the text features of the fields.
[0022] As a preferred embodiment, in step S3: the multilingual OCR recognition model includes: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula:
[0023] In the formula, For pixels The binarization threshold; For The average grayscale value of a local area centered on the center (default 15×15); The standard deviation of grayscale in a local area; This is an adjustment factor (default 0.34). This is the dynamic range of grayscale values (default 255).
[0024] Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension.
[0025] Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
[0026] The technical effect of this preferred solution is that, through the deep fusion architecture of "improved ResNet-18 + feature pyramid fusion feature extraction" combined with customized optimization for order scenarios, it can achieve accurate recognition and language detection of multilingual and multi-format order texts.
[0027] As a preferred embodiment, the order semantic understanding model in step S4 integrates natural language processing (NLP) and computer vision technologies to locate the region where the key fields are located. Based on a multilingual keyword mapping library, it achieves a unified semantic mapping from different language fields to the system's standard fields, thereby obtaining structured key information data.
[0028] As a preferred embodiment, the confidence assessment model in step S6 includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.
[0029] This invention also provides an order data processing system based on multilingual intelligent recognition, comprising: The raw image data acquisition module acquires image data of paper order documents from physical scanning devices and image data of electronic order documents from email addresses as raw image data. The image preprocessing module performs preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data acquired by the original image data acquisition module to obtain preprocessed image data, thereby improving the quality of the original image data. The multilingual OCR recognition module inputs preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; The order semantic understanding module takes source language text data into the order semantic understanding model, locates and identifies key field information in the source language data, and maps the located and identified key field information into standard field information based on a multilingual keyword mapping library. The translation module translates source language text data into target language data based on standard field information, and converts the format of the translated target language data into a standard format compatible with the EMS system. The confidence assessment module compares and verifies the target language data after it has been converted to a standard format with the basic database data of the MES system to obtain verification data; and assigns confidence values to the standard field information through the confidence assessment model. The order flow processing module processes the order flow. If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order will be converted into target language data adapted to the EMS system standard format and written into the MES system order creation module; otherwise, the order will be returned.
[0030] As a preferred embodiment, in the image preprocessing module, the correction processing of the original image data specifically involves: using the Hough Transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, resulting in horizontally arranged text lines; the line detection formula of the Hough Transform algorithm is:
[0031] In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.0 (default 0.8). The contrast enhancement process after denoising is specifically as follows: Adaptive Histogram Equalization (CLAHE) algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: The original image data of the order is divided into non-overlapping rectangular blocks. For each rectangular block (No. Line 1 Calculate the grayscale histogram for each block:
[0032] In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0033] The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is:
[0034] In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows:
[0035] Redistribute the overflow frequencies that exceed the maximum allowed frequency:
[0036]
[0037] In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged (still ). ); Indicates the frequency of overflow Total number of gray levels Take the mold.
[0038] Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram:
[0039]
[0040] In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value (range [0, 255]).
[0041] The technical advantages of this preferred solution are as follows: it performs a combination of preprocessing, including correction, noise reduction, and contrast enhancement, on the original image data, forming a complete optimization chain of "spatial regularization - noise reduction - feature enhancement". The OCR recognition accuracy of the preprocessed image data obtained after the preprocessing operation is significantly improved, providing high-quality data input for subsequent steps. At the same time, it lowers the technical threshold for multilingual processing and weakens the differences between orders in different languages and formats. Character features (such as stroke thickness and structural shape) in high-contrast images are more distinct, and the order semantic understanding model can more accurately capture the text features of the fields.
[0042] As a preferred embodiment, the multilingual OCR recognition module includes: a multilingual OCR recognition model comprising: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula:
[0043] In the formula, For pixels The binarization threshold; For The average grayscale value of a local area centered on the center (default 15×15); The standard deviation of grayscale in a local area; This is an adjustment factor (default 0.34). This is the dynamic range of grayscale values (default 255).
[0044] Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension.
[0045] Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
[0046] The technical effect of this preferred solution is that, through the deep fusion architecture of "improved ResNet-18 + feature pyramid fusion feature extraction" combined with customized optimization for order scenarios, it can achieve accurate recognition and language detection of multilingual and multi-format order texts.
[0047] As a preferred embodiment, the order semantic understanding model in the order semantic understanding module integrates natural language processing (NLP) and computer vision technologies to locate the regions where key fields are located. Based on a multilingual keyword mapping library, it achieves a unified semantic mapping from different language fields to system standard fields, thereby obtaining structured key information data.
[0048] As a preferred embodiment, the confidence assessment model in the confidence assessment module includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.
[0049] The advantages of this invention over the prior art are as follows: To overcome the shortcomings of low accuracy in multilingual document recognition and ensure recognition stability: By combining document preprocessing (correction + noise reduction + contrast enhancement) and multilingual OCR recognition model, the quality of the original image is first optimized, which solves the problems of low accuracy in multilingual mixed document recognition and significant decline in recognition effect in complex scenarios in existing technologies.
[0050] To overcome the shortcomings of semantic understanding and achieve accurate extraction of key information: By leveraging the order semantic understanding model and integrating natural language processing and computer vision technologies, it breaks through the limitations of existing technologies that "only recognize text and do not understand semantics". It can accurately locate key fields such as "order number and material code" regardless of the order layout format; it completely solves the technical pain points of existing technologies that cannot understand contextual semantics and are difficult to accurately match standard fields.
[0051] Break down process integration barriers and achieve a fully automated closed loop: Construct an end-to-end complete process of "data collection → preprocessing → recognition → semantic extraction → translation standardization → verification and evaluation → system entry", deeply integrating order recognition, language translation, format conversion and system entry functions, without the need for manual intervention in each step. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0053] Figure 1 This is a schematic diagram of an order data processing system based on multilingual intelligent recognition provided by the present invention.
[0054] The module comprises: 1-Original image data acquisition module, 2-Image preprocessing module, 3-Multilingual OCR recognition module, 4-Order semantic understanding module, 5-Translation module, 6-Confidence assessment module, and 7-Order flow processing module. Detailed Implementation
[0055] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. The following embodiments are explanations of the present invention, but the present invention is not limited to the following implementation methods.
[0056] Example 1: A method for processing order data based on multilingual intelligent recognition includes the following steps: Step S1: Obtain image data of paper order documents from the physical scanning device and image data of electronic order documents from the email address as raw image data; Step S2: Perform preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data obtained in step S1 to obtain preprocessed image data, so as to improve the quality of the original image data. In step S2, the skew correction process for the original image data specifically involves: using the Hough Transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, resulting in horizontally arranged text lines; the line detection formula of the Hough Transform algorithm is:
[0057] In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.0 (default 0.8). The contrast enhancement process after denoising is specifically as follows: Adaptive Histogram Equalization (CLAHE) algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: The original image data of the order is divided into non-overlapping rectangular blocks. For each rectangular block (No. Line 1 Calculate the grayscale histogram for each block:
[0058] In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0059] The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is:
[0060] In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows:
[0061] Redistribute the overflow frequencies that exceed the maximum allowed frequency:
[0062]
[0063] In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged (still ). ); Indicates the frequency of overflow Total number of gray levels Take the mold.
[0064] Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram:
[0065]
[0066] In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value (range [0, 255]).
[0067] The original image data is subjected to a combination of preprocessing, including correction, noise reduction, and contrast enhancement, forming a complete optimization chain of "spatial regularization - noise reduction - feature enhancement". The OCR recognition accuracy of the preprocessed image data is significantly improved after the preprocessing operation, providing high-quality data input for subsequent steps. At the same time, it reduces the technical threshold for multilingual processing and weakens the differences between orders in different languages and formats. Character features (such as stroke thickness and structural shape) in high-contrast images are more distinct, and the order semantic understanding model can more accurately capture the text features of the fields.
[0068] Step S3: Input the preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; In step S3, the multilingual OCR recognition model includes: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula:
[0069] In the formula, For pixels The binarization threshold; For The average grayscale value of a local area centered on the center (default 15×15); The standard deviation of grayscale in a local area; This is an adjustment factor (default 0.34). This is the dynamic range of grayscale values (default 255).
[0070] Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension.
[0071] Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
[0072] Through a deep fusion architecture of "improved ResNet-18+ feature pyramid fusion feature extraction" combined with customized optimization for order scenarios, we can achieve accurate recognition and language detection of order texts in multiple languages and formats.
[0073] Step S4: Input the source language text data into the order semantic understanding model, locate and identify the key field information of the source language data, and map the located and identified key field information into standard field information based on the multilingual keyword mapping library; The order semantic understanding model in step S4 integrates natural language processing (NLP) and computer vision technology to locate the region where key fields are located. Based on a multilingual keyword mapping library, it realizes a unified semantic mapping from different language fields to system standard fields, and obtains structured key information data.
[0074] Step S5: Based on standard field information, translate the source language text data into target language data, and convert the format of the translated target language data into a standard format compatible with the EMS system; Step S6: Compare and verify the target language data after it has been converted to the standard format with the basic database data of the MES system to obtain the verification data; assign confidence values to the standard field information through the confidence evaluation model; The confidence assessment model in step S6 includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.
[0075] Step S7: If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order converted into target language data adapted to the EMS system standard format will be written into the MES system order creation module; otherwise, the order will be returned.
[0076] Example 2: like Figure 1 As shown, this embodiment provides an order data processing system based on multilingual intelligent recognition, including: Raw image data acquisition module 1 acquires image data of paper order documents from physical scanning devices and image data of electronic order documents from email addresses as raw image data. Image preprocessing module 2 performs preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data acquired by the original image data acquisition module to obtain preprocessed image data, thereby improving the quality of the original image data. In the image preprocessing module 2, the correction processing of the original image data specifically involves: using the Hough Transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, so that the corrected text lines are arranged horizontally; the line detection formula of the Hough Transform algorithm is:
[0077] In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.0 (default 0.8). The contrast enhancement process after denoising is specifically as follows: Adaptive Histogram Equalization (CLAHE) algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: The original image data of the order is divided into non-overlapping rectangular blocks. For each rectangular block (No. Line 1 Calculate the grayscale histogram for each block:
[0078] In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0079] The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is:
[0080] In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows:
[0081] Redistribute the overflow frequencies that exceed the maximum allowed frequency:
[0082]
[0083] In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged (still ). ); Indicates the frequency of overflow Total number of gray levels Take the mold.
[0084] Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram:
[0085]
[0086] In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value (range [0, 255]).
[0087] The original image data is subjected to a combination of preprocessing, including correction, noise reduction, and contrast enhancement, forming a complete optimization chain of "spatial regularization - noise reduction - feature enhancement". The OCR recognition accuracy of the preprocessed image data is significantly improved after the preprocessing operation, providing high-quality data input for subsequent steps. At the same time, it reduces the technical threshold for multilingual processing and weakens the differences between orders in different languages and formats. Character features (such as stroke thickness and structural shape) in high-contrast images are more distinct, and the order semantic understanding model can more accurately capture the text features of the fields.
[0088] Multilingual OCR recognition module 3: This module inputs preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; In the multilingual OCR recognition module 3, the multilingual OCR recognition model includes: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula:
[0089] In the formula, For pixels The binarization threshold; For The average grayscale value of a local area centered on the center (default 15×15); The standard deviation of grayscale in a local area; This is an adjustment factor (default 0.34). This is the dynamic range of grayscale values (default 255).
[0090] Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension.
[0091] Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
[0092] Through a deep fusion architecture of "improved ResNet-18+ feature pyramid fusion feature extraction" combined with customized optimization for order scenarios, we can achieve accurate recognition and language detection of order texts in multiple languages and formats.
[0093] Order semantic understanding module 4: This module inputs the source language text data into the order semantic understanding model, locates and identifies the key field information of the source language data, and maps the located and identified key field information into standard field information based on the multilingual keyword mapping library; The order semantic understanding module 4 integrates natural language processing (NLP) and computer vision technologies to locate the regions where key fields are located. Based on a multilingual keyword mapping library, it achieves a unified semantic mapping from different language fields to the system's standard fields, thereby obtaining structured key information data.
[0094] Translation module 5 translates source language text data into target language data based on standard field information, and converts the format of the translated target language data into a standard format that is compatible with the EMS system. Confidence assessment module 6 compares and verifies the target language data after it has been converted to a standard format with the basic database data of the MES system to obtain verification data; and assigns confidence values to the standard field information through the confidence assessment model. The confidence assessment model in the confidence assessment module 6 includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.
[0095] Order flow processing module 7 processes the order flow. If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order will be converted into target language data adapted to the standard format of the EMS system and written into the MES system order creation module; otherwise, the order will be returned.
[0096] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The methods disclosed in the embodiments are described simply because they correspond to the systems disclosed in the embodiments; relevant details can be found in the method section.
[0097] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0098] In the embodiments provided by this invention, it should be understood that the disclosed systems, methods, and approaches can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.
[0099] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0100] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit.
[0101] Similarly, in the various embodiments of the present invention, each processing unit can be integrated into a functional module, or each processing unit can exist physically, or two or more processing units can be integrated into a functional module.
[0102] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0103] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0104] The above-disclosed embodiments are merely preferred embodiments of the present invention, but the present invention is not limited thereto. Any non-creative variations that can be conceived by those skilled in the art, as well as any improvements and modifications made without departing from the principles of the present invention, should fall within the protection scope of the present invention.
Claims
1. A method for processing order data based on multi-language intelligent recognition, characterized in that, Includes the following steps: Step S1: Obtain image data of paper order documents from the physical scanning device and image data of electronic order documents from the email address as raw image data; Step S2: Perform preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data obtained in step S1 to obtain preprocessed image data. Step S3: Input the preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; Step S4: Input the source language text data into the order semantic understanding model, locate and identify the key field information of the source language data, and map the located and identified key field information into standard field information based on the multilingual keyword mapping library; Step S5: Based on standard field information, translate the source language text data into target language data, and convert the format of the translated target language data into a standard format compatible with the EMS system; Step S6: Compare and verify the target language data after it has been converted to the standard format with the basic database data of the MES system to obtain the verification data; assign confidence values to the standard field information through the confidence evaluation model; Step S7: If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order data converted into target language data adapted to the standard format of the EMS system will be written into the order creation module of the MES system. Otherwise, the order will be returned.
2. The order data processing method based on multi-language intelligent recognition according to claim 1, characterized in that, In step S2, the correction processing of the original image data specifically involves: using the Hough transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, resulting in horizontally arranged text lines; the formula for line detection in the Hough transform algorithm is: In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.
0. The contrast enhancement process after denoising is specifically as follows: An adaptive histogram equalization algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: Divide the original image data of the order into mutually non-overlapping rectangular blocks For each rectangular block Compute the gray level histogram: In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is: In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows: Redistribute the overflow frequencies that exceed the maximum allowed frequency: In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged. ; Indicates the frequency of overflow Total number of gray levels Take the mold; Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram: In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value, with a range of [0, 255].
3. The order data processing method based on multilingual intelligent recognition according to claim 1 or 2, characterized in that, In step S3, the multilingual OCR recognition model includes: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula: In the formula, For pixels The binarization threshold; For The average gray level of the local area centered on the target; The standard deviation of grayscale in a local area; For adjustment coefficients; This refers to the dynamic range of grayscale values. Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension. Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
4. The order data processing method based on multilingual intelligent recognition according to claim 3, characterized in that, The order semantic understanding model in step S4 integrates natural language processing and computer vision technologies to locate the regions where key fields are located. Based on a multilingual keyword mapping library, it achieves a unified semantic mapping from different language fields to the system's standard fields, thereby obtaining structured key information data.
5. The order data processing method based on multilingual intelligent recognition according to claim 4, characterized in that, The confidence assessment model in step S6 includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.
6. An order data processing system based on multilingual intelligent recognition, characterized in that, include: The raw image data acquisition module acquires image data of paper order documents from physical scanning devices and image data of electronic order documents from email addresses as raw image data. The image preprocessing module performs preprocessing operations such as correction, noise reduction, and contrast enhancement on the original image data acquired by the original image data acquisition module to obtain preprocessed image data, thereby improving the quality of the original image data. The multilingual OCR recognition module inputs preprocessed image data into the multilingual OCR recognition model to recognize the source language text data of the order document; The order semantic understanding module takes source language text data into the order semantic understanding model, locates and identifies key field information in the source language data, and maps the located and identified key field information into standard field information based on a multilingual keyword mapping library. The translation module translates source language text data into target language data based on standard field information, and converts the format of the translated target language data into a standard format compatible with the EMS system. The confidence assessment module compares and verifies the target language data after it has been converted to a standard format with the basic database data of the MES system to obtain verification data; and assigns confidence values to the standard field information through the confidence assessment model. The order flow processing module processes the order flow. If the verification data meets the preset verification conditions and the confidence level is not lower than the preset threshold, the order data, which is converted into target language data adapted to the standard format of the EMS system, will be written into the MES system order creation module. Otherwise, the order will be returned.
7. The order data processing system based on multilingual intelligent recognition according to claim 6, characterized in that, In the image preprocessing module, the correction processing of the original image data specifically involves: using the Hough transform algorithm to detect the text line direction in the original image data, calculating the so-called offset angle of the text line direction, and performing rotation correction on the tilted original image data, so that the corrected text lines are arranged horizontally; the line detection formula of the Hough transform algorithm is: In the formula, This represents the perpendicular distance from the origin of the image coordinate system to the target line. Vertical distance and The angle along the positive direction of the axis. The x-coordinate of a pixel in the image space. The ordinate of a pixel in the image space; The denoising process after the bias correction is as follows: a combination of median filtering and Gaussian filtering is used to denoise the original image data after bias correction. The window size of the median filter is 3×3, and the standard deviation of the Gaussian filter is set to 0.5-1.
0. The contrast enhancement process after denoising is specifically as follows: An adaptive histogram equalization algorithm is used to enhance the contrast of the denoised original image data, including the following steps: The steps for image segmentation and gray-level histogram calculation are as follows: The original image data of the order is divided into non-overlapping rectangular blocks. For each rectangular block Calculate the grayscale histogram: In the formula, rectangular block medium grayscale value The number of pixels; For order images in pixel coordinates The original gray value at the location has a range of [0, 255]; Grayscale ; This is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise. The steps for cropping and redistributing histograms that exceed the maximum allowed frequency are as follows: Define contrast limit threshold Then the maximum allowed frequency of gray levels in a single histogram is: In the formula, The total number of pixels in a single rectangular block; This represents the total number of gray levels. ; The histogram exceeding the maximum allowed frequency is clipped, and the clipped histogram is as follows: Redistribute the overflow frequencies that exceed the maximum allowed frequency: In the formula, The overflow frequency caused by clipping is uniformly distributed to ensure that the total area of the histogram remains unchanged. ; Indicates the frequency of overflow Total number of gray levels Take the mold; Steps for calculating the cumulative distribution function of rectangular blocks based on the clipped histogram: In the formula, rectangular block medium grayscale value The cumulative number of pixels, The grayscale mapping function for this rectangular block will assign grayscale levels to... The value is mapped to an enhanced grayscale value, with a range of [0, 255].
8. An order data processing system based on multilingual intelligent recognition according to claim 6 or 7, characterized in that, The multilingual OCR recognition module includes the following multilingual OCR recognition models: Input layer: Input the preprocessed image data after the preprocessing operation. The input preprocessed image data is uniformly scaled to a width of 1024 pixels, and the height is adaptively adjusted proportionally. If the short side is insufficient, it is filled with black pixels. Image preprocessing sub-layer: The image preprocessing sub-layer includes a lightweight image optimization unit to further improve the effectiveness of feature extraction and compensate for minor shortcomings in the front-end document preprocessing; it dynamically adjusts the pixel binarization threshold based on the grayscale mean and variance of local regions, using the following formula: In the formula, For pixels The binarization threshold; For The average gray level of the local area centered on the target; The standard deviation of grayscale in a local area; For adjustment coefficients; This refers to the dynamic range of grayscale values. Feature extraction layer: includes a CNN backbone network and a feature pyramid fusion network. The CNN backbone network is an improved ResNet-18 network, which replaces the last two fully connected layers of the original ResNet network. The improved ResNet-18 network includes convolutional layers, a first residual block group, a second residual block group, a third residual block group, and a fourth residual block group in sequence. The first and second residual block groups are used as low-level residual blocks to extract the basic visual features of text edges and textures. The third and fourth residual block groups are used as high-level residual blocks embedded in dilated convolutions to extract deep semantic features. The first residual block group outputs a C1 feature map, the second residual block group outputs a C2 feature map, the third residual block group outputs a C3 feature map, and the fourth residual block group outputs a C4 feature map. The feature pyramid fusion network described above performs multi-scale fusion of the C1, C2, C3, and C4 feature maps output by the improved ResNet-18 network, and finally outputs a fused feature map with a unified dimension. Multilingual sequence modeling layer: Converts the fused feature map into a text sequence, models the contextual dependencies between characters, and outputs a contextual text sequence.
9. The order data processing system based on multilingual intelligent recognition according to claim 8, characterized in that, The order semantic understanding module integrates natural language processing and computer vision technologies to locate the regions where key fields are located. Based on a multilingual keyword mapping library, it achieves a unified semantic mapping from different language fields to the system's standard fields, thereby obtaining structured key information data.
10. The order data processing system based on multilingual intelligent recognition according to claim 9, characterized in that, The confidence assessment model in the confidence assessment module includes: The system collects multi-source features covering order processing nodes, including OCR recognition quality features, semantic matching features, and format compliance features. Feature quantization and weighted fusion are performed, and feature scoring is unified through linear / non-linear transformation. Dynamic weights are assigned based on business priorities to calculate the initial confidence level. Dynamic calibration and optimization are performed by training logistic regression and Platt scaling models based on historical data to correct the initial score deviation.