Purchase order generation method and device, equipment and storage medium

By integrating real-time procurement demand and price fluctuations, combining historical data and real-time inventory information to generate purchase orders, the inefficiency, accuracy and high cost problems in the generation and review of purchase orders in the logistics industry are solved, and efficient, accurate and flexible procurement management is achieved.

CN120106730APending Publication Date: 2025-06-06SHANGHAI YUNDA HIGH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510064657.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing technology has problems such as inefficiency, accuracy, and high costs in the generation and review of purchase orders in the logistics industry, making it difficult to flexibly respond to complex situations and market changes.

Method used

By integrating real-time procurement demand and price fluctuations, training procurement quantity prediction models using historical procurement data, combining real-time inventory and supplier information, generating procurement quantity and procurement budgets, and evaluating suppliers' comprehensive evaluation scores, and finally generating purchase orders.

Benefits of technology

It significantly improves the efficiency of procurement activities, reduces procurement costs, enhances the competitiveness of enterprises in the market, and improves the accuracy and flexibility of order processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106730A_ABST
    Figure CN120106730A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a purchase order generation method and device, equipment and a storage medium, and the method comprises the steps: processing and preprocessing historical purchase data to train a purchase quantity prediction model; obtaining to-be-predicted information and inputting the to-be-predicted information into the purchase quantity prediction model to obtain a demand prediction result; analyzing the real-time price trend to obtain a trend analysis result; generating a purchase quantity and a purchase budget in combination with the real-time inventory information, the demand prediction result and the trend analysis result; evaluating supplier information, determining a criterion and a weight, and calculating a comprehensive evaluation score corresponding to a supplier; ranking suppliers according to the comprehensive evaluation scores, and generating a purchase order based on the purchase quantity, the purchase budget and a supplier ranking result; according to the method disclosed by the invention, the real-time purchase demand and the price fluctuation trend are integrated, and the corresponding purchase strategy is formulated, so that the efficiency of the purchase activity can be remarkably improved, the purchase cost is reduced, and the competitiveness of an enterprise in the market is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a purchase order generation method, device, equipment and storage medium. Background Art

[0002] In the current logistics industry, the generation and review process of purchase orders mainly relies on manual operations and fixed rules, which leads to several key problems:

[0003] First, it is inefficient. Especially when processing a large number of orders, manual operations are time-consuming and the review speed may not meet business needs, resulting in delayed order processing and affecting logistics efficiency. In addition, the rigidity of fixed rules makes it difficult for the process to flexibly respond to complex situations, reducing work efficiency. When the market environment or customer needs change, fixed rules may not be adjusted in time to meet new business needs.

[0004] Secondly, accuracy issues. Manual operations are prone to errors, such as information entry errors and audit omissions. These errors may lead to inaccurate order information, affecting logistics distribution and customer service. At the same time, fixed rules may not fully cover all compliance requirements, increasing compliance risks.

[0005] Finally, manual operations have the problem of high costs. As the business scale expands, more human resources are needed, including order processors and auditors, and these labor costs continue to increase. In addition, the maintenance and updating of fixed rules also require regular investment costs to adapt to changes in market and compliance requirements.

[0006] It can be seen that the existing technology still needs to be improved and enhanced. Summary of the invention

[0007] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a purchase order generation method, which can significantly improve the efficiency of procurement activities, reduce procurement costs, and enhance the competitiveness of enterprises in the market by integrating real-time procurement needs and price fluctuation trends to formulate corresponding procurement strategies.

[0008] The first aspect of the present invention provides a purchase order generation method, comprising: obtaining historical purchase data and performing preprocessing and partitioning processing to obtain training data; obtaining information to be predicted, training a purchase quantity prediction model based on the training data, and inputting the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result; obtaining real-time price information, performing trend change analysis on the real-time price information to obtain a trend analysis result; obtaining real-time inventory information, and generating a purchase quantity and a purchase budget based on the real-time inventory information, the demand prediction result and the trend analysis result; obtaining real-time supplier information, confirming the criteria and weights of each supplier based on the real-time supplier information to calculate a comprehensive evaluation score corresponding to each supplier; generating a supplier ranking result based on the comprehensive evaluation score, and generating a purchase order based on the purchase quantity, the purchase budget and the supplier ranking result.

[0009] Optionally, in a first implementation method of the first aspect of the present invention, the historical procurement data is obtained and preprocessed and divided to obtain training data, including: obtaining historical procurement data, using the pandas library to perform duplicate data deletion processing on the historical procurement data, and using the mean filling method to fill missing values ​​on the historical procurement data to obtain filled data; converting the date format and data type in the filled data respectively, and using the Min-Max normalization method to standardize the converted filled data to obtain standard data; performing feature extraction processing on the standard data, and creating lagging features based on the standard data to obtain feature data; dividing the feature data based on a preset division ratio to obtain training data, wherein the training data includes a training set and a test set.

