AI-based material information processing method and device, equipment and storage medium
By preprocessing material image data and performing optical character recognition, combined with similarity calculation and matching rules, automated identification and matching of material information is achieved. This solves the problems of low efficiency, low accuracy and insufficient traceability of material information identification in existing technologies, and improves the efficiency of material receiving and inspection and the accuracy of matching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies suffer from low efficiency in material information identification, low matching accuracy, reliance on human experience, and lack of traceability, resulting in low material receiving and inspection efficiency and potential quality risks.
By acquiring and preprocessing image data of the target material, optical character recognition is performed to generate structured text recognition results, and material information is automatically identified and matched based on similarity calculation and preset matching rules.
It enables automated identification and matching of material information, improving identification efficiency, enhancing matching accuracy and reliability, providing a recordable and traceable electronic process, and reducing the risk of incorrect materials.
Smart Images

Figure CN121765401A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of warehousing and material identification technology, and in particular to an AI-based material information processing method, apparatus, equipment and storage medium. Background Technology
[0002] In the PCBA (Printed Circuit Board Assembly) manufacturing process, companies frequently receive external materials from customers (referred to as "customer-supplied materials"). These materials are the core raw materials for product assembly. Currently, the labeling information of customer-supplied materials exhibits significant non-standardization: different customers and component suppliers use label designs that lack uniformity, text layouts vary, and the distribution of key information on the label is irregular. For example, some labels place the coding information at the top, while others place it at the bottom, side, or scattered across multiple sections. Regarding coding types, some materials are labeled with a "material code" directly corresponding to the BOM (Bill of Materials) list, while others only provide an "original manufacturer code" without a clear mapping relationship. Still others do not provide any coding at all, only indicating specifications in the form of functional parameters (such as "5V 100KΩ resistor"). At the same time, the BOM lists provided by customers themselves also exhibit inconsistencies in information expression. Some entries contain complete material coding fields, while others only list technical requirements in the form of "specification descriptions" (such as "5V 100KΩ"). Against this backdrop, the material receiving, inspection and preparation operations need to match physical materials with BOM items based on the aforementioned diverse input information in order to support the smooth operation of subsequent production processes.
[0003] Under current technological conditions, matching materials with the Bill of Materials (BOM) primarily relies on manual operation, exposing numerous problems and deep-seated contradictions. Firstly, processing efficiency is low. Operators must check the physical labels of each item and manually compare them with the corresponding entries in the BOM list. The entire process is time-consuming and labor-intensive; a skilled employee needs an average of 2 to 3 hours to process 100 items, making it difficult to handle peak scenarios with large-volume material arrivals and severely impacting the overall receiving rhythm. Secondly, matching accuracy is highly dependent on individual experience. For non-verbal consistency judgments such as "original code A123 corresponds to '5V 100KΩ resistor' in the BOM" or "'100K 5V' on the label and '5V 100KΩ' in the BOM are the same specification," new employees, lacking prior knowledge, are prone to misjudgments, resulting in a mismatch rate as high as 5%–8%, creating potential quality hazards. Secondly, the ability to handle complex matching scenarios is severely inadequate. When materials only have original manufacturer codes but are not included in the BOM, or when only specifications are indicated but the BOM lacks detailed parameter descriptions, it is necessary to consult the manufacturer's manual, contact the customer for confirmation, or rely on expert intervention. A single matching process often takes more than 30 minutes, further exacerbating the operational bottleneck. Finally, the incomplete recording mechanism leads to difficulties in traceability. The manual matching process usually does not retain original image data. Once the material has undergone high-temperature processes such as baking and reflow soldering, the labels fade, carbonize, or fall off, the original information cannot be recovered. In the event of subsequent quality problems, it is impossible to provide effective evidence to support the determination of responsibility and the analysis of causes. Summary of the Invention
[0004] In view of this, embodiments of this application provide an AI-based material information processing method, apparatus, device, and storage medium, which can effectively solve the problems of low material information identification efficiency, low matching accuracy, reliance on human experience, and lack of traceability in the prior art.
[0005] In a first aspect, embodiments of this application provide an AI-based material information processing method, including: Image data of the target material is acquired, and the image data is preprocessed to obtain the image to be identified; The image to be recognized is subjected to optical character recognition processing to generate structured text recognition results; Based on the text recognition results and the preset bill of materials information, a similarity calculation is performed to determine candidate matching material items; Using preset matching rules, the candidate matching material items are matched and judged to obtain the material information identification result.
[0006] In some embodiments, acquiring image data of the target material and preprocessing the image data to obtain an image to be identified includes: The image data is converted to grayscale to obtain a grayscale image; Gaussian blur denoising processing is performed on the grayscale image to obtain a denoised image; The denoised image is then subjected to contrast enhancement processing to obtain an enhanced image; The enhanced image is binarized to obtain a binary image; Morphological operations are performed on the binary image to obtain the image to be identified.
[0007] In some embodiments, performing optical character recognition processing on the image to be recognized to generate structured text recognition results includes: Perform document image orientation classification processing on the image to be identified to obtain an overall orientation corrected image; Perform text image correction processing on the overall orientation-corrected image to obtain a text-corrected image; Perform text detection processing on the text-corrected image to obtain a set of text regions; Perform text line direction classification processing on each text region in the text region set to obtain the corresponding text line direction information; Based on the text line direction information, text recognition processing is performed on each text region to obtain structured text recognition results.
[0008] In some embodiments, the step of calculating similarity based on the text recognition result and preset bill of materials information to determine candidate matching material items includes: The target text is constructed based on the text recognition results; For each material item in the bill of materials information, extract the matching field corresponding to the material item, and construct candidate text based on the matching field; Using the length of the candidate text as the sliding window size, the sliding window is traversed over the target text according to a preset sliding step size to obtain multiple window substrings; Calculate the fusion similarity score for each window substring and the corresponding candidate text; The corresponding candidate matching material items are determined based on the fusion similarity scores of each item.
[0009] In some embodiments, calculating a fusion similarity score for each window substring and the corresponding candidate text includes: Calculate the normalized edit distance similarity, longest common sequence similarity, Jaccard similarity, and cosine similarity between the window substring and the candidate text, respectively. The similarity calculation results of each item are weighted and summed according to preset weights, and then normalized to obtain the fusion similarity score.
[0010] In some embodiments, the step of using preset matching rules to perform matching judgments on the candidate matching material items to obtain material information identification results includes: Obtain the comprehensive matching score for each candidate matching material item; Each comprehensive matching score is compared with a preset confidence threshold; When the overall matching score is greater than or equal to the confidence threshold, the corresponding candidate matching material item is determined as a valid matching material item; All valid matching material items are sorted in descending order of comprehensive matching score, and a matching suggestion list is generated. The matching suggestion list is visualized, and the matching item confirmed and selected by the user in the matching suggestion list is used as the material information identification result.
[0011] In some embodiments, the method further includes: The material information identification results, the candidate matching material items, the comprehensive matching score, and the matching process log are associated and recorded, and the recorded results are stored to form a log.
[0012] Secondly, embodiments of this application provide an AI-based material information processing device, comprising: The data processing module is used to acquire image data of the target material and preprocess the image data to obtain the image to be identified. The character recognition module is used to perform optical character recognition processing on the image to be recognized and generate structured text recognition results; The similarity calculation module is used to perform similarity calculation based on the text recognition results and the preset bill of materials information to determine candidate matching material items; The judgment module is used to perform matching judgment on the candidate matching material items using preset matching rules to obtain the material information recognition result.
[0013] Thirdly, embodiments of this application provide a terminal device, the terminal device including a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the AI-based material information processing method of the first aspect described above.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium, wherein when the computer program is executed on a processor, it implements the AI-based material information processing method of the first aspect described above.
[0015] The embodiments of this application have the following beneficial effects: Image data of the target material is acquired and preprocessed to obtain an image to be identified. Then, optical character recognition (OCR) processing is performed on the image to generate a structured text recognition result. Based on this result, a similarity calculation is performed with preset bill of materials information to determine candidate matching material items. Finally, a matching judgment is made on the candidate matching material items using preset matching rules, and the material information recognition result is output. This application achieves automated identification and matching of material information, reducing the workload of manual verification and significantly improving the efficiency of material receiving and inspection. Through image recognition and structured text analysis, the adaptability to non-standard labels is enhanced. The combination of similarity calculation and confidence judgment mechanisms improves the accuracy and reliability of matching results, reducing the risk of incorrect materials. Simultaneously, a recordable and traceable electronic matching process is formed, providing data support for quality control. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 A flowchart of an AI-based material information processing method according to an embodiment of this application is shown; Figure 2 This paper illustrates another flowchart of an AI-based material information processing method according to an embodiment of this application. Figure 3 This paper illustrates another flowchart of an AI-based material information processing method according to an embodiment of the present application. Figure 4 A schematic diagram of one structure of an AI-based material information processing device according to an embodiment of this application is shown. Detailed Implementation
[0018] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0019] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0021] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0022] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0023] Considering the problems of low efficiency in material information identification, low matching accuracy, reliance on human experience, and lack of traceability in existing technologies, an AI-based material information processing method is proposed. This method acquires and preprocesses image data of the target material to obtain an image to be identified. Optical character recognition is then performed on the image to generate a structured text recognition result. Based on this result, a similarity calculation is performed with a preset bill of materials information to determine candidate matching material items. Finally, a preset confidence judgment rule is used to determine the credibility of the candidate results, and the material information identification result is output, thereby achieving automated identification and efficient matching of material information.
[0024] The following examples illustrate the AI-based material information processing method.
[0025] Figure 1A flowchart of an AI-based material information processing method according to an embodiment of this application is shown. Exemplarily, the AI-based material information processing method includes the following steps: Step S100: Acquire image data of the target material and preprocess the image data to obtain the image to be identified.
[0026] The target material is a component, and the image data refers to the digital image information of the target material (e.g., a component) captured by an image acquisition device. Preprocessing refers to performing a series of image enhancement operations on the original image to improve the accuracy of subsequent optical character recognition. This process eliminates the effects of uneven lighting, background interference, and character breakage by performing noise reduction, contrast optimization, and structural repair on the image, and outputs a high-quality image that is more suitable for text recognition.
[0027] In an optional embodiment, step S100 includes the following sub-steps: performing grayscale processing on the image data to obtain a grayscale image; performing Gaussian blur denoising processing on the grayscale image to obtain a denoised image; performing contrast enhancement processing on the denoised image to obtain an enhanced image; performing binarization processing on the enhanced image to obtain a binary image; and performing morphological operations on the binary image to obtain the image to be recognized.
[0028] Among them, grayscale processing converts a color image into a single-channel grayscale image to reduce computational complexity; Gaussian blur denoising is used to smooth image noise and suppress high-frequency interference; contrast enhancement processing highlights the difference between text and background by adjusting the pixel intensity distribution; binarization processing converts the image into a form containing only black and white pixels, which facilitates subsequent text region extraction; morphological operations include opening and closing operations, which are used to remove small noise points and connect broken character edges.
[0029] As an example, a high-speed scanner or mobile phone is used to photograph the target material label, obtaining an RGB color image with a resolution of 1920×1080 as the raw image data. This image is then converted to an 8-bit grayscale image with pixel values ranging from 0 to 255. Next, a 5×5 Gaussian filter is applied to denoise the image, effectively reducing random noise introduced by reflections or low light. Then, the contrast-limited adaptive histogram equalization (CLAHE) algorithm is used to enhance the contrast of local areas, avoiding global overexposure. Next, Otsu's method is used to determine the threshold and convert the image into a binary image. Finally, the closing operation of a 3×3 structuring element is used to fill in broken lines in the characters, and the opening operation is used to remove isolated noise points, outputting a clear and coherent text outline image as the image to be recognized.
[0030] For example, when a material label has slight wrinkles that cause some characters to break, morphological closing operations can effectively connect the breakpoints, enabling OCR to fully recognize "TPS5430DDAR" instead of "TPS54 0DDAR", significantly improving the completeness of recognition.
[0031] In other implementations, the image acquisition device can be replaced with an industrial-grade barcode scanner or PDA device, suitable for standardized scenarios where barcodes are clear but their positions are fixed.
[0032] Step S200: Perform optical character recognition processing on the image to be recognized to generate a structured text recognition result.
[0033] The image to be recognized refers to a high-quality binary image after preprocessing. Optical character recognition processing refers to the process of automatically detecting and recognizing the text content in the image through algorithms. The structured text recognition result refers to an ordered data set containing the recognized text content and its spatial location, reading order, and other information. This process converts the visible text in the image into computable text data, providing a basis for subsequent matching with the information in the bill of materials.
[0034] In one alternative embodiment, such as Figure 2 As shown, step S200 includes the following sub-steps: S201, Perform document image orientation classification processing on the image to be recognized to obtain an overall orientation corrected image.
[0035] Document image orientation classification processing refers to the technical operation of determining whether the overall image is rotated and performing angle correction. As an example, PaddleOCR's built-in orientation classification model is used to perform four-class classification reasoning (0°, 90°, 180°, 270°) on the input image to be recognized, outputting the orientation label with the highest confidence. Then, based on this label, an affine transformation rotation is performed on the image to ensure that the text is arranged horizontally, avoiding subsequent recognition failures due to tilted shooting angles.
[0036] S202, perform text image correction processing on the overall orientation correction image to obtain the text-corrected image.
[0037] Text image correction processing refers to the non-rigid correction of geometric distortions (such as trapezoidal deformation and bending) in local text regions. As an example, a correction network based on keypoint detection (such as TPS-StnHead) is used to first locate the upper and lower boundary keypoints of the text lines, and then straighten each line of text line by line through thin plate spline transformation, eliminating distortion caused by lens perspective or label curvature.
[0038] S203, perform text detection processing on the text-corrected image to obtain a set of text regions.
[0039] Text detection processing refers to the process of locating all rectangular regions in an image that may contain text. Exemplarily, the PP-YOLOE or DB (Differentiable Binarization) algorithm is used to perform forward inference on the corrected image, outputting a set of bounding boxes with coordinates, each corresponding to one or more lines of continuous text; these bounding boxes are arranged in a logical order from top to bottom and from left to right, forming a set of text regions.
[0040] S204, Perform text line direction classification processing on each text region in the text region set to obtain the corresponding text line direction information.
[0041] The text line direction classification process refers to determining the writing direction (e.g., horizontal or vertical) of the text within each text box. As an example, the direction classification model is run separately for each cropped text sub-image to determine whether it is horizontal or vertical.
[0042] S205, based on the text line direction information, perform text recognition processing on each text region to obtain structured text recognition results.
[0043] Text recognition processing refers to the process of converting text images into strings using deep learning models. As an example, based on the directional information of each text region, an appropriate recognition model branch (such as CRNN+CTC or SRN) is dynamically selected to independently predict the character sequence for each text region, ultimately outputting a structured result in JSON format containing text content, coordinate positions, and confidence scores.
[0044] Step S300: Calculate the similarity between the text recognition results and the preset bill of materials information to determine candidate matching material items.
[0045] The preset bill of materials information refers to the BOM data obtained from the enterprise's WMS system, which includes fields such as material number and specification description. This process compares the OCR results with the BOM entries in multiple dimensions to quantify the matching degree of each entry, and filters out high-probability matching candidates to provide a basis for subsequent confidence judgment.
[0046] In one alternative embodiment, such as Figure 3 As shown, step S300 includes the following sub-steps: S301, construct the target text based on the text recognition results.
[0047] The target text refers to the long string formed by concatenating all text content recognized by OCR in logical order, which serves as the source text to be matched. For example, the structured recognition results in JSON format are extracted, and the content of each text line is extracted according to the spatial arrangement from top to bottom and left to right, using spaces as delimiters to form a single string. For instance, when OCR recognizes three lines of text: "TPS5430DDAR", "DC-DC Converter", and "SOT23-6", the system generates the target text as "TPS5430DDAR DC-DC Converter SOT23-6". This concatenation method preserves the information distribution characteristics of the original labels, avoids the omission of key information due to field misalignment, and improves matching robustness.
[0048] S302, for each material item in the bill of materials information, extract the matching field corresponding to the material item, and construct candidate text based on the matching field.
[0049] In this context, "matching fields" refer to key fields in the BOM that can be compared with label information, including material number, product model, and specification description. "Candidate text" refers to reference text for comparison, formed by combining one or more matching fields. For example, the BOM data for the current order is retrieved from the WMS interface. Each material item contains fields such as "item_code:IC102", "mpn:TPS5430DDAR", "desc1:3.3V Buck Regulator", and "desc2:SOT23-6". The system constructs candidate text using "mpn" as the primary matching field, generating "TPS5430DDAR". It also supports concatenating multiple fields.
[0050] S303, using the length of the candidate text as the sliding window size, perform sliding window traversal on the target text according to the preset sliding step size to obtain multiple window substrings.
[0051] The sliding window size refers to the length of the target text captured each time, which is equal to the length of the candidate text. The preset sliding step size is usually 1 character, meaning that each time it moves one character, it performs a local matching scan. For example, when the candidate text is "TPS5430" (length 8) and the target text is "PartNo TPS5430DDAR RevA", the system slides an 8-character window across the target text with a step size of 1, sequentially capturing "PartNo T", "artNo TP", ... up to "TPS5430", and then calculates the similarity with the candidate text. This mechanism can effectively capture locally highly similar segments, and even if the candidate text is embedded in redundant information (such as manufacturer logos or batch numbers), it can still accurately identify the best matching position.
[0052] S304, calculate the fusion similarity score for each window substring and its corresponding candidate text.
[0053] Among them, the fusion similarity score refers to the comprehensive score obtained by weighted fusion of multiple text similarity algorithms, reflecting the overall similarity between two texts. Exemplarily, four metrics are calculated in parallel at each sliding position: normalized edit distance similarity (1...). Edit distance min_len), Longest Common Subsequence Similarity (LCS) The similarity scores are calculated as follows: Lev (Lev), Jaccard similarity (intersection over union of character sets), and cosine similarity (based on character n-gram vectors). Then, a weighted sum is calculated based on preset weights (e.g., Lev:0.5, LCS:0.3, Jac:0.1, Cos:0.1), and normalized to the [0,1] interval to obtain the final fusion score. For example, when the window substring is "TPS5430D" and the candidate text is "TPS5430", despite single-character redundancy, the LCS and edit distance remain high, resulting in an overall score close to 0.9, successfully identifying it as a potential match.
[0054] S305, determine the corresponding candidate matching material items based on each fusion similarity score.
[0055] Here, candidate matching material items refer to the set of BOM entries whose fusion similarity scores exceed a basic threshold. Exemplarily, the maximum fusion similarity score achieved by each material item across all its sliding windows is used as its comprehensive matching score, and these are sorted in descending order of score. The top N items (e.g., Top-10) are selected as candidate results. For example, if the MPN of a chip is completely identical to a window in the target text, its score is 0.98, and it is ranked first; other items with lower similarity are ranked lower, facilitating subsequent confidence assessment to focus on high-priority items.
[0056] In other embodiments, this application further employs a hierarchical matching strategy, setting independent parameter sets for different matching types (such as material number, product model, and full text) to achieve fine-grained control and improve matching accuracy in complex scenarios, as shown in Table 1:
[0057] For example, (1) Material number matching: Extract the material number field in the BOM as candidate text and use OCR global text for sliding window comparison; the highest scenario weight of 2.0 is used in this scenario to ensure that once a match is successful, it dominates the ranking; the algorithm weight focuses on Levinstein distance (Lev:0.5) and longest common subsequence (LCS:0.4), while the weights of Jaccard and cosine are very low (0.05 each); the confidence threshold is set to 0.85, and the minimum length of the matched fragment is required to be no less than 5 characters; after calculating the "highest fusion similarity score" in this scenario, multiply it by its scenario weight of 2.0 to obtain the "weighted matching score".
[0058] (2) Product model matching: Extract the "MPN" or "specification description" field from the BOM as candidate text; before calculation, use regular expressions to detect whether the OCR text contains known prefix tags such as "PN", "P / N", "Model No."; if it does not start with any prefix, the similarity result of this match is multiplied by a penalty coefficient of 0.95; the weight of this scenario is 1.0, the algorithm weight is evenly distributed (Lev:0.3, LCS:0.3, Jac:0.2, Cos:0.2), the confidence threshold is set to 0.75, and the minimum length is 3; calculate the "highest fusion similarity score" in this scenario (after prefix penalty), multiply it by its scenario weight of 1.0, and get the "weighted matching score".
[0059] (3) Full text matching: used to deal with complex labels with disordered field order or scattered information; the system concatenates all texts recognized by OCR into a single string as the target text in spatial order; at the same time, it performs full permutation and combination of the three fields "material number + description 1 + description 2" of each material in BOM (such as A+B+C, A+C+B, B+A+C...) to generate multiple candidate concatenation strings; it performs sliding window similarity calculation on each candidate concatenation string and takes the maximum value among all results as the full text matching score of the material; this scenario has the lowest weight (0.6), a loose confidence threshold (0.3), and no prefix penalty; it calculates the "highest fusion similarity score" in this scenario, multiplies it by its scenario weight of 0.6, and obtains the "weighted matching score".
[0060] Ultimately, for each BOM entry, the system will obtain a maximum of three "weighted matching scores" (derived from the material number, product model, and full text matching modes, respectively). The highest value among these scores will be taken as the "overall matching score" for that BOM entry.
[0061] For example, a chip label may display "P / N: TPS5430DDAR," while the corresponding entry in the BOM contains the part number "IC_5430" and MPN "TPS5430DDAR." Although the part number is not directly matched, the product model matching score is 0.82, which, after a weighting of 1.0, is 0.82. Simultaneously, the full text matching also captures this entry, scoring 0.75, which, after a weighting of 0.6, is 0.45. Therefore, this entry's "overall matching score" is 0.82, and it is identified as a candidate matching part number.
[0062] Step S400: Using preset matching rules, the candidate matching material items are matched and judged to obtain the material information identification result.
[0063] Among them, candidate matching material items refer to a number of high-probability BOM entries output during the similarity calculation stage. This process identifies the most likely correct matching item - material identification result by screening the candidate results for credibility and prioritizing them, thereby reducing the risk of misjudgment and improving the accuracy and usability of the system output.
[0064] In an optional embodiment, step S400 includes the following sub-steps: S401, obtain the comprehensive matching score corresponding to each candidate matching material item.
[0065] The overall matching score refers to the quantitative score used to characterize the final matching quality of the BOM item. For example, all candidate material items and their corresponding overall matching scores (retained to three decimal places) are read. For instance, the score for a chip item "IC102" is 1.634 (=0.817*2.0), and the score for the resistor item "R205" is 0.432, forming a result set to be judged.
[0066] S402, compare the overall matching score with the preset confidence threshold.
[0067] The preset confidence threshold is a value between [0,1] used to distinguish between a credible match and a suspected match. For example, the global default threshold defined in the configuration center (e.g., 0.85) is loaded, and the score of each candidate is compared with it one by one. If the score is greater than or equal to the threshold, it is included in the valid set; otherwise, it is considered a no-match. For instance, when a manufacturer's code is similar to but not completely corresponding to the BOM description (e.g., a score of 0.78), it is determined to be below the standard and not included in the valid results to avoid low-quality recommendations interfering with user judgment.
[0068] S403, when the overall matching score is greater than or equal to the confidence threshold, the corresponding candidate matching material item is determined as a valid matching material item.
[0069] Here, a valid matching item refers to the candidate set that has passed the confidence screening, representing a matching result with high reliability. For example, all candidate items are traversed, and only items with a score ≥ 0.85 are retained. If no item meets the standard, it is determined that there is no high-confidence match.
[0070] S404: Sort all valid matching material items in descending order of comprehensive matching score and generate a matching suggestion list.
[0071] In this context, descending order sorting refers to reorganizing the display order of valid matches from highest to lowest based on the overall matching score as the sorting key. For example, a sorting algorithm (such as quicksort) is invoked to process the valid set, generating a result list sorted from highest to lowest score, with the original BOM field information (such as material number, description, and customer number) appended.
[0072] In other implementations, Top-N results can be returned based on business needs instead of a single recommendation, which is suitable for fuzzy scenarios with multiple reasonable matching items (such as general resistor and capacitor components), with the final decision made by a human.
[0073] S405, the matching suggestion list is visualized, and the matching item confirmed by the user in the matching suggestion list is used as the material information identification result.
[0074] Among them, the material information identification result represents the final confirmed correct matching relationship, which is used for subsequent material receiving records, data association and quality traceability.
[0075] In another optional implementation, when the comprehensive matching score of each candidate matching item calculated based on similarity does not reach the preset confidence threshold, or in response to a deep matching command triggered by the user, a high-confidence matching suggestion can be generated through an artificial intelligence matching algorithm and used as the matching result.
[0076] Among them, the artificial intelligence matching algorithm refers to a deep semantic matching mechanism that combines multimodal large-scale model reasoning, internal and external knowledge retrieval, and dynamic rule construction. It is used to solve extremely difficult matching scenarios where the label only contains the original manufacturer's code and the BOM only describes functional parameters, with no text overlap. For example, the image to be identified and the structured text recognition results are input into the multimodal large-scale model, allowing the model to analyze and determine the manufacturer and precise type of the material (e.g., "DC-DC converter" or "surface mount capacitor"). Then, based on the determination result, the model queries the pre-stored product coding rule documents in the Milvus vector database and simultaneously calls the Jina search engine to perform an online search to obtain the official specifications and naming conventions of relevant manufacturers. Next, the large-scale model is used to deduplicate, refine, and summarize the above information to generate a dynamic product coding rule description. Finally, a complex prompt word containing the material image, OCR text, dynamic rules, and the BOM item to be matched is constructed and submitted to the multimodal large-scale model for comprehensive reasoning. The model parses the technical parameters corresponding to the original manufacturer's model and performs a semantic-level comparison with the functional description in the BOM, outputting the most likely match and its reasoning basis.
[0077] In one optional embodiment, the AI-based material information processing method includes the following steps: The material information identification results, corresponding candidate material items, and comprehensive matching scores are associated and recorded, and the recorded results are stored to form a log. The associated record refers to binding and storing key data from the matching process in a structured manner to form a complete and traceable data unit; the log refers to a log table or file directory deployed on a local server or secure database for long-term storage of the historical records of receiving and inspection operations. For example, after completing step S405, the log writing process is triggered, generating a structured log entry containing fields such as timestamp, work order number, material image storage path, original OCR recognition result, target matching material item, all candidate matching items and their comprehensive matching scores, confidence threshold, and operator account, and persistently storing it in the log table of the MySQL database. For instance, when subsequent production anomalies require tracing the incoming material information of a certain chip, the entire matching process data, including the original label image and system judgment criteria, can be retrieved through the BOM entry, effectively supporting quality attribution analysis.
[0078] In other implementations, the user's actual selection results can also be recorded simultaneously to build a feedback training set, supporting the continuous optimization of subsequent algorithm parameters.
[0079] In other implementations, when business personnel report poor material matching results, scenario diagnosis can be performed to determine whether the case belongs to a "part number matching scenario," "product model matching scenario," or "full text matching scenario." If the label has an independent "P / N:XXX" code, it is classified as a part number matching scenario; if the main information is a specification description or original manufacturer's model, it is classified as a product model matching scenario. Subsequently, based on the diagnostic results, the corresponding independent parameter set is retrieved for analysis. In the case of location, the entire process log of this operation is reviewed to analyze the performance of each basic similarity algorithm (normalized edit distance, longest common subsequence, Jaccard, cosine) in this calculation. Based on the analysis results, calibration operations are performed on the relevant parameters. Weight calibration refers to adjusting the preset weights of each algorithm: for algorithms that contribute stably to correct matching cases, their weights can be appropriately increased; for those that frequently generate false alarms, their weights are decreased. For example, in the "part number matching scenario," if it is found that Jaccard similarity generates a large number of false alarms due to ignoring the order, its weight can be further reduced from 0.05 to 0.02. Threshold fine-tuning refers to adjusting the confidence threshold in this scenario to meet the business requirements for matching strictness; increasing the threshold makes it stricter, while decreasing it makes it more lenient. Finally, all parameter adjustments need to be iteratively verified; that is, the new parameters are used to perform backtracking calculations on a representative sample set including the target case to ensure that the matching results of the target problem are improved and consistent with human judgment, while not negatively affecting other known correct cases.
[0080] Figure 4 A schematic diagram of an AI-based material information processing apparatus according to an embodiment of this application is shown. Exemplarily, the apparatus 100 includes: The data processing module 110 is used to acquire image data of the target material and preprocess the image data to obtain an image to be identified. Character recognition module 120 is used to perform optical character recognition processing on the image to be recognized and generate structured text recognition results; The similarity calculation module 130 is used to perform similarity calculation based on the text recognition result and the preset bill of materials information to determine candidate matching material items; The judgment module 140 is used to perform matching judgment on the candidate matching material items using preset matching rules to obtain material information recognition results.
[0081] It is understood that the apparatus of this embodiment corresponds to the method of the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.
[0082] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the above-described method or apparatus.
[0083] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0084] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0085] This application also provides a computer-readable storage medium for storing the computer program used in the aforementioned terminal device. For example, the computer-readable storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0086] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0087] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0088] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0089] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An AI-based material information processing method, characterized by, The method comprises: acquire image data of the target material, and pre-process the image data to obtain a to-be-recognized image; perform optical character recognition processing on the to-be-recognized image to generate a structured text recognition result; based on the text recognition result and preset material list information, perform similarity calculation to determine a candidate matching material item; using a preset matching rule, perform matching judgment on the candidate matching material item to obtain a material information recognition result. 2.The AI-based material information processing method of claim 1, wherein The acquisition of the image data of the target material and the pre-processing of the image data to obtain the to-be-recognized image comprises: performing grayscale processing on the image data to obtain a grayscale image; performing Gaussian blur denoising processing on the grayscale image to obtain a denoised image; performing contrast enhancement processing on the denoised image to obtain an enhanced image; performing binaryzation processing on the enhanced image to obtain a binary image; performing morphological operation processing on the binary image to obtain the to-be-recognized image. 3.The AI-based material information processing method of claim 1, wherein The optical character recognition processing on the to-be-recognized image to generate a structured text recognition result comprises: performing document image direction classification processing on the to-be-recognized image to obtain an overall direction corrected image; performing text image correction processing on the overall direction corrected image to obtain a text corrected image; performing text detection processing on the text corrected image to obtain a text region set; performing text line direction classification processing on each text region in the text region set respectively to obtain corresponding text line direction information; based on the text line direction information, performing text recognition processing on each text region to obtain a structured text recognition result. 4.The AI-based material information processing method of claim 1, wherein The similarity calculation based on the text recognition result and the preset material list information to determine a candidate matching material item comprises: constructing a target text based on the text recognition result; for each material item in the material list information, extracting a matching field corresponding to the material item, and constructing a candidate text based on the matching field; taking the text length of the candidate text as a sliding window size, performing sliding window traversal on the target text according to a preset sliding step to obtain a plurality of window subsequences; calculating a fusion similarity score for each window subsequence and the corresponding candidate text respectively; determining the corresponding candidate matching material item according to the fusion similarity scores. 5.The AI-based material information processing method of claim 4, wherein, The calculation of the fusion similarity score for each window subsequence and the corresponding candidate text respectively comprises: calculating the normalized edit distance similarity, the longest common sequence similarity, the Jaccard similarity and the cosine similarity between the window subsequence and the candidate text respectively; performing weighted summation processing on each similarity calculation result according to a preset weight, and obtaining a fusion similarity score after normalization processing. 6.The AI-based material information processing method of claim 1, wherein The matching judgment on the candidate matching material item using the preset matching rule to obtain a material information recognition result comprises: acquiring a comprehensive matching score corresponding to each candidate matching material item; comparing each comprehensive matching score with a preset confidence threshold value; when the comprehensive matching score is greater than or equal to the confidence threshold value, determining the corresponding candidate matching material item as an effective matching material item; Rank all the valid matched material items in descending order of the comprehensive matching scores to generate a matching suggestion list; Visualize the matching suggestion list, and take the matching item selected by the user in the matching suggestion list as the material information recognition result. 7.The AI-based material information processing method of claim 1, wherein, The method further includes: Correlatively record the material information recognition result, the candidate matching material item, the comprehensive matching score, and the matching process log, and store the record result to form a log.
8. An AI-based material information processing apparatus, characterized by comprising: Comprise: A data processing module configured to obtain image data of a target material and pre-process the image data to obtain a to-be-recognized image; A character recognition module configured to perform optical character recognition processing on the to-be-recognized image to generate a structured text recognition result; A similarity calculation module configured to perform similarity calculation based on the text recognition result and preset material list information to determine a candidate matching material item; A judgment module configured to perform matching judgment on the candidate matching material item by using a preset matching rule to obtain a material information recognition result.
9. A terminal device, comprising: The terminal device comprises a processor and a memory, the memory stores a computer program, and the processor is configured to execute the computer program to implement the AI-based material information processing method in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer program is stored in the memory and is executed on the processor to implement the AI-based material information processing method in any one of claims 1-7.