Purchase data prediction method and device, equipment and medium
By building a prediction model based on decision tree, using historical procurement feature data training and optimization, the problem of inefficient prediction of multiple procurement indicators in the existing technology is solved, and efficient and accurate procurement data prediction is achieved.
Patent Information
- Application Number
- CN202411506211.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-10-28
AI Technical Summary
The existing procurement forecasting system is unable to effectively handle complex predictions of multiple procurement indicators, resulting in inefficient predictions and requires manual intervention.
By building a prediction model based on decision tree, using historical procurement feature data to train the decision tree, analyze trends and optimize the prediction model, reduce manual participation, and improve prediction efficiency and accuracy.
It realizes efficient prediction of multiple procurement indicators, reduces manual participation, improves forecasting efficiency and accuracy, and takes into account the cyclicality and future trends of procurement.
Smart Images

Figure CN119048156A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of procurement data prediction, and in particular to a procurement data prediction method, device, equipment and medium. Background Art
[0002] Scientific decision-making is an important responsibility of modern managers. In the procurement management of enterprise suppliers, a common scenario is that some procurement indicators are known, but a considerable number of procurement indicators are still unknown. Therefore, it is necessary to infer the unknown procurement indicators based on the known procurement indicators.
[0003] Currently, the forecasting systems for procurement on the market are basically based on one or two procurement indicators, such as sales-based procurement or production-based procurement. If an enterprise sets many procurement indicators, the existing forecasting system cannot support complex forecasting of multiple indicators, and manual judgment is required to make forecasts, resulting in low forecasting efficiency. Summary of the invention
[0004] The present invention provides a method, device, equipment and medium for predicting procurement data, so as to improve the prediction efficiency of procurement.
[0005] According to one aspect of the present invention, a method for predicting procurement data is provided, comprising:
[0006] Constructing historical procurement characteristic data of a previous procurement cycle based on procurement forecast related data; the procurement cycle includes at least two years;
[0007] Training a decision tree for each year of the procurement cycle according to the historical procurement feature data, and constructing an initial prediction model according to the leaf proportions in each decision tree;
[0008] Performing trend analysis on the historical purchasing characteristic data to obtain expected purchasing characteristic data for future periods;
[0009] The initial prediction model is adjusted and optimized according to the expected procurement feature data to obtain a target prediction model.
[0010] According to another aspect of the present invention, there is provided a purchase data prediction device, comprising:
[0011] A data sorting module, used to construct historical procurement characteristic data of a previous procurement cycle based on procurement forecast related data; the procurement cycle includes at least two years;
[0012] A model building module, used to train a decision tree for each year of the procurement cycle according to the historical procurement feature data, and to build an initial prediction model according to the leaf proportion in each decision tree;
[0013] A trend analysis module, used to perform trend analysis on the historical purchase characteristic data to obtain expected purchase characteristic data for future periods;
[0014] The model optimization module is used to adjust and optimize the initial prediction model according to the expected procurement feature data to obtain a target prediction model.
[0015] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method for predicting procurement data according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for predicting procurement data described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for predicting procurement data described in any embodiment of the present invention when executed.
[0018] The embodiment of the present invention trains a decision tree to generate a prediction model, and uses the prediction model to predict procurement characteristics, thereby reducing the amount of manual participation in the prediction and improving the prediction efficiency. In addition, the periodicity and future trends of procurement are considered in the generation process, thereby improving the accuracy of the prediction.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a method for predicting procurement data provided according to an embodiment of the present invention;
[0022] Figure 2is a flowchart of a method for predicting procurement data provided according to another embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of data in a prediction model provided according to another embodiment of the present invention;
[0024] Figure 4 is a structural schematic diagram of a method for predicting procurement data provided according to another embodiment of the present invention;
[0025] Figure 5 It is a schematic diagram of the structure of an electronic device implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "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.
[0028] Figure 1 This is a flowchart of a method for predicting purchase data provided by an embodiment of the present invention. This embodiment can be applied to the case where a prediction model is generated based on historical purchase feature data, and unknown purchase index values are determined based on the prediction model and known purchase index values. The method can be executed by a purchase data prediction device, which can be implemented in the form of hardware and / or software. The device can be configured in an electronic device with corresponding data processing capabilities, such as a server of a purchase prediction system. Figure 1 As shown, the method includes:
[0029] S110. Construct historical procurement feature data of the previous procurement cycle based on procurement forecast related data.
[0030] S120: training a decision tree for each year of the procurement cycle according to the historical procurement feature data, and constructing an initial prediction model according to the leaf proportions in each decision tree.
[0031] S130. Perform trend analysis on the historical purchase characteristic data to obtain expected purchase characteristic data for future periods.
[0032] S140: Adjust and optimize the initial prediction model according to the expected procurement feature data to obtain a target prediction model.
[0033] Among them, procurement forecast-related data include historical procurement data, market trend data, supplier information and other relevant data. Historical procurement data include procurement volume, procurement frequency, procurement time, etc., market trend data include market price fluctuations, market demand changes, etc., supplier information includes supplier reputation, supply capacity, price, etc. The procurement cycle includes at least two years.
[0034] Specifically, the collection of procurement forecast-related data is a crucial first step. The production and procurement activities of an enterprise have a certain periodicity (for example, a five-year cycle). The procurement forecast-related data of the previous cycle is collected through data sources such as the enterprise's internal database, market research, and public data, and is placed in the source data container. The data in the source data container is preprocessed in various ways, including:
[0035] Invalid processing, by checking whether there are outliers, missing values or duplicate values in the data, and deleting or filling them.
[0036] Compensation processing: It is mainly divided into two categories, numerical and character. First, numerical filling is performed. For data with null values, vector values are extracted from all model fields through the corresponding data model, and the data is searched in the entire model. The data row with a final score of 0.9 is extracted and filled with the current null value field. If it is between 0.5 and 0.8, the core data columns of the data record are found through the data vector of each column, and the columns greater than 0.5 are saved. Finally, the two largest columns are obtained as the data benchmark, and the same data column values are filled; for the remaining null value data, the average, median, interpolation and other methods are used to fill. Secondly, character filling is performed. For character filling, field identification and description are firstly inferred to find fields that may be related, such as whether there is a linear relationship between dictionary values and values. If the field meets the inference relationship, it is filled. For unfilled fields, linear inference is performed on all numerical columns with days, weeks, months, quarters, and years as dimensions to obtain the fields that match this time node for filling.
[0037] Governance processing: In theory, the larger the amount of data, the more accurate the data predictability. For data of different magnitudes, according to the accuracy coefficient of the configured data, it needs to be standardized so that the values of different features are on the same scale.
[0038] After completing the data preprocessing, feature engineering processing (including feature value construction) is performed on the data in the source data container to obtain the historical procurement feature data of the previous cycle, specifically including the historical procurement feature data of each year in the previous cycle.
[0039] The target feature is selected from the historical procurement feature data as the root point of the decision tree, and other features except the target feature are used as leaf nodes of the decision tree to obtain the initial decision tree.
[0040] The initial decision trees are trained using the historical purchasing feature data of each year in the purchasing cycle to obtain a corresponding number of decision trees, each of which corresponds to a year in the purchasing cycle. The underlying relationship between different features in each year of the purchasing cycle is determined based on the leaf proportions in each decision tree, and the initial prediction model is generated based on this relationship.
[0041] The historical procurement feature data is normalized, and the procurement trend of the future cycle (10 years) is constructed using linear regression and logistic regression algorithms to obtain the expected procurement feature data. At the same time, the prediction model is used to predict the procurement trend of the future cycle to obtain the predicted procurement feature data. The expected procurement feature data is compared with the expected procurement feature data, and according to the comparison results of the two, the data in the prediction model is adjusted and optimized to obtain the target prediction model.
[0042] The embodiment of the present invention generates a prediction model by training a decision tree, and uses the prediction model to predict procurement features, thereby reducing the amount of manual participation in the prediction and improving the prediction efficiency. In addition, the periodicity and future trends of procurement are considered in the generation process, thereby improving the accuracy of the prediction.
[0043] Based on the above embodiment, the target characteristics include market trends and annual demand, and the other characteristics include purchase volume, purchase frequency, production volume, sales volume, inventory volume and bill of materials.
[0044] Specifically, as shown in Table 1, the business characteristics of the purchase are distinguished, one or more characteristics under each business characteristic are determined, and the data acquisition logic of each characteristic is pre-specified.
[0045] Table 1 Characteristics of some business features
[0046]
[0047] Figure 2This is a flowchart of a method for predicting purchase data provided by another embodiment of the present invention. This embodiment is optimized and improved on the basis of the above embodiment. Figure 2 As shown, the method includes:
[0048] S210. Construct historical procurement feature data of the previous procurement cycle based on procurement forecast related data.
[0049] S220. Select a target feature from the historical procurement feature data as a root node, and use other features other than the target feature as leaf nodes to obtain an initial decision tree; for each year of the procurement cycle, train the initial decision tree according to the historical procurement feature data of the current year to obtain a decision tree for the current year.
[0050] Among them, the numerical ranges of other features in different decision trees are different.
[0051] Specifically, the target feature is used as the root node of the decision tree, and other features are used as leaf nodes to complete the construction of the initial decision tree. For each year of the procurement cycle, according to the number of leaf nodes, an average distribution is made at 100%, and the actual purchase amount in the historical procurement feature data is calculated to be the same as the purchase amount output by the initial decision tree. Based on this, the proportion of each leaf node is continuously adjusted to obtain the decision tree corresponding to each year.
[0052] S230: Construct a prediction model according to the proportion and value range of leaf nodes in each decision tree.
[0053] Specifically, Figure 3 As shown, the proportional relationship between leaf nodes in the decision tree of each year, as well as the features and feature value intervals corresponding to the leaf nodes are recorded. These data are sorted to obtain a mathematical model, which is the prediction model.
[0054] S240. Perform trend analysis on the historical procurement feature data based on different growth rates to obtain at least two candidate procurement feature data; and select expected procurement feature data for a future period from the candidate procurement features according to the information gain rate of each candidate procurement feature data.
[0055] Specifically, different growth rates (for example, 10%, 20%, and 30%) are pre-set, and trend analysis is performed on the historical procurement feature data according to different growth rates to obtain multiple candidate procurement feature data, and the growth rates adopted by each candidate procurement feature data are different. The information gain rate of each candidate procurement feature data is calculated by a preset algorithm. The larger the information gain rate, the higher the reference value of the candidate procurement feature data. The candidate procurement feature data with an information gain rate greater than the threshold will be determined as the expected procurement feature data for the future period. That is, there can be multiple copies of expected procurement feature data, and for each expected procurement feature data for a growth rate, different expected procurement feature data are used to adjust and optimize the initial prediction model respectively, so as to obtain a prediction model suitable for different growth rates. In subsequent predictions, a prediction model matching the target growth rate can be selected from multiple prediction models according to the target growth rate.
[0056] S250: adjusting and optimizing the initial prediction model according to the expected purchase characteristic data to obtain a target prediction model.
[0057] S260. Based on the target prediction model, determine the hit leaf node and the hit decision tree where the hit leaf node is located according to the numerical interval of the known procurement feature value.
[0058] S270, substitute the known procurement feature value and the proportion of the hit leaf node into the hit decision tree, and retrain the hit decision tree to obtain the target numerical range where the unknown procurement feature value is located; determine the target numerical range as the prediction result of the unknown procurement feature.
[0059] Specifically, during actual prediction, determine the numerical interval where the known purchasing feature value is located, then query the prediction model, determine the leaf node corresponding to the numerical interval, determine it as the hit leaf node, and determine the decision tree where the hit leaf node is located as the hit decision tree. Substitute the known purchasing feature value and the proportion of the hit leaf node into the hit decision tree, and retrain the hit decision tree using the pre-fetched feature data. After the training is completed. The data interval of the leaf node corresponding to the unknown purchasing feature in the decision tree is the target numerical interval where the unknown purchasing feature value is located. The upper limit and lower limit of the target numerical interval are used as the predicted maximum value and predicted minimum value of the unknown purchasing feature value.
[0060] The embodiment of the present invention sets different growth rates to obtain prediction models suitable for different growth rates, thereby improving the applicability of the prediction model and the flexibility of the prediction scheme.
[0061] Figure 4 A schematic diagram of a procurement data prediction device provided by another embodiment of the present invention. Figure 4As shown, the device comprises:
[0062] The data sorting module 310 is used to construct historical procurement characteristic data of the previous procurement cycle according to procurement forecast related data; the procurement cycle includes at least two years;
[0063] A model building module 320 is used to train a decision tree for each year of the procurement cycle according to the historical procurement feature data, and to build an initial prediction model according to the leaf proportion in each decision tree;
[0064] A trend analysis module 330, configured to perform trend analysis on the historical purchase characteristic data to obtain expected purchase characteristic data for a future period;
[0065] The model optimization module 340 is used to adjust and optimize the initial prediction model according to the expected purchase characteristic data to obtain a target prediction model.
[0066] The purchase data prediction device provided in the embodiment of the present invention can execute the purchase data prediction method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0067] Optionally, the model building module 310 includes:
[0068] A decision tree construction unit, used to select a target feature from the historical procurement feature data as a root node, and use other features other than the target feature as leaf nodes to obtain an initial decision tree;
[0069] A decision tree training unit, used for training the initial decision tree for each year of the procurement cycle according to the historical procurement feature data of the current year to obtain a decision tree for the current year;
[0070] Among them, other features have different numerical ranges in different decision trees, including:
[0071] Optionally, the model building module 320 includes:
[0072] The model building unit is used to build a prediction model according to the proportion and value range of leaf nodes in each decision tree.
[0073] Optionally, the device further comprises:
[0074] A hit determination module, used to determine a hit leaf node and a hit decision tree where the hit leaf node is located based on the target prediction model and the numerical interval where the known procurement feature value is located;
[0075] A retraining module, used for substituting the known purchasing feature value and the proportion of the hit leaf node into the hit decision tree, and retraining the hit decision tree to obtain the target value interval of the unknown purchasing feature value;
[0076] A result determination module is used to determine the target numerical range as the prediction result of the unknown procurement feature.
[0077] Optionally, the target characteristics include market trends and annual demand, and the other characteristics include purchase volume, purchase frequency, production volume, sales volume and inventory volume.
[0078] Optionally, the trend analysis module 330 includes:
[0079] A trend analysis unit, used to perform trend analysis on the historical purchase feature data based on different growth rates to obtain at least two candidate purchase feature data;
[0080] The data screening unit is used to select expected procurement feature data of a future period from the candidate procurement features according to the information gain rate of each candidate procurement feature data.
[0081] The purchase data prediction device further described can also execute the purchase data prediction method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0082] Figure 5 A schematic diagram of an electronic device 40 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0083] like Figure 4As shown, the electronic device 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0084] A number of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0085] The processor 41 may be a variety of general and / or dedicated processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as a prediction method for purchase data.
[0086] In some embodiments, the prediction method of purchase data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the prediction method of purchase data described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the prediction method of purchase data in any other appropriate manner (e.g., by means of firmware).
[0087] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0088] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0089] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0090] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0091] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0092] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0093] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0094] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for predicting procurement data, characterized in that: The method comprises: Constructing historical procurement characteristic data of a previous procurement cycle based on procurement forecast related data; the procurement cycle includes at least two years; Training a decision tree for each year of the procurement cycle according to the historical procurement feature data, and constructing an initial prediction model according to the leaf proportions in each decision tree; Performing trend analysis on the historical purchasing characteristic data to obtain expected purchasing characteristic data for future periods; The initial prediction model is adjusted and optimized according to the expected procurement feature data to obtain a target prediction model.
2. The method for predicting purchase data according to claim 1, characterized in that: The decision tree for each year of the procurement cycle is trained based on the historical procurement feature data: Selecting a target feature from the historical purchase feature data as a root node, and taking other features other than the target feature as leaf nodes to obtain an initial decision tree; For each year of the procurement cycle, the initial decision tree is trained according to the historical procurement feature data of the current year to obtain a decision tree for the current year; Among them, the numerical ranges of other features in different decision trees are different.
3. The method for predicting purchase data according to claim 2, characterized in that: The constructing of the initial prediction model according to the leaf proportions in each decision tree comprises: A prediction model is constructed based on the proportion and numerical range of leaf nodes in each decision tree.
4. The method for predicting purchase data according to claim 3, characterized in that: After the initial prediction model is adjusted and optimized according to the expected purchase characteristic data to obtain a target prediction model, the method further includes: Based on the target prediction model, determining a hit leaf node and a hit decision tree where the hit leaf node is located according to a numerical interval where a known purchase feature value is located; Substitute the known procurement feature values and the proportion of the hit leaf nodes into the hit decision tree, and retrain the hit decision tree to obtain the target numerical range where the unknown procurement feature values are located; determine the target numerical range as the prediction result of the unknown procurement feature.
5. The method for predicting purchase data according to claim 3, characterized in that: The target characteristics include market trends and annual demand, and the other characteristics include purchase volume, purchase frequency, production volume, sales volume and inventory volume.
6. The method for predicting purchase data according to claim 1, characterized in that: The expected purchasing characteristic data for a future period obtained by performing trend analysis on the historical purchasing characteristic data includes: Perform trend analysis on the historical purchase feature data based on different growth rates to obtain at least two candidate purchase feature data; The expected procurement feature data of the future period are selected from the candidate procurement features according to the information gain rate of each candidate procurement feature data.
7. A purchase data prediction device, characterized in that: The device comprises: A data sorting module, used to construct historical procurement characteristic data of a previous procurement cycle based on procurement forecast related data; the procurement cycle includes at least two years; A model building module, used to train a decision tree for each year of the procurement cycle according to the historical procurement feature data, and to build an initial prediction model according to the leaf proportion in each decision tree; A trend analysis module, used to perform trend analysis on the historical purchase characteristic data to obtain expected purchase characteristic data for a future period; The model optimization module is used to adjust and optimize the initial prediction model according to the expected procurement feature data to obtain a target prediction model.
8. The purchase data prediction device according to claim 7, characterized in that: The model building module includes: A decision tree construction unit, used to select a target feature from the historical procurement feature data as a root node, and use other features other than the target feature as leaf nodes to obtain an initial decision tree; A decision tree training unit, used for training the initial decision tree for each year of the procurement cycle according to the historical procurement feature data of the current year to obtain a decision tree for the current year; Among them, the numerical ranges of other features in different decision trees are different.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for predicting purchase data according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the procurement data prediction method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
A purchaser account period risk prediction method
CN113191771A
Construction method and device of shopping guide decision tree, equipment and storage medium
CN117151829A
Product retail management method and system
CN117788045A
Metered material inventory demand prediction method based on combined prediction model
CN117829347A
Cross-border sales prediction model construction method and system based on heterogeneous ensemble learning
CN118332333A