[0010] Optionally, in a second implementation of the first aspect of the present invention, the information to be predicted is obtained, a purchase quantity prediction model is obtained based on the training data, and the information to be predicted is input into the purchase quantity prediction model to obtain a demand forecast result, including: setting the date data included in the training data as an index to obtain adjustment data; calculating the autocorrelation function and the partial correlation function to obtain the initial order of the model, and initializing the ARIMA model based on the initial order; estimating the autoregressive coefficient, difference parameter and moving average coefficient in the ARIMA model by the least squares method to achieve the fitting of the ARIMA model; inputting the adjusted data into the fitted ARIMA model for training to obtain a purchase quantity prediction model; obtaining the information to be predicted, inputting the information to be predicted into the purchase quantity prediction model to obtain a demand forecast result.

[0011] Optionally, in a third implementation of the first aspect of the present invention, the acquiring of real-time price information, performing trend change analysis on the real-time price information, and obtaining trend analysis results include: acquiring real-time price information, performing format conversion processing on the real-time price information, and obtaining converted price information; setting the date in the converted price information as an index to obtain adjusted price information; using a moving average method to generate a moving average line based on the adjusted price information, and using a linear regression method to fit the moving average line to obtain a trend analysis result, wherein the trend analysis result is a price trend line.

[0012] Optionally, in a fourth implementation method of the first aspect of the present invention, the acquiring of real-time inventory information and generating a purchase quantity and a purchase budget based on the real-time inventory information, the demand forecasting results and the trend analysis results include: acquiring real-time inventory information, the real-time inventory information including a real-time inventory level and a maximum inventory storage capacity; calculating an initial quantity based on the real-time inventory information and the demand forecasting results, and adjusting the initial quantity based on the trend analysis results to obtain the purchase quantity; and confirming the purchase budget based on the trend analysis structure and the purchase quantity.

[0013] Optionally, in a fifth implementation of the first aspect of the present invention, real-time supplier information is obtained, and criteria and weights of each supplier are confirmed based on the real-time supplier information to calculate a comprehensive evaluation score corresponding to each supplier, including: obtaining real-time supplier information and preprocessing it to obtain preprocessed supplier information; obtaining preset evaluation indicators and preset multiple criteria, and using a hierarchical analysis method to obtain weights corresponding to the criteria based on the preprocessed supplier information, the preset evaluation indicators and the preset multiple criteria; obtaining a pre-built DEA model, inputting the pre-built DEA model into the pre-built DEA model, and obtaining an efficiency score corresponding to the supplier; and combining the weights corresponding to the criteria and the efficiency score corresponding to the supplier to obtain a comprehensive evaluation score corresponding to the supplier.

[0014] Optionally, in a sixth implementation method of the first aspect of the present invention, the supplier ranking result is generated based on the comprehensive evaluation score, and a purchase order is generated based on the purchase quantity, the purchase budget and the supplier ranking result, including: based on the comprehensive evaluation score, using a bubble sort algorithm, arranging each supplier in descending order to obtain a supplier ranking result; based on the purchase quantity, purchase budget and the supplier ranking result, screening to obtain a target supplier range, and determining a purchase quota for each supplier within the selected supplier range; generating a purchase order based on the target supplier range and the purchase quota, and assigning a unique order number to the purchase order.

[0015] The second aspect of the present invention provides a purchase order generation device, including: a processing module, which is used to obtain historical purchase data and perform preprocessing and division processing to obtain training data; a prediction module, which is used to obtain information to be predicted, obtain a purchase quantity prediction model based on the training data, and input the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result; an analysis module, which is used to obtain real-time price information, perform trend change analysis on the real-time price information, and obtain a trend analysis result; a first generation module, which is used to obtain real-time inventory information, and generate a purchase quantity and a purchase budget based on the real-time inventory information, the demand prediction result and the trend analysis result; a calculation module, which is used to obtain real-time supplier information, confirm the criteria and weights of each supplier based on the real-time supplier information, so as to calculate a comprehensive evaluation score corresponding to each supplier; a second generation module, which generates a supplier ranking result based on the comprehensive evaluation score, and generates a purchase order based on the purchase quantity, the purchase budget and the supplier ranking result.

[0016] Optionally, in a first implementation method of the second aspect of the present invention, the processing module includes: a first processing unit, used to obtain historical procurement data, use the pandas library to perform duplicate data deletion processing on the historical procurement data, and use the mean filling method to fill missing values ​​on the historical procurement data to obtain filled data; a second processing unit, used to convert the date format and data type in the filled data respectively, and use the Min-Max normalization method to standardize the converted filled data to obtain standard data; a third processing unit, used to perform feature extraction processing on the standard data, and create lagging features based on the standard data to obtain feature data; a partitioning unit, used to partition the feature data based on a preset partitioning ratio to obtain training data, wherein the training data includes a training set and a test set.

[0017] Optionally, in a second implementation method of the second aspect of the present invention, the prediction module includes: a first setting unit, used to set the date data included in the training data as an index to obtain adjustment data; a first calculation unit, used to calculate the autocorrelation function and the partial correlation function to obtain the initial order of the model, and initialize the ARIMA model based on the initial order; a first fitting unit, used to estimate the autoregressive coefficient, differential parameter and moving average coefficient in the ARIMA model by the least squares method to achieve the fitting of the ARIMA model; a training unit, used to input the adjustment data into the fitted ARIMA model for training to obtain a procurement quantity forecasting model; a first forecasting unit, used to obtain information to be forecasted, input the information to be forecasted into the procurement quantity forecasting model to obtain a demand forecasting result.

