Industrial heterogeneous network scheduling algorithm matching method based on improved decision tree ID3 algorithm
By improving the decision tree ID3 algorithm to build and deploy the industrial heterogeneous network scheduling algorithm matching model in industrial software-defined controllers, the problem of insufficient matching of scheduling algorithms in the existing technology is solved, and efficient and intelligent transmission selection of industrial networks is achieved .
Patent Information
- Application Number
- CN202411392936.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-03
AI Technical Summary
The existing industrial heterogeneous network scheduling lacks flexibility, efficiency and intelligence, and it is difficult to quickly, efficiently and accurately match the optimal scheduling algorithm according to user needs, resulting in insufficient immediateness and automation choice of network transmission.
Using the improved decision tree ID3 algorithm, the industrial heterogeneous network scheduling algorithm matching model is constructed and trained through user input scheduling requirements, generate scheduling tables, deployed in industrial software-defined controllers, realize the calculation of network status information and scheduling table generation, and combine with API Endpoints perform parameter passing and result return, optimizing decision tree structure and pruning process to improve matching accuracy.
It improves the immediacy and intelligent choice of industrial network transmission, realizes fast, efficient and accurate optimal scheduling algorithm matching, and meets the diverse needs of users.
Smart Images

Figure CN119254693A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial Internet of Things and relates to an industrial heterogeneous network scheduling algorithm matching method based on an improved decision tree ID3 algorithm. Background Art
[0002] With the rapid development of network technology, industrial production has higher and higher requirements for data transmission. The future industrial network will support applications and services with multiple communication requirements, and it is difficult to meet these requirements with a single communication technology. It is imperative to build a heterogeneous network. In addition, there are many industrial wireless networks and industrial wired networks. In particular, time-sensitive networks have been a hot research topic in the field of industrial networks in recent years. They have ensured the certainty of data transmission through a series of key technologies. The integration of multiple networks can meet both the communication needs of factory mobile facilities and the strict requirements of industrial control for reliability. However, if two different networks are to be integrated into a heterogeneous network, the information flow of the entire heterogeneous network must be jointly scheduled to avoid problems such as collisions and congestion, and to ensure the normal transmission of information flows. However, with the development of technology and the times, when used in industrial network service systems, a single heterogeneous network scheduling lacks a flexible, efficient and intelligent matching option. Therefore, it has become a challenge to ensure that heterogeneous networks meet the requirements of joint scheduling while meeting the diversity, intelligence and efficiency of users.
[0003] Machine learning, as a method to implement artificial intelligence, is widely used in predictive analysis of communication network scheduling. Scientific decision-making is an important responsibility of modern managers, and the decision tree algorithm in the machine learning classification method, as a decision-making technology, can effectively control the risks brought by decision-making through calculations and ultimately select the decision result with the greatest benefit.
[0004] The integration of multiple heterogeneous network scheduling algorithms in an industrial heterogeneous network scheduling system greatly reduces the data delay during network switching. Since there are usually many different types of industrial Ethernet networks, industrial wired networks and industrial wireless networks in industrial networks, there are also various scheduling algorithms when different networks perform cross-network scheduling. The network scheduling needs of different users often require switching selection of multiple heterogeneous network scheduling algorithms. How to quickly, efficiently and accurately match the optimal scheduling algorithm according to user scheduling needs has not been well solved. Therefore, in order to solve the immediacy of industrial network transmission and realize industrial automation and intelligent selection, it is urgent to study an industrial heterogeneous network scheduling algorithm matching method for application in the scheduling system of industrial heterogeneous networks. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide an industrial heterogeneous network scheduling algorithm matching method based on an improved decision tree ID3 algorithm, which serves the industrial heterogeneous network collaborative scheduling system. The collaborative scheduling system serves as the control core, is deployed in an industrial software defined controller (ISDC), runs on the control plane, calculates the network status information and generates a scheduling table.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] An industrial heterogeneous network scheduling algorithm matching method based on an improved decision tree ID3 algorithm comprises the following steps:
[0008] S1: The user builds the network topology at the front end of the industrial heterogeneous network collaborative scheduling subsystem, selects the usage scenario, and inputs the scheduling requirements;
[0009] S2: The industrial heterogeneous network collaborative scheduling subsystem transmits parameters according to user scheduling requirements, builds and trains the industrial heterogeneous network scheduling algorithm matching model based on the improved decision tree ID3 algorithm;
[0010] S3: Deploy the industrial heterogeneous network scheduling algorithm matching prediction model to the industrial heterogeneous network collaborative scheduling subsystem backend and add environmental dependencies. The industrial heterogeneous network collaborative scheduling subsystem frontend transmits demand information through the API endpoint. The industrial heterogeneous network scheduling algorithm matching prediction model receives parameters and returns the matching results to the industrial heterogeneous network collaborative scheduling subsystem frontend.
[0011] Furthermore, in step S1, the user sets up a network topology at the front end of the industrial heterogeneous network collaborative scheduling subsystem to select a usage scenario, including the scheduling of industrial wired networks and industrial wireless networks, and then checks or inputs the scheduling requirements as input feature parameters of the industrial heterogeneous network scheduling algorithm.
[0012] Further, step S2 specifically includes the following steps:
[0013] S21: collecting input characteristic parameter data of the industrial heterogeneous network scheduling algorithm as a training data set D and a test data set V of the matching function model of the industrial heterogeneous network scheduling algorithm, and then preprocessing;
[0014] S22: Calculate the information gain g(D|W) of the input feature parameters of each industrial heterogeneous network scheduling algorithm i ), select the algorithm input feature parameters that have the ability to classify the training data;
[0015] S23: using a recursive method, selecting the feature parameter with the largest information gain as the determination criterion for the current node, until the stop constraint condition is met and the predetermined fitting effect is achieved, thereby creating a decision tree;
[0016] S24: The cost complexity pruning CCP in the post-pruning algorithm is used to improve the ID3 algorithm. When creating the decision tree, the nodes are conditionally judged whether pruning is needed, and the parameters of the decision tree ID3 algorithm are modified and adjusted. When the predicted fitting effect is achieved, the industrial heterogeneous network scheduling algorithm matching model algorithm based on the improved decision tree ID3 algorithm is obtained.
[0017] Further, in step S21, the user collects the input feature parameter data of the industrial heterogeneous network scheduling algorithm from the test case library of each heterogeneous network scheduling or from the public data set platform as the input of the industrial heterogeneous network scheduling algorithm matching model, and defines this data set as the data feature set W of the machine learning model, which is expressed as:
[0018] W={C1,C2,C3,…C n}
[0019] C n It represents the characteristic parameters of the industrial heterogeneous network scheduling algorithm input, and n represents the number of parameters in a specific industrial heterogeneous network scheduling algorithm;
[0020] The data feature set W is divided into a training data set D and a test data set T; then the missing values of the data are processed, standardized, and normalized.
[0021] Further, step S22 specifically includes the following steps:
[0022] S221: The random scheduling algorithm result obtained by matching the input characteristic parameters of the industrial heterogeneous network scheduling algorithm is called the empirical entropy of the input scheduling algorithm characteristic parameters. The empirical entropy H(D) of the input characteristic parameter data set of the industrial heterogeneous network scheduling algorithm is calculated and expressed as l(r i ) represents the expected value of a scheduling algorithm result, and its expression is:
[0023] l(r i )=-log2p(r i )
[0024] Where p(r i ) indicates the occurrence of scheduling algorithm r i The result probability of , by superimposing the above formula, we can get the expected value of information of all matching results of industrial heterogeneous network scheduling algorithm, that is, entropy, which is expressed as:
[0025]
[0026] When the probability of the expected value of information is calculated from the training set, the corresponding entropy becomes the empirical entropy. If the training set is D, then the empirical entropy of the training set is H(D), where |D| represents the sample size of the training set. The scheduling algorithm input parameter feature set W = {C1, C2, C3, ... Cn},|C i | indicates that the feature is C in the training set D i The number of samples, the formula of empirical entropy is written as:
[0027]
[0028] S222: Calculate the conditional entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, where the conditional entropy H(Y|X) represents the uncertainty of the random variable Y under the condition that the random variable X is known;
[0029] The random variable X is represented by the scheduling algorithm input parameter feature set W = {C1, C2, C3, ... C n}, Y represents that when X takes a certain value in the feature set W, the matching result is a certain value r in the industrial heterogeneous network scheduling algorithm set R. i , defined as the mathematical expectation of the entropy of the conditional probability distribution of Y given X:
[0030]
[0031] p(r i ) is represented by a specific value in the feature set W, and the matching result is a specific value r in the industrial heterogeneous network scheduling algorithm set R i The probability distribution of X = C i When Y = r i The probability distribution of |C i |When the input characteristic parameter value is C i The sample size is The parameter characteristic is C i , the scheduling algorithm matching result is r i Sample size:
[0032]
[0033] When the probability of conditional entropy is calculated from the training set, the corresponding entropy becomes the conditional empirical entropy. Let |D| be the sample size of the input feature parameter training set of the industrial heterogeneous network scheduling algorithm. The formula of the conditional empirical entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm is written as:
[0034]
[0035] S223: Calculate the target value information gain of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, that is, the optimal input feature parameter of the scheduling algorithm; the feature C in the input parameter feature set W of the industrial heterogeneous network scheduling algorithm nThe information gain of the training data set D of the scheduling algorithm matching function model is g(D|W), which is defined as the difference between the empirical entropy H(D) of the training data set D of the scheduling algorithm matching function model and the empirical conditional entropy H(D|W) of D under the given conditions of the input parameter feature set W of the industrial heterogeneous network scheduling algorithm, that is:
[0036] g(D|W)=H(D)-H(D|W)
[0037] Characteristic C n The information gain formula is:
[0038]
[0039] Calculate the information gain of each parameter feature in the comparison feature set and select W i The maximum information gain value in is taken as the optimal feature.
[0040] Further, in step S23, after the decision tree is generated, decision tree branches are established according to different values of the characteristic parameters of the root node: a recursive method is adopted to select the characteristic parameter with the largest information gain as the determination standard of the current node, and the branch nodes are continuously divided until the scheduling demand categories of the data in all branch node subsets are the same, thereby constructing a decision tree;
[0041] The constraint stopping conditions of the improved decision tree ID3 algorithm are: if the depth of the tree reaches the set threshold; if the characteristic parameters of the child nodes of the node are less than the set threshold; if no characteristic parameters can meet the threshold of the set splitting criterion;
[0042] If the decision tree stopping constraint is met, the remaining data set will no longer be divided and this feature will be used as a leaf node;
[0043] If the decision tree stopping constraint is not met, set the optimal feature parameter of this branch to A, take the training set of all values in A as the new training set, and remove the remaining feature set from feature set W as the new feature set A. i , and then recursively build a subtree; at each node, the data set is divided into two or more subsets according to the best splitting feature, and then this process is recursively performed on each subset until the termination condition is met.
[0044] Further, in step S24, after the decision tree starts to be generated, the error rate gain values of all nodes are calculated from the root node to the leaf node of each branch, and it is determined whether the error rate gain value of the branch is less than the smallest non-leaf node. If not, other non-leaf nodes are polled and traversed until the pruning conditions are met and then the branch is pruned. The algorithm model parameters are modified and optimized through pruning; the performance of the decision tree is evaluated using the test data set T. The decision tree is adjusted by evaluating the accuracy, recall rate, and F1 value of the industrial heterogeneous network scheduling algorithm matching prediction model, including re-pruning or retraining, so as to adjust and optimize the algorithm parameters and obtain the industrial heterogeneous network scheduling algorithm matching prediction model.
[0045] Further, in step S24, the cost complexity pruning CCP method is used for pruning. CCP selects the non-leaf node with the smallest node surface error gain value, deletes the left and right child nodes of the non-leaf node, and if there are multiple non-leaf nodes with the same surface error rate gain value, the non-leaf node with the most child nodes is selected for pruning. During the pruning process, the subtree is deleted and replaced with a leaf node. The category of the node can also be judged by the accuracy on the test set. If the accuracy is improved after pruning, pruning is performed;
[0046] The CCP algorithm is a subtree T t Define the cost and complexity, as well as a parameter α that measures the relationship between cost and complexity: Starting from the decision tree branch T0, prune continuously from bottom to top until the root node of T0, forming a subtree sequence {T0, T1, ..., T n}, then traverse and compare the error rate gain values on non-leaf nodes one by one, determine whether branch T0 is less than the minimum value in the traversal, and then prune the branch. The mathematical derivation formula for calculating the error rate gain value of the classification is as follows:
[0047]
[0048] α measures the classification error rate gain that each node can reduce, E(t) represents the error cost of the leaf node, and E(T t ) represents the error cost of the subtree, e(t) is the error rate of the node, p(t) is the percentage of the number of nodes, and N(t) represents the total number of decision tree subnodes; the smaller α is, the smaller the classification error rate that the node can reduce; when α = 0, E(t) = E(T t ), prune the nodes and make them leaf nodes.
[0049] Further, in step S3, the industrial heterogeneous network scheduling algorithm matching prediction model is deployed on the back end of the industrial heterogeneous network scheduling system, including the following steps:
[0050] S31: Add environment dependencies related to web development and machine learning loading to the project to achieve interaction between the two machine languages;
[0051] S32: loading the industrial heterogeneous network scheduling algorithm matching prediction model at the back end of the industrial heterogeneous network scheduling system, saving the model in the form of a file and directly calling the output file;
[0052] S33: By designing the API endpoint, create a service class to encapsulate the call to the API, convert the input data into the appropriate format, send the request, and convert the response object to ensure that the input can be received normally and the prediction result can be returned;
[0053] S34: Ensure that the communication from the backend application to the model service is working properly, the inference results of the machine learning model are as expected, and optimize the performance of the model service as needed.
[0054] The beneficial effects of the present invention are as follows: the present invention often requires switching selection of multiple heterogeneous network scheduling algorithms according to the network scheduling needs of different users, quickly, efficiently and accurately matches the optimal scheduling algorithm according to the user scheduling needs, improves the immediacy of industrial network transmission, and realizes industrial automation and intelligent selection.
[0055] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:
[0057] Figure 1 This is a diagram of the industrial heterogeneous network scheduling architecture;
[0058] Figure 2 It is the overall flow chart of the industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm;
[0059] Figure 3 This is the flow chart of ID3 algorithm based on improved decision tree;
[0060] Figure 4 Generate a structure diagram for the decision tree matching model of industrial heterogeneous network scheduling algorithm;
[0061] Figure 5 This is a pruning flowchart based on the improved decision tree ID3 algorithm. DETAILED DESCRIPTION
[0062] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.
[0063] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0064] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0065] The present invention provides an industrial heterogeneous network scheduling algorithm matching method based on an improved decision tree ID3 algorithm. The method serves an industrial heterogeneous network collaborative scheduling system. The collaborative scheduling system is deployed in an industrial software defined controller (ISDC) as a control core and runs on the control plane. Its function is to calculate network status information and generate a scheduling table. The industrial heterogeneous network scheduling architecture diagram is shown in FIG. Figure 1 shown.
[0066] First, users need to build a network topology on the front end of the industrial heterogeneous network collaborative scheduling subsystem to select the usage scenario, check or enter the scheduling requirements. Then, according to the user's scheduling requirements, the parameters are transferred, and the industrial heterogeneous network scheduling algorithm matching algorithm model based on the improved decision tree ID3 algorithm is called, and the scheduling algorithm is matched according to the input feature parameters. This solution is an improved decision tree ID3 algorithm based on the machine learning classification method. Before using the algorithm, the algorithm needs to be trained with data, and the feature parameter data of the industrial heterogeneous network scheduling algorithm input from the test case library of each heterogeneous network scheduling or from some public data set platforms is collected. Through the training of these data, each industrial scheduling algorithm inputs the feature parameters to calculate the optimal features and sorting, and then obtain the results. Only then can the parameters of the decision tree ID3 algorithm be modified and adjusted. In order to solve the problem that the ID3 algorithm is prone to overfitting, this solution introduces some thresholds or other conditions when constructing the decision tree to determine whether the current node needs to be pruned. When the predicted fitting effect is achieved, the industrial heterogeneous network scheduling algorithm matching model based on the improved decision tree ID3 algorithm can be obtained. Add environment dependency to the industrial heterogeneous network scheduling backend to deploy the algorithm model to the backend, connect to the industrial heterogeneous network scheduling frontend through the API endpoint, and the user transmits new demand data through the frontend. The new data is calculated and predicted by the algorithm model in ISDC to match the optimal result and return it to the user. At the same time, set up monitoring and maintenance models to facilitate regular maintenance and update of machine learning models. The overall process is as follows Figure 2 The definitions of terms in this protocol are shown in Table 1.
[0067] Table 1
[0068]
[0069]
[0070] The implementation steps of the industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm are as follows:
[0071] Step 1: The user builds the network topology and selects the usage scenario at the front end of the industrial heterogeneous network scheduling system, including the scheduling of industrial wired networks TSN, Modbus TCP, etc. and industrial wireless networks 5G, WIA-PA, etc., and then checks or inputs the scheduling requirements, including the input characteristic parameters of the industrial heterogeneous network scheduling algorithm such as traffic cycle, frame length, delay, jitter, traffic identification, priority, etc. After the user enters the characteristic parameters, the parameters are passed to the scheduling algorithm matching model based on the improved decision tree ID3 algorithm as the input of the algorithm model for matching the scheduling algorithm.
[0072] Step 2: Data training builds a scheduling algorithm matching model based on the improved decision tree ID3 algorithm. The improved decision tree ID3 algorithm used in this solution is an algorithm for decision tree construction. The algorithm flow is as follows: Figure 3 As shown in the figure, it is mainly used for classification prediction problems, and the information gain of parameter features is used as the standard to select features to build decision trees. The algorithm weights the characteristic parameters of the scheduling algorithm by calculating the information gain, and then splits the data set according to the features and creates branches until the preset minimum split amount is reached. In order to prevent the decision tree from overfitting, the error rate gain value is judged after each branch to prune the nodes. Finally, the classification result leaf node is the matching prediction result of the scheduling algorithm.
[0073] 2.1 Collection and preprocessing of scheduling algorithm input characteristic parameter data
[0074] This solution serves the industrial heterogeneous network scheduling system. Users can collect input feature parameter data of industrial heterogeneous network scheduling algorithms such as traffic cycle, frame length, delay, jitter, traffic identification, priority, etc. from the test case library of various heterogeneous network scheduling or from some public data set platforms. At the same time, these feature parameters are also used as inputs of the algorithm model. The data set is defined as the data feature set W of the machine learning model, and its expression is:
[0075] W={C1,C2,C3,…C n} (1)
[0076] C n It represents the characteristic parameter of the industrial heterogeneous network scheduling algorithm input, and n represents the number of parameters in a specific industrial heterogeneous network scheduling algorithm.
[0077] According to the principle of machine learning division, the user divides 80% of the data into a training data set D, and the remaining 20% is used as a test data set T for the function model. The training data set is used to output the matching results of the specified scheduling algorithm for the input feature parameter value, and then build a function model through a large amount of data training and learning. The test data set is used to evaluate the model, adjust parameters, and select features. At the same time, the data needs to be preprocessed, including missing values, standardization, and normalization of the data, to improve the data quality and make it suitable for subsequent machine learning models.
[0078] 2.2 Calculate the information gain of feature parameters and select the optimal feature parameters
[0079] The selection of optimal feature parameters is to select feature parameters that have the ability to sort and classify training data, which can improve the learning efficiency of the decision tree algorithm. The selection and sorting of optimal feature parameters will directly affect the classification effect of the decision tree model matching prediction industrial heterogeneous network scheduling algorithm. Therefore, in order to obtain a matching prediction model for the industrial heterogeneous network scheduling algorithm with a high degree of fit, it is necessary to select the best feature parameters and sort these features in an orderly weighted manner. In this scheme, information gain is selected as the criterion for selecting the optimal feature parameters, which can not only efficiently calculate the optimal feature parameters through probability, but also the complexity of the algorithm is relatively simple.
[0080] (1) The empirical entropy H(D) of the input characteristic parameter data set of the industrial heterogeneous network scheduling algorithm is calculated in ISDC. The measure of the uncertainty of random variables is called entropy. In this scheme, the random scheduling algorithm result matched with the input characteristic parameters of the industrial heterogeneous network scheduling algorithm is called the empirical entropy of the input scheduling algorithm characteristic parameters. Entropy describes the degree of disorder of the data. The larger the entropy, the higher the degree of disorder, that is, the lower the purity; conversely, the smaller the entropy, the lower the degree of disorder and the higher the purity.
[0081] There are multiple possible results of the matching scheduling algorithm in this scheme. i ) represents the expected value of a scheduling algorithm result, and its expression is:
[0082] l(r i )=-log2p(r i ) (2)
[0083] Where p(r i ) indicates the occurrence of scheduling algorithm r i By superimposing the above formula, we can get the expected value of information of all matching results of the industrial heterogeneous network scheduling algorithm, that is, entropy, which is expressed as:
[0084]
[0085] When the probability of the expected value of information is calculated from the training set, the corresponding entropy becomes the empirical entropy. In this scheme, the training set in the input feature parameter data set of the industrial heterogeneous network scheduling algorithm is D, then the empirical entropy of the training set is H(D), |D| represents the sample size of the training set, where the scheduling algorithm input parameter feature set W = {C1, C2, C3, ... C n},|C i | indicates that the feature is C in the training set D i The number of samples, so the formula of empirical entropy can be written as:
[0086]
[0087] (2) The conditional entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm is calculated in ISDC. The conditional entropy H(Y|X) represents the uncertainty of the random variable Y under the condition of the known random variable X.
[0088] In this scheme, the random variable X is represented by the scheduling algorithm input parameter feature set W = {C1, C2, C3, ... C n}, and Y represents that when X takes a certain value in the feature set W, the matching result is a certain value r in the industrial heterogeneous network scheduling algorithm set R. i , defined as the mathematical expectation of the entropy of the conditional probability distribution of Y given X:
[0089]
[0090] p(r i ) is represented by a specific value in the feature set W, and the matching result is a specific value r in the industrial heterogeneous network scheduling algorithm set R i The probability distribution of X = C i When Y = r i The probability distribution of |C i |When the input characteristic parameter value is C i The sample size is The parameter characteristic is C i , the scheduling algorithm matching result is r i Sample size:
[0091]
[0092] When the probability of conditional entropy is calculated from the training set, the corresponding entropy becomes the conditional empirical entropy. Let |D| be the sample size of the input feature parameter training set of the industrial heterogeneous network scheduling algorithm. Combined with formula (6), the formula for the conditional empirical entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm can be written as:
[0093]
[0094] (3) After ISDC obtains the empirical entropy and conditional entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, ISDC then calculates the target value information gain of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, that is, the optimal input feature parameter of the scheduling algorithm. Information gain is relative to the feature, and it measures how much information the feature brings to the classification system. The more information it brings, the more important the feature is.
[0095] Feature C in the input parameter feature set W of industrial heterogeneous network scheduling algorithm nThe information gain of the training data set D of the scheduling algorithm matching function model is g(D|W), which is defined as the difference between the empirical entropy H(D) of the training data set D of the scheduling algorithm matching function model and the empirical conditional entropy H(D|W) of D under the given conditions of the input parameter feature set W of the industrial heterogeneous network scheduling algorithm, that is:
[0096] g(D|W)=H(D)-H(D|W) (8)
[0097] Combining formula (4), formula (7) and formula (8), we can get the characteristic C n The information gain formula is:
[0098]
[0099] According to formula (9), the information gain of each parameter feature in the comparison feature set can be calculated, and W is selected i The maximum information gain value in is taken as the optimal feature.
[0100] 2.3 Recursively select the best features and sort them to create a decision tree
[0101] After the decision tree is generated, the decision tree branches are established according to the different values of the root node characteristic parameters: a recursive method is used to select the characteristic parameter with the largest information gain as the determination standard of the current node, and the branch nodes are continuously divided until the scheduling demand categories of the data in all branch node subsets are the same, thereby constructing a decision tree. The decision tree generation structure diagram is shown in the figure below: Figure 4 shown.
[0102] The constraint stopping conditions of the improved decision tree ID3 algorithm are:
[0103] a) If the depth of the tree reaches the set threshold
[0104] b) If the characteristic parameters of the node's child nodes are less than the set threshold
[0105] c) If no feature parameter meets the threshold of the splitting criterion
[0106] If the decision tree stopping constraint is met, it means that the branch feature will no longer have a significant impact on the classification, no feature parameter can meet the threshold of the set splitting criterion, or the depth of the tree has reached the set threshold. At this time, the remaining data set will no longer be divided and this feature will be used as a leaf node.
[0107] If the decision tree stopping constraint is not met, let the optimal feature parameter of the branch be A, then the training set of all values in A is used as the new training set, and the feature set remaining after removing A from the feature set W is used as the new feature set A. i, and then recursively build subtrees. At each node, the dataset is divided into two or more subsets based on the best splitting feature, and then this process is recursively performed on each subset until the termination condition is met.
[0108] 2.4 Decision Tree Pruning and Evaluation and Modification and Optimization of Algorithm Model Parameters
[0109] Pruning and evaluation,The ID3 algorithm is sensitive to noise and tends to overfit the training data,leading to poor performance on new unseen data.,In order to reduce or lower the impact of noise, the decision tree needs to be pruned.,The classic ID3 algorithm does not support pruning, so this solution is improved on the basis of the original,algorithm.
[0110] After the decision tree starts to be generated, the error rate gain values of all nodes need to be calculated in ISDC before generating the leaf nodes of each branch from the root node to determine whether the error rate gain value of the branch is less than the smallest non-leaf node. If not, poll and traverse other non-leaf nodes until the pruning conditions are met and then prune the branch. Pruning is used to modify and optimize the algorithm model parameters.
[0111] Common pruning strategies include pre-pruning and post-pruning. Pre-pruning is to stop the growth of the decision tree in advance, while the core idea of post-pruning is to let the algorithm generate a fully grown decision tree, and then decide whether to prune after calculation. This solution adopts the cost complexity pruning (CCP) in the post-pruning algorithm. The algorithm flow chart is as follows Figure 5 As shown in Figure 2, ISDC can optimize the performance of decision trees through pruning, making them better generalize new data points.
[0112] CCP selects the non-leaf node with the smallest node surface error gain value, deletes the left and right child nodes of the non-leaf node, and if there are multiple non-leaf nodes with the same surface error rate gain value, then the non-leaf node with the most child nodes is selected for pruning. During the pruning process, the subtree is deleted and replaced with a leaf node. The category of the node can also be judged by the accuracy on the test set. If the accuracy is improved after pruning, pruning is performed. Compared with pre-pruning, post-pruning methods can usually obtain decision trees with stronger generalization capabilities, but the time cost will be greater.
[0113] The CCP algorithm is a subtree T t The cost and complexity are defined, as well as a parameter α that measures the relationship between the cost and complexity. The general process is to start from the decision tree branch T0 and prune continuously from bottom to top until the root node of T0, forming a subtree sequence {T0, T1, …, T n}, then traverse and compare the error rate gain values on non-leaf nodes one by one, determine whether branch T0 is less than the minimum value in the traversal, and then prune the branch. The mathematical derivation formula for calculating the error rate gain value of the classification is as follows:
[0114]
[0115] α measures the classification error rate gain that each node can reduce, E(t) represents the error cost of the leaf node, and E(T t ) represents the error cost of the subtree, e(t) is the error rate of the node, p(t) is the percentage of the number of nodes, and N(t) represents the total number of child nodes of the decision tree. The smaller α is, the smaller the classification error rate that the node can reduce. When α = 0, E(t) = E(T t ), it is meaningless to continue to classify, so we can prune the tree and make the node a leaf node.
[0116] ISDC uses the test data set T to evaluate the performance of the decision tree. By evaluating the accuracy, recall, F1 value and other indicators of the industrial heterogeneous network scheduling algorithm matching prediction model, the decision tree can be adjusted, such as re-pruning or retraining, to improve its performance. By adjusting and optimizing the algorithm parameters after the above pruning and evaluation, the industrial heterogeneous network scheduling algorithm matching prediction model can be obtained.
[0117] Step 3: Deploy and run the industrial heterogeneous network scheduling algorithm matching prediction model.
[0118] In ISDC, the industrial heterogeneous network scheduling algorithm matching prediction model is deployed at the back end of the industrial heterogeneous network scheduling system.
[0119] 3.1: Add environment dependencies related to web development and machine learning loading to the project to achieve interaction between the two machine languages.
[0120] 3.2: Load the industrial heterogeneous network scheduling algorithm matching prediction model on the back end of the industrial heterogeneous network scheduling system, save the model in the form of a file and directly call the output file.
[0121] 3.3: By designing the API endpoint, create a service class to encapsulate the call to the API, convert the input data into the appropriate format, send the request, and convert the response object to ensure that the input can be received normally and the prediction results can be returned.
[0122] 3.4: Ensure that the communication from the backend application to the model service is working properly and the inference results of the machine learning model are as expected. Optimize the performance of the model service as needed, such as by increasing cache, adjusting concurrency settings, etc.
[0123] The front end of the industrial heterogeneous network scheduling system is designed with network perception, intelligent analysis modules and scheduling calculation modules. After completing the previous network environment selection and scheduling algorithm matching, the scheduling algorithm is run and calculated to pass the scheduling demand information to the back-end API port. The data is passed to the machine learning function model in the form of parameters, and the optimal matching result is obtained through calculation. The corresponding scheduling algorithm is called through the function interface, and the corresponding scheduling algorithm is run and the result is returned to the front end.
[0124] The backend receives the request to call the corresponding algorithm. After the operation is completed, the results are saved in a specific file. The database and the front-end system access the data through the API endpoint, and the front-end displays the retrieved results to the user. The database saves the input and output as a new training set for the industrial heterogeneous network scheduling algorithm to match the prediction model. A monitoring mechanism is set up for the model to regularly maintain and update the machine learning model to adapt to new data and user needs. Use tools to test the API port to ensure that the new data entered by the front-end user can be received by the model and return the prediction results.
[0125] A person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. When the program is executed, the steps of the method can be implemented. The storage medium, such as ROM / RAM, a disk, an optical disk, etc.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. An industrial heterogeneous network scheduling algorithm matching method based on an improved decision tree ID3 algorithm, characterized in that: The following steps are involved: S1: The user builds the network topology at the front end of the industrial heterogeneous network collaborative scheduling subsystem, selects the usage scenario, and inputs the scheduling requirements; S2: The industrial heterogeneous network collaborative scheduling subsystem transmits parameters according to user scheduling requirements, builds and trains the industrial heterogeneous network scheduling algorithm matching model based on the improved decision tree ID3 algorithm; S3: Deploy the industrial heterogeneous network scheduling algorithm matching prediction model to the industrial heterogeneous network collaborative scheduling subsystem backend and add environmental dependencies. The industrial heterogeneous network collaborative scheduling subsystem frontend transmits demand information through the API endpoint. The industrial heterogeneous network scheduling algorithm matching prediction model receives parameters and returns the matching results to the industrial heterogeneous network collaborative scheduling subsystem frontend.
2. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 1 is characterized in that: In step S1, the user sets up the network topology at the front end of the industrial heterogeneous network collaborative scheduling subsystem and selects the usage scenario, including the scheduling of industrial wired networks and industrial wireless networks, and then checks or inputs the scheduling requirements as input feature parameters of the industrial heterogeneous network scheduling algorithm.
3. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 1 is characterized by: Step S2 specifically includes the following steps: S21: collecting input characteristic parameter data of the industrial heterogeneous network scheduling algorithm as a training data set D and a test data set V of the matching function model of the industrial heterogeneous network scheduling algorithm, and then preprocessing; S22: Calculate the information gain g(D|W) of the input feature parameters of each industrial heterogeneous network scheduling algorithm i ), select the algorithm input feature parameters that have the ability to classify the training data; S23: using a recursive method, selecting the feature parameter with the largest information gain as the determination criterion for the current node, until the stop constraint condition is met and the predetermined fitting effect is achieved, thereby creating a decision tree; S24: The cost complexity pruning CCP in the post-pruning algorithm is used to improve the ID3 algorithm. When creating the decision tree, the nodes are conditionally judged whether pruning is needed, and the parameters of the decision tree ID3 algorithm are modified and adjusted. When the predicted fitting effect is achieved, the industrial heterogeneous network scheduling algorithm matching model algorithm based on the improved decision tree ID3 algorithm is obtained.
4. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 3 is characterized by: In step S21, the user collects the input feature parameter data of the industrial heterogeneous network scheduling algorithm from the test case library of each heterogeneous network scheduling or from the public data set platform as the input of the industrial heterogeneous network scheduling algorithm matching model, and defines this data set as the data feature set W of the machine learning model, which is expressed as: In={C1,C2,C3,…C n } C n It represents the characteristic parameters of the industrial heterogeneous network scheduling algorithm input, and n represents the number of parameters in a specific industrial heterogeneous network scheduling algorithm; The data feature set W is divided into a training data set D and a test data set T; then the missing values of the data are processed, standardized, and normalized.
5. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 3 is characterized by: Step S22 specifically includes the following steps: S221: The random scheduling algorithm result obtained by matching the input characteristic parameters of the industrial heterogeneous network scheduling algorithm is called the empirical entropy of the input scheduling algorithm characteristic parameters. The empirical entropy H(D) of the input characteristic parameter data set of the industrial heterogeneous network scheduling algorithm is calculated and expressed as l(r i ) represents the expected value of a scheduling algorithm result, and its expression is: l(r i )=-log2p(r i ) Where p(r i ) indicates the occurrence of scheduling algorithm r i The result probability of , by superimposing the above formula, we can get the expected value of information of all matching results of industrial heterogeneous network scheduling algorithm, that is, entropy, which is expressed as: When the probability of the expected value of information is calculated from the training set, the corresponding entropy becomes the empirical entropy. If the training set is D, then the empirical entropy of the training set is H(D), where |D| represents the sample size of the training set. The scheduling algorithm input parameter feature set W = {C1, C2, C3, ... C n },|C i | indicates that the feature is C in the training set D i The number of samples, the formula of empirical entropy is written as: S222: Calculate the conditional entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, where the conditional entropy H(Y|X) represents the uncertainty of the random variable Y under the condition that the random variable X is known; The random variable X is represented by the scheduling algorithm input parameter feature set W = {C1, C2, C3, ... C n }, Y represents the random possible value in the feature set W, and the matching result is a specific value r in the industrial heterogeneous network scheduling algorithm set R. i , defined as the mathematical expectation of the entropy of the conditional probability distribution of Y given X: p(r i ) is represented by a specific value in the feature set W, and the matching result is a specific value r in the industrial heterogeneous network scheduling algorithm set R i The probability distribution of X = C i When Y = r i The probability distribution of |C i |When the input characteristic parameter value is C i The sample size is The parameter characteristic is C i , the scheduling algorithm matching result is r i Sample size: When the probability of conditional entropy is calculated from the training set, the corresponding entropy becomes the conditional empirical entropy. Let |D| be the sample size of the input feature parameter training set of the industrial heterogeneous network scheduling algorithm. The formula of the conditional empirical entropy of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm is written as: S223: Calculate the target value information gain of the input feature parameter data set of the industrial heterogeneous network scheduling algorithm, that is, the optimal input feature parameter of the scheduling algorithm; the feature C in the input parameter feature set W of the industrial heterogeneous network scheduling algorithm n The information gain of the training data set D of the scheduling algorithm matching function model is g(D|W), which is defined as the difference between the empirical entropy H(D) of the training data set D of the scheduling algorithm matching function model and the empirical conditional entropy H(D|W) of D under the given conditions of the input parameter feature set W of the industrial heterogeneous network scheduling algorithm, that is: g(D|W)=H(D)-H(D|W) Characteristic C n The information gain formula is: Calculate the information gain of each parameter feature in the comparison feature set and select W i The maximum information gain value in is taken as the optimal feature.
6. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 3 is characterized by: In step S23, after the decision tree is generated, the decision tree branches are established according to different values of the characteristic parameters of the root node: a recursive method is adopted to select the characteristic parameter with the largest information gain as the determination standard of the current node, and the branch nodes are continuously divided until the scheduling demand categories of the data in all branch node subsets are the same, thereby constructing a decision tree; The constraint stopping conditions of the improved decision tree ID3 algorithm are: if the depth of the tree reaches the set threshold; if the characteristic parameters of the child nodes of the node are less than the set threshold; if no characteristic parameters can meet the threshold of the set splitting criterion; If the decision tree stopping constraint is met, the remaining data set will no longer be divided and this feature will be used as a leaf node; If the decision tree stopping constraint is not met, set the optimal feature parameter of this branch to A, take the training set of all values in A as the new training set, and remove the remaining feature set from feature set W as the new feature set A. i , and then recursively build a subtree; at each node, the data set is divided into two or more subsets according to the best splitting feature, and then this process is recursively performed on each subset until the termination condition is met.
7. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 3 is characterized by: In step S24, after the decision tree starts to be generated, the error rate gain values of all nodes are calculated from the root node to the leaf node of each branch, and it is determined whether the error rate gain value of the branch is less than the smallest non-leaf node. If not, other non-leaf nodes are polled and traversed until the pruning conditions are met and then the branch is pruned. The algorithm model parameters are modified and optimized through pruning; the performance of the decision tree is evaluated using the test data set T. The decision tree is adjusted by evaluating the accuracy, recall rate, and F1 value of the industrial heterogeneous network scheduling algorithm matching prediction model, including re-pruning or retraining, so as to adjust and optimize the algorithm parameters and obtain the industrial heterogeneous network scheduling algorithm matching prediction model.
8. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 7 is characterized in that: In step S24, the cost complexity pruning CCP method is used for pruning. CCP selects the non-leaf node with the smallest node surface error gain value, deletes the left and right child nodes of the non-leaf node, and if there are multiple non-leaf nodes with the same surface error rate gain value, the non-leaf node with the most child nodes is selected for pruning. During the pruning process, the subtree is deleted and replaced with a leaf node. The category of the node can also be judged by the accuracy on the test set. If the accuracy is improved after pruning, pruning is performed; The CCP algorithm is a subtree T t Define the cost and complexity, as well as a parameter α that measures the relationship between cost and complexity: Starting from the decision tree branch T0, prune continuously from bottom to top until the root node of T0, forming a subtree sequence {T0, T1, ..., T n }, then traverse and compare the error rate gain values on non-leaf nodes one by one, determine whether branch T0 is less than the minimum value in the traversal, and then prune the branch. The mathematical derivation formula for calculating the error rate gain value of the classification is as follows: α measures the classification error rate gain that each node can reduce, E(t) represents the error cost of the leaf node, and E(T t ) represents the error cost of the subtree, e(t) is the error rate of the node, p(t) is the percentage of the number of nodes, and N(t) represents the total number of child nodes of the decision tree. The smaller α is, the smaller the classification error rate that can be reduced by the node. When α=0, E(t)=E(T t ), prune the nodes and make them leaf nodes.
9. The industrial heterogeneous network scheduling algorithm matching method based on the improved decision tree ID3 algorithm according to claim 1 is characterized by: In step S3, the industrial heterogeneous network scheduling algorithm matching prediction model is deployed on the back end of the industrial heterogeneous network scheduling system, including the following steps: S31: Add environment dependencies related to web development and machine learning loading to the project to achieve interaction between the two machine languages; S32: loading the industrial heterogeneous network scheduling algorithm matching prediction model at the back end of the industrial heterogeneous network scheduling system, saving the model in the form of a file and directly calling the output file; S33: By designing the API endpoint, create a service class to encapsulate the call to the API, convert the input data into the appropriate format, send the request, and convert the response to the object to ensure that the input can be received normally and the prediction result can be returned; S34: Ensure that the communication from the backend application to the model service is working properly, the inference results of the machine learning model are as expected, and optimize the performance of the model service as needed.