ERP purchase and sale and stock data processing method and system based on machine learning

By processing multi-source data in the ERP system through machine learning, sales forecasting and procurement optimization are performed, and inventory thresholds are dynamically adjusted. This solves the problem of inventory management inadequacy caused by reliance on human experience in existing technologies, and realizes closed-loop control of intelligent inventory management and risk response.

CN123032284APending Publication Date: 2026-11-03HANGZHOU YONGLI ZHIHANG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611229045.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing ERP systems rely on human experience in sales, procurement, and inventory management, and cannot quantitatively combine the influence of multiple factors to forecast demand and control inventory, resulting in stockouts, overstocking, and inventory thresholds that are not adapted to market changes.

Method used

Machine learning technology is used to aggregate and standardize multi-source heterogeneous data, perform sales forecasting and procurement plan optimization, dynamically calculate inventory thresholds, identify abnormal risks, and generate early warning information and rectification work orders.

Benefits of technology

It enables intelligent coordination between sales demand and procurement quantity, dynamically adjusts inventory thresholds, reduces the risk of stockouts and backlogs, and improves the adaptability and anomaly response efficiency of inventory management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123032284A_ABST
    Figure CN123032284A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of enterprise ERP intelligent data processing, and discloses an ERP purchase, sale and inventory data processing method and system based on machine learning, wherein the method comprises the following steps: acquiring enterprise purchase, sale and inventory multi-source heterogeneous data, eliminating invalid redundant data, and obtaining converged data; performing OCR analysis, NLP identification, field correction, information completion, code unification and abnormal marking on the converged data to obtain standardized business data; performing time sequence sales volume prediction according to the standardized business data to obtain a demand prediction interval of each SKU material; and performing purchase quantity, purchase time point and supplier combination optimization based on the demand prediction interval to obtain a purchase scheme. The application adopts an AI time sequence sales volume prediction and purchase scheme optimization technical scheme, achieves the technical effects of demand quantitative prediction and intelligent generation of purchase decision, realizes the collaborative matching of sales demand, purchase quantity and replenishment time point, and solves the shortages of lack of goods and overstock caused by artificial experience judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of enterprise ERP intelligent data processing technology, specifically involving an ERP purchasing, sales and inventory data processing method and system, electronic equipment and storage medium based on machine learning, which can be applied to purchasing, sales and inventory data governance, demand forecasting and intelligent inventory management scenarios in manufacturing and trading enterprises. Background Technology

[0002] In the context of collaborative management of sales, procurement, and inventory in enterprise ERP systems, it is necessary to unify orders, purchase orders, receiving slips, outbound slips, inventory ledgers, and supplier delivery dates, and support material demand forecasting, procurement plan generation, and inventory threshold control. The core technical challenge lies in how to leverage AI to perform linked analysis of sales trends, procurement cycles, and inventory consumption, thereby improving the adaptive capabilities of supply and demand matching and inventory management.

[0003] Currently, traditional ERP systems mainly rely on manual data entry, manual setting of safety stock, and manual viewing of reports to complete sales statistics, procurement plans, and inventory warnings. They generate reminders or approval tasks according to fixed rules, and business personnel adjust procurement quantities and replenishment times based on experience.

[0004] However, existing technologies have significant limitations in practical applications. On the one hand, sales demand, procurement quantities, and replenishment timing still rely on personnel experience for judgment, making it impossible to make quantitative predictions based on historical sales patterns, seasonal fluctuations, promotional impacts, and supply chain cycles. This can easily lead to stockouts of popular materials, customer delivery defaults, and stockpiling of slow-moving materials, resulting in increased capital tied up in inventory. On the other hand, inventory upper and lower limits and safety stock are mostly fixed parameters, and the thresholds cannot be dynamically adjusted based on sales fluctuations, procurement lead times, supplier delivery stability, and warehousing costs. Market changes can easily lead to wasted excess inventory funds or production halts due to stockouts. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a machine learning-based ERP purchasing, sales, and inventory data processing method and system, electronic equipment, and storage media, primarily solving the following technical problems: First, purchasing, sales, and inventory documents are multi-sourced and heterogeneous, with inconsistent formats and standards, resulting in low data governance efficiency, high error rates, and inability to be directly used for intelligent analysis; second, demand forecasting and procurement decisions rely on human experience, making it difficult to quantify and match the impact of multiple factors such as seasons, promotions, and supply chains, easily leading to stockouts and overstocking; third, safety stock and inventory upper and lower limits are fixed parameters, unable to be dynamically adjusted according to demand fluctuations, delivery date changes, and cost structures, resulting in insufficient adaptability of inventory management; fourth, there is a lack of proactive identification and closed-loop handling mechanisms for procurement, supplier, and inventory anomalies, leading to delayed risk response.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides an ERP purchasing, sales, and inventory data processing method based on machine learning, comprising:

[0008] Acquire heterogeneous data on enterprise purchasing, sales, and inventory from multiple sources, remove invalid and redundant data, and obtain aggregated data;

[0009] The aggregated data is subjected to OCR parsing, NLP recognition, field correction, information completion, encoding unification, and anomaly marking to obtain standardized business data;

[0010] Based on the standardized business data, time-series sales forecasts are performed to obtain the demand forecast range for each SKU material.

[0011] Based on the demand forecast range, the procurement quantity, procurement timing, and supplier combination are optimized to obtain a procurement plan;

[0012] Dynamic safety stock calculations are performed on the standardized business data and procurement plans to obtain the upper and lower limits of inventory and safety stock values ​​for each SKU material;

[0013] Based on the aforementioned procurement plan, inventory upper and lower limits, and safety stock value, abnormal risks are identified to obtain early warning information and rectification work orders;

[0014] Based on the aforementioned demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information, and rectification work orders, the ERP database is written back to obtain the ERP sales, procurement, and inventory data processing results.

[0015] Preferably, the aggregated data undergoes OCR parsing, NLP recognition, field correction, information completion, encoding standardization, and anomaly marking to obtain standardized business data, including:

[0016] OCR parsing is performed on the image-type documents and text-type documents in the aggregated data to obtain the document text data;

[0017] The document text data is subjected to NLP recognition to extract the material name, specifications, quantity, unit price, date, supplier, and document type fields, thus obtaining the field extraction data;

[0018] The extracted data from the fields is subjected to field format validation and field association validation to correct erroneous fields and complete missing text fields, resulting in corrected and completed data;

[0019] The material name, specifications, and document type in the correction and completion data are coded and matched to obtain unified coded data;

[0020] The unified coded data is marked for unit price anomalies, quantity anomalies, inbound / outbound anomalies, and duplicate documents to obtain standardized business data.

[0021] Preferably, based on the standardized business data, time-series sales forecasting is performed to obtain the demand forecast range for each SKU material, including:

[0022] The standardized business data is divided into SKU material dimensions to obtain the historical sales data of each SKU material;

[0023] Based on the historical sales data, sort it by time and correlate it with seasonal factors, promotional activities, raw material prices and market conditions to obtain the sales forecast input data;

[0024] Based on the sales forecast input data, periodic patterns are learned to obtain the sales change characteristics of each SKU material.

[0025] The predicted demand for each SKU material is obtained by forecasting future demand based on the aforementioned sales change characteristics.

[0026] The predicted demand is categorized into operational strategies to obtain the demand forecast range for each SKU material.

[0027] Preferably, dynamic safety stock calculation is performed on the standardized business data and procurement plan to obtain the upper and lower limits of inventory and the safety stock value for each SKU material, including:

[0028] The material sales volatility, procurement lead time volatility, stockout loss cost, and warehousing inventory cost in the standardized business data are statistically analyzed to obtain inventory calculation parameters.

[0029] Calculate the safety stock value of each SKU material based on the aforementioned inventory calculation parameters and procurement plan to obtain the dynamic safety stock result;

[0030] Based on the dynamic safety stock results, current inventory levels, and in-transit procurement quantities, determine the lower and upper limits of inventory for each SKU material.

[0031] Preferably, based on the procurement plan, inventory upper and lower limits, and safety stock value, abnormal risks are identified to obtain early warning information and rectification work orders, including:

[0032] The procurement quantity and timing in the procurement plan are used to identify over-purchases, resulting in abnormal procurement data.

[0033] Delayed delivery is identified for the supplier combinations in the procurement plan to obtain abnormal supplier data.

[0034] The inventory upper and lower limits and safety stock values ​​are used to identify inventory below the safety threshold, inventory backlog, and unsold materials to obtain abnormal inventory data.

[0035] The abnormal procurement data, abnormal supplier data, and abnormal inventory data are classified into risk levels to obtain early warning information;

[0036] The warning information is matched with responsible parties and processing items are generated to obtain a rectification work order.

[0037] Preferably, based on the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information, and rectification work orders, the ERP sales, procurement, and inventory data processing results are written back to the ERP database, including:

[0038] SKU material matching is performed on the demand forecast range to obtain sales forecast write-back data;

[0039] The procurement plan is broken down by procurement quantity, procurement timing, and supplier combination to obtain procurement requisition write-back data;

[0040] The SKU material correspondence is verified for the upper and lower limits of inventory and the safety stock value to obtain inventory parameter write-back data;

[0041] The warning information and rectification work orders are matched with the anomaly type and the responsible party to obtain anomaly handling write-back data;

[0042] Based on the sales forecast write-back data, purchase requisition write-back data, inventory parameter write-back data, and anomaly handling write-back data, the ERP database is written back to obtain the ERP sales, purchase, and inventory data processing results.