[0018] Optionally, in a third implementation of the second aspect of the present invention, the analysis module includes: a fourth processing unit, used to obtain real-time price information, perform format conversion processing on the real-time price information, and obtain converted price information; a second setting unit, used to set the date in the converted price information as an index to obtain adjusted price information; a second fitting unit, used to adopt a moving average method to generate a moving average line based on the adjusted price information, and use a linear regression method to fit the moving average line to obtain a trend analysis result, wherein the trend analysis result is a price trend line.

[0019] Optionally, in a fourth implementation method of the second aspect of the present invention, the first generation module includes: a first acquisition unit, used to acquire real-time inventory information, the real-time inventory information including real-time inventory level and maximum inventory storage capacity; a second calculation unit, used to calculate an initial quantity based on the real-time inventory information and the demand forecast result, and adjust the initial quantity based on the trend analysis result to obtain the purchase quantity; a confirmation unit, used to confirm the purchase budget based on the trend analysis structure and the purchase quantity.

[0020] Optionally, in a fifth implementation of the second aspect of the present invention, the calculation module includes: a fifth processing unit, used to acquire real-time supplier information and perform preprocessing to obtain preprocessed supplier information; a second acquisition unit, used to acquire preset evaluation indicators and preset multiple criteria, and based on the preprocessed supplier information, preset evaluation indicators and preset multiple criteria, use the hierarchical analysis method to acquire weights corresponding to the criteria; a third calculation unit, used to acquire a prebuilt DEA model, input the preprocessed supplier information into the prebuilt DEA model, and obtain an efficiency score corresponding to the supplier; a fourth calculation unit, used to combine the weights corresponding to the criteria and the efficiency score corresponding to the supplier to obtain a comprehensive evaluation score corresponding to the supplier.

[0021] Optionally, in a sixth implementation of the second aspect of the present invention, the second generation module includes: a sorting unit, used to arrange each supplier in descending order based on the comprehensive evaluation score and using a bubble sort algorithm to obtain a supplier sorting result; a screening unit, used to screen and obtain a target supplier range based on the purchase quantity, purchase budget and supplier sorting result, and determine the purchase quota of each supplier within the selected supplier range; a generation unit, used to generate a purchase order based on the target supplier range and the purchase quota, and assign a unique order number to the purchase order.

[0022] A third aspect of the present invention provides a purchase order generation device, comprising: a memory and at least one processor, wherein the memory stores instructions; at least one of the processors calls the instructions in the memory to enable the purchase order generation device to execute each step of the purchase order generation method described in any one of the above items.

[0023] A fourth aspect of the present invention provides a computer-readable storage medium having instructions stored thereon, and when the instructions are executed by a processor, the various steps of any of the above-mentioned purchase order generation methods are implemented.

[0024] In the technical solution of the present invention, historical procurement data is processed and preprocessed to train a procurement quantity prediction model; information to be predicted is obtained and input into the procurement quantity prediction model to obtain demand prediction results; real-time price trends are analyzed to obtain trend analysis results; real-time inventory information, demand forecast results and trend analysis results are combined to generate procurement quantities and procurement budgets; supplier information is evaluated, criteria and weights are determined, and comprehensive evaluation scores corresponding to suppliers are calculated; suppliers are ranked according to the comprehensive evaluation scores, and procurement orders are generated based on procurement quantities, procurement budgets and supplier ranking results; the method disclosed in the present application integrates real-time procurement demand and price fluctuation trends to formulate corresponding procurement strategies, which can not only significantly improve the efficiency of procurement activities and reduce procurement costs, but also enhance the competitiveness of logistics companies in the market. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A first flow chart of a method for generating a purchase order provided by an embodiment of the present invention;

[0026] Figure 2 A second flow chart of the purchase order generation method provided by an embodiment of the present invention;

[0027] Figure 3 A third flow chart of the purchase order generation method provided by an embodiment of the present invention;

[0028] Figure 4 A fourth flow chart of a method for generating a purchase order provided by an embodiment of the present invention;

[0029] Figure 5 A fifth flow chart of the purchase order generation method provided by the embodiment of the present invention;

[0030] Figure 6 A sixth flow chart of a purchase order generation method provided by an embodiment of the present invention;

[0031] Figure 7 A seventh flow chart of a purchase order generation method provided by an embodiment of the present invention;

[0032] Figure 8 A schematic diagram of the structure of a purchase order generating device provided by an embodiment of the present invention;

[0033] Fig. 9 A schematic diagram of the structure of a purchase order generating device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The present invention provides a purchase order generation method, apparatus, device and storage medium. In the present invention, the terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0036] 101. Obtain historical purchase data and perform preprocessing and segmentation processing to obtain training data;

