Linear multi-threshold classification method based on Huffman tree

The linearized multi-threshold classification method, which utilizes Huffman tree encoding and scatter matrix optimization, solves the problems of high computational resource consumption and uneven class distribution in multi-class classification tasks, achieving efficient and accurate classification results.

CN120929970APending Publication Date: 2025-11-11SHANDONG INSPUR DIGITAL BUSINESS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511052000.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing technologies consume large amounts of computational resources and have high classification latency in multi-class classification tasks, and the uneven distribution of classes leads to large recognition errors.

Method used

A linearized multi-threshold classification method based on Huffman trees is adopted. The classification containers are divided by Huffman tree encoding, and the feature vectors are optimized by combining the scatter matrix and the Youden Index to adjust the threshold. The classification containers and thresholds are dynamically adjusted to adapt to the class distribution.

Benefits of technology

It significantly reduces model training and prediction costs, improves the ability to identify a few categories, reduces the false positive rate, and is suitable for application in edge devices and real-time systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929970A_ABST
    Figure CN120929970A_ABST
Patent Text Reader

Abstract

The invention discloses a linear multi-threshold classification method based on a Huffman tree, and the method comprises the steps: obtaining a correlation coefficient matrix according to multi-class data in a collected historical data set, and obtaining the average intensity of each class of data in a multi-feature dimension, so as to obtain the probability of each data class; according to the probability, coding is carried out through a Huffman tree, the coding length is inversely proportional to the probability, and classification containers are divided according to the coding length; and according to the divergence matrix of the data in the classification containers, in combination with the divergence matrix between the classification containers, obtaining a feature vector so as to obtain a regression mean value of the classification containers, and determining a classification threshold between the classification containers so as to perform classification by using the data collected in real time. According to the method, classification containers are dynamically divided based on Huffman tree coding, a multi-classification task is optimized into O (logK) subtasks, and in combination with divergence matrix driven feature vector optimization and dynamic threshold selection, the model complexity is reduced, and meanwhile, the recognition precision in a class imbalance scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data classification technology, specifically relating to a linearized multi-threshold classification method based on Huffman trees. Background Technology

[0002] With the rapid development of artificial intelligence and big data technologies, multi-class classification has become a core task in fields such as image recognition, natural language processing, and industrial inspection. Among existing technologies, linear classifiers (such as SVM and LDA) are widely used due to their high computational efficiency and strong interpretability, but they have significant limitations when handling multi-class tasks.

[0003] Binary splitting strategies decompose multi-class problems into multiple binary sub-problems through one-to-one, one-to-many, or many-to-many approaches. Therefore, K(K-1) / 2 or K binary classifiers need to be constructed, causing model training time and prediction overhead to increase exponentially with the number of classes K. For example, when K=100, 4950 classifiers need to be trained, significantly increasing computational resource consumption. Furthermore, multiple classifiers need to be executed sequentially during the prediction phase, resulting in high real-time classification latency. For example, in industrial inspection scenarios, high latency can impact production line efficiency.

[0004] Furthermore, existing technologies generally assume a balanced class distribution, but in real-world data, class frequencies differ significantly, with the majority class having far more samples than the minority class. The binary splitting strategy fails to model these class frequency differences, leading to overfitting of the model to majority class features and a significant decrease in its ability to identify the minority class. Summary of the Invention

[0005] This invention provides a linearized multi-threshold classification method based on Huffman trees to solve the problems of increased computational resource consumption and high classification latency caused by the increase in the number of binary classifiers due to the increase in the number of categories in the binary splitting strategy, as well as the recognition error caused by the uneven distribution of categories.

[0006] The technical solution adopted in this invention is as follows:

[0007] A linearized multi-threshold classification method based on Huffman trees, comprising:

[0008] Based on the multi-category data in the collected historical dataset, a correlation coefficient matrix and the average intensity of each category of data in multiple feature dimensions are obtained to obtain the probability of each data category.

[0009] Based on the probability, Huffman trees are used for encoding, with the encoding length inversely proportional to the probability. Based on the encoding length, classification containers are divided.