[0043] Preferably, the extracted data from the fields undergoes field format validation and field association validation to correct erroneous fields and complete missing text fields, resulting in corrected and completed data, including:

[0044] The material name, specifications, quantity, unit price, date, supplier, and document type fields in the extracted data are used to identify missing field data.

[0045] The quantity, unit price, and date fields extracted from the field are validated for their format to obtain data with abnormal formats.

[0046] Perform field association validation on the material name, specifications, supplier, and document type fields in the extracted data to obtain data on fields with abnormal associations.

[0047] Based on the missing field data, format-abnormal field data, and association-abnormal field data, the extracted field data is corrected for errors and missing text fields are filled in to obtain corrected and completed data.

[0048] Preferably, based on the sales forecast input data, periodic pattern learning is performed to obtain the sales change characteristics of each SKU material, including:

[0049] The sales forecast input data is arranged according to SKU material and time order to obtain sales time series data;

[0050] By establishing the correspondence between historical sales, seasonal factors, promotional activities, raw material prices, and market conditions in the aforementioned sales time series data, multidimensional time series correlation data is obtained.

[0051] The sales peak, sales trough and sales continuous change trend are identified in the multidimensional time-series correlation data to obtain sales fluctuation data.

[0052] The recurring variation patterns of the sales fluctuation data are extracted to obtain periodic sales pattern data;

[0053] Based on the periodic sales data, the sales growth characteristics, sales decline characteristics, and sales stability characteristics of each SKU are determined, thus obtaining the sales change characteristics of each SKU.

[0054] Preferably, delayed delivery is identified for the supplier combination in the procurement plan to obtain abnormal supplier data, including:

[0055] Supplier delivery dates are extracted from the supplier combinations in the procurement plan to obtain supplier delivery date data.

[0056] The estimated delivery time is obtained by calculating the delivery time based on the procurement timing and supplier delivery date data in the procurement plan.

[0057] The estimated delivery time and the corresponding demand time of the procurement plan are compared to obtain delivery deviation data.

[0058] The arrival deviation data is used to determine the risk of delay, and the delayed supplier data is obtained.

[0059] Based on the delayed supplier data, the supplier combination is marked as abnormal to obtain supplier abnormal data.

[0060] Secondly, the present invention provides an ERP purchasing, sales, and inventory data processing system based on machine learning, comprising:

[0061] The data aggregation module is used to acquire heterogeneous data from multiple sources related to enterprise purchasing, sales and inventory, remove invalid and redundant data, and obtain aggregated data.

[0062] The data standardization module is used to perform OCR parsing, NLP recognition, field correction, information completion, encoding unification, and anomaly marking on the aggregated data to obtain standardized business data.

[0063] The sales forecasting module is used to perform time-series sales forecasting based on the standardized business data to obtain the demand forecast range for each SKU material.

[0064] The procurement optimization module is used to optimize the procurement quantity, procurement timing, and supplier combination based on the demand forecast range to obtain a procurement plan.

[0065] The inventory calculation module is used to perform dynamic safety stock calculations on the standardized business data and procurement plans to obtain the upper and lower limits of inventory and safety stock values ​​for each SKU material.

[0066] The anomaly identification module is used to identify abnormal risks based on the procurement plan, upper and lower limits of inventory, and safety stock value, and to obtain early warning information and rectification work orders;

[0067] The data write-back module is used to write back the ERP database based on the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information and rectification work orders to obtain the ERP sales, procurement and inventory data processing results.

[0068] Thirdly, the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in the first aspect.

[0069] Fourthly, the present invention provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method in the first aspect.

[0070] The present invention has the following beneficial effects: 1. Efficient standardization of multi-source data: Through joint parsing of OCR+NLP, field correction and completion, and unified coding, the automatic standardization and management of heterogeneous documents is achieved, improving data quality and processing efficiency, and reducing manual processing costs; 2. Precise matching of supply and demand: Based on machine learning time series prediction, multiple demand ranges are output, and procurement plans are generated by combining multiple constraints to achieve intelligent coordination of sales demand, procurement quantity and replenishment time, thereby reducing the risk of stockouts and backlogs; 3. Dynamically adapting inventory thresholds: By combining demand fluctuations, delivery time fluctuations, and cost trade-offs, safety stock and upper and lower limits are dynamically calculated to achieve differentiated inventory management for different SKUs, balancing supply assurance capabilities and inventory capital occupation; 4. Closed-loop management of abnormal risks: Proactively identify three types of abnormalities: procurement, suppliers, and inventory, issue tiered warnings and generate rectification work orders to improve risk response efficiency and achieve a process-oriented closed loop for abnormal handling. Attached Figure Description

[0071] Figure 1 A flowchart of an ERP purchasing, sales and inventory data processing method based on machine learning provided in an embodiment of the present invention.

[0072] Figure 2 A standardized business data generation flowchart provided for embodiments of the present invention.

[0073] Figure 3 A flowchart for generating early warning information and rectification work orders provided in this embodiment of the invention.

[0074] Figure 4 The diagram below illustrates the structure of an ERP purchasing, sales, and inventory data processing system based on machine learning, as provided in this embodiment of the invention. Detailed Implementation

[0075] To enable those skilled in the art to understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should fall within the scope of protection of the present invention.

[0076] The present invention will now be described in detail with reference to the accompanying drawings:

[0077] According to the first aspect of this application, this application provides a machine learning-based method for processing ERP purchasing, sales, and inventory data. Figure 1 This is a flowchart illustrating the ERP purchasing, sales, and inventory data processing method based on machine learning provided in the embodiments of this application. Figure 1 As shown, the ERP sales, procurement, and inventory data processing method is applicable to enterprise ERP sales, procurement, and inventory collaborative management scenarios, especially those involving paper contracts, image documents, non-standard Excel ledgers, orders, purchase requisitions, receiving slips, issuing slips, inventory ledgers, supplier delivery records, and financial price records. This method aggregates, cleans, standardizes, forecasts sales, optimizes procurement, calculates dynamic safety stock, identifies anomalies and risks, and writes back to the ERP database, creating a closed loop for sales demand forecasting, procurement plan generation, inventory threshold adjustment, and anomaly handling.

[0078] In this implementation, the multi-source heterogeneous data of enterprise sales, purchases, and inventory refers to structured, semi-structured, and unstructured data generated during the enterprise's sales, purchase, and inventory operations. Structured data includes ERP order forms, purchase orders, inbound and outbound slips, inventory balance sheets, supplier master data sheets, material master data sheets, and price lists. Semi-structured data includes non-standard Excel ledgers, CSV lists, email bodies, electronic contract texts, and supplier delivery feedback documents. Unstructured data includes scanned copies of paper contracts, image documents, photographed inbound vouchers, delivery note images, invoice images, and images of handwritten notes.

[0079] In this implementation, SKU materials refer to the smallest inventory management object determined in the ERP system based on material code, specifications, unit of measurement, and business attributes. Demand forecast range refers to the range of demand for each SKU material within the future business cycle, which may include conservative, neutral, and aggressive demand. Procurement plan refers to the procurement quantity, timing, and supplier combination generated based on the demand forecast range, inventory status, in-transit procurement quantity, supplier delivery date, minimum order quantity, procurement price, warehousing costs, and capital occupation costs. Inventory upper and lower limits and safety stock values ​​are dynamically calculated inventory control parameters for each SKU material, used to assess replenishment, early warning, overstocking, and stockout risks. Early warning information refers to risk alert data generated after identifying procurement anomalies, inventory anomalies, and supplier anomalies. Rectification work orders refer to pending task data generated after determining the responsible parties and handling matters based on early warning information. ERP sales, procurement, and inventory data processing results refer to the collection of sales forecast data, purchase requisition data, inventory parameter data, anomaly handling data, and business linkage records generated after being written back from the ERP database.

[0080] The ERP purchasing, sales, and inventory data processing method based on machine learning in this embodiment includes the following steps:

[0081] S1. Obtain heterogeneous data on enterprise purchases, sales, and inventory from multiple sources, remove invalid and redundant data, and obtain aggregated data.

[0082] In this step, enterprise sales, procurement, and inventory data are acquired through data source access methods. These methods include database interface access, ERP interface access, file directory monitoring access, message queue access, API interface access, and image upload access. For structured data in the ERP system, order, procurement, inventory, and supplier records are read through database views, business interfaces, or data synchronization tasks. For non-standard Excel ledgers, worksheets, row and column headers, merged cells, and cell values ​​are read through a file parser. For scanned copies of paper contracts and image documents, image files are obtained through an image input interface. For electronic contracts and email text, the original text content is obtained through a text parsing interface.

[0083] In one implementation, the collected raw data is represented as a dataset:

[0084] ,

[0085] in, This represents a collection of heterogeneous data from multiple sources related to enterprise purchasing, sales, and inventory. Indicates the first One piece of raw data, This represents the total number of original data entries. Each original data entry... It should include at least the data source identifier, file type, business time, upload time, data content, business department, and data summary.

[0086] After acquiring heterogeneous data from multiple sources related to enterprise purchasing, sales, and inventory, the data from different data sources is first converted using a unified transmission protocol. For database table data, fields are mapped to unified field descriptions; for Excel data, the row and column structure is converted into table records; for images and scanned documents, file path, image resolution, upload time, and business source are used to form image metadata; for text data, the text encoding is unified to a standard encoding format. After completing the protocol conversion, the original data undergoes data source verification, file integrity verification, and duplicate verification.