[0037] In this embodiment, by acquiring and processing historical procurement data, not only the time for manual data collection and processing is greatly reduced, but also the work efficiency is significantly improved; through the systematic data processing process, data cleaning, integration and division can be completed quickly, laying a solid foundation for the subsequent training of the procurement quantity prediction model.

[0038] 102. Acquire information to be predicted, train a purchase quantity prediction model based on the training data, and input the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result;

[0039] In this embodiment, the information to be predicted may be a date sequence of a period of time in the future, that is, a time range that needs to be predicted.

[0040] 103. Obtain real-time price information, perform trend change analysis on the real-time price information, and obtain trend analysis results;

[0041] In this embodiment, by conducting in-depth trend analysis on real-time price information, not only can the changing dynamics of market prices be accurately grasped, but future price trends can also be predicted, providing solid data support for the formulation of procurement budgets.

[0042] 104. Acquire real-time inventory information, and generate a purchase quantity and a purchase budget based on the real-time inventory information, the demand forecast result, and the trend analysis result;

[0043] In this embodiment, the purchase quantity and purchase budget generated by combining real-time inventory information, demand forecast results and trend analysis results are more scientific and reasonable, effectively avoiding the problem of inventory backlog or shortage, and ensuring the stability and flexibility of the supply chain.

[0044] 105. Obtain real-time supplier information, confirm the criteria and weight of each supplier based on the real-time supplier information, and calculate the comprehensive evaluation score corresponding to each supplier;

[0045] In this embodiment, the objectivity and fairness of the evaluation results are ensured by a quantitative approach, and the generated supplier ranking results not only help logistics companies accurately lock in high-quality suppliers, but also optimize supply chain management, improve procurement efficiency and reduce procurement costs.

[0046] 106. Generate a supplier ranking result based on the comprehensive evaluation score, and generate a purchase order based on the purchase quantity, the purchase budget and the supplier ranking result.

[0047] The present application discloses a purchase order generation method, which processes historical purchase data and performs preprocessing to train a purchase quantity prediction model; obtains information to be predicted and inputs it into the purchase quantity prediction model to obtain demand prediction results; analyzes real-time price trends to obtain trend analysis results; generates purchase quantities and purchase budgets by combining real-time inventory information, demand prediction results and trend analysis results; evaluates supplier information, determines criteria and weights, and calculates comprehensive evaluation scores corresponding to suppliers; sorts suppliers according to the comprehensive evaluation scores, and generates purchase orders based on purchase quantities, purchase budgets and supplier sorting results; the method disclosed in the present application can not only accurately grasp real-time purchase needs, but also integrate real-time purchase needs with price fluctuation trends to formulate corresponding purchase strategies, which can not only significantly improve the efficiency of purchase activities and reduce purchase costs, but also enhance the competitiveness of logistics companies in the market.

[0048] See also Figure 2 The second embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0049] 201. Obtain historical purchase data, use the pandas library to perform duplicate data deletion processing on the historical purchase data, and use the mean filling method to fill the missing values ​​of the historical purchase data to obtain filled data;

[0050] In this embodiment, the pandas library is used to deduplicate the historical procurement data, and the mean filling method is used to effectively fill the gaps in the data. This not only can quickly identify and remove redundant data, but also greatly improves the overall quality and availability of the data set, laying a solid foundation for subsequent training work.

[0051] 202. Convert the date format and data type in the fill-in data respectively, and standardize the converted fill-in data using the Min-Max normalization method to obtain standard data;

[0052] In this embodiment, since the historical procurement data contains a date field, in order to ensure the consistency of the date format, the pandas library can be used to convert the date column to a suitable date and time type; further, check and ensure that the data type meets the requirements of model training, and perform format conversion on the data that does not meet the requirements of model training. For example, the purchase quantity should be a numeric type rather than a string type; for numeric procurement data (such as purchase amount, purchase quantity, etc.), if the dimensions of different features are different, it may affect the training effect of the model. Therefore, it is necessary to use the Min-Max normalization method to standardize the converted fill-in data so that procurement data of different magnitudes (such as purchase amount and purchase quantity) have the same weight in model training.

[0053] 203. Perform feature extraction processing on the standard data, and create a hysteresis feature based on the standard data to obtain feature data;

[0054] In this embodiment, the pandas library can be used to extract useful time features from standard data, such as year, month, day, day of the week, etc. The extracted time features have an important impact on the prediction of procurement demand. For example, the procurement volume of certain commodities in a specific month or day of the week may change regularly. Furthermore, procurement demand is usually related to past procurement behavior, and a lag feature can be created to reflect this correlation. For example, a feature representing the procurement volume of the previous week is created. By creating lag features, the feature dimension of the data is further enriched, so that the model can capture more time series information, thereby significantly improving the prediction accuracy of the model.

[0055] 204. Performing division processing on the feature data based on a preset division ratio to obtain training data, wherein the training data includes a training set and a test set;

[0056] In this embodiment, in order to evaluate the performance of the model, the preprocessed historical purchase data needs to be divided into a training set and a test set; the preset division ratio is: 70%-80% of the data is used for training, and 20%-30% of the data is used for testing.