[0010] Based on the scatter matrix of the data within the classification container and the scatter matrix between classification containers, feature vectors are obtained to obtain the regression mean of the classification containers, and the classification threshold between the classification containers is determined so as to use the real-time collected data for classification.

[0011] The linearized multi-threshold classification method based on Huffman trees disclosed in this invention also has the following additional technical features:

[0012] The probability of each data category is obtained as follows:

[0013] Based on the correlation coefficient matrix and the average intensity of each data category across multiple feature dimensions, the contribution value of each data category to the multiple feature dimensions is obtained.

[0014] The probability of a data category is obtained by taking the percentage of the sum of the contributions of each data category as a whole.

[0015] Based on the encoding length, the categories are divided into containers, specifically:

[0016] Based on the length of the code, category data with the same code length are divided into a category container, and the data category stored in the category container is recorded.

[0017] Based on the scatter matrix of the data within each classification container, and combined with the scatter matrix between classification containers, feature vectors are obtained to derive the regression mean of the classification containers. Specifically:

[0018] Based on the scatter matrix S of the data within the classification container w Combining the scatter matrix S between the classification containers b , to obtain the feature vector The regression mean of the classification container is obtained through the feature vector.

[0019] Where x is the numerical vector in the corresponding classification container, and m is the amount of data in the corresponding classification container.

[0020] The classification threshold between the classification containers is determined as follows:

[0021] The classification containers are sorted according to the regression mean.

[0022] In the sorting order, the classification thresholds are preset sequentially, and the magnitude of the preset classification thresholds follows the same trend as the magnitude of the regression mean.

[0023] The classification threshold is obtained by adjusting the true positive rate and false positive rate based on the Youden Index model and the preset classification threshold.

[0024] The classification is performed using real-time collected data, specifically as follows:

[0025] Based on the real-time collected data, the corresponding classification containers are determined by comparing them one by one with the classification thresholds from small to large, so as to determine the candidate data categories.

[0026] When the candidate data category is unique, the data category of that data is determined.

[0027] Otherwise, by analyzing data characteristics, the data category corresponding to the data can be determined based on the correlation between the data and the candidate data categories.

[0028] After classifying the data collected in real time, it also includes:

[0029] A new data category is identified when the correlation between the data and its corresponding data category is consistently less than the intra-category correlation threshold.

[0030] Based on the collected data, the classification containers and classification thresholds are readjusted.

[0031] This invention also provides a linearized multi-threshold classification system based on Huffman trees, comprising:

[0032] The data preprocessing module is used to obtain the probability of each data category and construct a Huffman tree;

[0033] The classification container training module is used to obtain classification containers and assign thresholds;

[0034] The classification execution module is used to use real-time collected data to call the classifier to complete the classification based on the classification threshold.

[0035] The dynamic optimization module is used to adjust the classification container and threshold parameters.

[0036] This invention further provides a storage medium,

[0037] The storage medium stores a computer program, which, when executed, implements the steps of the linearized multi-threshold classification method based on Huffman trees.

[0038] The present invention further provides a processing apparatus, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor for implementing the steps of a Huffman tree-based linearized multi-threshold classification method when executing the computer program.

[0041] Due to the adoption of the above technical solution, the beneficial effects achieved by this invention are as follows:

[0042] 1. In this invention, Huffman tree coding is used to divide the classification containers, and the coding length is dynamically allocated according to the class probability. High-frequency classes correspond to short codes, and low-frequency classes correspond to long codes. This breaks down the multi-classification task into O(logK) sub-classification tasks (compared to the O(K) sub-classification tasks of traditional binary classification strategies). 2 (Significant optimization). For example, when the number of categories K=100, the traditional binary classification strategy requires training 4950 binary classifiers, while this invention only requires about 7 classifiers (log2). 100 (≈7), significantly reducing model training and prediction overhead. High-frequency categories are quickly matched using short codes, while low-frequency categories are gradually refined using long codes, reducing redundant computation and improving real-time classification efficiency.

[0043] By combining the scatter matrices (within-class variance and between-class variance) within and between classification containers, the weight vector is optimized by maximizing the difference in between-class means and minimizing the within-class variance, and the feature vector is calculated to optimize the classification boundary. The optimal threshold is dynamically selected using the Youden Index to maximize classification accuracy.