[0087] When removing invalid and redundant data, the original data is processed as follows: Empty files, corrupted files, unreadable files, and data with severely missing or unparseable fields are removed as invalid data; data with identical content, identical document numbers, and older version times are removed as redundant data; data where the same document appears repeatedly from different sources is retained as the master record and marked as a copy; data whose business time is outside the scope of the enterprise ERP statistics is isolated and marked. The aggregated data obtained after these removals is represented as follows:

[0088] ,

[0089] in, This indicates the aggregation of data. Indicates the first The aggregated business data This indicates the total number of aggregated data.

[0090] The aggregated data is generated from heterogeneous multi-source data on enterprise purchasing, sales, and inventory through access, protocol conversion, integrity verification, duplicate verification, and invalid data removal. The aggregated data includes structured business records, semi-structured ledger records, image-based document records, and text-based document records.

[0091] S2. Perform OCR parsing, NLP recognition, field correction, information completion, encoding unification, and anomaly marking on the aggregated data to obtain standardized business data.

[0092] In this step, text recognition and semantic field extraction are performed on image and text documents in the aggregated data. The extracted business fields are then validated, corrected, completed, encoded, matched, and anomaly marked to convert data from different sources, formats, and definitions into standardized business data that can be calculated by the ERP system.

[0093] S21. Perform OCR parsing on the image-type documents and text-type documents in the aggregated data to obtain document text data.

[0094] Image-based documents include scanned copies of contracts, purchase orders, delivery notes, inbound slips, outbound slips, and invoices. Text-based documents include electronic contracts, email bodies, non-standard Excel exported text, and supplier delivery feedback text. When performing OCR parsing on image-based documents, image preprocessing is performed first. Image preprocessing includes grayscale conversion, noise reduction, skew correction, edge enhancement, page segmentation, and table line recognition. Grayscale conversion reduces the impact of color differences on text recognition; noise reduction removes scanning noise; skew correction restores the horizontal alignment of the document text; page segmentation distinguishes the title area, table area, signature area, and remarks area; and table line recognition determines the cell position.

[0095] After image preprocessing, text regions in the image are detected and recognized to obtain text blocks, text coordinates, recognition confidence scores, and text order. For tabular documents, the table structure is reconstructed based on row lines, column lines, text coordinates, and relative cell positions; for contract documents, the text structure is reconstructed based on paragraph spacing, title keywords, and clause numbers. Text-based documents do not require image text recognition, but they do require standardized encoding, line breaks, space cleanup, punctuation standardization, and paragraph segmentation.

[0096] The document text data is represented as follows:

[0097] ,

[0098] in, This represents the text data of the document. Indicates the first The document text, This indicates the number of document texts. Each document text... This includes text content, text source, text location, page layout, table structure, identification confidence level, and corresponding aggregated data identifier.

[0099] The document text data is obtained from image-type and text-type documents in the aggregated data through OCR parsing and text structuring processing. It contains text content and page layout relationships that can be recognized by NLP, providing a foundation for the generation of field extraction data.

[0100] S22. Perform NLP recognition on the document text data to extract the material name, specifications, quantity, unit price, date, supplier, and document type fields to obtain field extraction data.

[0101] In this step, the document text data undergoes word segmentation, part-of-speech tagging, entity recognition, relation extraction, and field attribution determination. Word segmentation is used to divide continuous text into word sequences; entity recognition is used to identify material name, specifications, quantity, unit price, date, and supplier; relation extraction is used to determine which material a certain quantity, unit price, and specification belong to; and field attribution determination is used to identify the document type and the business meaning of each field in the document.

[0102] For tabular documents, fields are extracted based on header names, column positions, and cell contents. For example, if a column header contains the semantics of "Material," "Product Name," or "Item Name," that column is identified as a Material Name column; if a column header contains the semantics of "Model," "Specification," or "Specification Model," that column is identified as a Specification Model column; and if a column header contains the semantics of "Quantity," "Number of Pieces," or "Purchase Quantity," that column is identified as a Quantity column. For contract documents, supplier names, material terms, purchase quantities, price terms, and delivery dates are identified based on semantic context. For email texts, fields are extracted based on the sender's name, promised delivery date in the body, material description, and quantity description.

[0103] Data extracted from fields is represented as follows:

[0104] ,

[0105] in, Indicates that data is extracted from the field. Indicates the first Extract records from the field. This indicates the total number of records extracted for each field. Each field can be used to extract records. This includes material name, specifications, quantity, unit price, date, supplier, document type, field source, field confidence level, and original text fragment.

[0106] The extracted field data is generated from the document text data through NLP recognition and field attribution determination, and includes the basic fields required for subsequent field format verification, field association verification, code matching and anomaly marking.

[0107] S23. Perform field format validation and field association validation on the extracted data of the field, correct erroneous fields, and complete missing text fields to obtain corrected and completed data.

[0108] S231. Perform field integrity identification on the material name, specifications, quantity, unit price, date, supplier, and document type fields in the extracted data to obtain the missing field data.

[0109] Configure field integrity templates for various document types. Purchase orders require material name, specifications, quantity, unit price, date, and supplier fields; receiving orders require material name, specifications, quantity, date, and supplier fields; outbound orders require material name, specifications, quantity, date, and document type fields; sales orders require material name, specifications, quantity, unit price, date, and customer-related fields. Compare the extracted field data with the corresponding document type's field integrity template. If a field is empty, has a confidence level below a preset threshold, has an obviously abnormal character length, or its content is unrecognizable, mark that field as missing.

[0110] Missing field data includes the missing field name, the document to which it belongs, the material line to which it belongs, the reason for the missing field, the field confidence level, and the source of candidate completion.

[0111] S232. Perform field format validation on the quantity, unit price, and date fields extracted from the field data to obtain data of fields with abnormal formats.

[0112] Field format validation is used to determine whether field values ​​meet the calculable format of the ERP system. Quantity fields need to be convertible to numeric data and the unit of measurement needs to be recognized; unit price fields need to be convertible to monetary data and the currency and tax rate need to be recognized; date fields need to be convertible to a unified date format. If a quantity field contains unrecognizable characters, quantity and unit are stuck together and cannot be separated, a unit price field has obvious misrecognized symbols, or a date field has disordered year-month-day order, data with an abnormal format will be generated.

[0113] In one implementation, the format confidence of the field value is calculated:

[0114] ,

[0115] in, Retrieve records from the specified field Middle field The format confidence level, This indicates the confidence level of the field type match. This indicates the confidence level of the range of field values. This indicates the confidence level of the field unit match. , and This represents the weighting coefficient.

[0116] The format exception field data includes the exception field name, exception field value, exception type, format confidence level, candidate correction value, and the document to which it belongs.

[0117] S233. Perform field association verification on the material name, specifications, supplier and document type fields in the extracted data to obtain the data of fields with abnormal association.

[0118] Field association validation is used to determine whether the business relationships between different fields are consistent. It matches material names and specifications to determine if a material name corresponds to the current specification; it matches suppliers and material names to determine if the supplier is allowed to supply the material; it matches document types and field combinations to determine if the document type should contain the corresponding fields; and it matches quantities and document types to determine if the business direction of the quantity field in purchase orders, receiving orders, and issuing orders is consistent.

[0119] In one implementation, the field association score is represented as:

[0120] ,

[0121] in, Retrieve records from the specified field The field-related score, This indicates the score for matching the material name and specifications. This indicates the supplier and material matching score. This indicates the score for matching document type and field combination. , and This represents the weighting coefficient.

[0122] If the field association score is lower than the preset association threshold, association anomaly field data is generated. Association anomaly field data includes association anomaly type, conflicting fields, candidate correct fields, association score, and original text evidence.

[0123] S234. Based on the missing field data, format error field data, and association error field data, perform error field correction and text missing field completion on the extracted field data to obtain corrected and completed data.

[0124] When completing missing data fields, candidate values ​​are prioritized from other locations within the same document, related documents within the same business chain, ERP material master data, and supplier master data. If an inbound order lacks a supplier field, it is completed using the supplier field in the corresponding purchase order; if an outbound order lacks a specification / model field, it is completed by matching the material name with the ERP material master data; if a date field lacks a year, it is completed by combining the document upload time and the business period.

[0125] When correcting erroneous fields, candidate values ​​are sorted based on data from fields with formatting errors and fields with association errors. The candidate value sorting comprehensively considers OCR confidence, field format confidence, field association score, and ERP master data matching score. The overall score of the candidate corrected values ​​is expressed as follows:

[0126] ,

[0127] in, Indicates candidate correction value The overall score, This represents the OCR recognition confidence level of the candidate correction value. The format confidence level of the candidate correction value. This represents the correlation score of the candidate correction value. This represents the matching score between the candidate correction value and the ERP master data. , , and This represents the weighting coefficient.

[0128] The corrected and completed data is generated from field extraction data, missing field data, format-abnormal field data, and association-abnormal field data. It includes the corrected material name, specifications, quantity, unit price, date, supplier, document type, correction source, completion source, and field confidence level.

[0129] S24. The material name, specifications and document type in the correction and completion data are coded and matched to obtain unified coded data.

[0130] Encoding matching is used to convert different descriptions of the same material, specification, and document type from different sources into a unified ERP code. It reads ERP material master data, specification dictionary, alias mapping table, and document type dictionary. For material names, it performs synonym consolidation, abbreviation expansion, Chinese full name matching, English name matching, and historical alias matching; for specifications, it performs character standardization, unit unification, special symbol unification, and model segment splitting; and for document types, it performs business semantic matching, assigning "Purchase Requisition," "Purchase Order," and "Purchase Order" to the corresponding ERP purchase document codes.