[0057] See also Figure 3 A third embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0058] 301. Setting the date data included in the training data as an index to obtain adjustment data;

[0059] In this embodiment, by setting the date data in the training data as an index, time information can be fully utilized so that the model can better capture the time trends and periodic changes in the data during analysis and prediction, thereby improving the overall prediction accuracy and robustness of the model.

[0060] 302. Calculate the autocorrelation function and the partial correlation function to obtain the initial order of the model, and initialize the ARIMA model based on the initial order;

[0061] In this embodiment, the initial order of the ARIMA model is determined by calculating the autocorrelation function and the partial correlation function, which avoids the subjectivity and arbitrariness of the artificial selection of the order in the traditional method, ensures that the setting of the model parameters is more reasonable and accurate, and the determined initial order is the autoregressive order and the moving average order.

[0062] 303. Estimate the autoregressive coefficient, difference parameter and moving average coefficient in the ARIMA model by the least squares method to achieve the fitting of the ARIMA model;

[0063] In this embodiment, the least squares method is used to estimate the autoregressive coefficient, difference parameter and moving average coefficient in the model, and the parameter setting of the model is further optimized, so that the model can fit the training data more accurately and improve the training effect of the purchase quantity prediction model.

[0064] 304. Input the adjusted data into the fitted ARIMA model for training to obtain a purchase quantity prediction model;

[0065] During the model training process, the predicted values ​​are compared with the true values ​​in the test set to evaluate the performance of the model. The root mean square error is used as the evaluation indicator. The root mean square error calculates the average of the squares of the differences between the predicted values ​​and the true values, and then takes the square root, thereby providing a numerical value to measure the prediction accuracy of the model. Based on the evaluation indicators, it is determined whether the model has reached the expected level of accuracy, or whether further adjustment and optimization are needed to improve the prediction performance of the final output purchase quantity forecasting model.

[0066] 305. Obtain information to be predicted, input the information to be predicted into the purchase quantity prediction model, and obtain a demand prediction result.

[0067] See also Figure 4 The fourth embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0068] 401. Acquire real-time price information, perform format conversion processing on the real-time price information, and obtain converted price information;

[0069] In this embodiment, by performing format conversion processing on real-time price information, the readability and usability of the price information are improved, making the data more intuitive and easy to understand and in line with forecasting requirements, thereby greatly improving work efficiency.

[0070] 402. Set the date in the converted price information as an index to obtain the adjusted price information;

[0071] 403. Using a moving average method, generating a moving average line based on the adjusted price information, and fitting the moving average line using a linear regression method to obtain a trend analysis result, wherein the trend analysis result is a price trend line;

[0072] In this embodiment, the moving average method is used to generate a moving average line, which effectively smooths price fluctuations, reduces noise interference, and makes the price trend more clearly visible; the linear regression method is used to fit the moving average line to generate a price trend line. The generated price trend line intuitively displays information such as price change trends and change rates, providing strong support for decision-making, which not only enhances the accuracy of trend predictions, but also provides a scientific data basis for subsequent procurement budget generation.

[0073] See also Figure 5 The fifth embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0074] 501. Acquire real-time inventory information, where the real-time inventory information includes a real-time inventory level and a maximum inventory storage capacity;

[0075] In this embodiment, real-time inventory information is obtained to avoid inventory backlog or shortage problems caused by delayed information.

[0076] 502. Calculate an initial quantity based on the real-time inventory information and the demand forecast result, and adjust the initial quantity based on the trend analysis result to obtain a purchase quantity;

[0077] In this embodiment, the initial quantity is calculated based on real-time inventory information and demand forecast results, and on this basis, the initial quantity is fine-tuned in combination with trend analysis results to ultimately determine a reasonable purchase quantity; this method not only makes full use of historical sales data and market demand forecasts, but also fully considers changes in market trends, making procurement plans more scientific and accurate; through this multi-dimensional, multi-level analysis, companies can effectively avoid capital occupation and inventory backlogs caused by excessive procurement, or supply chain disruptions caused by insufficient procurement.

[0078] 503. Confirming a procurement budget based on the trend analysis structure and the procurement quantity;

[0079] In this embodiment, through in-depth analysis of market trends and precise control of procurement quantities, the enterprise can formulate a practical procurement budget to ensure that procurement activities are carried out efficiently within the budget.

[0080] See also Figure 6 The sixth embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0081] 601. Acquire real-time supplier information and pre-process it to obtain pre-processed supplier information;

[0082] In this embodiment, the preprocessing includes cleaning, sorting and standardization to ensure the quality and consistency of the data.

[0083] 602. Obtaining preset evaluation indicators and preset multiple criteria, and using a hierarchy analysis method to obtain weights corresponding to the criteria based on the preprocessed supplier information, the preset evaluation indicators and the preset multiple criteria;