[0044] In imbalanced class scenarios, traditional methods suffer from low minority class recognition rates due to the majority class samples dominating model training. This invention addresses this by optimizing feature vectors driven by the scatter matrix, reducing the false positive rate in overlapping class regions and enhancing minority class recognition capabilities. Furthermore, adjusting the threshold using the Youden Index avoids classification bias caused by fixed thresholds, further minimizing false positives.

[0045] Furthermore, the classification threshold between classification containers allows for classification using real-time collected data, resulting in lower computational complexity. This makes it suitable for deployment on edge devices or real-time systems, offering significant advantages in scenarios with high efficiency and accuracy requirements, such as industrial inspection and medical diagnosis. Attached Figure Description

[0046] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:

[0047] Figure 1 This is a flowchart illustrating the linearized multi-threshold classification method based on Huffman trees according to one embodiment of the present invention. Detailed Implementation

[0048] To more clearly illustrate the overall concept of the present invention, a detailed description will be provided below with reference to the accompanying drawings and examples.

[0049] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0050] like Figure 1 As shown, a linearized multi-threshold classification method based on Huffman trees includes:

[0051] S100: Based on the multi-class data in the collected historical dataset, obtain the correlation coefficient matrix and the average intensity of each class of data in multiple feature dimensions to obtain the probability of each data class.

[0052] The core objective of this step is to construct a category probability model based on multi-feature-dimensional statistical information from historical datasets, providing a foundation for subsequent Huffman tree coding and classification container partitioning.

[0053] For all feature dimensions in the historical dataset, calculate the Pearson correlation coefficient matrix to evaluate the linear correlation between features. Identify redundant features (high correlation) or key features (low correlation) to provide a basis for feature selection in subsequent average intensity calculation, reduce the feature dimensions required for subsequent classifier training, and indirectly reduce model complexity.

[0054] For each category, calculate its average strength across all feature dimensions to quantify the significance of the category across different feature dimensions and avoid a single feature dominating probability calculation.

[0055] By combining the correlation coefficient matrix and the average intensity, the probability of each category is calculated. The average intensity is used to quantify the distribution differences of categories along the feature dimension, improving the accuracy of probability calculation. In class-imbalanced scenarios, traditional methods suffer from probability distortion due to sample size bias, while this invention, through dynamic weight optimization of the feature dimension, more accurately reflects the category distribution.

[0056] This step solves the probability distortion problem of traditional methods in scenarios such as imbalanced class distribution and feature redundancy by combining the correlation coefficient matrix with the average strength for probabilistic modeling, laying a key foundation for efficient data classification and adaptability to imbalanced data.

[0057] S200: Based on the probability, encode using a Huffman tree, with the encoding length inversely proportional to the probability, and divide the classification containers according to the encoding length.

[0058] The core objective of this step is to optimize the efficiency and accuracy of multi-classification tasks through Huffman tree encoding and classification container partitioning.

[0059] Based on the category probabilities calculated in the preceding steps, the Huffman algorithm is used to construct an optimal binary tree. Categories with high probabilities are closer to the root node and have shorter encoding lengths; categories with low probabilities are farther from the root node and have longer encoding lengths. The encoding length of the Huffman tree is proportional to the probability, and high-frequency categories are processed first to reduce redundant calculations.

[0060] Categories are divided into multiple containers based on their encoding length, with categories of the same encoding length grouped into the same container. For example, if categories A and B have an encoding length of 2, and categories C and D have an encoding length of 3, then they are divided into containers G1 = {A, B} and G2 = {C, D}. Categories within a container have similar encoding paths, facilitating centralized processing by subsequent classifiers and simplifying the training and prediction process. This container-based approach reduces model complexity, avoiding the need for traditional methods that require constructing O(K) arrays. 2 The cost of ) classifiers.

[0061] This step addresses the core shortcomings of traditional multi-classification methods in terms of efficiency, complexity, and adaptability by using Huffman tree encoding and classification container partitioning.

[0062] S300: Based on the scatter matrix of the data within the classification container and the scatter matrix between classification containers, a feature vector is obtained to obtain the regression mean of the classification containers and determine the classification threshold between the classification containers, so as to use the real-time collected data for classification.