[0131] For material code matching, text similarity, specification consistency, and supplier supply relationship are used for joint judgment. The material code matching score is expressed as follows:

[0132] ,

[0133] in, Retrieve records from the specified field and candidate encoding The encoding matching score, This indicates the score for matching the material name. This indicates the score for matching specifications and models. This indicates the score for matching supplier supply relationships. , and This represents the weighting coefficient.

[0134] The unified coding data includes ERP material codes, specification and model codes, document type codes, original field values, standard field values, code matching scores, and matching sources. The unified coding data is generated by matching corrected and completed data with ERP master data, providing a consistent standard for anomaly labeling and time-series sales forecasting.

[0135] S25. Mark the unified coded data for unit price anomalies, quantity anomalies, inbound / outbound anomalies, and duplicate documents to obtain standardized business data.

[0136] Anomaly flags are used to identify data quality issues that affect subsequent forecasting and procurement optimization. For unit price anomaly identification, the current unit price is compared with the historical purchase price, sales price, tiered price, and recent median price for the same SKU material. If the deviation exceeds a preset price fluctuation range, it is flagged as a unit price anomaly. For quantity anomaly identification, the current quantity is compared with the historical order quantity, purchase quantity, inbound / outbound quantity, and inventory change range for the same SKU material. If the quantity significantly exceeds the historical business range or does not match the business documents, it is flagged as a quantity anomaly. For inbound / outbound anomaly identification, the consistency of quantity direction and inventory balance changes between inbound and outbound slips and the inventory ledger is verified. For duplicate document flagging, a fingerprint is generated based on the document number, material code, quantity, date, supplier, and amount. If the fingerprints are identical or highly similar, the document is flagged as a duplicate.

[0137] Standardized business data is represented as follows:

[0138] ,

[0139] in, Represents standardized business data. Indicates SKU material In time Corresponding standardized business records, Indicates the quantity of SKU materials. This represents a set of business time periods. Standardized business data includes SKU material code, material name, specifications, quantity, unit price, date, supplier, document type, inbound / outbound direction, inventory quantity, anomaly flags, and field confidence levels.

[0140] Standardized business data is generated from unified coded data through unit price anomalies, quantity anomalies, inbound / outbound anomalies, and duplicate document markings. It features unified material codes, unified document definitions, unified statistical definitions, and abnormal quality identifiers.

[0141] S3. Based on the standardized business data, perform time-series sales forecasting to obtain the demand forecast range for each SKU material.

[0142] In this step, based on standardized business data, historical sales data, seasonal factors, promotional activities, raw material prices, and market conditions of each SKU material are used as input data for sales forecasting. Through periodic pattern learning and future demand forecasting, the demand forecast range for each SKU material is obtained.

[0143] S31. Divide the standardized business data into SKU material dimensions to obtain the historical sales data of each SKU material.

[0144] Standardized business data is grouped according to ERP material codes, and historical sales are determined based on sales orders, sales shipments, sales returns, and inventory deduction records. For the same SKU material with multiple sales records within the same time granularity, aggregation is performed; for return records, deductions are made according to business direction; data with severe anomaly flags is removed or demoted in weight. Historical sales data can be aggregated by day, week, or month, with the specific time granularity determined based on the company's business cycle.

[0145] Historical sales data for each SKU are represented as follows:

[0146] ,

[0147] in, This represents a set of historical sales data. Indicates SKU material In historical time Sales It represents a set of historical time periods.

[0148] Historical sales data is generated by standardizing business data, dividing it by SKU material dimension, identifying business direction, and aggregating time. It includes the sales value of each SKU material in the historical time series, providing a foundation for constructing input data for sales forecasting.

[0149] S32. Based on the historical sales data, sort it by time and associate it with seasonal factors, promotional activities, raw material prices and market conditions to obtain sales forecast input data.

[0150] Historical sales data is sorted in ascending order by time, and multi-dimensional features are constructed for each SKU material at corresponding time points. Seasonal factors can be generated from months, holidays, peak and off-peak season identifiers, and cycle positions; promotional activities can be generated from promotion type, promotion duration, discount level, and activity coverage; raw material prices can be generated from raw material price indices or purchase price changes related to SKU materials; market sentiment can be generated from industry indices, order inquiry volume, customer activity, or internal sales opportunity data.

[0151] The input data for sales forecasting is represented as follows:

[0152] ,

[0153] in, This represents the set of input data for sales forecasting. Indicates SKU material In historical time The sales forecast input vector. The input vector can be represented as:

[0154] ,

[0155] in, Indicates historical sales volume. Indicates seasonal factors, Indicates the characteristics of the promotional activity. Indicates the characteristics of raw material prices. Indicates market sentiment characteristics. This represents the weight of abnormal quality.

[0156] The input data for sales forecasting is generated from historical sales data through time sorting and multi-dimensional factor correlation. It includes sales volume itself as well as external and internal factors that affect sales fluctuations, providing input for learning periodic patterns.

[0157] S33. Based on the sales forecast input data, perform periodic pattern learning to obtain the sales change characteristics of each SKU material.

[0158] S331. Arrange the sales forecast input data according to SKU material and time order to obtain sales time series data.

[0159] Using SKU materials as grouping objects, the sales forecast input vectors for each SKU material are arranged in chronological order to form a continuous time series. If sales data is missing at a certain point in time, the missing value is filled in based on adjacent time points, trends of similar SKU materials, and the business calendar; if an abnormal quality marker exists at a certain point in time, the input for that point in time is weighted down according to the abnormal quality weight. The sales time series data is represented as follows:

[0160] ,

[0161] in, Indicates SKU material Sales time series data, This represents historical time points arranged in ascending order of time. Indicates the length of the historical sequence.

[0162] S332. Establish the correspondence between historical sales, seasonal factors, promotional activities, raw material prices and market prosperity in the sales time series data to obtain multi-dimensional time series correlation data.

[0163] Establish a correlation between sales volume and seasonal factors, promotional activities, raw material prices, and market sentiment at each time point to form a feature matrix that the model can learn from. For promotional activities that span multiple time points, extend the impact of promotions to the corresponding time windows; for cases where raw material prices have a lagging effect on sales prices and demand, set a lag feature; for cases where market sentiment has an early impact on sales volume, set a leading feature.

[0164] Multidimensional time-series correlation data is represented as follows:

[0165] ,

[0166] in, Indicates SKU material Multidimensional time-series correlated data.

[0167] S333. Identify the sales peak, sales trough and continuous sales trend of the multidimensional time-series correlation data to obtain sales fluctuation data.

[0168] Moving window analysis is performed on multidimensional time-series correlated data to identify local peaks, local troughs, and intervals of continuous growth or decline. For time windows... ,like Sales volume exceeding the average of adjacent sales within the window and with a difference reaching a preset fluctuation threshold is marked as a sales peak. Sales values ​​less than the average of adjacent sales within the window and with the difference reaching a preset fluctuation threshold are marked as low sales values; if the sales slope is positive for multiple consecutive time points, it is marked as an upward trend; if the sales slope is negative for multiple consecutive time points, it is marked as a downward trend.

[0169] The intensity of sales fluctuations can be expressed as:

[0170] ,

[0171] in, Indicates SKU material In time The intensity of sales fluctuations Indicated by time Average sales at the center window This represents the standard deviation of sales for the corresponding window. This indicates a smoothing term to prevent the denominator from being zero.

[0172] Sales fluctuation data includes peak time, low time, continuous growth period, continuous decline period, fluctuation intensity, and related influencing factors.

[0173] S334. Extract the recurring change patterns from the sales fluctuation data to obtain periodic sales pattern data.

[0174] The system performs periodic detection on sales fluctuation data, identifying weekly, monthly, quarterly, peak / off-peak season, and promotional cycles. Periodic detection can be achieved through autocorrelation analysis, frequency domain analysis, and similar segment matching. The autocorrelation function is expressed as:

[0175] ,

[0176] in, Indicates SKU material In the lag period The autocorrelation value under the following conditions Indicates SKU material Historical average sales. If a certain lag period... If the corresponding autocorrelation value is higher than the preset period threshold, the lag period is identified as a candidate period.

[0177] Periodic sales pattern data includes candidate period length, period intensity, period occurrence time, corresponding influencing factors, and period stability. This data is used to determine the sales variation characteristics of each SKU material.

[0178] S335. Based on the periodic sales data, determine the sales growth characteristics, sales decline characteristics, and sales stability characteristics of each SKU material to obtain the sales change characteristics of each SKU material.

[0179] Based on periodic sales patterns and fluctuations, the sales status of each SKU at different times is categorized into growth, decline, and stability. Growth characteristics include the start time of growth, duration of growth, growth slope, and related factors; decline characteristics include the start time of decline, duration of decline, decline slope, and related factors; stability characteristics include the stability interval, stability mean, and fluctuation range. Sales change characteristics are represented as follows:

[0180] ,

[0181] in, Indicates SKU material Sales change characteristics Indicates the characteristics of sales growth. This indicates a decline in sales. This indicates stable sales.

[0182] Sales change characteristics are generated from the sales forecast input data through time-series arrangement, multi-dimensional correlation, fluctuation identification, period extraction, and state classification. They include sales growth, decline, stability, and periodic patterns, providing a basis for future demand forecasting.