[0084] In this embodiment, a hierarchical analysis method is used to obtain weights corresponding to criteria. Specifically, the preset evaluation indicators and criteria are first layered according to logical relationships to form a hierarchical model, and then a judgment matrix is ​​constructed for the criteria at each level. The judgment matrix is ​​used to compare the relative importance of the criteria, and is usually represented by a 1-9 scale. The judgment matrix is ​​then used to calculate the weight vector of each criterion using a suitable algorithm (such as an eigenvector method, a geometric mean method, an arithmetic mean method, etc.). The judgment matrix is ​​then subjected to a consistency check to ensure the rationality of the judgment matrix. If the consistency requirement is not met, the judgment matrix needs to be adjusted. Finally, the weight of each evaluation indicator in the overall evaluation is calculated based on the weight vectors of each level to form a hierarchical total ranking. The complex evaluation problem is decomposed into multiple levels and criteria through the hierarchical analysis method, that is, the weight is calculated using a quantitative method, so that the evaluation process is more systematic and organized. It avoids subjective assumptions and fuzzy evaluations, and improves the accuracy of the evaluation results.

[0085] 603. Obtain a pre-built DEA model, input the pre-processed supplier information into the pre-built DEA model, and obtain an efficiency score corresponding to the supplier;

[0086] In this embodiment, the efficiency score corresponding to the supplier is obtained based on the data envelopment analysis method; specifically, each supplier is taken as a decision unit, and each decision unit has multiple input and output indicators, the input indicators can be the supplier's purchase price, raw material input, etc., and the output indicators can be product quality, delivery time, service level, etc.; then the pre-built DEA model is obtained to calculate the efficiency score of each decision unit to obtain the efficiency score corresponding to the supplier; the data envelopment analysis method can objectively and impartially evaluate the efficiency of each supplier, avoid the interference of human factors, and provide strong support for the selection of suppliers and the generation of procurement strategies.

[0087] 604. Combining the weight corresponding to the criteria and the efficiency score corresponding to the supplier, a comprehensive evaluation score corresponding to the supplier is obtained;

[0088] In this embodiment, by combining the criteria with the corresponding weights, it can be ensured that important criteria receive sufficient attention in the evaluation process, while the influence of secondary criteria is relatively reduced, which helps to avoid subjectivity and one-sidedness in the evaluation process; further, by combining with the corresponding efficiency scores of suppliers, the performance of suppliers can be converted into specific scores, which is convenient for comparison and ranking, and helps to quickly identify suppliers with excellent performance, thereby generating more appropriate procurement decisions.

[0089] See also Figure 7 The seventh embodiment of the purchase order generation method in the embodiment of the present invention includes:

[0090] 701. Based on the comprehensive evaluation scores, the bubble sort algorithm is used to sort the suppliers in descending order to obtain the supplier ranking result;

[0091] In this embodiment, the suppliers are comprehensively evaluated through the bubble sort algorithm, which can ensure that the suppliers are accurately sorted according to the evaluation scores; this sorting method is not only simple and easy, but also has high accuracy and can effectively avoid the influence of human factors on supplier selection.

[0092] 702. Based on the purchase quantity, purchase budget and supplier ranking results, screen the target supplier range and determine the purchase quota of each supplier within the selected supplier range;

[0093] In this embodiment, the purchase quota of each supplier is determined within the selected supplier range, thereby avoiding the problem of idle resources of other suppliers due to excessive concentrated procurement of certain suppliers; at the same time, reasonable quota allocation can also effectively prevent resource waste and shortage in the procurement process, ensuring the smooth operation of the supply chain.

[0094] 703. Generate a purchase order based on the target supplier range and purchase quota, and assign a unique order number to the purchase order;

[0095] In this embodiment, when a purchase order is generated, a unique order number is assigned to facilitate logistics companies to track and manage the purchase order, to grasp the purchase progress in real time, and to promptly discover and resolve problems that arise during the purchase process, thereby greatly improving the efficiency and accuracy of procurement work.

[0096] The purchase order generation method in the embodiment of the present invention is described above. The purchase order generation device in the embodiment of the present invention is described below. Figure 8 In one embodiment of the present invention, a purchase order generating device includes:

[0097] The processing module 801 is used to obtain historical procurement data and perform preprocessing and partitioning processing to obtain training data; the prediction module 802 is used to obtain information to be predicted, obtain a procurement quantity prediction model based on the training data, and input the information to be predicted into the procurement quantity prediction model to obtain a demand prediction result; the analysis module 803 is used to obtain real-time price information, perform trend change analysis on the real-time price information, and obtain a trend analysis result; the first generation module 804 is used to obtain real-time inventory information, and generate a procurement quantity and a procurement budget based on the real-time inventory information, the demand prediction result and the trend analysis result; the calculation module 805 is used to obtain real-time supplier information, confirm the criteria and weight of each supplier based on the real-time supplier information, and calculate the comprehensive evaluation score corresponding to each supplier; the second generation module 806 generates a supplier ranking result based on the comprehensive evaluation score, and generates a purchase order based on the procurement quantity, the procurement budget and the supplier ranking result.