[0063] The core objective of this step is to improve the ability to distinguish between classification containers by calculating the scatter matrix of the LDA model and using multiple thresholds.

[0064] Calculate the intra-class scatter matrix to quantify the dispersion of samples within the classification container, providing a basis for subsequent projection direction optimization. Calculate the inter-class scatter matrix to measure the dispersion between classification containers, guiding the selection of projection directions to maximize inter-class differences.

[0065] Solve for the eigenvectors to obtain the optimal projection direction. Ensure that the projected data is as separated as possible between classes and as clustered as possible within classes, ensuring clear classification boundaries. Calculate the regression mean to map the samples to a low-dimensional space, preserving key classification information and reducing computational complexity.

[0066] Based on the distribution characteristics of the regression mean, the optimal threshold sequence is dynamically selected using the Youden Index. The projection direction and threshold allocation are systematically optimized through the scatter matrix calculation of the LDA model, avoiding reliance on empirical evidence.

[0067] This step solves the problems of blurred boundaries, threshold dependence on experience, and high computational complexity in traditional multi-classification methods by calculating the scatter matrix and assigning thresholds using the LDA model.

[0068] In a preferred embodiment of the present invention, the probability of each data category is obtained as follows:

[0069] Based on the correlation coefficient matrix and the average intensity of each data category across multiple feature dimensions, the contribution value of each data category to the multiple feature dimensions is obtained.

[0070] The probability of a data category is obtained by taking the percentage of the sum of the contributions of each data category as a whole.

[0071] The core objective of this implementation is to accurately quantify the probability of each data category by calculating the contribution value of the correlation coefficient matrix combined with the average intensity, thus providing reliable input for the subsequent construction of the Huffman tree.

[0072] Using the Pearson correlation coefficient formula

[0073]

[0074] Calculate the linear correlation between features to obtain the correlation coefficient matrix C. n×n To obtain the accuracy matrix c -1 n×n It is used to reflect the independence of feature dimensions and eliminate the influence of redundant features.

[0075] For each category, calculate its average value x across all feature dimensions. i Quantifying the performance of categories in terms of feature dimensions reduces the number of feature dimensions required for subsequent classifier training, indirectly reducing model complexity.

[0076] pass The contribution of each data category to multiple feature dimensions is obtained. Weighted by a precision matrix, and considering both feature independence and category performance, the overall contribution of each category to the multiple feature dimensions is derived. Average intensity is used to quantify the distributional differences of categories across feature dimensions, improving the accuracy of probability calculations.

[0077] The probability of a data category is obtained by taking the proportion of the sum of its contributions across all data categories.

[0078]

[0079] Normalizing the contribution values ​​into probabilities reflects the relative importance of the category in the overall dataset.

[0080] This implementation solves the probability distortion problem of traditional methods in scenarios such as class imbalance and feature redundancy by calculating the contribution value by combining the correlation coefficient matrix and the average intensity.

[0081] In a preferred embodiment of the present invention, the classification containers are divided according to the encoding length, specifically as follows:

[0082] Based on the length of the code, category data with the same code length are divided into a category container, and the data category stored in the category container is recorded.

[0083] The core objective of this implementation is to optimize the efficiency and resource allocation of multi-classification tasks by dividing the classification containers according to the Huffman tree encoding length.

[0084] Based on the calculated class probability p i The Huffman algorithm is used to construct an optimal binary tree, with high-probability categories closer to the root node (shorter encoding length) and low-probability categories farther from the root node (longer encoding length). The encoding length of the Huffman tree is inversely proportional to the probability, and high-frequency categories are processed first, reducing redundant calculations and wasting computing resources.

[0085] Specifically, the encoding rule is that the left subtree is 0 and the right subtree is 1, and the path from the root node to the leaf node is the category code.

[0086] Categories are divided into multiple containers based on their encoding length, with categories of the same encoding length grouped into the same container. For example, if categories A and B have an encoding length of 2, and categories C and D have an encoding length of 3, then they are divided into containers G1 = {A, B} and G2 = {C, D}. Categories within a container have similar encoding paths, facilitating centralized processing by subsequent classifiers and simplifying the training and prediction process. This container-based approach reduces model complexity, avoiding the need for traditional methods that require constructing O(K) arrays. 2 The cost of ) classifiers.