[0183] S34. Calculate the future demand based on the sales change characteristics to obtain the predicted demand for each SKU material.

[0184] In this step, a trained time-series prediction model can be used to predict sales change characteristics. The time-series prediction model can employ an LSTM model, a gated recurrent unit model, a temporal convolutional model, or a time-series model incorporating an attention mechanism. This implementation uses an LSTM model as an example. For SKU materials... The model in time The input is Hidden state is The memory state is The model learns the long-term dependencies between historical sales and multidimensional influencing factors through input gates, forget gates, and output gates, thus obtaining future time... Forecast demand .

[0185] The projected demand is expressed as:

[0186] ,

[0187] in, Indicates SKU material In the future Forecast demand during the forecast period This indicates a time-series prediction model that has completed training. Indicates model parameters, This represents time-series sales data. Indicates characteristics of sales changes. This indicates the prediction step size.

[0188] The predicted demand for each SKU is generated by sales change characteristics and time series forecasting models, including the forecast results of demand points for different forecast periods in the future, providing a basis for business strategy tiering and procurement optimization.

[0189] S35. The predicted demand is categorized into operational strategies to obtain the demand forecast range for each SKU material.

[0190] Based on the company's business strategy, the predicted demand is converted into a demand forecast range. Business strategies can include conservative, neutral, and aggressive strategies. Conservative strategies are used to control the risk of inventory buildup, neutral strategies are used to maintain normal operations, and aggressive strategies are used to respond to promotions, peak seasons, or market expansion. The demand forecast range is generated based on forecast error, historical volatility, and business strategy coefficients.

[0191] The demand forecast range is expressed as:

[0192] ,

[0193] in, Indicates SKU material In the future Forecast cycle, business strategy The following demand forecast range Indicates the lower limit of the interval. Indicates the upper limit of the interval. This indicates the type of business strategy. The upper and lower limits of the range can be represented as:

[0194] ,

[0195] ,

[0196] in, Indicates SKU material Predicting step size The standard deviation of the prediction error is below. Indicates business strategy The corresponding interval coefficients.

[0197] The demand forecast range is generated by categorizing the predicted demand through business strategies. It includes conservative, neutral, and aggressive demand ranges for each SKU material in the future business cycle, providing input for optimizing procurement quantity, procurement timing, and supplier mix.

[0198] S4. Based on the demand forecast range, optimize the purchase quantity, purchase timing and supplier combination to obtain the purchase plan.

[0199] In this step, procurement is optimized based on demand forecast range, current inventory, in-transit purchase quantity, supplier delivery time, minimum order quantity of materials, tiered purchase price, warehousing cost and capital occupation cost, and the output of purchase quantity, purchase timing and supplier combination is generated.

[0200] First, retrieve the current inventory, ordered but not yet delivered quantities, historical purchase prices, supplier delivery dates, and supplier supply relationships from standardized business data. For each SKU material... The current inventory level is recorded as The amount of purchases in transit is recorded as The demand forecast range is denoted as Based on the business strategy chosen by the company. Determine the target demand The target demand can be the median, upper limit, or service level-weighted demand value of the demand forecast range.

[0201] Decision variables for procurement optimization include procurement quantity. Timing of Procurement Supplier selection variables .in, Indicates the supplier, Indicates the future forecast period To suppliers Purchasing SKU materials Quantity, Indicate whether to select a supplier Supply SKU materials .

[0202] The procurement optimization objective function can be expressed as:

[0203] ,

[0204] in, This indicates the target value for procurement optimization. Indicates SKU material To suppliers Purchase quantity The corresponding procurement cost, Indicates SKU material The warehousing cost coefficient, Indicates SKU material In the forecast period Projected inventory at the end of the month. Indicates SKU material The stockout loss cost coefficient, Indicates SKU material In the forecast period The expected shortage volume, Indicates supplier The startup or management costs.

[0205] The inventory balance constraint is expressed as:

[0206] ,

[0207] in, Indicates supplier Supply SKU materials Purchase delivery time, This indicates that the order was placed before the delivery date and within the specified period. The quantity of goods purchased that have arrived.

[0208] The minimum order quantity constraint is expressed as follows:

[0209] ,

[0210] in, Indicates supplier Supply SKU materials Minimum order quantity.

[0211] Supplier selection constraints are expressed as follows:

[0212] ,

[0213] in, Indicates supplier In the cycle For SKU materials Maximum supply capacity.

[0214] Global optimization is performed using the aforementioned objective function and constraints. When constraint conflicts result in no solution, a solution is obtained by prioritizing constraints, ultimately yielding the purchase quantity, purchase timing, and supplier combination. If the enterprise ERP system requires a draft order to be generated first, the optimization results are converted into a purchase requisition draft. The draft order includes SKU material codes, purchase quantity, suggested order date, suggested delivery date, supplier, purchase price, basis for demand, and risk warnings.

[0215] The procurement plan is generated through procurement optimization based on demand forecast range, current inventory, in-transit procurement quantity, supplier delivery time, minimum order quantity, procurement price, and cost constraints. The procurement plan includes procurement quantity, procurement timing, supplier combination, estimated delivery time, procurement cost, and draft procurement requisition data.

[0216] S5. Perform dynamic safety stock calculation on the standardized business data and procurement plan to obtain the upper and lower limits of inventory and safety stock value for each SKU material.

[0217] In this step, based on the sales fluctuations, procurement lead time fluctuations, stockout loss costs, and warehousing inventory costs in the standardized business data, and combined with the procurement timing, procurement quantity, and supplier combination in the procurement plan, the safety stock value, lower inventory limit, and upper inventory limit of each SKU material are dynamically calculated.

[0218] S51. Statistically analyze the material sales volatility, procurement lead time volatility, stockout loss cost, and warehousing inventory cost in the standardized business data to obtain inventory calculation parameters.

[0219] Material sales volatility is calculated from historical sales data. For SKU materials... The mean sales volume and the standard deviation of sales volume are expressed as follows: and The fluctuation in the procurement lead time is calculated from the supplier's historical delivery data, with the average delivery time and standard deviation of delivery time expressed as follows: and The cost of stockout losses is calculated by discounting order default costs, customer churn risk, and emergency procurement costs, and is expressed as follows: Warehousing and inventory costs are calculated by deducting warehousing fees, capital occupation costs, loss costs, and management costs, and are expressed as follows: .

[0220] The inventory calculation parameters are expressed as follows:

[0221] ,

[0222] in, Indicates SKU material Inventory calculation parameters.

[0223] Inventory calculation parameters are generated from standardized business data through sales statistics, delivery date statistics, and cost statistics, and include demand fluctuations, delivery date fluctuations, and cost trade-off information required for dynamic safety stock calculation.

[0224] S52. Calculate the safety stock value of each SKU material based on the inventory calculation parameters and procurement plan to obtain the dynamic safety stock result.

[0225] Service level is determined based on inventory calculation parameters and procurement plans. Higher stockout loss costs necessitate a higher target service level; higher warehousing and inventory costs also require greater control over the target service level. The service level coefficient is expressed as... Safety stock can be expressed as:

[0226] ,

[0227] in, Indicates SKU material Safety stock value, Indicates SKU material The corresponding service level coefficient, This indicates the average lead time for procurement. Indicates the standard deviation of sales. This represents the average sales volume. This represents the standard deviation of the procurement lead time.

[0228] The service level factor can be determined based on the cost of stockout losses and warehousing inventory costs:

[0229] ,

[0230] in, This represents the basic service level coefficient. Indicates the cost sensitivity coefficient. This indicates the smoothing term.

[0231] Dynamic safety stock results include SKU material codes, safety stock values, service level coefficients, sales fluctuation data, procurement lead time fluctuation data, and cost basis. These results are generated from inventory calculation parameters and procurement plans, providing a foundation for determining upper and lower inventory limits.

[0232] S53. Based on the dynamic safety stock results, current inventory levels, and in-transit procurement quantities, determine the lower and upper limits of inventory for each SKU material.

[0233] The lower inventory limit is used to trigger replenishment or stockout alerts, while the upper inventory limit is used to identify overstocking and stockpiling risks. For SKU materials... The lower limit of inventory can be expressed as:

[0234] ,

[0235] in, This indicates the lower limit of inventory.

[0236] The upper limit of inventory can be determined by combining the demand forecast range, warehousing costs, and purchase quantity:

[0237] ,

[0238] in, Indicates the upper limit of inventory. Indicates SKU materials in the procurement plan Optimize purchase batch size This indicates the business buffer. The business buffer can be determined based on promotional activities, peak season factors, and supply chain stability.

[0239] The upper and lower limits of inventory and the safety stock value for each SKU are jointly determined by the dynamic safety stock result, current inventory level, in-transit purchase quantity, and procurement plan. This includes the safety stock value, lower inventory limit, upper inventory limit, applicable time, and calculation basis. This result provides the foundation for identifying below-safety thresholds, inventory backlog, and slow-moving materials in the anomaly risk identification process.

[0240] S6. Based on the procurement plan, inventory upper and lower limits, and safety stock value, identify abnormal risks and obtain early warning information and rectification work orders.

[0241] In this step, real-time or periodic risk identification is performed on the procurement plan, upper and lower limits of inventory, and safety stock value. This includes identifying over-purchasing, delayed delivery by suppliers, inventory below the safety threshold, inventory backlog, and unsold materials. The identification results are then classified into risk levels, and early warning information and rectification work orders are generated.