[0098] In this embodiment, the processing module 801 includes: a first processing unit 8011, which is used to obtain historical procurement data, use the pandas library to deduplicate the historical procurement data, and use the mean filling method to fill the missing values ​​of the historical procurement data to obtain filled data; a second processing unit 8012, which is used to convert the date format and data type in the filled data respectively, and use the Min-Max normalization method to standardize the converted filled data to obtain standard data; a third processing unit 8013, which is used to extract features from the standard data, and create lagging features based on the standard data to obtain feature data; a partitioning unit 8014, which is used to partition the feature data based on a preset partitioning ratio to obtain training data, and the training data includes a training set and a test set.

[0099] In this embodiment, the prediction module 802 includes: a first setting unit 8021, which is used to set the date data included in the training data as an index to obtain adjustment data; a first calculation unit 8022, which is used to calculate the autocorrelation function and the partial correlation function to obtain the initial order of the model, and initialize the ARIMA model based on the initial order; a first fitting unit 8023, which is used to estimate the autoregressive coefficient, differential parameter and moving average coefficient in the ARIMA model by the least squares method to achieve the fitting of the ARIMA model; a training unit 8024, which is used to input the adjustment data into the fitted ARIMA model for training to obtain a purchase quantity prediction model; a first prediction unit 8025, which is used to obtain information to be predicted, and input the information to be predicted into the purchase quantity prediction model to obtain a demand forecast result.

[0100] In this embodiment, the analysis module 803 includes: a fourth processing unit 8031, used to obtain real-time price information, perform format conversion processing on the real-time price information, and obtain converted price information; a second setting unit 8032, used to set the date in the converted price information as an index to obtain adjusted price information; a second fitting unit 8033, used to use a moving average method to generate a moving average line based on the adjusted price information, and use a linear regression method to fit the moving average line to obtain a trend analysis result, and the trend analysis result is a price trend line.

[0101] In this embodiment, the first generation module 804 includes: a first acquisition unit 8041, used to acquire real-time inventory information, wherein the real-time inventory information includes a real-time inventory level and a maximum inventory storage capacity; a second calculation unit 8042, used to calculate an initial quantity based on the real-time inventory information and the demand forecast result, and adjust the initial quantity based on the trend analysis result to obtain a purchase quantity; and a confirmation unit 8043, used to confirm a purchase budget based on the trend analysis structure and the purchase quantity.

[0102] In this embodiment, the calculation module 805 includes: a fifth processing unit 8051, which is used to obtain real-time supplier information and perform preprocessing to obtain preprocessed supplier information; a second acquisition unit 8052, which is used to obtain preset evaluation indicators and preset multiple criteria, and based on the preprocessed supplier information, preset evaluation indicators and preset multiple criteria, a hierarchical analysis method is used to obtain weights corresponding to the criteria; a third calculation unit 8053, which is used to obtain a pre-built DEA model, input the pre-processed supplier information into the pre-built DEA model, and obtain an efficiency score corresponding to the supplier; a fourth calculation unit 8054, which is used to combine the weights corresponding to the criteria and the efficiency scores corresponding to the suppliers to obtain a comprehensive evaluation score corresponding to the supplier.

[0103] In this embodiment, the second generation module 806 includes: a sorting unit 8061, which is used to arrange each supplier in descending order based on the comprehensive evaluation score by using a bubble sort algorithm to obtain a supplier sorting result; a screening unit 8062, which is used to screen and obtain a target supplier range based on the purchase quantity, purchase budget and supplier sorting result, and determine the purchase quota of each supplier within the selected supplier range; a generation unit 8063, which is used to generate a purchase order based on the target supplier range and the purchase quota, and assign a unique order number to the purchase order.

[0104] Based on the same idea as the method in the above embodiment, the device provided by the present application can implement the method in the above embodiment.

[0105] above Figure 8 The purchase order generating device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The purchase order generating device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0106] Fig. 91 is a schematic diagram of the structure of a purchase order generation device provided by an embodiment of the present invention. The purchase order generation device 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 910 (for example, one or more processors) and a memory 920, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 933 or data 932. Among them, the memory 920 and the storage medium 930 may be temporary storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the purchase order generation device 900. Furthermore, the processor 910 may be configured to communicate with the storage medium 930, and execute a series of instruction operations in the storage medium 930 on the purchase order generation device 900 to implement the steps of the purchase order generation method provided by the above-mentioned method embodiments.

[0107] The purchase order generating device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input and output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Fig. 9 The structure of the purchase order generating device shown does not constitute a limitation of the purchase order generating device, and may include more or less components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0108] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the computer executes the steps of the purchase order generation method.

[0109] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0111] Finally, it should be noted that the above description is only a preferred example of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a purchase order, characterized in that: include: Obtain historical purchase data and perform preprocessing and segmentation to obtain training data; Acquire information to be predicted, train a purchase quantity prediction model based on the training data, and input the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result; Obtain real-time price information, perform trend change analysis on the real-time price information, and obtain trend analysis results; Acquire real-time inventory information, and generate a purchase quantity and a purchase budget based on the real-time inventory information, the demand forecast result, and the trend analysis result; Obtain real-time supplier information, confirm the criteria and weights of each supplier based on the real-time supplier information, and calculate the comprehensive evaluation score corresponding to each supplier; A supplier ranking result is generated based on the comprehensive evaluation score, and a purchase order is generated based on the purchase quantity, the purchase budget and the supplier ranking result.