[0087] This implementation method addresses the core shortcomings of traditional multi-classification methods in terms of efficiency, complexity, and adaptability by dividing the classification container using Huffman tree encoding length.

[0088] In a preferred embodiment of the present invention, a feature vector is obtained based on the scatter matrix of the data within the classification container and the scatter matrix between classification containers, in order to obtain the regression mean of the classification containers, specifically as follows:

[0089] Based on the scatter matrix S of the data within the classification container e Combining the scatter matrix S between the classification containers b , to obtain the feature vector The regression mean of the classification container is obtained through the feature vector.

[0090] Where x is the numerical vector in the corresponding classification container, and m is the amount of data in the corresponding classification container.

[0091] The core objective of this implementation method is to improve the distinguishing ability between classification containers by calculating the scatter matrix and optimizing the feature vector of the LDA model, thereby providing accurate input for subsequent classification threshold division.

[0092] The scatter matrix within the classification container is,

[0093]

[0094] Used to quantify the dispersion of samples within a classification container, reflecting the clustering of similar data.

[0095] The scatter matrix between the classification containers is,

[0096]

[0097] It is used to measure the degree of dispersion between classification containers and guide the selection of projection direction to maximize inter-class differences.

[0098] By solving The eigenvector w corresponding to the largest generalized eigenvalue is used as the classification projection solution to obtain the optimal projection direction, ensuring that the data after projection are separated as much as possible between classes and clustered as much as possible within classes, and ensuring that the classification boundary of the data after projection is clear.

[0099] Obtain the regression mean.

[0100]

[0101] This maps the data within the classification container to a low-dimensional space, preserving key classification information and reducing computational complexity. Through the divergence matrix calculation of the LDA model, the projection direction and threshold allocation are systematically optimized, avoiding reliance on empirical evidence.

[0102] This implementation solves the problems of blurred boundaries, threshold dependence on experience, and high computational complexity in traditional multi-classification methods by calculating the divergence matrix and optimizing the eigenvectors of the LDA model.

[0103] As a preferred embodiment of this implementation, the classification threshold between classification containers is determined as follows:

[0104] The classification containers are sorted according to the regression mean.

[0105] In the sorting order, the classification thresholds are preset sequentially, and the magnitude of the preset classification thresholds follows the same trend as the magnitude of the regression mean.

[0106] The classification threshold is obtained by adjusting the true positive rate and false positive rate based on the Youden Index model and the preset classification threshold.

[0107] The core objective of this implementation method is to dynamically determine the optimal classification threshold between classification containers through the collaborative optimization of regression mean sorting and the Youden Index model, thereby improving the accuracy and robustness of classification.

[0108] Based on the regression mean of the classification containers, the containers are sorted from low to high to ensure that the subsequent threshold setting is consistent with the data distribution trend. The sorted containers have a clearer distribution, providing a structured basis for threshold setting.

[0109] Initial thresholds are set sequentially among the sorted classification containers, with the threshold values ​​following the same trend as the regression mean.

[0110]

[0111] Where y k y k+1 This is the regression mean of adjacent classification containers. The initial threshold directly reflects the distribution differences between containers, avoiding bias caused by empirical settings.

[0112] Calculate the True Positive Rate (TPR) and False Positive Rate (FPR) for each preset threshold. Based on the Youden Index formula,

[0113] t p =arg max t′ TPR p (t′)-FPR p [(t′)], p∈(N-1)

[0114] TPR p (t′) represents the true positive rate (FPR) of the model when the classification threshold is t′ during the p-th split. p (t′) represents the false positive rate of the model when the classification threshold is t′ during the p-th split, and arg max t′ [·] indicates selecting the optimal threshold that meets the conditions, t p This represents the p-th classification threshold obtained. Maintaining a dynamic balance between sensitivity and specificity ensures the classifier maintains high performance even under complex data distributions.

[0115] This embodiment addresses the core shortcomings of traditional classification threshold setting methods in balancing adaptability, sensitivity, and specificity by synergistically optimizing regression mean sorting and the Youden Index model.