[0242] S61. Over-purchasing is identified in the procurement quantity and timing of the procurement plan to obtain procurement anomaly data.

[0243] The procurement plan compares the procurement quantity with the demand forecast range, current inventory level, in-transit procurement quantity, and inventory ceiling. If the projected inventory after procurement exceeds the inventory ceiling, or the procurement quantity significantly exceeds the upper limit of the future demand forecast range, it is marked as over-procurement. Projected inventory is represented as:

[0244] ,

[0245] in, Indicates SKU material In the forecast period Projected inventory, Indicates the current inventory level. This indicates the quantity of purchases in transit. Indicates the quantity purchased. This indicates the target demand.

[0246] like This generates procurement anomaly data. Procurement anomaly data includes SKU material code, abnormal procurement quantity, suggested adjustment quantity, abnormal procurement time, expected overstock, and reason for the anomaly.

[0247] S62. Identify delayed deliveries for the supplier combinations in the procurement plan to obtain abnormal supplier data.

[0248] S621. Extract supplier delivery dates from the supplier combinations in the procurement plan to obtain supplier delivery date data.

[0249] The supplier portfolio is extracted from the procurement plan, and historical delivery dates, promised delivery dates, delivery date fluctuations, and delivery stability are retrieved from standardized business data or ERP supplier master data. Supplier delivery date data includes supplier code, SKU material code, average delivery date, maximum delivery date, delivery date standard deviation, historical number of delays, and delivery date stability score.

[0250] S622. Calculate the estimated delivery time by analyzing the procurement time and supplier delivery date data in the procurement plan.

[0251] Calculate the estimated delivery time based on the purchase date and supplier's delivery schedule. For SKU materials... and suppliers The estimated delivery time is expressed as follows:

[0252] ,

[0253] in, Indicates the estimated delivery time. Indicates the time of procurement. This indicates the supplier's delivery date.

[0254] If delivery time fluctuations are taken into account, the expected delivery time for risk is expressed as:

[0255] ,

[0256] in, Indicates the estimated delivery time for the risk. Indicates supplier Supply SKU materials Average delivery time Indicates the standard deviation of delivery time. This indicates the risk coefficient for delivery time.

[0257] S623. Compare the estimated delivery time and the demand time corresponding to the procurement plan to obtain delivery deviation data.

[0258] Compare the estimated or risk-based estimated delivery time with the demand time. The demand time, derived from the demand forecast range and procurement plan, is the time it takes for SKU materials to arrive to meet sales or inventory minimum requirements. Delivery deviation is expressed as:

[0259] ,

[0260] in, This indicates a discrepancy in delivery. Indicates SKU material The required time. If > This indicates that there is a risk of delay.

[0261] Delivery deviation data includes supplier code, SKU material code, estimated delivery time, risky estimated delivery time, demand time, and deviation duration.

[0262] S624. Determine the delay risk based on the arrival deviation data to obtain delayed supplier data.

[0263] Delay risk is assessed based on arrival deviation, delivery time stability score, and historical number of delays. The delay risk score is expressed as follows:

[0264] ,

[0265] in, Indicates supplier For SKU materials The delay risk score, Indicates the number of historical delays. , and This represents the weighting coefficient. If the delay risk score exceeds the preset threshold, the supplier is marked as a delayed supplier.

[0266] The data on delayed suppliers includes the delayed supplier code, corresponding SKU material, delay risk score, reason for delay, and suggested alternative suppliers.

[0267] S625. Based on the delayed supplier data, mark the supplier combination as abnormal to obtain supplier abnormal data.

[0268] Delayed supplier data is written back to the supplier portfolio item in the procurement plan. Suppliers with delay risks are marked as abnormal, and supplier abnormal data is generated. Supplier abnormal data includes supplier abnormality type, risk level, affected purchase quantity, affected delivery time, and alternative suggestions.

[0269] S63. Identify inventory below the safety threshold, inventory backlog, and unsold materials by analyzing the upper and lower limits of inventory and the safety stock value to obtain abnormal inventory data.

[0270] The system compares the current inventory level, projected inventory level, safety stock level, lower inventory level, and upper inventory level. If the current inventory level or projected inventory level is lower than the safety stock level, it is identified as inventory below the safety threshold; if the current inventory level or projected inventory level is higher than the upper inventory level, it is identified as inventory backlog; if the sales volume of a certain SKU material is lower than the historical average and the inventory level remains high during a continuous business cycle, it is identified as material slow-moving.

[0271] The risk score for slow-moving inventory can be expressed as:

[0272] ,

[0273] in, Indicates SKU material The score for the risk of unsold goods. Indicates the current inventory level. This represents the average sales volume. Indicates the upper limit of inventory. This indicates the recent sales growth factor. , and This represents the weighting coefficient.

[0274] Inventory anomaly data includes SKU material code, anomaly type, current inventory, estimated inventory, safety stock value, lower inventory limit, upper inventory limit, cause of anomaly, and suggested handling direction.

[0275] S64. The abnormal procurement data, abnormal supplier data, and abnormal inventory data are classified into risk levels to obtain early warning information.

[0276] Anomaly data from procurement, suppliers, and inventory are uniformly input into the risk level classification model. Risk level classification is based on factors including the probability of risk occurrence, the degree of business impact, the monetary impact, the impact on order fulfillment, and the urgency of handling. The overall risk score is expressed as follows:

[0277] ,

[0278] in, This represents the overall risk score. The score represents the probability of the risk occurring. Indicates the score based on the impact of business operations. The amount indicates that the score is affected. The score indicates the urgency of the response. , , and This represents the weighting coefficient.

[0279] The early warning information includes the early warning number, early warning type, risk level, SKU material code, associated procurement plan, associated supplier, cause of the anomaly, time of risk occurrence, suggested handling period, and early warning status. The early warning information is generated from abnormal procurement data, abnormal supplier data, and abnormal inventory data, categorized by risk level, providing a basis for generating rectification work orders.

[0280] S65. Match the responsible parties and generate processing items for the warning information to obtain a rectification work order.

[0281] The system matches responsible parties based on the type of alert. Over-purchase alerts are matched to the purchasing manager or supervisor; supplier delay alerts are matched to purchasing staff and supplier administrators; inventory below the safety threshold is matched to inventory administrators and purchasing planners; and inventory backlog and slow-moving materials are matched to inventory administrators, sales managers, and planning managers. Based on the alert type, the system generates appropriate actions, such as adjusting purchase quantities, changing suppliers, placing orders in advance, expediting purchases, suspending purchases, promoting inventory clearance through sales, transferring inventory to other warehouses, or reviewing documents.

[0282] The rectification work order includes the work order number, associated warning number, responsible party, handling items, handling deadline, handling priority, associated SKU materials, associated procurement plan, current status and feedback records. After the work order is handled, the handling effect must be verified and the work order must be closed and archived to form a closed loop for abnormal handling.

[0283] S7. Based on the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information and rectification work orders, write back to the ERP database to obtain the ERP sales, procurement and inventory data processing results.

[0284] In this step, the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information and rectification work order are converted into data structures that can be received by the ERP database, and written back to the relevant data tables of ERP sales, procurement, inventory and process processing.

[0285] S71. Perform SKU material matching on the demand forecast interval to obtain sales forecast write-back data.

[0286] The SKU material codes within the demand forecast range are matched with the ERP material master data to verify material status, unit of measurement, and business organization. After successful verification, the demand forecast range is converted into sales forecast write-back data. This sales forecast write-back data includes SKU material codes, forecast period, conservative demand, neutral demand, aggressive demand, forecast generation time, forecast basis, and forecast version number. This sales forecast write-back data is used in the ERP sales planning, production planning, or procurement planning modules.

[0287] S72. The procurement plan is broken down into procurement quantity, procurement time and supplier combination to obtain procurement request write-back data.

[0288] The procurement plan is broken down into ERP purchase requisition lines. Each purchase requisition's data includes the purchase requisition number, SKU material code, quantity, suggested order date, suggested delivery date, supplier code, purchase price, source of demand, reason for purchase, and approval status. If the same SKU is supplied by multiple suppliers, it is split into multiple purchase requisition lines based on supplier combinations; if the same supplier supplies multiple SKUs, they can be integrated into a single purchase requisition according to ERP rules.

[0289] S73. Verify the SKU material correspondence between the upper and lower limits of inventory and the safety stock value to obtain inventory parameter write-back data.

[0290] Verify that the upper and lower limits of inventory and the safety stock value correspond to valid SKU materials, valid warehouses, and valid inventory organizations. Upon successful verification, generate inventory parameter write-back data. This data includes the SKU material code, warehouse code, safety stock value, lower inventory limit, upper inventory limit, applicable date, parameter version, calculation basis, and activation status. The inventory parameter write-back data is used for ERP inventory alerts, replenishment suggestions, and inventory control rules.

[0291] S74. Match the early warning information and rectification work order with the abnormality type and the responsible object to obtain abnormality handling write-back data.

[0292] The system maps anomaly types in early warning messages to ERP early warning types, and maps responsible parties in rectification work orders to ERP organizational personnel. Anomaly handling write-back data includes early warning number, early warning type, risk level, responsible party, handling items, handling deadline, work order status, associated purchase requisition, associated inventory parameters, and handling feedback entry point. Anomaly handling write-back data is used in ERP workflows, approval workflows, and the task center.

[0293] S75. Based on the sales forecast write-back data, purchase requisition write-back data, inventory parameter write-back data, and anomaly handling write-back data, write back to the ERP database to obtain the ERP sales, purchase, and inventory data processing results.