2. The purchase order generation method according to claim 1, characterized in that: The historical purchase data is obtained and pre-processed and divided to obtain training data, including: Obtain historical purchase data, use the pandas library to delete duplicate data from the historical purchase data, and use the mean filling method to fill missing values ​​in the historical purchase data to obtain filled data; The date format and data type in the fill-in data are converted respectively, and the converted fill-in data are standardized using the Min-Max normalization method to obtain standard data; Perform feature extraction processing on the standard data, and create hysteresis features based on the standard data to obtain feature data; The feature data is divided and processed based on a preset division ratio to obtain training data, wherein the training data includes a training set and a test set.

3. The purchase order generation method according to claim 1, characterized in that: The step of obtaining the information to be predicted, training a purchase quantity prediction model based on the training data, and inputting the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result includes: The date data included in the training data is set as the index to obtain the adjustment data; Calculate the autocorrelation function and the partial correlation function to obtain the initial order of the model, and initialize the ARIMA model based on the initial order; The autoregressive coefficient, difference parameter and moving average coefficient in the ARIMA model are estimated by the least squares method to achieve the fitting of the ARIMA model; Inputting the adjusted data into the fitted ARIMA model for training to obtain a purchase quantity prediction model; Obtain the information to be predicted, input the information to be predicted into the purchase quantity prediction model, and obtain the demand prediction result.

4. The purchase order generation method according to claim 1, characterized in that: The acquiring of real-time price information, performing trend change analysis on the real-time price information, and obtaining trend analysis results include: Acquire real-time price information, perform format conversion on the real-time price information, and obtain converted price information; Set the date in the converted price information as the index to obtain the adjusted price information; The moving average method is adopted to generate a moving average line based on the adjusted price information, and the moving average line is fitted using a linear regression method to obtain a trend analysis result, which is a price trend line.

5. The purchase order generation method according to claim 1, characterized in that: The acquiring of real-time inventory information and generating a purchase quantity and a purchase budget based on the real-time inventory information, the demand forecast result and the trend analysis result include: Acquiring real-time inventory information, wherein the real-time inventory information includes a real-time inventory level and a maximum inventory storage capacity; Calculating an initial quantity based on the real-time inventory information and the demand forecast result, and adjusting the initial quantity based on the trend analysis result to obtain a purchase quantity; A procurement budget is confirmed based on the trend analysis structure and the procurement quantity.

6. The purchase order generation method according to claim 1, characterized in that: The obtaining of real-time supplier information and confirming the criteria and weight of each supplier based on the real-time supplier information to calculate a comprehensive evaluation score corresponding to each supplier include: Acquire real-time supplier information and pre-process it to obtain pre-processed supplier information; Obtaining preset evaluation indicators and preset multiple criteria, and using a hierarchical analysis method to obtain weights corresponding to the criteria based on the preprocessed supplier information, the preset evaluation indicators and the preset multiple criteria; Obtaining a pre-built DEA model, inputting the pre-processed supplier information into the pre-built DEA model, and obtaining an efficiency score corresponding to the supplier; The weight corresponding to the criteria and the efficiency score corresponding to the supplier are combined to obtain a comprehensive evaluation score corresponding to the supplier.

7. The purchase order generation method according to claim 1, characterized in that: Generating a supplier ranking result based on the comprehensive evaluation score, and generating a purchase order based on the purchase quantity, the purchase budget and the supplier ranking result, includes: Based on the comprehensive evaluation scores, the bubble sort algorithm is used to sort each supplier in descending order to obtain the supplier ranking result; Based on the purchase quantity, purchase budget and supplier ranking results, the target supplier range is screened and the purchase quota of each supplier is determined within the selected supplier range; Generate a purchase order based on the target supplier range and purchasing quota, and assign a unique order number to the purchase order.

8. A purchase order generating device, characterized in that: include: A processing module is used to obtain historical purchase data and perform preprocessing and segmentation processing to obtain training data; A prediction module, used to obtain information to be predicted, train a purchase quantity prediction model based on the training data, and input the information to be predicted into the purchase quantity prediction model to obtain a demand prediction result; The analysis module is used to obtain real-time price information, analyze the trend changes of the real-time price information, and obtain trend analysis results; A first generating module, configured to obtain real-time inventory information, and generate a purchase quantity and a purchase budget based on the real-time inventory information, the demand forecast result, and the trend analysis result; A calculation module is used to obtain real-time supplier information, confirm the criteria and weight of each supplier based on the real-time supplier information, and calculate a comprehensive evaluation score corresponding to each supplier; The second generating module generates a supplier ranking result based on the comprehensive evaluation score, and generates a purchase order based on the purchase quantity, the purchase budget and the supplier ranking result.

9. A purchase order generating device, characterized in that: The purchase order generating device comprises: a memory and at least one processor, wherein instructions are stored in the memory; At least one of the processors calls the instructions in the memory to enable the purchase order generating device to execute each step of the purchase order generating method as described in any one of claims 1-7.

10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the purchase order generation method as described in any one of claims 1-7 are implemented.