[0116] As a preferred embodiment of the present invention, classification is performed using real-time collected data, specifically as follows:

[0117] Based on the real-time collected data, the corresponding classification containers are determined by comparing them one by one with the classification thresholds from small to large, so as to determine the candidate data categories.

[0118] When the candidate data category is unique, the data category of that data is determined.

[0119] Otherwise, by analyzing data characteristics, the data category corresponding to the data can be determined based on the correlation between the data and the candidate data categories.

[0120] The core objective of this implementation method is to improve classification accuracy by combining real-time data classification and dynamic threshold comparison mechanisms with correlation analysis, thereby providing accurate input for the efficient processing of dynamic data streams.

[0121] Real-time collected data sample x and preset threshold t between classification containers i Based on the classification threshold after sorting by regression mean, the size relationship between x and the threshold is compared sequentially (e.g., x < t1, t1 < x < t2, etc.) to determine the classification container.

[0122] If the classification container contains only one data category, it will directly match the corresponding category. This quickly filters potential data categories and reduces the computational cost of subsequent analysis.

[0123] When a classification container contains multiple classification containers, initiate correlation analysis. Calculate the correlation between x and the data within each candidate data category (e.g., chi-square test, mutual information). Select the classification container with the highest correlation as the final category. Quantify the matching degree between the data and the candidate data categories to avoid misclassification caused by overlapping thresholds.

[0124] The combination of threshold comparison and correlation analysis ensures classification efficiency while resolving class overlap issues. Threshold comparison quickly filters candidate containers, avoiding full classifier computation and shortening classification response time.

[0125] This implementation method addresses the core shortcomings of traditional classification methods in terms of efficiency, accuracy, and dynamic adaptability through the synergistic optimization of real-time data classification threshold comparison and correlation analysis.

[0126] As a preferred embodiment of this implementation, after classifying the data collected in real time, the method further includes:

[0127] A new data category is identified when the correlation between the data and its corresponding data category is consistently less than the intra-category correlation threshold.

[0128] Based on the collected data, the classification containers and classification thresholds are readjusted.

[0129] The core objective of this embodiment is to automatically identify the emergence of new data categories by monitoring the dynamic changes in the correlation between data and categories in real time, and to trigger adaptive adjustments to the classification container and threshold, thereby improving the robustness and adaptability of the classification system.

[0130] Real-time classified data x and its candidate categories, calculate the relationship between x and each candidate category C. k The correlation (such as chi-square test, mutual information, cosine similarity, etc.).

[0131] If the correlation between x and all candidate categories is less than the preset intra-class correlation threshold θ intra If so, it will be marked as "suspected new category".

[0132] Corr(x,C k )<θ ntra ,

[0133] Quantify the degree of matching between data and categories to identify potential new categories.

[0134] If multiple samples in the same batch of data (e.g., N consecutive times) are all marked as "suspected new category", the new category confirmation process is triggered. The suspected new category samples are clustered (e.g., using K-Means, DBSCAN) to form a new classification container C. new Update the list of category containers {C1, C2, ..., C}. new Dynamically expand the classification container to adapt to changes in data distribution and systematically solve the problems of data drift and new categories.

[0135] This embodiment addresses the core shortcomings of traditional classification systems in terms of data drift and new category identification through a correlation monitoring and dynamic adjustment mechanism.

[0136] This invention also provides a linearized multi-threshold classification system based on Huffman trees, comprising:

[0137] The data preprocessing module is used to obtain the probability of each data category and construct a Huffman tree;

[0138] The classification container training module is used to obtain classification containers and assign thresholds;

[0139] The classification execution module is used to use real-time collected data to call the classifier to complete the classification based on the classification threshold.

[0140] The dynamic optimization module is used to adjust the classification container and threshold parameters.

[0141] Therefore, it is possible to achieve any effect of the linearized multi-threshold classification method based on Huffman trees, which will not be elaborated here.

[0142] This invention further provides a storage medium,

[0143] The storage medium stores a computer program, which, when executed, implements the steps of the linearized multi-threshold classification method based on Huffman trees.

[0144] Therefore, it is possible to achieve any effect of the linearized multi-threshold classification method based on Huffman trees, which will not be elaborated here.