[0294] Data write-back is performed according to the ERP database interface specifications. Before write-back, field type validation, primary key conflict validation, version number validation, and transaction consistency validation are performed. If sales forecast data, purchase requisition data, inventory parameter data, and exception handling data need to be consistent during write-back, a transaction commit method is used; if the write-back of a certain type of data fails, the reason for the failure is recorded and a rollback or compensation task is triggered. After successful write-back, ERP sales, purchase, and inventory data processing results are generated.

[0295] The ERP sales, procurement, and inventory data processing results include sales forecast results, purchase requisition results, inventory parameter results, anomaly warning results, rectification work order results, and database write-back logs. These results are derived from standardized business data, demand forecast ranges, procurement plans, inventory upper and lower limits, safety stock values, warning information, and rectification work orders. These results can be used to guide sales forecasting, purchase requisitions, inventory control, anomaly handling, and business approval within the ERP system. This solution addresses the problem of traditional ERP systems relying on manual experience to judge sales demand, purchase quantities, and replenishment timing, and also resolves the issue of fixed inventory parameters being unable to adapt to sales fluctuations and supply chain changes. The results demonstrate the overall technical effectiveness of the coordinated efforts of demand forecasting, procurement optimization, dynamic inventory adjustment, anomaly warnings, and ERP write-back.

[0296] According to a second aspect of this application, this application provides an ERP purchasing, sales and inventory data processing system based on machine learning. Figure 4 This is a structural block diagram of an ERP purchasing, sales, and inventory data processing system provided according to an embodiment of this application. Figure 4 As shown, the system includes a data aggregation module, a data standardization module, a sales forecasting module, a procurement optimization module, an inventory calculation module, an anomaly identification module, and a data write-back module.

[0297] The data aggregation module is used to acquire heterogeneous multi-source data on enterprise purchasing, sales, and inventory, remove invalid and redundant data, and obtain aggregated data. The data aggregation module includes a data source access unit, a protocol conversion unit, an integrity verification unit, a duplicate data identification unit, and an aggregated data generation unit. The data source access unit is used to access the ERP database, file directory, API interface, image upload entry, and message queue; the protocol conversion unit is used to convert data of different formats into a unified data structure; the integrity verification unit is used to identify empty files, corrupted files, and data with severely missing fields; the duplicate data identification unit is used to identify duplicate documents and duplicate files; and the aggregated data generation unit is used to generate aggregated data and transmit it to the data standardization module.

[0298] The data standardization module is used to perform OCR parsing, NLP recognition, field correction, information completion, encoding standardization, and anomaly marking on the aggregated data to obtain standardized business data. The data standardization module includes an OCR parsing unit, an NLP recognition unit, a field correction unit, an information completion unit, an encoding standardization unit, and an anomaly marking unit. The OCR parsing unit converts image-based and text-based documents into document text data; the NLP recognition unit extracts material name, specifications, quantity, unit price, date, supplier, and document type fields; the field correction unit performs field format validation and field association validation; the information completion unit corrects erroneous fields and completes missing text fields; the encoding standardization unit matches material name, specifications, and document type to the ERP unified code; and the anomaly marking unit marks unit price anomalies, quantity anomalies, inbound / outbound anomalies, and duplicate documents.

[0299] The sales forecasting module is used to perform time-series sales forecasting based on the standardized business data, obtaining the demand forecast range for each SKU material. The sales forecasting module includes an SKU segmentation unit, a feature association unit, a cycle learning unit, a demand forecasting unit, and a strategy grading unit. The SKU segmentation unit generates historical sales data for each SKU material; the feature association unit associates seasonal factors, promotional activities, raw material prices, and market sentiment; the cycle learning unit identifies sales peaks, lows, continuous trends, and recurring cyclical patterns; the demand forecasting unit generates future demand; and the strategy grading unit generates conservative, neutral, and aggressive demand forecast ranges.

[0300] The procurement optimization module is used to optimize the procurement quantity, procurement timing, and supplier combination based on the demand forecast interval to obtain a procurement plan. The procurement optimization module includes an inventory reading unit, a supplier constraint reading unit, a cost constraint construction unit, a procurement optimization solution unit, and a procurement plan generation unit. The inventory reading unit reads the current inventory level and the quantity of goods in transit; the supplier constraint reading unit reads the supplier's delivery date, minimum order quantity, and supply capacity; the cost constraint construction unit constructs the procurement price, warehousing cost, and stockout loss cost; the procurement optimization solution unit calculates the procurement quantity, procurement timing, and supplier combination; and the procurement plan generation unit outputs the procurement plan and draft procurement requisition data.

[0301] The inventory calculation module is used to dynamically calculate safety stock based on the standardized business data and procurement plans, obtaining the upper and lower limits of inventory and safety stock values ​​for each SKU. The inventory calculation module includes an inventory parameter statistics unit, a safety stock calculation unit, an inventory upper and lower limit determination unit, and an inventory parameter output unit. The inventory parameter statistics unit is used to calculate material sales volatility, procurement lead time volatility, stockout loss costs, and warehousing inventory costs; the safety stock calculation unit is used to calculate the safety stock value for each SKU; the inventory upper and lower limit determination unit is used to determine the lower and upper limits of inventory based on the dynamic safety stock results, current inventory levels, and in-transit procurement quantities; the inventory parameter output unit is used to output the inventory parameter data.

[0302] The anomaly identification module is used to identify abnormal risks based on the procurement plan, inventory upper and lower limits, and safety stock values, and to generate early warning information and rectification work orders. The anomaly identification module includes a procurement anomaly identification unit, a supplier anomaly identification unit, an inventory anomaly identification unit, a risk level classification unit, and a rectification work order generation unit. The procurement anomaly identification unit is used to identify over-purchasing; the supplier anomaly identification unit is used to identify delayed delivery risks; the inventory anomaly identification unit is used to identify inventory below the safety threshold, inventory backlog, and unsold materials; the risk level classification unit is used to generate early warning information; and the rectification work order generation unit is used to match responsible parties and generate processing items.

[0303] The data write-back module is used to write back the data to the ERP database based on the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information, and rectification work orders, thereby obtaining the ERP sales, procurement, and inventory data processing results. The data write-back module includes a sales forecast write-back unit, a purchase requisition write-back unit, an inventory parameter write-back unit, an exception handling write-back unit, and a transaction control unit. The sales forecast write-back unit generates sales forecast write-back data; the purchase requisition write-back unit generates purchase requisition write-back data; the inventory parameter write-back unit generates inventory parameter write-back data; the exception handling write-back unit generates exception handling write-back data; and the transaction control unit performs data verification, transaction commit, failure rollback, and write-back log records.

[0304] During system operation, the data aggregation module first generates aggregated data, which is then called by the data standardization module to generate standardized business data. The standardized business data is called by the sales forecasting module to generate a demand forecast range. The demand forecast range is called by the procurement optimization module to generate a procurement plan. The standardized business data and the procurement plan are called by the inventory calculation module to generate upper and lower limits of inventory and safety stock values. The procurement plan, upper and lower limits of inventory, and safety stock values ​​are called by the anomaly identification module to generate early warning information and rectification work orders. The demand forecast range, procurement plan, upper and lower limits of inventory, safety stock values, early warning information, and rectification work orders are called by the data write-back module and written back to the ERP database, forming the ERP sales, procurement, and inventory data processing results.

[0305] The ERP sales, procurement, and inventory data processing results include unified and streamlined business data, demand forecast ranges for each SKU, optimized procurement quantities and timing, supplier portfolio results, dynamic inventory upper and lower limits, safety stock values, early warning information, rectification work orders, and ERP database write-back records. These results are progressively derived from aggregated data, standardized business data, sales change characteristics, demand forecast ranges, procurement plans, dynamic safety stock results, anomaly risk identification results, and write-back data. These results can guide enterprises in sales forecasting, purchase requisition generation, inventory threshold updates, replenishment control, supplier risk management, and closed-loop handling of anomaly work orders within the ERP system. This solution addresses the problem that existing ERP systems rely on human experience to predict sales demand, procurement quantities, and replenishment timing, failing to incorporate historical sales patterns, seasonal fluctuations, promotional impacts, and supply chain cycles for quantitative forecasting. It also addresses the issue that fixed inventory upper and lower limits and safety stock levels cannot be dynamically adjusted based on sales fluctuations, procurement lead times, supplier delivery stability, and warehousing costs. The results are supported by the entire chain of multi-source data standardization and governance, AI time-series sales forecasting, procurement scheme optimization, dynamic safety stock calculation, anomaly risk identification, and ERP database write-back, which comprehensively demonstrate the technical effects of sales, procurement, and inventory collaborative matching and adaptive optimization of inventory management.

[0306] Embodiments of the present invention have been presented and described. It will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

[0307] Those skilled in the art should understand that the embodiments of the present invention can be implemented using a pure hardware architecture, a pure software architecture, or an integrated hardware and software architecture. The present invention can be prepared as a computer program product, which can be stored in various non-volatile computer-readable storage media, including but not limited to solid-state drives, flash memory chips, mobile storage devices, optical discs, cloud storage servers, and other standardized storage media, and is not limited to traditional storage media.

[0308] The above description describes embodiments of the present invention. Without departing from the embodiments and broad aspects of the present invention, those skilled in the art can make data modifications and method changes based on this description in specific operations. The appended claims are intended to include all data modifications and method changes that do not depart from the embodiments of the present invention.

