Resource consumption trend prediction method, device and equipment based on random forest
The resource consumption trend prediction method based on random forest solves the problem of resource consumption prediction in the traditional system, achieves accurate prediction and reasonable scheduling of training support resources, and ensures the timeliness and adequacy of resource supply.
Patent Information
- Application Number
- CN202210742491.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-06-28
AI Technical Summary
The traditional training support system lacks effective resource tracking and management methods, making it difficult to accurately predict the consumption of training support resources.
The resource consumption trend prediction method based on random forest is adopted to ensure resource consumption data through collecting and processing training, establishing a resource consumption factor set and a weight set, using the random forest algorithm for prediction, and obtaining the resource consumption prediction results.
It achieves effective prediction of the consumption of training support resources, ensures timely replenishment of resources, more reasonable dispatch of resources, and ensures adequate supplies in advance in the face of emergencies.
Smart Images

Figure CN115130576B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of resource coordination of training support data, and relates to a method, device and equipment for predicting resource consumption trends based on random forests. Background Art
[0002] Training support is crucial to the entire training management work, and a complete training support system can greatly improve the overall quality of training management. Relying on the massive data resources of training management, using big data technology to analyze and discover the internal logical relationship of information in various fields of training management, analyzing and predicting the consumption trend of training support resources will help to prepare for training and have strong practical significance. However, in the process of realizing the present invention, the inventors found that in the traditional training support system, there is no special means of tracking and managing training support resources, and there is a technical problem that the consumption of training support resources cannot be effectively predicted. Summary of the invention
[0003] In response to the problems existing in the above-mentioned traditional technologies, the present invention proposes a resource consumption trend prediction method based on random forest, a resource consumption trend prediction device based on random forest, a resource prediction equipment and a computer-readable storage medium that can effectively predict the consumption of training support resources.
[0004] In order to achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0005] On the one hand, a method for predicting resource consumption trends based on random forest is provided, comprising the steps of:
[0006] Collect training support resource consumption data for a set period of time and perform statistical processing to establish a training support resource consumption data set;
[0007] According to the data characteristics of the training guarantee resource consumption data, a resource consumption factor set and a resource consumption factor weight set are established;
[0008] According to the training support resource consumption data set, resource consumption factor set and resource consumption factor weight set, the training support resource consumption trend is predicted based on the random forest algorithm to obtain the resource consumption prediction result.
[0009] In one embodiment, the steps of collecting training support resource consumption data for a set period and performing data statistical processing to establish a training support resource consumption data set include:
[0010] Performing statistical processing on the training support resource consumption data according to the set time range to obtain an initial training support resource consumption data set;
[0011] The initial training support resource consumption data set is subjected to data preprocessing to obtain an established training support resource consumption data set; the data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
[0012] In one embodiment, the step of establishing a resource consumption factor set and a resource consumption factor weight set according to data characteristics of training guarantee resource consumption data includes:
[0013] According to the data characteristics of the training guarantee resource consumption data, each resource consumption factor is analyzed and extracted to obtain a resource consumption factor set;
[0014] Set weights for each resource consumption factor respectively to obtain a resource consumption factor weight set.
[0015] In one embodiment, the step of predicting the trend of training guarantee resource consumption based on the random forest algorithm according to the training guarantee resource consumption data set, the resource consumption factor set and the resource consumption factor weight set to obtain the resource consumption prediction result includes:
[0016] Use Bootstrap to randomly sample from the training guarantee resource consumption dataset with replacement N times and extract m samples each time to form N learning sample subsets; N and m are both positive integers not less than 2;
[0017] Develop N decision trees based on N learning sample subsets;
[0018] According to the resource consumption factor set and the resource consumption factor weight set, the optimal features are selected for each decision tree;
[0019] Split each decision tree according to the corresponding optimal features to form a random forest;
[0020] Get the predicted values of random forest and take the average as the resource consumption prediction result.
[0021] In one embodiment, the step of selecting the optimal feature for each decision tree according to the resource consumption factor set and the resource consumption factor weight set includes:
[0022] According to the resource consumption factor set and the resource consumption factor weight set, an optimal consumption factor is selected as the optimal feature for each decision tree using the information gain rate.
[0023] On the other hand, a resource consumption trend prediction device based on random forest is also provided, comprising:
[0024] The data collection module is used to collect the training support resource consumption data in a set period and perform data statistics processing to establish a training support resource consumption data set;
[0025] A characteristic factor module, used to establish a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data;
[0026] The prediction output module is used to predict the trend of training support resource consumption based on the random forest algorithm according to the training support resource consumption data set, the resource consumption factor set and the resource consumption factor weight set, and obtain the resource consumption prediction result.
[0027] In one embodiment, the data acquisition module includes:
[0028] The data statistics submodule is used to perform statistical processing on the training support resource consumption data within a set time range to obtain an initial training support resource consumption data set;
[0029] The preprocessing submodule is used to perform data preprocessing on the initial training support resource consumption data set to obtain the established training support resource consumption data set; the data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
[0030] In one embodiment, the feature factor module includes:
[0031] The factor extraction submodule is used to analyze and extract various resource consumption factors according to the data characteristics of the training guarantee resource consumption data to obtain a resource consumption factor set;
[0032] The weight setting submodule is used to set weights for each resource consumption factor respectively to obtain a resource consumption factor weight set.
[0033] On the other hand, a resource prediction device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned random forest-based resource consumption trend prediction method when executing the computer program.
[0034] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned resource consumption trend prediction method based on random forest are implemented.
[0035] One of the above technical solutions has the following advantages and beneficial effects:
[0036] The above-mentioned method, device and equipment for predicting resource consumption trend based on random forests first collects training support resource consumption data for a set period of time, performs data statistical processing on the data to establish a training support resource consumption data set, then establishes a resource consumption factor set and its corresponding resource consumption factor weight set based on the data characteristics of the training support resource consumption data, and finally uses the established training support resource consumption data set, resource consumption factor set and resource consumption factor weight set to predict resource consumption based on the random forest algorithm. In this way, according to the actual needs of the traditional training support system, after establishing the relevant data set of training support resource consumption, the random forest algorithm is used to predict resource consumption, achieving the purpose of effectively predicting the consumption of training support resources, ensuring that various resources can be replenished in time in the training support task, playing a positive role in the scheduling of training support resources, and when facing various emergencies, it can also ensure in advance that sufficient scheduling training support materials are provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A schematic diagram of a process of predicting a resource consumption trend based on random forest in one embodiment;
[0039] Figure 2 A schematic diagram of a resource consumption prediction process based on random forest in one embodiment;
[0040] Figure 3 is a flow chart of a method for predicting resource consumption trends based on random forests in another embodiment;
[0041] Figure 4 The figure is a schematic diagram of the module structure of a resource consumption trend prediction device based on random forest in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0044] It should be noted that the reference to "embodiment" in this document means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The presentation of the phrase at various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments.
[0045] Those skilled in the art will appreciate that the embodiments described herein may be combined with other embodiments. The term "and / or" used in the present specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0046] Random forest refers to a classifier that uses multiple decision trees to train and predict samples. This method combines the idea of "Bootstrap aggregating" and "random subspace method" to build a collection of decision trees. The process of building each decision tree is as follows:
[0047] 1. Use N to represent the number of training cases (samples), and M to represent the number of features.
[0048] 2. Input the number of features m, which is used to determine the decision result of a node on the decision tree; m should be much smaller than M.
[0049] 3. Take samples N times from N training cases (samples) with replacement to form a training set (bootstrap sampling), and use the unsampled cases (samples) for prediction to evaluate their errors.
[0050] 4. For each node, randomly select m features. The decision of each node in the decision tree is determined based on these features. Based on these m features, calculate the best split method.
[0051] 5. Each tree will grow completely without pruning, which may be adopted after building a normal tree classifier.
[0052] The construction of random forest includes two aspects: random selection of data and random selection of features to be selected.
[0053] Random selection of data: First, take a sample with replacement from the original data set to construct a sub-data set. The amount of data in the sub-data set is the same as that of the original data set. Elements of different sub-data sets can be repeated, and elements in the same sub-data set can also be repeated. Second, use the sub-data sets to construct sub-decision trees, put this data into each sub-decision tree, and each sub-decision tree outputs a result. Third, if there is new data that needs to be classified through the random forest, the output result of the random forest can be obtained by voting on the judgment results of the sub-decision trees. For example, suppose there are 3 sub-decision trees in the random forest, the classification results of 2 sub-trees are Class A, and the classification result of 1 sub-tree is Class B, then the classification result of the random forest is Class A.
[0054] Random selection of candidate features: Similar to the random selection of data sets, each splitting process of the subtree in the random forest does not use all the candidate features, but randomly selects certain features from all the candidate features, and then selects the best feature from the randomly selected features. This can make the decision trees in the random forest different from each other, improve the diversity of the system, and thus improve the classification performance.
[0055] Based on the actual needs of the traditional training support system, this application designs a training support resource consumption trend prediction method based on the random forest algorithm: first, the original resource consumption data is statistically processed, and then according to the data characteristics of the resource consumption data, the resource consumption factors are analyzed and extracted, the resource consumption factor weights are set, and a resource consumption factor set and a resource consumption factor weight set are established. Finally, based on the random forest algorithm, the training support resource consumption trend is predicted, and the average of the entire forest prediction value is taken to obtain the final resource consumption prediction result, thereby achieving the purpose of effectively predicting the training support resource consumption situation.
[0056] The following will describe the implementation of the present invention in detail with reference to the accompanying drawings in the embodiment diagram of the present invention.
[0057] See also Figure 1 In one embodiment, the present application provides a resource consumption trend prediction method based on random forest, including the following processing steps S12 to S16:
[0058] S12, collecting training support resource consumption data for a set period of time and performing data statistical processing to establish a training support resource consumption data set.
[0059] It can be understood that the training support resource consumption process is continuous, and the training support resource consumption data of a certain period of time is collected and statistically processed to establish a training support resource consumption data set. The set period is also the selected data collection period, such as the aforementioned certain period of time. The set period can cover the previous training execution time, or the previous training accurate time and its training execution time, which can be specifically determined according to the start and end time of the training support resource consumption in the previous training execution process.
[0060] The training support resource consumption data collected within a set period may include multiple resource consumption data, which may be determined by the number of data collections within the set period and the number of single collections. The data collection method may be, but is not limited to, manual reporting, on-site data registration equipment transmission, or fetching from a database server, as long as the required data can be collected.
[0061] S14, establishing a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data.
[0062] It can be understood that, by analyzing the data characteristics of the training support resource consumption data, it can be determined that the training support resource consumption is constrained by multiple factors. Therefore, the various resource consumption factors that constrain the training support resource consumption can be determined by the data characteristics of the training support resource consumption data, and the set of these resource consumption factors is the resource consumption factor set. The data characteristics of the training support resource consumption data can be characteristic information reflecting the quantity, speed, type, source and other consumption-related contents of the training support resource consumption, and the resource consumption factors refer to factors that directly or indirectly affect the aforementioned consumption-related contents (such as but not limited to training environment factors, training tasks and human factors, etc.).
[0063] For each resource consumption factor, a corresponding weight can be set for it, which is called the resource consumption factor weight. The set of resource consumption factor weights is the resource consumption factor weight set. For the resource consumption factor set, the importance of each resource consumption factor may be different in actual applications. Therefore, different weights can be assigned to each resource consumption factor according to actual application needs.
[0064] S16, according to the training guarantee resource consumption data set, the resource consumption factor set and the resource consumption factor weight set, based on the random forest algorithm, the training guarantee resource consumption trend is predicted to obtain the resource consumption prediction result.
[0065] It can be understood that after establishing the training support resource consumption data set, the random forest algorithm can be applied to construct and develop each sub-decision tree, and then the optimal features provided by the resource consumption factor set and the resource consumption factor weight set are used to split the sub-decision trees in sequence to form a corresponding random forest. The average of the predicted values of the entire random forest is the resource consumption prediction result of the final prediction output. This prediction result can be used to indicate the expected consumption of each training support resource, thereby providing effective reference and guidance for future training preparations.
[0066] The above-mentioned resource consumption trend prediction method based on random forest first collects the training support resource consumption data of the set time period, performs data statistics processing on it to establish a training support resource consumption data set, then establishes a resource consumption factor set and its corresponding resource consumption factor weight set based on the data characteristics of the training support resource consumption data, and finally uses the established training support resource consumption data set, resource consumption factor set and resource consumption factor weight set to predict the resource consumption based on the random forest algorithm. In this way, according to the actual needs of the traditional training support system, after establishing the relevant data set of training support resource consumption, the random forest algorithm is used to predict resource consumption, achieving the purpose of effectively predicting the consumption of training support resources, ensuring that various resources can be replenished in time in the training support task, playing a positive role in the scheduling of training support resources, and when facing various emergencies, it can also ensure that sufficient scheduling training support materials are provided in advance.
[0067] In one embodiment, the above step S12 may specifically include the following processing steps:
[0068] Performing statistical processing on the training support resource consumption data according to the set time range to obtain an initial training support resource consumption data set;
[0069] The initial training support resource consumption data set is subjected to data preprocessing to obtain an established training support resource consumption data set; the data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
[0070] It can be understood that the set time range refers to the data statistical time range selected within the set period of data collection, such as but not limited to the set number of months, weeks, days or hours, and can be set according to actual application needs.
[0071] Specifically, according to a certain time range T, the training support resource consumption data is counted to obtain a set of training support resource consumption data sets D = {D 1 ,D 2 ,…,D t}, the data set at this time is called the initial training guarantee resource consumption data set, where Dt ={D t1 ,D t2 ,…,D tn}, n represents the total amount of training support resource consumption data collected within any time range t.
[0072] The initial training support resource consumption data set was preprocessed, such as data deduplication, to ensure that there were no duplicate values in the data set. As for the missing values and outliers in the data, these missing values and outliers were deleted in consideration of the continuity of the records of the training support resource consumption process.
[0073] Through the above processing, a training guarantee resource consumption dataset can be established efficiently and accurately.
[0074] In one embodiment, the above step S14 may specifically include the following processing steps:
[0075] According to the data characteristics of the training guarantee resource consumption data, each resource consumption factor is analyzed and extracted to obtain a resource consumption factor set;
[0076] Set weights for each resource consumption factor respectively to obtain a resource consumption factor weight set.
[0077] Specifically, after analyzing the data characteristics of the training support resource consumption data, the set of resource consumption factors obtained can be recorded as E = {E 1 ,E 2 ,…,E n}; where E n Indicates the nth resource consumption factor.
[0078] After determining the resource consumption factors, the weights of the resource consumption factors can be set to establish the corresponding resource consumption factor weight set, which can be recorded as A = {A 1 ,A 2 ,…,A n}, for the resource consumption factor set, the importance of each resource consumption factor is different, so different weights can be assigned to each resource consumption factor.
[0079] In one embodiment, Figure 2 and Figure 3 As shown, the above step S16 may specifically include the following processing steps S162 to S169:
[0080] S162, using Bootstrap to randomly sample with replacement from the training guarantee resource consumption dataset N times and extract m samples each time to form N learning sample subsets; N and m are both positive integers not less than 2;
[0081] S164, developing N decision trees according to the N learning sample subsets;
[0082] S166, selecting the optimal feature for each decision tree according to the resource consumption factor set and the resource consumption factor weight set;
[0083] S168, splitting each decision tree according to the corresponding optimal feature to form a random forest;
[0084] S169, obtaining the prediction value of the random forest and taking the average value as the resource consumption prediction result.
[0085] As you can understand, Bootstrap is a commonly used processing tool in the bagging method. When Bootstrap is used to randomly sample with replacement, the sample selected is called in-bag data, and the data not selected is called out-of-bag data. Since the samples are randomly selected, each decision tree is independent of each other.
[0086] In some implementations, the above step S166 may specifically include the following processing steps:
[0087] According to the resource consumption factor set and the resource consumption factor weight set, an optimal consumption factor is selected as the optimal feature for each decision tree using the information gain rate.
[0088] Specifically, for each decision tree, according to the resource consumption factor set E and the resource consumption factor weight set A, an optimal consumption factor (i.e., optimal feature) is selected as the root node of the decision tree using the information gain rate, and then split in sequence. Each decision tree is split according to its optimal feature, and no pruning is required in this process to form a random forest. According to the regression results of each decision tree (which constitute the prediction value of the entire random forest), the final resource consumption prediction result (set) is obtained by averaging.
[0089] Through the above random forest, the required resource consumption prediction results can be efficiently obtained using the above data set.
[0090] It should be understood that although Figures 1 to 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps can be executed in other orders. Figures 1 to 3At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequentially, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0091] See also Figure 4 In one embodiment, a resource consumption trend prediction device 100 based on random forest is provided, comprising a data collection module 11, a characteristic factor module 13 and a prediction output module 15. The data collection module 11 is used to collect training guarantee resource consumption data of a set period and perform data statistical processing to establish a training guarantee resource consumption data set. The characteristic factor module 13 is used to establish a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data. The prediction output module 15 is used to predict the training guarantee resource consumption trend based on the random forest algorithm according to the training guarantee resource consumption data set, the resource consumption factor set and the resource consumption factor weight set to obtain a resource consumption prediction result.
[0092] The above-mentioned random forest-based resource consumption trend prediction device 100, through the cooperation of various modules, first collects the training support resource consumption data of the set time period, performs data statistical processing on it to establish a training support resource consumption data set, and then establishes a resource consumption factor set and its corresponding resource consumption factor weight set based on the data characteristics of the training support resource consumption data, and finally uses the established training support resource consumption data set, resource consumption factor set and resource consumption factor weight set to predict the resource consumption based on the random forest algorithm. In this way, according to the actual needs of the traditional training support system, after establishing the relevant data set of training support resource consumption, the random forest algorithm is used to predict resource consumption, so as to achieve the purpose of effectively predicting the consumption of training support resources, ensure that various resources can be replenished in time in the training support task, play a positive role in the scheduling of training support resources, and when facing various emergencies, it can also ensure in advance that sufficient scheduling training support materials are provided.
[0093] In one embodiment, the data acquisition module 11 includes a data statistics submodule and a preprocessing submodule. The data statistics submodule is used to perform statistical processing on the training support resource consumption data according to a set time range to obtain an initial training support resource consumption data set. The preprocessing submodule is used to perform data preprocessing on the initial training support resource consumption data set to obtain an established training support resource consumption data set; data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
[0094] In one embodiment, the characteristic factor module 13 includes a factor extraction submodule and a weight setting submodule. The factor extraction submodule is used to analyze and extract each resource consumption factor according to the data characteristics of the training guarantee resource consumption data to obtain a resource consumption factor set. The weight setting submodule is used to set weights for each resource consumption factor to obtain a resource consumption factor weight set.
[0095] In one embodiment, the prediction output module 15 includes a sampling submodule, a development submodule, a feature selection submodule, a splitting submodule and a mean submodule. Among them, the sampling submodule is used to randomly sample N times with replacement from the training guarantee resource consumption data set using Bootstrap and extract m samples each time to form N learning sample subsets; N and m are both positive integers not less than 2. The development submodule is used to develop N decision trees based on the N learning sample subsets. The feature selection submodule is used to select the optimal features for each decision tree according to the resource consumption factor set and the resource consumption factor weight set. The splitting submodule is used to split each decision tree according to the corresponding optimal features to form a random forest. The mean submodule is used to obtain the predicted value of the random forest and take the average value as the resource consumption prediction result.
[0096] In one embodiment, the feature selection submodule is specifically used to select an optimal consumption factor as the optimal feature for each decision tree based on the resource consumption factor set and the resource consumption factor weight set using the information gain rate.
[0097] Regarding the specific limitations of the random forest-based resource consumption trend prediction device 100, please refer to the corresponding limitations of the random forest-based resource consumption trend prediction method above, which will not be repeated here. Each module in the above-mentioned random forest-based resource consumption trend prediction device 100 can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of a device with a specific data processing function in the form of hardware, or can be stored in the memory of the aforementioned device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. The aforementioned device can be, but is not limited to, various types of data processing devices already available in the art.
[0098] In one embodiment, a resource prediction device is also provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the following processing steps when executing the computer program: collecting training support resource consumption data for a set time period and performing data statistical processing to establish a training support resource consumption data set; establishing a resource consumption factor set and a resource consumption factor weight set based on the data characteristics of the training support resource consumption data; and predicting the trend of training support resource consumption based on the random forest algorithm based on the training support resource consumption data set, the resource consumption factor set and the resource consumption factor weight set to obtain a resource consumption prediction result.
[0099] It can be understood that in addition to the memory and processor mentioned above, the above-mentioned resource prediction device also includes other software and hardware components not listed in this specification. The specific components can be determined according to the model of the specific data processing equipment in different application scenarios, and this specification will no longer list them one by one in detail.
[0100] In one embodiment, when the processor executes the computer program, the added steps or sub-steps in each embodiment of the above-mentioned resource consumption trend prediction method based on random forest can also be implemented.
[0101] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the following processing steps are implemented: collecting training support resource consumption data for a set time period and performing data statistical processing to establish a training support resource consumption data set; establishing a resource consumption factor set and a resource consumption factor weight set based on the data characteristics of the training support resource consumption data; and predicting the trend of training support resource consumption based on the random forest algorithm based on the training support resource consumption data set, the resource consumption factor set and the resource consumption factor weight set to obtain a resource consumption prediction result.
[0102] In one embodiment, when the computer program is executed by a processor, it can also implement the steps or sub-steps added in each embodiment of the above-mentioned resource consumption trend prediction method based on random forest.
[0103] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus dynamic random access memory (Rambus DRAM, referred to as RDRAM) and interface dynamic random access memory (DRDRAM).
[0104] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0105] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and all of them belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A resource consumption trend prediction method based on random forest, characterized in that: Includes steps: Collect training support resource consumption data for a set period of time and perform statistical processing to establish a training support resource consumption data set; Establishing a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data; According to the training guarantee resource consumption data set, the resource consumption factor set and the resource consumption factor weight set, a training guarantee resource consumption trend prediction is performed based on a random forest algorithm to obtain a resource consumption prediction result; wherein, Bootstrap is used to randomly sample from the training guarantee resource consumption dataset with replacement N times and m samples are extracted each time to form N learning sample subsets; N and m are both positive integers not less than 2; and N decision trees are developed based on the N learning sample subsets; According to the resource consumption factor set and the resource consumption factor weight set, respectively select the optimal feature for each decision tree; wherein, according to the resource consumption factor set and the resource consumption factor weight set, respectively select an optimal consumption factor as the optimal feature for each decision tree using the information gain rate; Splitting each decision tree according to the corresponding optimal feature to form a random forest; The predicted values of the random forest are obtained and an average value is taken as the resource consumption prediction result.
2. The method for predicting resource consumption trends based on random forests according to claim 1, characterized in that: The steps of collecting training support resource consumption data for a set period and performing data statistical processing to establish a training support resource consumption data set include: Performing statistical processing on the training support resource consumption data according to a set time range to obtain an initial training support resource consumption data set; The initial training guarantee resource consumption data set is subjected to data preprocessing to obtain the established training guarantee resource consumption data set; the data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
3. The method for predicting resource consumption trends based on random forests according to claim 1 or 2, characterized in that: The step of establishing a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data comprises: Analyze and extract each of the resource consumption factors according to the data characteristics of the training support resource consumption data to obtain the resource consumption factor set; A weight is set for each of the resource consumption factors to obtain a weight set of the resource consumption factors.
4. A resource consumption trend prediction device based on random forest, characterized in that: include: The data collection module is used to collect the training support resource consumption data in a set period and perform data statistics processing to establish a training support resource consumption data set; A characteristic factor module, used to establish a resource consumption factor set and a resource consumption factor weight set according to the data characteristics of the training guarantee resource consumption data; A prediction output module is used to predict the trend of training guarantee resource consumption based on the random forest algorithm according to the training guarantee resource consumption data set, the resource consumption factor set and the resource consumption factor weight set, so as to obtain a resource consumption prediction result; wherein the prediction output module includes: A sampling submodule, used to randomly sample from the training guarantee resource consumption dataset N times with replacement using Bootstrap and extract m samples each time to form N learning sample subsets; N and m are both positive integers not less than 2; A development submodule, used for developing N decision trees according to the N learning sample subsets; A feature selection submodule, used to select the optimal feature for each decision tree according to the resource consumption factor set and the resource consumption factor weight set; wherein, according to the resource consumption factor set and the resource consumption factor weight set, an optimal consumption factor is selected as the optimal feature for each decision tree using the information gain rate; A splitting submodule, used for splitting each decision tree according to the corresponding optimal feature to form a random forest; The mean submodule is used to obtain the predicted value of the random forest and take the average value as the resource consumption prediction result.
5. The resource consumption trend prediction device based on random forest according to claim 4 is characterized in that: The data acquisition module comprises: A data statistics submodule, used for performing statistical processing on the training support resource consumption data within a set time range to obtain an initial training support resource consumption data set; The preprocessing submodule is used to perform data preprocessing on the initial training guarantee resource consumption data set to obtain the established training guarantee resource consumption data set; the data preprocessing includes data deduplication processing, missing value and outlier deletion processing.
6. The resource consumption trend prediction device based on random forest according to claim 4 or 5, characterized in that: The characteristic factor module includes: A factor extraction submodule, used for analyzing and extracting each of the resource consumption factors according to the data characteristics of the training guarantee resource consumption data, to obtain the resource consumption factor set; The weight setting submodule is used to set a weight for each of the resource consumption factors to obtain a weight set of the resource consumption factors.
7. A resource prediction device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the resource consumption trend prediction method based on random forests as described in any one of claims 1 to 3 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the random forest-based resource consumption trend prediction method according to any one of claims 1 to 3 are implemented.