[0145] The present invention further provides a processing apparatus, comprising:

[0146] Memory, used to store computer programs;

[0147] A processor is configured to implement the steps of the Huffman tree-based linearized multi-threshold classification method when executing the computer program.

[0148] Therefore, it is possible to achieve any effect of the linearized multi-threshold classification method based on Huffman trees, which will not be elaborated here.

[0149] For any parts not mentioned in this invention, existing technologies can be used or referenced.

[0150] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

[0151] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. A linearized multi-threshold classification method based on Huffman trees, characterized in that, include: Based on the multi-category data in the collected historical dataset, a correlation coefficient matrix and the average intensity of each category of data in multiple feature dimensions are obtained to obtain the probability of each data category. Based on the probability, Huffman trees are used for encoding, with the encoding length inversely proportional to the probability. Based on the encoding length, classification containers are divided. Based on the scatter matrix of the data within the classification container and the scatter matrix between classification containers, feature vectors are obtained to obtain the regression mean of the classification containers, and the classification threshold between the classification containers is determined so as to use the real-time collected data for classification.

2. The linearized multi-threshold classification method based on Huffman trees according to claim 1, characterized in that, The probability of each data category is obtained as follows: Based on the correlation coefficient matrix and the average intensity of each data category across multiple feature dimensions, the contribution value of each data category to the multiple feature dimensions is obtained. The probability of a data category is obtained by taking the percentage of the sum of the contributions of each data category as a whole.

3. The linearized multi-threshold classification method based on Huffman trees according to claim 1, characterized in that, Based on the encoding length, the categories are divided into containers, specifically: Based on the length of the code, category data with the same code length are divided into a category container, and the data category stored in the category container is recorded.

4. The linearized multi-threshold classification method based on Huffman trees according to claim 1, characterized in that, Based on the scatter matrix of the data within each classification container, and combined with the scatter matrix between classification containers, feature vectors are obtained to derive the regression mean of the classification containers. Specifically: Based on the scatter matrix S of the data within the classification container w Combining the scatter matrix S between the classification containers b , to obtain the feature vector The regression mean of the classification container is obtained through the feature vector. Where x is the numerical vector in the corresponding classification container, and m is the amount of data in the corresponding classification container.

5. The linearized multi-threshold classification method based on Huffman trees according to claim 4, characterized in that, The classification threshold between the classification containers is determined as follows: The classification containers are sorted according to the regression mean. In the sorting order, the classification thresholds are preset sequentially, and the magnitude of the preset classification thresholds follows the same trend as the magnitude of the regression mean. The classification threshold is obtained by adjusting the true positive rate and false positive rate based on the Youden Index model and the preset classification threshold.

6. The linearized multi-threshold classification method based on Huffman trees according to claim 3, characterized in that, The classification is performed using real-time collected data, specifically as follows: Based on the real-time collected data, the corresponding classification containers are determined by comparing them one by one with the classification thresholds from small to large, so as to determine the candidate data categories. When the candidate data category is unique, the data category of that data is determined. Otherwise, by analyzing data characteristics, the data category corresponding to the data can be determined based on the correlation between the data and the candidate data categories.

7. The linearized multi-threshold classification method based on Huffman trees according to claim 6, characterized in that, After classifying the data collected in real time, it also includes: A new data category is identified when the correlation between the data and its corresponding data category is consistently less than the intra-category correlation threshold. Based on the collected data, the classification containers and classification thresholds are readjusted.

8. A linearized multi-threshold classification system based on Huffman trees, characterized in that, include: The data preprocessing module is used to obtain the probability of each data category and construct a Huffman tree; The classification container training module is used to obtain classification containers and assign thresholds; The classification execution module is used to use real-time collected data to call the classifier to complete the classification based on the classification threshold. The dynamic optimization module is used to adjust the classification container and threshold parameters.

9. A storage medium, characterized in that, The storage medium stores a computer program that, when executed, implements the steps of the linearized multi-threshold classification method based on Huffman trees as described in any one of claims 1 to 8.

10. A processing apparatus, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the Huffman tree-based linearized multi-threshold classification method as described in any one of claims 1 to 8 when executing the computer program.