[0309] Based on the foregoing description in conjunction with the accompanying drawings, those skilled in the art will understand that the embodiments of this application can be implemented by software programs. Therefore, this application also provides a computer-readable storage medium. This computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the method described above in conjunction with the accompanying drawings.

[0310] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, or by hardware. The technical solutions described above, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device to execute the methods described in the various embodiments or certain parts of the embodiments.

[0311] It should be noted that the operations of the method described in the accompanying drawings are in a specific order, but this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be executed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be integrated into a single step, and / or a single step may be broken down into multiple steps.

[0312] It should be understood that when the terms "first," "second," "third," and "fourth," etc., are used in the claims, specification, and drawings of this application, they are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "including" as used in the specification and claims of this application indicate the presence of the described features, units, steps, operations, elements, and / or components, but do not exclude the presence or addition of other features, units, steps, operations, elements, components, and / or sets.

[0313] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments and is not intended to limit the application. As used in this specification and claims, the singular forms “a” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should be further understood that the term “and / or” as used in this specification and claims refers to any combination of one or more of the associated listed items, and all possible combinations thereof.

[0314] The embodiments of this application are as described above, but the content described is merely an example for the purpose of understanding this application and is not intended to limit the scope or application scenarios of this application. Any person skilled in the art described in this application may make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be determined by the scope defined in the appended claims.

Claims

1. A machine learning-based ERP purchasing, sales, and inventory data processing method, applied to enterprise multi-source heterogeneous purchasing, sales, and inventory data governance and intelligent decision-making scenarios, which performs time-series sales forecasting and procurement and inventory linkage optimization based on standardized data, characterized in that... include: Acquire heterogeneous data on enterprise purchasing, sales, and inventory from multiple sources, remove invalid and redundant data, and obtain aggregated data; The aggregated data is subjected to OCR parsing, NLP recognition, field correction, information completion, encoding unification, and anomaly marking to obtain standardized business data; Based on the standardized business data, time-series sales forecasts are performed to obtain the demand forecast range for each SKU material. Based on the demand forecast range, the procurement quantity, procurement timing, and supplier combination are optimized to obtain a procurement plan; Dynamic safety stock calculations are performed on the standardized business data and procurement plans to obtain the upper and lower limits of inventory and safety stock values ​​for each SKU material; Based on the aforementioned procurement plan, inventory upper and lower limits, and safety stock value, abnormal risks are identified to obtain early warning information and rectification work orders; Based on the aforementioned demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information, and rectification work orders, the ERP database is written back to obtain the ERP sales, procurement, and inventory data processing results.

2. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 1, characterized in that, The aggregated data is subjected to OCR parsing, NLP recognition, field correction, information completion, encoding standardization, and anomaly marking to obtain standardized business data, including: OCR parsing is performed on the image-type documents and text-type documents in the aggregated data to obtain the document text data; The document text data is subjected to NLP recognition to extract the material name, specifications, quantity, unit price, date, supplier, and document type fields, thus obtaining the field extraction data; The extracted data from the fields is subjected to field format validation and field association validation to correct erroneous fields and complete missing text fields, resulting in corrected and completed data; The material name, specifications, and document type in the correction and completion data are coded and matched to obtain unified coded data; The unified coded data is marked for unit price anomalies, quantity anomalies, inbound / outbound anomalies, and duplicate documents. When there are conflicts in multi-source data, standardized business data is obtained by accepting data according to a preset priority.

3. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 1, characterized in that, Based on the standardized business data, time-series sales forecasts are performed to obtain the demand forecast range for each SKU material, including: The standardized business data is divided into SKU material dimensions to obtain the historical sales data of each SKU material; Based on the historical sales data, sort it by time and correlate it with seasonal factors, promotional activities, raw material prices and market conditions to obtain the sales forecast input data; Based on the sales forecast input data, periodic patterns are learned to obtain the sales change characteristics of each SKU material. The predicted demand for each SKU material is obtained by forecasting future demand based on the aforementioned sales change characteristics. The predicted demand is categorized into operational strategies to obtain the demand forecast range for each SKU material.

4. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 1, characterized in that, Dynamic safety stock calculations are performed on the standardized business data and procurement plans to obtain the upper and lower limits of inventory and the safety stock value for each SKU material, including: The material sales volatility, procurement lead time volatility, stockout loss cost, and warehousing inventory cost in the standardized business data are statistically analyzed to obtain inventory calculation parameters. Calculate the safety stock value of each SKU material based on the aforementioned inventory calculation parameters and procurement plan to obtain the dynamic safety stock result; Based on the dynamic safety stock results, current inventory levels, and in-transit procurement quantities, determine the lower and upper limits of inventory for each SKU material.

5. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 1, characterized in that, Based on the aforementioned procurement plan, inventory upper and lower limits, and safety stock values, abnormal risks are identified, resulting in early warning information and rectification work orders, including: The procurement quantity and timing in the procurement plan are used to identify over-purchases, resulting in abnormal procurement data. Delayed delivery is identified for the supplier combinations in the procurement plan to obtain abnormal supplier data. The inventory upper and lower limits and safety stock values ​​are used to identify inventory below the safety threshold, inventory backlog, and unsold materials to obtain abnormal inventory data. The abnormal procurement data, abnormal supplier data, and abnormal inventory data are classified into risk levels to obtain early warning information; The warning information is matched with responsible parties and processing items are generated to obtain a rectification work order.

6. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 1, characterized in that, Based on the aforementioned demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information, and rectification work orders, the ERP database is written back to obtain the ERP sales, procurement, and inventory data processing results, including: SKU material matching is performed on the demand forecast range to obtain sales forecast write-back data; The procurement plan is broken down by procurement quantity, procurement timing, and supplier combination to obtain procurement requisition write-back data; The SKU material correspondence is verified for the upper and lower limits of inventory and the safety stock value to obtain inventory parameter write-back data; The warning information and rectification work orders are matched with the anomaly type and the responsible party to obtain anomaly handling write-back data; Based on the sales forecast write-back data, purchase requisition write-back data, inventory parameter write-back data, and anomaly handling write-back data, the ERP database is written back to obtain the ERP sales, purchase, and inventory data processing results.

7. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 2, characterized in that, The extracted data from the fields undergoes field format validation and field association validation to correct erroneous fields and complete missing text fields, resulting in corrected and completed data, including: The material name, specifications, quantity, unit price, date, supplier, and document type fields in the extracted data are used to identify missing field data. The quantity, unit price, and date fields extracted from the field are validated for their format to obtain data with abnormal formats. Perform field association validation on the material name, specifications, supplier, and document type fields in the extracted data to obtain data on fields with abnormal associations. Based on the missing field data, format-abnormal field data, and association-abnormal field data, the extracted field data is corrected for errors and missing text fields are filled in to obtain corrected and completed data.

8. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 3, characterized in that, Based on the sales forecast input data, periodic pattern learning is performed to obtain the sales change characteristics of each SKU material, including: The sales forecast input data is arranged according to SKU material and time order to obtain sales time series data; By establishing the correspondence between historical sales, seasonal factors, promotional activities, raw material prices, and market conditions in the aforementioned sales time series data, multidimensional time series correlation data is obtained. The sales peak, sales trough and sales continuous change trend are identified in the multidimensional time-series correlation data to obtain sales fluctuation data. The recurring variation patterns of the sales fluctuation data are extracted to obtain periodic sales pattern data; Based on the periodic sales data, the sales growth characteristics, sales decline characteristics, and sales stability characteristics of each SKU are determined, thus obtaining the sales change characteristics of each SKU.

9. The ERP purchasing, sales, and inventory data processing method based on machine learning according to claim 5, characterized in that, The procurement plan involves identifying delayed deliveries from the supplier combinations to obtain abnormal supplier data, including: Supplier delivery dates are extracted from the supplier combinations in the procurement plan to obtain supplier delivery date data. The estimated delivery time is obtained by calculating the delivery time based on the procurement timing and supplier delivery date data in the procurement plan. The estimated delivery time and the corresponding demand time of the procurement plan are compared to obtain delivery deviation data. The arrival deviation data is used to determine the risk of delay, and the delayed supplier data is obtained. Based on the delayed supplier data, the supplier combination is marked as abnormal to obtain supplier abnormal data.

10. An ERP purchasing, sales, and inventory data processing system based on machine learning, characterized in that, include: The data aggregation module is used to acquire heterogeneous data from multiple sources related to enterprise purchasing, sales and inventory, remove invalid and redundant data, and obtain aggregated data. The data standardization module is used to perform OCR parsing, NLP recognition, field correction, information completion, encoding unification, and anomaly marking on the aggregated data to obtain standardized business data. The sales forecasting module is used to perform time-series sales forecasting based on the standardized business data to obtain the demand forecast range for each SKU material. The procurement optimization module is used to optimize the procurement quantity, procurement timing, and supplier combination based on the demand forecast range to obtain a procurement plan. The inventory calculation module is used to perform dynamic safety stock calculations on the standardized business data and procurement plans to obtain the upper and lower limits of inventory and safety stock values ​​for each SKU material. The anomaly identification module is used to identify abnormal risks based on the procurement plan, upper and lower limits of inventory, and safety stock value, and to obtain early warning information and rectification work orders; The data write-back module is used to write back the ERP database based on the demand forecast range, procurement plan, inventory upper and lower limits, safety stock value, early warning information and rectification work orders to obtain the ERP sales, procurement and inventory data processing results.