A dispatching and scheduling method based on decision tree
Through the decision tree-based dispatching method, processing and analyzing production data and building a decision tree model, the problem of lack of scientificity and systematicity of the traditional dispatching production method is solved, intelligent scheduling and optimization of production tasks is realized, and production efficiency and customer satisfaction are improved.
Patent Information
- Application Number
- CN202411396968.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The traditional method of dispatching production is not scientific and systematic, and it is difficult to adapt to changes in the modern production environment. The existing data-driven methods have problems such as high model complexity, large calculation volume, and difficulty in adapting in real time.
The decision tree-based dispatching method is adopted, and the collected data is processed and analyzed, the comprehensive features and characteristics are determined, the decision tree model is constructed, and the dispatching dispatching plan is generated in real time.
It realizes intelligent scheduling and optimization of dispatched production, improves the feasibility and execution efficiency of the plan, reduces production costs, shortens the lead time, and improves customer satisfaction.
Smart Images

Figure CN118917631B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a dispatching and scheduling method based on a decision tree. Background Art
[0002] In the manufacturing industry, dispatching and scheduling is a crucial link, which involves the rational allocation of production resources and the effective execution of production tasks. Traditional dispatching and scheduling methods often rely on manual experience and intuition, lacking scientificity and systematicness. With the rapid development of the manufacturing industry and the continuous change of production requirements, traditional methods can no longer meet the requirements of modern production.
[0003] In recent years, with the continuous development of artificial intelligence and big data technologies, data-driven dispatching and scheduling methods have gradually become a research hotspot. These methods collect and analyze production data, and use algorithms such as machine learning to build models to achieve intelligent monitoring and optimization of the production process. However, existing methods still have some limitations, such as high model complexity, large computational amount, and difficulty in adapting to real-time changes.
[0004] Therefore, the present invention provides a dispatching and scheduling method based on a decision tree. Summary of the Invention
[0005] The present invention provides a dispatching and scheduling method based on a decision tree, which is used to determine second data by performing a first process on the collected first data, analyze the second data to determine a first comprehensive feature, a second comprehensive feature, a first feature, and a second feature, and determine a dimensionality reduction feature. A decision tree model is constructed based on the second data and the dimensionality reduction feature, and a dispatching and scheduling plan for real-time order information is determined and executed based on the decision tree model. All data related to dispatching and scheduling can be comprehensively analyzed, the data quality and consistency can be improved, a dispatching and scheduling plan can be generated in real time to adapt to changes in the production environment and requirements, the intelligent scheduling and scheduling optimization of production tasks can be simply and efficiently achieved, the feasibility and execution efficiency of the dispatching and scheduling plan can be improved, the production cost can be reduced, the delivery cycle can be shortened, and customer satisfaction can be improved.
[0006] The present invention provides a dispatching and scheduling method based on a decision tree, including:
[0007] 101: Collect data related to dispatching and scheduling to determine first data, and perform a first process on the first data to determine second data;
[0008] 102: Determine a first sub-feature, a second sub-feature, a third sub-feature, and a fourth sub-feature based on the second data, and determine a first comprehensive feature and a second comprehensive feature;
[0009] 103: Determine a first feature based on the second data and the first comprehensive feature. At the same time, determine a second feature based on the second data and the second comprehensive feature, and determine a dimensionality reduction feature;
[0010] 104: Construct a decision tree model based on the second data and the dimensionality-reduced features, determine the dispatching and production scheduling plan for real-time order information based on the decision tree model, and execute it.
[0011] According to a dispatching and production scheduling method based on a decision tree provided by the present invention, the first data includes multiple historical order information;
[0012] The first processing includes data cleaning, missing value processing, and data normalization of the first data.
[0013] According to a dispatching and production scheduling method based on a decision tree provided by the present invention, determining the first sub-feature, the second sub-feature, the third sub-feature, and the fourth sub-feature based on the second data includes:
[0014] Extract the data related to numerical values in the second data to determine the first sub-data, where the first sub-data includes multiple numerical categories related to numerical values in the second data;
[0015] Perform statistical analysis on each numerical category in the first sub-data respectively, and determine the first sub-feature based on the statistical analysis results of all numerical categories;
[0016] Extract the data related to time in the second data to determine the second sub-data, where the second sub-data includes multiple time series categories related to time in the second data;
[0017] Perform time series analysis on each time series category in the second sub-data respectively, and determine the second sub-feature based on the time series analysis results of all time series categories;
[0018] Extract all the remaining data in the second data except the first sub-data and the second sub-data to determine the third sub-data, where the third sub-data includes multiple classification categories;
[0019] Determine the third sub-feature based on each category in the third sub-data;
[0020] Encode all the identifiers under each classification category in the third sub-data respectively, perform interaction on the encoded identifiers under all classification categories related to workers to determine the worker sub-feature, perform interaction on the encoded identifiers under all classification categories related to equipment to determine the equipment sub-feature, and at the same time, perform interaction on the encoded identifiers under all classification categories related to the environment to determine the environment sub-feature, where the worker sub-feature includes multiple worker vectors, the equipment sub-feature includes multiple equipment vectors, and the environment sub-feature includes multiple environment vectors;
[0021] Perform permutation and combination on all the encoded identifiers under the worker sub-feature, the equipment sub-feature, and the environment sub-feature to determine the fourth sub-feature, where the fourth sub-feature includes multiple category vectors.
[0022] A dispatching and scheduling method based on decision tree provided by the present invention determines a first comprehensive feature and a second comprehensive feature, including:
[0023] Perform standardization processing on the first sub-feature, the second sub-feature, and the third sub-feature, and determine the first comprehensive feature based on the standardized first sub-feature, second sub-feature, and third sub-feature;
[0024] Perform standardization processing on the first sub-feature, the second sub-feature, and the fourth sub-feature, and determine the second comprehensive feature based on the standardized first sub-feature, second sub-feature, and fourth sub-feature, where the second comprehensive feature includes multiple feature vectors.
[0025] A dispatching and scheduling method based on decision tree provided by the present invention determines a first feature based on the second data and the first comprehensive feature, including:
[0026] Determine a corresponding first order vector for each historical order information in the second data according to the first comprehensive feature;
[0027] Determine an order matrix based on the first order vectors of all historical order information;
[0028] Wherein, N1 represents the number of historical order information in the second data, and N2 represents the number of sub-features in the first comprehensive feature. , , respectively represent the order value of the first sub-feature, the feature value of the j-th sub-feature, and the feature value of the N2-th sub-feature of the first historical order information in the second data in the first comprehensive feature. , , respectively represent the order value of the first sub-feature, the feature value of the j-th sub-feature, and the feature value of the N2-th sub-feature of the i-th historical order information in the second data in the first comprehensive feature. , , respectively represent the feature value of the first sub-feature, the feature value of the j-th sub-feature, and the order value of the N2-th sub-feature of the N1-th historical order information in the second data in the first comprehensive feature.
[0029] Determine a first eigenvalue and a first eigenvector based on the order matrix;
[0030] Wherein, C is the covariance matrix. is the transpose matrix of the order matrix. is the k-th first eigenvalue. represents the k-th first eigenvector. ;
[0031] Sort the first eigenvalues from largest to smallest, and calculate the importance rate of the first Nu eigenvalues.
[0032] Among them, , represents the importance rate of the first Nu eigenvalues after sorting, represents the adjustment parameter, represents the p-th first eigenvalue after sorting the order matrix, represents the p-th first eigenvalue based on the adjustment parameter after sorting the order matrix, represents the cumulative importance value of the first Nu eigenvalues after sorting the order matrix, represents the cumulative importance value of all the first eigenvalues after sorting the order matrix, represents the first importance rate of the first Nu eigenvalues after sorting the order matrix, represents the first weight of the first importance rate, represents the second importance rate of the first Nu eigenvalues after sorting the order matrix, represents the second weight of the second importance rate;
[0033] Extract all Nu values with an importance rate greater than 95%, and select the first first eigenvalues after sorting to construct the first projection matrix;
[0034] Project the second data into the first projection matrix to determine the first feature.
[0035] According to a dispatching and scheduling method based on a decision tree provided by the present invention, a second feature is determined based on the second data and the second comprehensive feature, and a dimensionality reduction feature is determined, including:
[0036] Match all historical order information in the second data based on the second comprehensive feature to determine the order set of each feature vector and the second order vector of each historical order information in the order set;
[0037] Determine the second eigenvalue and the second eigenvector based on the order sets of all feature vectors;
[0038] Among them, represents the deviation value of the corresponding feature vector of all order sets, represents the deviation value between all feature vectors, represents the b-th second order vector in the order set of the a-th feature vector, represents the second order fitting vector in the order set of the a-th feature vector, The difference vector between the b-th second order vector and the second order fitting vector in the order set representing the a-th eigenvector, The transposed row vector of the difference vector between the b-th second order vector and the mean value of the second order vectors in the order set representing the a-th eigenvector, Represents the number of second order vectors in the order set of the a-th eigenvector, Represents the number of eigenvectors in the second comprehensive feature, Represents the total fitting value of the second order vectors in the order set of all eigenvectors in the second data, The difference vector between the second order fitting vector and the total fitting value of the second order vectors in the order set of the a-th eigenvector, The transposed row vector of the difference vector between the second order fitting vector and the total fitting value of the second order vectors in the order set of the a-th eigenvector, Is the c-th second eigenvalue of, Is the c-th second eigenvector, ;
[0039] Select the top Second eigenvalues after sorting to construct a second projection matrix;
[0040] Project the second data into the second projection matrix to determine the second feature;
[0041] Extract the features that appear in both the first feature and the second feature to determine the dimensionality-reduced feature.
[0042] According to a dispatching and scheduling method based on a decision tree provided by the present invention, a decision tree model is constructed based on the second data and the dimensionality-reduced feature, and a dispatching and scheduling plan for real-time order information is determined and executed based on the decision tree model, including:
[0043] Divide the second data into a training set and a test set,
[0044] Construct a decision tree model based on the dimensionality-reduced feature, the historical order requirements of all historical order information in the training set, and the historical execution plan;
[0045] Use the historical order requirements of all historical order information in the test set as the input of the trained decision tree model, and the decision tree model outputs the decision execution plan corresponding to each historical order information;
[0046] Evaluate the model performance based on the historical execution plan and the decision execution plan of each historical order information, and perform the first optimization on the decision tree model based on the evaluation results.
[0047] A dispatching and scheduling method based on a decision tree provided by the present invention constructs a decision tree model based on second data and dimensionality-reduced features, determines a dispatching and scheduling plan for real-time order information based on the decision tree model, and executes it. It further includes:
[0048] Input the real-time order information into the optimized decision tree model to generate a dispatching and scheduling plan for the real-time order information;
[0049] Execute the dispatching and scheduling plan, evaluate the execution result of the dispatching and scheduling plan, and perform a second optimization on the decision tree model based on the execution result.
[0050] Compared with the prior art, the beneficial effects of the present application are as follows:
[0051] By performing a first processing on the collected first data to determine the second data, analyzing the second data to determine the first comprehensive feature, the second comprehensive feature, the first feature, and the second feature, and determining the dimensionality-reduced feature, constructing a decision tree model based on the second data and the dimensionality-reduced feature, determining a dispatching and scheduling plan for real-time order information based on the decision tree model, and executing it, all data related to dispatching and scheduling can be comprehensively analyzed, improving data quality and consistency, generating a dispatching and scheduling plan in real time to adapt to changes in the production environment and requirements, simply and efficiently realizing intelligent scheduling and scheduling optimization of production tasks, improving the feasibility and execution efficiency of the dispatching and scheduling plan, reducing production costs, shortening the delivery cycle, and improving customer satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a flowchart of a dispatching and scheduling method based on a decision tree provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0054] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.
[0055] Example 1:
[0056] An embodiment of the present invention provides a dispatching and scheduling method based on a decision tree, as Figure 1 shown, including:
[0057] 101: Collect data related to dispatching and scheduling to determine first data, and perform a first process on the first data to determine second data;
[0058] 102: Determine a first sub-feature, a second sub-feature, a third sub-feature, and a fourth sub-feature based on the second data, and determine a first comprehensive feature and a second comprehensive feature;
[0059] 103: Determine a first feature based on the second data and the first comprehensive feature. At the same time, determine a second feature based on the second data and the second comprehensive feature, and determine a dimensionality reduction feature;
[0060] 104: Construct a decision tree model based on the second data and the dimensionality reduction feature, and determine and execute a dispatching and scheduling plan for real-time order information based on the decision tree model.
[0061] In this embodiment, the second data represents the data obtained after data cleaning, missing value filling, data normalization, and data transformation of the collected first data.
[0062] In this embodiment, the first sub-feature represents the feature determined after statistical analysis of all the data related to values in the second data.
[0063] In this embodiment, the second sub-feature represents the feature determined after time series analysis of all the data related to time in the second data.
[0064] In this embodiment, the third sub-feature represents the feature determined for all the categories included in all the data in the second data except the first sub-data and the second sub-data.
[0065] In this embodiment, the fourth sub-feature is a plurality of category vectors obtained by permuting and combining all the identification codes under the worker sub-feature, the equipment sub-feature, and the environment sub-feature.
[0066] In this embodiment, the first comprehensive feature is determined according to the first sub-feature, the second sub-feature, and the third sub-feature, and the second comprehensive feature is determined according to the first sub-feature, the second sub-feature, and the fourth sub-feature.
[0067] In this embodiment, the dimensionality reduction feature is all the features that appear in both the first feature and the second feature.
[0068] Advantages of the above technical solution: By performing first processing on the collected first data to determine second data, analyzing the second data to determine the first comprehensive feature, the second comprehensive feature, the first feature, and the second feature, and determining the dimensionality reduction feature, constructing a decision tree model based on the second data and the dimensionality reduction feature, determining and executing the dispatching and production scheduling plan for real-time order information, all data related to dispatching and production scheduling can be comprehensively analyzed, the data quality and consistency can be improved, the dispatching and production scheduling plan can be generated in real time to adapt to changes in the production environment and requirements, the intelligent scheduling and production scheduling optimization of production tasks can be simply and efficiently achieved, the feasibility and execution efficiency of the dispatching and production scheduling plan can be improved, the production cost can be reduced, the delivery cycle can be shortened, and the customer satisfaction can be improved.
[0069] Embodiment 2:
[0070] An embodiment of the present invention provides a dispatching and production scheduling method based on a decision tree, where the first data includes multiple historical order information;
[0071] The first processing includes data cleaning, missing value processing, and data normalization of the first data.
[0072] In this embodiment, the historical order information includes the working hours of workers, dispatching time, execution time, equipment usage time, order completion time, types of work that workers are good at, worker skill levels, worker working years, worker shifts, equipment types, equipment status, working temperature, humidity, and illumination, etc.;
[0073] In this embodiment, data cleaning means deleting duplicate records, processing outliers, and correcting data entry errors, etc. for the collected first data related to dispatching and production scheduling.
[0074] In this embodiment, missing value processing means deleting or filling in missing values for the first data after data cleaning.
[0075] In this embodiment, data normalization means converting the first data after missing value processing into a unified scale.
[0076] Advantages of the above technical solution: By determining the first data and the first processing, it can provide a data basis for determining the first sub-feature, the second sub-feature, the third sub-feature, and the fourth sub-feature, comprehensively analyze all data related to dispatching and production scheduling, and improve the data quality and consistency.
[0077] Embodiment 3:
[0078] An embodiment of the present invention provides a dispatching and production scheduling method based on a decision tree. Determining the first sub-feature, the second sub-feature, the third sub-feature, and the fourth sub-feature based on the second data includes:
[0079] Extract the data related to numerical values in the second data to determine the first sub-data, where the first sub-data includes multiple numerical categories related to numerical values in the second data;
[0080] Perform statistical analysis on each numerical category in the first sub-data respectively, and determine the first sub-feature based on the statistical analysis results of all numerical categories;
[0081] Extract the data related to time in the second data to determine the second sub-data, where the second sub-data includes multiple time series categories related to time in the second data;
[0082] Perform time series analysis on each time series category in the second sub-data respectively, and determine the second sub-feature based on the time series analysis results of all time series categories;
[0083] Extract all the remaining data in the second data except the first sub-data and the second sub-data to determine the third sub-data, where the third sub-data includes multiple classification categories;
[0084] Determine the third sub-feature based on each category in the third sub-data;
[0085] Encode all the identifiers under each classification category in the third sub-data respectively, perform interaction on the encoded identifiers under all classification categories related to workers to determine the worker sub-feature, perform interaction on the encoded identifiers under all classification categories related to equipment to determine the equipment sub-feature, and at the same time, perform interaction on the encoded identifiers under all classification categories related to the environment to determine the environment sub-feature, where the worker sub-feature includes multiple worker vectors, the equipment sub-feature includes multiple equipment vectors, and the environment sub-feature includes multiple environment vectors;
[0086] Perform permutation and combination on all the encoded identifiers under the worker sub-feature, the equipment sub-feature, and the environment sub-feature to determine the fourth sub-feature, where the fourth sub-feature includes multiple category vectors.
[0087] In this embodiment, the numerical categories included in the first sub-data can be the historical order quantity of the second data, the equipment running time of each historical order information, the working hours of workers, etc.
[0088] In this embodiment, the statistical analysis can include trend analysis of data value distribution, analysis of dispersion degree, determination of peak and valley values, and determination of extreme values for the data values of all historical order information under each numerical category.
[0089] In this embodiment, the first sub-feature includes basic numerical data features and composite features. The basic numerical data features can be order quantity features, average working hours of workers, and the composite features can be worker efficiency and equipment production efficiency, etc.
[0090] In this embodiment, the time series categories included in the second sub-data can be the dispatching time, execution time, equipment usage time, order completion time, etc. of all historical order information.
[0091] In this embodiment, the time series analysis can include moving average, periodic decomposition, autocorrelation coefficient calculation, and differencing for all time values under each time series category.
[0092] In this embodiment, the second sub-features can be the volatility of dispatching time (dispatching times are different in different time periods), the trend of execution time (execution time is shortened due to improved production efficiency), and the periodicity of equipment usage time.
[0093] In this embodiment, the classification categories included in the third sub-data can be the types of work a worker is good at, the skill level of the worker, the working years of the worker, the worker's shift, the equipment type, the equipment status, the working temperature, humidity, and light, etc.
[0094] In this embodiment, the third sub-features include all classification categories. The number of classification categories in the third sub-data is the same as the number of features in the third sub-features. For example, when the six classification categories included in the third sub-data are the skill level of the worker, the working years of the worker, the worker's shift, the equipment type, the equipment status, and the environmental area, the third sub-features include six features, namely, the skill level feature of the worker, the working years feature of the worker, the worker's shift feature, the equipment type feature, the equipment status feature, and the environmental area feature.
[0095] In this embodiment, all identification codes under all classification categories related to workers are interacted to determine the worker sub-features. For example, classification categories: skill level of the worker (such as: junior, intermediate, senior), working years of the worker (such as: 1 - 3 years, 3 - 5 years, more than 5 years), types of work a worker is good at (such as: welder, electrician, machine operator), worker's shift (such as: morning shift, night shift, graveyard shift); identification codes: skill level code: S1 (junior), S2 (intermediate), S3 (senior), working years code: Y1 (1 - 3 years), Y2 (3 - 5 years), Y3 (more than 5 years), type of work code: T1 (welder), T2 (electrician), T3 (machine operator), shift code: B1 (morning shift), B2 (night shift), B3 (graveyard shift); interact to determine the worker sub-features, worker vector 1: S2, Y1, T1, B1 (indicating an intermediate welder with 1 - 3 years of work experience, responsible for the morning shift), worker vector 2: S3, Y3, T2, B3 (indicating a senior electrician with more than 5 years of experience, responsible for the graveyard shift).
[0096] In this embodiment, the worker sub-features can be used to identify workers with specific skill levels, experience, types of work, and shifts.
[0097] In this embodiment, all identification codes under all classification categories related to the device are interacted to determine the device sub-features. For example, classification categories: device type (such as: mechanical device, electronic device, sensing device), device status (such as: normal, under repair, faulty), device location (such as: production line A, production line B, warehouse), identification codes: device type code: M1 (mechanical device), M2 (electronic device), M3 (sensing device), device status code: N1 (normal), N2 (under repair), N3 (faulty), device location code: L1 (production line A), L2 (production line B), L3 (warehouse), examples of device sub-feature vectors: device vector 1: M1, N1, L1 (indicating a normal working mechanical device located on production line A), device vector 2: M3, N2, L3 (indicating a sensing device under repair located in the warehouse).
[0098] In this embodiment, the device sub-features can be used to identify devices with specific device types, device statuses, and device locations, etc.
[0099] In this embodiment, all identification codes under all classification categories related to the environment are interacted to determine the environment sub-features. For example, classification categories: temperature range (such as: low temperature, medium temperature, high temperature), humidity range (such as: dry, moderate, humid), lighting condition (such as: low light, normal light, strong light), identification codes: temperature range code: p1 (low temperature), p2 (medium temperature), p3 (high temperature), humidity range code: H1 (dry), H2 (moderate), H3 (humid), lighting condition code: Q1 (low light), Q2 (normal light), Q3 (strong light), examples of environment sub-feature vectors: environment vector 1: p2, H2, Q2 (indicating an environment with medium temperature, moderate humidity, and normal light), environment vector 2: p3, H3, Q1 (indicating an environment with high temperature, humid, and low light).
[0100] In this embodiment, the environment sub-features can be used to identify environments with specific temperatures, humidities, and lighting conditions.
[0101] In this embodiment, the different category vectors of the fourth sub-features are determined by the permutation and combination of all different identification codes included in the worker sub-features, device sub-features, and environment sub-features. For example, category vector 1: S2 - Y1 - T1 - B1 - M1 - N1 - L1 - p2 - H2 - Q2, indicating an intermediate welder with 1 - 3 years of work experience operating a normal state mechanical device in the morning shift, the device is located on production line A, and the environment is medium temperature, moderate humidity, and normal light; category vector 2: S3 - Y3 - T2 - B2 - M2 - N2 - L2 - p3 - H1 - Q3, indicating a senior electrician with more than 5 years of work experience operating a repaired electronic device in the night shift, the device is located on production line B, and the environment is high temperature, dry, and strong light.
[0102] In this embodiment, worker, equipment, and environment sub - features are combined to identify a solution that can achieve the best fit under specific production conditions. For example, when certain specific workers operate certain equipment in a specific environment, they may exhibit better efficiency or product quality. By quickly screening combinations of workers, equipment, and environments that meet specific conditions, workers with relevant skills and experience, available equipment, and suitable production environments can be automatically matched.
[0103] Beneficial effects of the above - mentioned technical solution: Determining the first sub - feature, the second sub - feature, the third sub - feature, and the fourth sub - feature based on the second data can provide a data basis for determining the first comprehensive feature and the second comprehensive feature, comprehensively analyzing all data related to work assignment and production scheduling, and enhancing the feature expression ability.
[0104] Embodiment 4:
[0105] An embodiment of the present invention provides a work assignment and production scheduling method based on a decision tree, which determines a first comprehensive feature and a second comprehensive feature, including:
[0106] Perform standardization processing on the first sub - feature, the second sub - feature, and the third sub - feature, and determine the first comprehensive feature based on the standardized first sub - feature, second sub - feature, and third sub - feature;
[0107] Perform standardization processing on the first sub - feature, the second sub - feature, and the fourth sub - feature, and determine the second comprehensive feature based on the standardized first sub - feature, second sub - feature, and fourth sub - feature, where the second comprehensive feature includes multiple feature vectors.
[0108] In this embodiment, all features included in the first sub - feature, the second sub - feature, and the third sub - feature are subjected to standardization processing, converting all features included in the first sub - feature, the second sub - feature, and the third sub - feature into the same scale or distribution, and combining all the standardized features into the first comprehensive feature. For example: the first sub - feature includes 2 numerical data features and 2 composite features, the second sub - feature includes 3 features, and the third sub - feature includes 4 features. Z - score standardization, Min - Max standardization, etc. can be performed on the features in the first sub - feature, time - difference standardization, periodic processing, etc. can be performed on the features in the second sub - feature, and One - Hot category encoding, Label category encoding, etc. can be performed on the classification categories of the third sub - feature. The first comprehensive feature is determined according to the 4 features in the processed first sub - feature, the 3 features in the second sub - feature, and the 4 features in the third sub - feature, and the first comprehensive feature includes 11 standardized features.
[0109] In this embodiment, all features included in the first sub-feature and the second sub-feature are standardized, and all features included in the first sub-feature and the second sub-feature are converted into the same scale or distribution. All the standardized features are combined, and the combination results are respectively recombined with each category vector included in the fourth sub-feature. The second comprehensive feature is determined according to all the recombined results. For example, the first sub-feature includes 3 numerical data features and 2 composite features, and the second sub-feature includes 3 features. The features in the first sub-feature can be standardized by Z-score normalization, Min-Max normalization, etc., and the features in the second sub-feature can be processed by time difference normalization, periodic processing, etc. According to the 4 features in the processed first sub-feature and the 3 features in the second sub-feature, 7 standardized features are determined by combination. The 7 standardized features are recombined with each category vector in the fourth sub-feature. Each combination result includes 7 standardized features and 1 category vector in the fourth sub-feature. The fourth sub-feature includes several category vectors, and the second comprehensive feature includes several feature vectors.
[0110] Advantages of the above technical solution: According to the first sub-feature, the second sub-feature, the third sub-feature and the fourth sub-feature, the first comprehensive feature and the second comprehensive feature are determined, which can provide a data basis for determining the first feature and the second feature, determine the relevance and mutual influence between different features, and thus improve the data understanding and classification ability of the decision tree model.
[0111] Embodiment 5:
[0112] An embodiment of the present invention provides a dispatching and scheduling method based on a decision tree. Determining the first feature based on the second data and the first comprehensive feature includes:
[0113] Determining a corresponding first order vector for each historical order information in the second data according to the first comprehensive feature;
[0114] Determining an order matrix based on the first order vectors of all historical order information;
[0115] Among them, N1 represents the number of historical order information in the second data, and N2 represents the number of sub-features in the first comprehensive feature. 、 、 respectively represent the order value of the first sub-feature, the feature value of the j-th sub-feature, and the feature value of the N2-th sub-feature in the first comprehensive feature of the first historical order information in the second data. 、 、 respectively represent the order value of the i-th historical order information in the second data for the 1st sub-feature in the first comprehensive feature, the feature value of the j-th sub-feature, and the feature value of the N2-th sub-feature, , , respectively represent the feature value of the 1st sub-feature, the feature value of the j-th sub-feature, and the order value of the N2-th sub-feature in the first comprehensive feature for the N1-th historical order information in the second data;
[0116] Determine the first eigenvalue and the first eigenvector based on the order matrix;
[0117] where C is the covariance matrix, is the transpose matrix of the order matrix, is the k-th first eigenvalue, represents the k-th first eigenvector of, ;
[0118] Sort the first eigenvalues from largest to smallest, and calculate the importance rate of the first Nu eigenvalues;
[0119] where, , represents the importance rate of the first Nu eigenvalues after sorting, represents the adjustment parameter, represents the p-th first eigenvalue after sorting the order matrix, represents the p-th first eigenvalue based on the adjustment parameter after sorting the order matrix, represents the cumulative importance value of the first Nu eigenvalues after sorting the order matrix, represents the cumulative importance value of all the first eigenvalues after sorting the order matrix, represents the first importance rate of the first Nu eigenvalues after sorting the order matrix, represents the first weight of the first importance rate, represents the second importance rate of the first Nu eigenvalues after sorting the order matrix, represents the second weight of the second importance rate;
[0120] Extract all Nu values with an importance rate greater than 95%, and select the first first eigenvalues after sorting to construct the first projection matrix;
[0121] Project the second data into the first projection matrix to determine the first feature.
[0122] In this embodiment, each historical order information in the second data is matched with the first comprehensive feature to determine the corresponding first order vector.
[0123] In this embodiment, the eigenvalue of the i-th historical order information in the second data for the j-th sub-feature in the first comprehensive feature represents the matching result between the i-th historical order information and the j-th sub-feature in the first comprehensive feature. If the feature manifestation of the j-th sub-feature is a numerical value, then according to the numerical value corresponding to the j-th sub-feature and the i-th historical order information, the eigenvalue of the i-th historical order information for the j-th sub-feature in the first comprehensive feature is determined; if the feature manifestation of the j-th sub-feature is a classification, then according to the identification code corresponding to the j-th sub-feature and the i-th historical order information, the eigenvalue of the i-th historical order information for the j-th sub-feature in the first comprehensive feature is determined.
[0124] In this embodiment, the order matrix M is an N2×N1 matrix, and the transpose matrix of the order matrix is an N1×N2 matrix, and the covariance matrix is an N2×N2 matrix.
[0125] In this embodiment, when α > 1, the first importance rate pays more attention to large eigenvalues; when 0 < α < 1, the first importance rate pays more attention to small eigenvalues; when α = 1, the first importance rate treats all eigenvalues equally.
[0126] In this embodiment, each first eigenvalue corresponds to a first eigenvector.
[0127] In this embodiment, the importance rate of the first Nu eigenvalues represents the importance of the sorted first Nu eigenvalues among all the first eigenvalues.
[0128] In this embodiment, represents the minimum Nu value with an importance rate greater than 95% among the sorted first eigenvalues, and the mean value of the number of features of the first comprehensive feature.
[0129] In this embodiment, the first projection matrix represents the matrix that projects the order matrix from the original feature space to the dimension-reduced feature space.
[0130] Beneficial effects of the above technical solution: Determining the first feature based on the second data and the first comprehensive feature can provide a data basis for determining the dimension-reduced feature, ensuring that the decision tree model can capture the key information most relevant to dispatching and scheduling, so as to generate a highly feasible dispatching and scheduling plan in real time.
[0131] Embodiment 6:
[0132] The embodiment of the present invention provides a dispatching and scheduling method based on a decision tree, which determines a second feature based on second data and a second comprehensive feature, and determines a dimension-reduced feature, including:
[0133] Match all historical order information in the second data based on the second comprehensive feature to determine the order set of each feature vector and the second order vector of each historical order information in the order set;
[0134] Determine the second eigenvalue and the second eigenvector based on the order sets of all feature vectors;
[0135] Among them, represents the deviation value of the corresponding feature vector of all order sets, represents the deviation value between all feature vectors, represents the b-th second order vector in the order set of the a-th feature vector, represents the second order fitting vector in the order set of the a-th feature vector, represents the difference vector between the b-th second order vector and the second order fitting vector in the order set of the a-th feature vector, represents the transposed row vector of the difference vector between the b-th second order vector and the mean value of the second order vectors in the order set of the a-th feature vector, represents the number of second order vectors in the order set of the a-th feature vector, represents the number of feature vectors in the second comprehensive feature, represents the total fitting value of the second order vectors of the order sets of all feature vectors in the second data, represents the difference vector between the second order fitting vector and the total fitting value of the second order vectors of the order set of the a-th feature vector, represents the transposed row vector of the difference vector between the second order fitting vector and the total fitting value of the second order vectors of the order set of the a-th feature vector, is the c-th second eigenvalue, is the c-th second eigenvector, ;
[0136] Select the top sorted second eigenvalues to construct the second projection matrix;
[0137] Project the second data into the second projection matrix to determine the second feature;
[0138] Extract the features that appear in both the first feature and the second feature to determine the dimensionality-reduced feature.
[0139] In this embodiment, each historical order information in the second data is matched with each feature vector in the second comprehensive feature, and the second order vector of each historical order information is assigned to the most matching feature vector. The order set of each feature vector is determined according to the second order vectors of all historical order information assigned to each feature vector. For example, when each historical order information in the second data is matched with each feature vector in the second comprehensive feature, the similarity or consistency between each historical order information and each feature vector in the second comprehensive feature can be calculated, and each historical order information is respectively assigned to the feature vector with the highest similarity or consistency. If 5 historical order information are assigned to a certain feature vector in the second comprehensive feature, the order set of this feature vector includes these 5 historical order information.
[0140] In this embodiment, represents the total product of the deviation of all second order vectors in the order set of the a-th feature vector from the a-th feature vector.
[0141] In this embodiment, the second order fitting vector can represent all order sets of the corresponding feature vector.
[0142] In this embodiment, the total fitting value of the second order vector can represent all order sets of all feature vectors.
[0143] In this embodiment, represents the total product of the deviation of all second order vectors in the order sets of all feature vectors from the corresponding feature vectors.
[0144] In this embodiment, represents the total product of the deviation of the second order fitting value and the total fitting value of the second order vector of each feature vector.
[0145] In this embodiment, the second projection matrix represents a matrix that projects all order sets from the original feature space to the reduced-dimensional feature space.
[0146] In this embodiment, how many features appear in both the first feature and the second feature, and how many features are included in the reduced-dimensional feature.
[0147] Beneficial effects of the above technical solution: Determine the second feature and the reduced-dimensional feature according to the second data and the second comprehensive feature, which can provide a data basis for constructing a decision tree model, reduce the complexity of the model, improve the generalization ability and efficiency of the model, and realize the intelligent scheduling and production planning optimization of production tasks simply and efficiently.
[0148] Embodiment 7:
[0149] An embodiment of the present invention provides a dispatching and scheduling method based on a decision tree. A decision tree model is constructed based on second data and dimensionality-reduced features, and a dispatching and scheduling plan for real-time order information is determined and executed based on the decision tree model, including:
[0150] Divide the second data into a training set and a test set.
[0151] Construct a decision tree model based on the dimensionality-reduced features, the historical order demands of all historical order information in the training set, and the historical execution plan.
[0152] Use the historical order demands of all historical order information in the test set as the input of the trained decision tree model, and the decision tree model outputs the decision execution plan corresponding to each historical order information.
[0153] Evaluate the model performance based on the historical execution plan and the decision execution plan of each historical order information, and perform a first optimization on the decision tree model based on the evaluation result.
[0154] In this embodiment, the second data is divided according to a ratio of 80 / 20 or 70 / 30. 80% or 70% of the data is used for training, and the remaining 20% or 30% is used for testing.
[0155] In this embodiment, based on the dimensionality-reduced features, the historical order information, historical order demands, and historical execution plan in the training set are used as the input of the decision tree model, and the decision tree model is trained using the training set data.
[0156] In this embodiment, all historical order information and historical order demands in the test set are input into the trained decision tree model, and the decision tree model outputs the predicted decision execution plan corresponding to each historical order information.
[0157] In this embodiment, the decision tree model automatically learns the causal relationship between features and the historical execution plan during the training process. The model will construct splitting rules based on how each feature in the training set affects the final decision. For example, if a certain type of order demand is associated with a specific resource allocation plan (historical execution plan), the model will learn this association and refer to these features to make similar allocation decisions in future decisions.
[0158] In this embodiment, compare the decision execution plan predicted by the model with the actual historical execution plan in the test set to evaluate the model performance. Methods such as accuracy, precision, recall, and F1-score can be used.
[0159] In this embodiment, perform a first optimization on the decision tree model according to the evaluation result. The first optimization can be adjusting model parameters, pruning, etc.
[0160] Beneficial effects of the above technical solution: By constructing a decision tree model based on the second data and the dimensionality-reduced features, a dispatching and scheduling plan can be generated in real time to adapt to changes in the production environment and requirements, simply and efficiently realizing intelligent scheduling and scheduling optimization of production tasks, improving the decision-making quality of dispatching and scheduling, and enhancing the feasibility and execution efficiency of the dispatching and scheduling plan.
[0161] Example 8:
[0162] An embodiment of the present invention provides a dispatching and scheduling method based on a decision tree, which constructs a decision tree model based on the second data and the dimensionality-reduced features, determines a dispatching and scheduling plan for real-time order information based on the decision tree model and executes it, and further includes:
[0163] Input the real-time order information into the optimized decision tree model to generate a dispatching and scheduling plan for the real-time order information;
[0164] Execute the dispatching and scheduling plan, evaluate the execution result of the dispatching and scheduling plan, and perform a second optimization on the decision tree model based on the execution result.
[0165] In this embodiment, the new real-time order information is input into the optimized decision tree model, and the model generates a corresponding dispatching and scheduling plan according to the input real-time order information.
[0166] In this embodiment, the generated dispatching and scheduling plan is actually executed, and the execution effect of the dispatching and scheduling plan is evaluated, which may include evaluations such as the comparison between the actual completion situation and the expected goal, the execution time, and the resource utilization efficiency.
[0167] In this embodiment, according to the execution result, the decision tree model is further optimized, which may include retraining the model, improving the model structure, or continuously adjusting the model through a feedback mechanism to improve its adaptability and prediction accuracy for real-time orders.
[0168] Beneficial effects of the above technical solution: By determining a dispatching and scheduling plan for real-time order information based on the decision tree model and executing it, all data related to dispatching and scheduling can be comprehensively analyzed, improving data quality and consistency, generating a dispatching and scheduling plan in real time to adapt to changes in the production environment and requirements, simply and efficiently realizing intelligent scheduling and scheduling optimization of production tasks, enhancing the feasibility and execution efficiency of the dispatching and scheduling plan, reducing production costs, shortening the delivery cycle, and improving customer satisfaction.
[0169] The method embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0170] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of the present invention.
Claims
1. A method for dispatching work and scheduling production based on a decision tree, characterized in that: include: 101: collecting data related to work dispatching and production scheduling to determine first data, and performing first processing on the first data to determine second data; 102: extracting data related to the value in the second data to determine first sub-data, wherein the first sub-data includes a plurality of value categories related to the value in the second data; Performing statistical analysis on each numerical category in the first sub-data respectively, and determining the first sub-feature based on the statistical analysis results of all numerical categories; Extracting time-related data from the second data to determine second sub-data, wherein the second sub-data includes a plurality of time-related time series categories from the second data; Performing time series analysis on each time series category in the second sub-data respectively, and determining the second sub-feature based on the time series analysis results of all time series categories; Extract all the remaining data except the first sub-data and the second sub-data from the second data to determine the third sub-data, wherein the third sub-data includes a plurality of classification categories; determining a third sub-feature based on each category in the third sub-data; Arrange and combine all identification codes under the worker sub-feature, the equipment sub-feature, and the environment sub-feature to determine a fourth sub-feature, wherein the fourth sub-feature includes a plurality of category vectors; Performing standardization processing on the first sub-feature, the second sub-feature, and the third sub-feature, and determining a first comprehensive feature based on the first sub-feature, the second sub-feature, and the third sub-feature after the standardization processing; Performing standardization processing on the first sub-feature, the second sub-feature, and the fourth sub-feature, and determining a second comprehensive feature based on the first sub-feature, the second sub-feature, and the fourth sub-feature after the standardization processing, wherein the second comprehensive feature includes a plurality of feature vectors; 103: determining a first feature based on the second data and the first comprehensive feature, and determining a second feature based on the second data and the second comprehensive feature, and extracting features that appear simultaneously in the first feature and the second feature to determine a dimensionality reduction feature; 104: Build a decision tree model based on the second data and the dimension reduction features, and determine and execute a work dispatching and production scheduling plan based on the real-time order information based on the decision tree model.
2. The method for dispatching work and scheduling production based on a decision tree according to claim 1, characterized in that: The first data includes a plurality of historical order information; The first processing includes data cleaning, missing value processing and data normalization on the first data.
3. The method for dispatching work and scheduling production based on a decision tree according to claim 1, characterized in that: After determining the third sub-feature based on each category in the third sub-data, the method further includes: All identifiers under each classification category in the third sub-data are encoded respectively, all identifier codes under all classification categories related to workers are interactively determined to determine worker sub-features, all identifier codes under all classification categories related to equipment are interactively determined to determine equipment sub-features, and at the same time, all identifier codes under all classification categories related to the environment are interactively determined to determine environment sub-features, wherein worker sub-features include multiple worker vectors, equipment sub-features include multiple equipment vectors, and environment sub-features include multiple environment vectors.
4. The method for dispatching work and scheduling production based on a decision tree according to claim 1, characterized in that: Determining the first feature based on the second data and the first comprehensive feature includes: Determine a corresponding first order vector for each piece of historical order information in the second data according to the first comprehensive feature; Determine an order matrix based on the first order vector of all historical order information; Wherein, N1 represents the number of historical order information in the second data, and N2 represents the number of sub-features in the first comprehensive feature. , , represent the order value of the first sub-feature of the first historical order information in the second data, the feature value of the j-th sub-feature, and the feature value of the N2-th sub-feature in the first comprehensive feature, respectively. , , They respectively represent the order value of the 1st sub-feature, the feature value of the jth sub-feature, and the feature value of the N2th sub-feature of the i-th historical order information in the second data in the first comprehensive feature, , , Respectively represent the feature value of the 1st sub-feature, the feature value of the jth sub-feature, and the order value of the N2th sub-feature of the N1th historical order information in the second data in the first comprehensive feature; determining a first eigenvalue and a first eigenvector based on the order matrix; Where C is the covariance matrix, is the transposed matrix of the order matrix, is the kth first eigenvalue, The kth first eigenvector represented by ; Sort the first eigenvalues from large to small, and calculate the importance rates of the first Nu first eigenvalues; in, , represents the importance rate of the first Nu eigenvalues after sorting, represents the adjustment parameters, represents the pth first eigenvalue of the order matrix after sorting, represents the pth first eigenvalue of the order matrix after sorting based on the adjustment parameter, represents the cumulative importance of the first Nu first eigenvalues after the order matrix is sorted, represents the cumulative importance of all first eigenvalues after the order matrix is sorted, It represents the first importance rate of the first Nu first eigenvalues after the order matrix is sorted, represents the first weight of the first importance rate, represents the second importance rate of the first Nu first eigenvalues after the order matrix is sorted, a second weight representing a second importance rate; Extract all Nu values with importance greater than 95%, and select the top values after sorting. The first eigenvalues construct the first projection matrix; The second data is projected into the first projection matrix to determine the first feature.
5. The method for dispatching work and scheduling production based on a decision tree according to claim 1, characterized in that: Determining the second feature based on the second data and the second comprehensive feature includes: Match all historical order information in the second data based on the second comprehensive feature, determine an order set for each feature vector, and a second order vector for each historical order information in the order set; Determining a second eigenvalue and a second eigenvector based on the order set of all eigenvectors; in, Represents the deviation value of the corresponding feature vector of all order sets, represents the deviation value between all eigenvectors, represents the bth second order vector in the order set of the ath feature vector, represents the second order fitting vector in the order set of the a-th eigenvector, The difference vector between the bth second order vector and the second order fitting vector in the order set of the ath feature vector, represents the transposed row vector of the difference vector between the bth second order vector and the mean of the second order vector in the order set of the ath eigenvector, represents the number of the second order vector in the order set of the a-th feature vector, represents the number of eigenvectors in the second comprehensive feature, The total fitted value of the second order vector representing the set of orders for all feature vectors in the second data, The difference vector between the second order fitting vector of the order set of the a-th feature vector and the total fitting value of the second order vector, The transposed row vector of the difference vector between the second order fitting vector and the total fitting value of the second order vector for the order set of the a-th eigenvector, is the cth second eigenvalue of, is the cth second eigenvector, ; Select the first The second eigenvalues construct the second projection matrix; The second data is projected into a second projection matrix to determine a second feature.
6. The method for dispatching work and scheduling production based on a decision tree according to claim 1, characterized in that: A decision tree model is constructed based on the second data and the dimension reduction features, and a dispatching and production scheduling plan for the real-time order information is determined and executed based on the decision tree model, including: Divide the second data into training set and test set, Build a decision tree model based on the dimensionality reduction features, historical order requirements of all historical order information in the training set, and historical execution plans; The historical order requirements of all historical order information in the test set are used as the input of the trained decision tree model, and the decision tree model outputs the decision execution plan corresponding to each historical order information; The model performance is evaluated based on the historical execution plan and decision execution plan of each historical order information, and the decision tree model is first optimized based on the evaluation results.
7. The method for dispatching work and scheduling production based on a decision tree according to claim 6, characterized in that: Building a decision tree model based on the second data and the dimension reduction features, determining and executing a dispatching and production scheduling plan for the real-time order information based on the decision tree model, and further comprising: Input the real-time order information into the optimized decision tree model to generate a work dispatching and production scheduling plan for the real-time order information; Execute the work dispatching and production scheduling plan, evaluate the execution result of the work dispatching and production scheduling plan, and perform a second optimization on the decision tree model based on the execution result.
Citation Information
Patent Citations
Production scheduling decision-making method and system
CN113159979A
Device and method for detecting non-stationary image, and program mounted with the method
JP2007293559A