SVM classification method and system based on multi-granularity features
By employing an SVM classification method based on multi-granularity features, text is preprocessed, word segments are segmented, multi-granularity feature vectors are generated, and dimensionality reduction is performed. This solves the problem of incomplete understanding of text content in traditional text classification methods, thereby improving the accuracy and efficiency of text classification.
Patent Information
- Application Number
- CN202511263496.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional text classification methods rely on vocabulary-based feature extraction, which makes it difficult to achieve a comprehensive understanding of text content, resulting in inaccurate classification results.
We employ an SVM classification method based on multi-granularity features. This method involves preprocessing the text to be classified, segmenting words, generating multi-granularity feature vectors, and reducing the dimensionality of the feature matrix. The resulting target feature matrix is then input into the SVM text classification model, enabling a comprehensive understanding of the text content and the removal of redundant features.
It improves the accuracy and efficiency of text classification. Through multi-granularity feature extraction and dimensionality reduction, it reduces the computational burden and achieves a comprehensive understanding and efficient classification of text content.
Smart Images

Figure CN120804859A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of text recognition, and in particular to an SVM classification method and system based on multi-granularity features. BACKGROUND
[0002] With the rapid development of information technology, especially the popularity of the Internet and big data technology, the generation and storage of text data have shown explosive growth. From social media, news websites, e-commerce platforms to academic papers, the application scenarios of text data are widespread in various fields, covering sentiment analysis, public opinion monitoring, automatic question answering, content recommendation, advertisement placement, intelligent customer service and other applications. Therefore, how to effectively process and analyze massive text data has become one of the research focuses in the field of artificial intelligence. As one of the core tasks in natural language processing, text classification has been widely used in the above-mentioned multiple fields and has become a basic technology in text mining.
[0003] Traditional text classification methods mostly rely on feature extraction technology based on words. However, such classification methods are difficult to achieve a comprehensive understanding of the text content, and are prone to inaccurate classification results. SUMMARY
[0004] The present application provides an SVM classification method and system based on multi-granularity features. To solve the problems raised in the background technology.
[0005] In a first aspect, the present application provides an SVM classification method based on multi-granularity features, comprising: preprocessing the text to be classified to obtain a target text; segmenting the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text; generating a multi-granularity feature vector for each phrase based on a preset multi-granularity feature vector generation method, and generating an initial feature matrix based on each multi-granularity feature vector; dimensionally reducing the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix, and inputting the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.
[0006] In one possible implementation, the preprocessing of the text to be classified to obtain a target text comprises: removing stop words in the text to be classified based on a preset stop word library to obtain the target text.
[0007] In a possible implementation, the preset multi-granularity feature vector generation method generates a multi-granularity feature vector of each of the word groups respectively, and generates an initial feature matrix based on the multi-granularity feature vectors, including: For each of the word groups, a percentage of the word group in the target text is calculated, and an application domain fingerprint sequence of the word group is generated based on a preset application domain fingerprint sequence generation method, and a semantic feature vector of the word group is obtained; For each of the word groups, the percentage, the application domain fingerprint sequence, and the semantic feature vector corresponding to the word group are sequentially arranged to obtain a multi-granularity feature vector corresponding to the word group; Each of the multi-granularity feature vectors is sequentially inserted into a preset blank matrix to obtain the initial feature matrix.
[0008] In a possible implementation, the preset feature matrix dimension reduction method performs dimension reduction processing on the initial feature matrix to obtain a target feature matrix, including: Information gain corresponding to each application domain fingerprint bit is calculated based on the initial feature matrix respectively, and multi-granularity feature vector dimension reduction processing is performed on the initial feature matrix based on the information gain corresponding to each application domain fingerprint bit to obtain an intermediate feature matrix; Each of the multi-granularity feature vectors in the intermediate feature matrix is combined into a binary combination to obtain a plurality of binary combination pairs; For each of the binary combination pairs, the percentages corresponding to the two multi-granularity feature vectors in the binary combination pair are deleted to obtain two target feature vectors corresponding to the binary combination pair, and a Pearson correlation coefficient between the two target feature vectors corresponding to the binary combination pair is calculated, and when the Pearson correlation coefficient is greater than a preset Pearson correlation coefficient, the two multi-granularity feature vectors corresponding to the binary combination pair are merged into one multi-granularity feature vector.
[0009] In a possible implementation, the preset feature matrix dimension reduction method performs dimension reduction processing on the initial feature matrix to obtain a target feature matrix, including: The total entropy of each of the application domain fingerprint bits and the individual entropy corresponding to each of the application domain fingerprint bits are calculated based on the initial feature matrix; For each of the application domain fingerprint bits, the difference between the total entropy and the individual entropy corresponding to the application domain fingerprint bit is determined as the information gain corresponding to the application domain fingerprint bit; For each application field fingerprint bit, if information gain corresponding to the application field fingerprint bit is less than preset information gain, a vector corresponding to the application field fingerprint bit in the initial feature matrix is deleted to obtain an intermediate feature matrix.
[0010] In a possible implementation, the calculating of the overall entropy of each application field fingerprint bit and the individual entropy corresponding to each application field fingerprint bit based on the initial feature matrix comprises: For each application field fingerprint bit, a vector corresponding to the application field fingerprint bit is multiplied by vectors corresponding to each percentage in the initial feature matrix to obtain a target value corresponding to the application field fingerprint bit; The target values are added to obtain a sum of target values; For each application field fingerprint bit, a ratio of a target value corresponding to the application field fingerprint bit to the sum of target values is determined as a weight coefficient corresponding to the application field fingerprint bit; The overall entropy of each application field fingerprint bit is determined based on the weight coefficients; The conditional entropy corresponding to each application field fingerprint bit is determined based on a preset conditional entropy calculation method.
[0011] In a second aspect, the application provides an SVM classification system based on multi-granularity features, comprising: A preprocessing module is configured to preprocess a text to be classified to obtain a target text; A segmentation module is configured to perform segmentation processing on the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text; A generation module is configured to generate a multi-granularity feature vector of each phrase based on a preset multi-granularity feature vector generation method, and generate an initial feature matrix based on the multi-granularity feature vectors; An input module is configured to perform dimension reduction processing on the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix, and input the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.
[0012] The application provides an SVM classification method and system based on multi-granularity features, which comprises the following steps: preprocessing a text to be classified to obtain a target text; performing segmentation processing on the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text; generating a multi-granularity feature vector of each phrase based on a preset multi-granularity feature vector generation method, and generating an initial feature matrix based on the multi-granularity feature vectors; performing dimension reduction processing on the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix, and inputting the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified. On the one hand, the multi-granularity feature vectors of the phrases are generated based on the preset multi-granularity feature vector generation method, the initial feature matrix is generated based on the multi-granularity feature vectors, the features of the phrases are extracted at multiple granularities, which is helpful for comprehensively understanding the content of the text. On the other hand, the dimension reduction processing is performed on the initial feature matrix based on the preset feature matrix dimension reduction method to obtain the target feature matrix, which can effectively remove the redundant features in the initial feature matrix, thereby reducing the calculation burden and improving the classification efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0014] Figure 1 A flowchart of the SVM classification method based on multi-granularity features provided by the embodiments of the present application is shown. Figure 2 A structural schematic block diagram of the SVM classification system based on multi-granularity features provided by the embodiments of the present application is shown. Figure 3 A structural schematic block diagram of the terminal device provided by the embodiments of the present application is shown. DETAILED DESCRIPTION
[0015] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the present application.
[0016] The flowcharts shown in the drawings are merely illustrative and do not necessarily include all contents and operations / steps, nor are they necessarily executed in the order described. For example, some operations / steps can be further decomposed, combined or partially merged, so the actual execution order can be changed based on actual conditions.
[0017] It should also be understood that the terms used in this specification of the application are only for the purpose of describing particular embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an" and "the" are intended to include plural forms unless the context clearly dictates otherwise.
[0018] It should be further understood that the term "and / or" used in this specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0019] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following examples and features in the examples can be combined with each other without conflict.
[0020] Please refer to Figure 1 , Figure 1 The flowchart of the SVM classification method based on multi-granularity features provided by the embodiments of the present application is shown in Figure 1 The SVM classification method based on multi-granularity features provided by the embodiments of the present application includes steps S1 to S4.
[0021] Step S1, pre-processing the text to be classified to obtain a target text.
[0022] Step S2, segmenting the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text.
[0023] Step S3, generating a multi-granularity feature vector for each phrase based on a preset multi-granularity feature vector generation method, and generating an initial feature matrix based on each multi-granularity feature vector.
[0024] Step S4, performing dimension reduction processing on the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix, and inputting the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.
[0025] In this embodiment, it specifically includes: In step S1, stop words are removed from the text to be classified based on a preset stop word library to obtain the target text. The stop word library includes stop word sets corresponding to various languages, including various punctuation marks and function words. For example, in Chinese, the corresponding stop word set includes ","; "."; ";"; "的"; "是", etc. By removing stop words from the text to be classified based on the preset stop word library, content that has little contribution to the text classification task is removed.
[0026] In the above step S2, the target text is input into the phrase segmentation model to obtain multiple phrases of the target text. The phrase segmentation model is obtained by learning a large number of phrases using a convolutional neural network.
[0027] In the above step S3, for each of the phrases, first, the percentage of the phrase in the target text is calculated, and the application domain fingerprint sequence of the phrase is generated based on a preset application domain fingerprint sequence generation method, and the semantic feature vector of the phrase is obtained. Then, for each of the phrases, the percentage, application domain fingerprint sequence and semantic feature vector corresponding to the phrase are arranged in sequence to obtain the multi-granularity feature vector corresponding to the phrase. Finally, each of the multi-granularity feature vectors is inserted into a preset blank matrix in sequence to obtain the initial feature matrix.
[0028] In the above step S4, first, the information gain corresponding to the fingerprint bit of each application field is calculated respectively based on the initial feature matrix, and the initial feature matrix is subjected to multi-granularity feature vector dimensionality reduction processing based on the information gain corresponding to the fingerprint bit of each application field to obtain an intermediate feature matrix, and then, the multi-granularity feature vectors with high similarity in the intermediate feature matrix are merged to obtain the target feature matrix, and finally, the target feature matrix is input into a preset SVM text classification model to obtain the classification result of the text to be classified; the SVM text classification model is obtained by RBF kernel SVM through learning the target feature matrix and text category corresponding to a large amount of text.
[0029] The method provided in this embodiment, on the one hand, generates multi-granularity feature vectors for each of the phrases based on a preset multi-granularity feature vector generation method, and generates an initial feature matrix based on each of the multi-granularity feature vectors, thereby extracting features of each of the phrases at multiple granularities, which helps to achieve a comprehensive understanding of the text content. On the other hand, by performing dimensionality reduction processing on the initial feature matrix based on a preset feature matrix dimensionality reduction method to obtain a target feature matrix, redundant features in the initial feature matrix can be effectively removed, which helps to reduce the computational burden and improve classification efficiency.
[0030] In some embodiments, the preset multi-granularity feature vector generation method generates a multi-granularity feature vector for each of the word groups respectively, and generates an initial feature matrix based on the multi-granularity feature vectors, including the following steps: For each of the word groups, a percentage of the word group in the target text is calculated, and an application domain fingerprint sequence of the word group is generated based on a preset application domain fingerprint sequence generation method, and a semantic feature vector of the word group is obtained; For each of the word groups, the percentage, the application domain fingerprint sequence, and the semantic feature vector corresponding to the word group are sequentially arranged to obtain a multi-granularity feature vector corresponding to the word group; Each of the multi-granularity feature vectors is sequentially inserted into a preset blank matrix to obtain the initial feature matrix.
[0031] In this embodiment, it specifically includes: First, the total number of word groups in the target text is counted, for each of the word groups, the ratio of the number of the word group in the target text to the total number of word groups is taken as the percentage corresponding to the word group, and a preset application domain sequence is obtained, for each application domain in the application domain sequence, if the word group belongs to the application domain, the value corresponding to the word group in the application domain is set to 1, if the word group does not belong to the application domain, the value corresponding to the word group in the application domain is set to 0, to obtain the application domain fingerprint sequence corresponding to the word group, for example, the application domain sequence is education, technology, culture, medical treatment, entertainment, and news, the word group is "artificial intelligence", and since artificial intelligence may appear in the fields of education, technology, and medical treatment, the application domain fingerprint sequence corresponding to the word group is 110100, and the word group is input into a preset word vector extraction model (such as Word2Vec, GloVe, or BERT) to obtain a semantic feature vector corresponding to the word group.
[0032] Then, for each of the word groups, the percentage, the application domain fingerprint sequence, and the semantic feature vector corresponding to the word group are sequentially arranged from left to right to obtain a multi-granularity feature vector corresponding to the word group; Finally, each of the multi-granularity feature vectors is sequentially inserted into a preset blank matrix from top to bottom to obtain the initial feature matrix.
[0033] The method provided in this embodiment, for each of the word groups, calculates the percentage of the word group in the target text, generates an application domain fingerprint sequence of the word group based on a preset application domain fingerprint sequence generation method, and obtains a semantic feature vector of the word group, which realizes multi-granularity extraction of the features of each of the word groups, and helps to realize comprehensive understanding of the text to be processed.
[0034] In some embodiments, the preset feature matrix dimension reduction method is used to reduce the dimension of the initial feature matrix to obtain a target feature matrix, including the following steps: Based on the initial feature matrix, the information gain corresponding to each application domain fingerprint bit is calculated, and the initial feature matrix is processed by multi-granularity feature vector dimension reduction based on the information gain corresponding to each application domain fingerprint bit to obtain an intermediate feature matrix. Each multi-granularity feature vector in the intermediate feature matrix is combined into a binary combination pair to obtain a plurality of binary combination pairs. For each binary combination pair, the percentage corresponding to the two multi-granularity feature vectors in the binary combination pair is deleted to obtain two target feature vectors corresponding to the binary combination pair, and the Pearson correlation coefficient between the two target feature vectors corresponding to the binary combination pair is calculated. When the Pearson correlation coefficient is greater than a preset Pearson correlation coefficient, the two multi-granularity feature vectors corresponding to the binary combination pair are combined into one multi-granularity feature vector.
[0035] In this embodiment, first, based on the initial feature matrix, the information gain corresponding to each application domain fingerprint bit is calculated, and the initial feature matrix is processed by multi-granularity feature vector dimension reduction based on the information gain corresponding to each application domain fingerprint bit to obtain an intermediate feature matrix. This step specifically includes the following steps: Based on the initial feature matrix, the total entropy of each application domain fingerprint bit and the individual entropy corresponding to each application domain fingerprint bit are calculated. For each application domain fingerprint bit, the difference between the total entropy and the individual entropy corresponding to the application domain fingerprint bit is determined as the information gain corresponding to the application domain fingerprint bit. For each application domain fingerprint bit, if the information gain corresponding to the application domain fingerprint bit is less than a preset information gain, the vector corresponding to the application domain fingerprint bit in the initial feature matrix is deleted to obtain the intermediate feature matrix.
[0036] Then, for each application domain fingerprint bit, the information gain corresponding to the application domain fingerprint bit is obtained by subtracting the individual entropy corresponding to the application domain fingerprint bit from the total entropy.
[0037] Finally, for each application field fingerprint bit, the information gain corresponding to the application field fingerprint bit is compared with a preset information gain. If the information gain corresponding to the application field fingerprint bit is less than the preset information gain, the vector corresponding to the application field fingerprint bit in the initial feature matrix is deleted to obtain the intermediate feature matrix. As known from the previous embodiment, the vector corresponding to each application field fingerprint bit in the initial feature matrix is a column vector. If the information gain corresponding to the application field fingerprint bit is less than the preset information gain, the column vector corresponding to the application field fingerprint bit in the initial feature matrix is deleted.
[0038] The calculation of the total entropy of each application field fingerprint bit and the individual entropy corresponding to each application field fingerprint bit based on the initial feature matrix includes: For each application field fingerprint bit, the vector corresponding to the application field fingerprint bit is multiplied with the vector corresponding to each percentage in the initial feature matrix to obtain a target value corresponding to the application field fingerprint bit. As known from the previous embodiment, the vector corresponding to each percentage in the initial feature matrix is the first column vector of the initial feature matrix, and each element in the vector corresponding to the application field fingerprint bit is 0 or 1. The target values are added to obtain a sum of target values. For each application field fingerprint bit, the ratio of the target value corresponding to the application field fingerprint bit to the sum of target values is determined as the weight coefficient corresponding to the application field fingerprint bit. The total entropy of each application field fingerprint bit is determined based on the weight coefficients. Specifically, the total entropy of each application field fingerprint bit is determined by The total entropy is determined, wherein The total entropy is determined, wherein The total number of application field fingerprint bits corresponding to the initial feature matrix is represented by The weight coefficient of the i-th application field fingerprint bit is represented by The weight coefficient of the i-th application field fingerprint bit is represented by The conditional entropy corresponding to each application field fingerprint bit is determined based on a preset conditional entropy calculation method. Specifically, for each application field fingerprint bit, , wherein The conditional entropy corresponding to the application field fingerprint bit is represented by The probability of 0 appearing in the column vector corresponding to the application field fingerprint bit is represented by The probability of 1 appearing in the column vector corresponding to the application field fingerprint bit is represented by
[0039] Please refer to Figure 2 , Figure 2 The structure of the SVM classification system 100 based on multi-granularity features provided by the embodiments of the present application is shown in the schematic block diagram of FIG. 1.Figure 2 As shown, the SVM classification system 100 based on multi-granularity features provided by the embodiments of the present application comprises: A preprocessing module 110, configured to preprocess a text to be classified to obtain a target text.
[0040] A segmentation module 120, configured to perform segmentation processing on the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text.
[0041] A generation module 130, configured to respectively generate a multi-granularity feature vector of each phrase based on a preset multi-granularity feature vector generation method, and generate an initial feature matrix based on the multi-granularity feature vectors.
[0042] An input module 140, configured to perform dimension reduction processing on the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix, and input the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.
[0043] It should be noted that, for the convenience and brevity of description, the specific working processes of the system and each module described above can refer to the processes in the foregoing embodiments of the SVM classification method based on multi-granularity features, and will not be described herein.
[0044] The SVM classification system 100 based on multi-granularity features provided by the foregoing embodiments can be implemented in the form of a computer program, which can run on a terminal device 200 as shown. Figure 3
[0045] Please refer to Figure 3 , Figure 3 The terminal device 200 provided by the embodiments of the present application is shown in the form of a structural schematic block diagram. The terminal device 200 comprises a processor 201 and a memory 202, and the processor 201 and the memory 202 are connected through a device bus 203. The memory 202 can comprise a non-volatile storage medium and an internal memory.
[0046] The non-volatile storage medium can store a computer program. The computer program comprises program instructions, which, when executed by the processor 201, can enable the processor 201 to perform any of the foregoing SVM classification methods based on multi-granularity features.
[0047] The processor 201 is configured to provide computing and control capabilities to support the operation of the entire terminal device 200.
[0048] The internal memory provides an environment for the running of a computer program in a non-volatile storage medium, which, when executed by the processor 201, can cause the processor 201 to perform any of the above-mentioned SVM classification methods based on multi-granularity features.
[0049] Those skilled in the art can understand that, Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the terminal device 200 involved in the scheme of the present application. The specific terminal device 200 can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0050] It should be understood that the processor 201 can be a central processing unit (CPU), and the processor 201 can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0051] In some embodiments, the processor 201 is configured to run a computer program stored in the memory to perform the following steps: preprocessing the text to be classified to obtain a target text; segmenting the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text; generating a multi-granularity feature vector for each of the phrases based on a preset multi-granularity feature vector generation method, and generating an initial feature matrix based on the multi-granularity feature vectors; performing dimensionality reduction processing on the initial feature matrix based on a preset feature matrix dimensionality reduction method to obtain a target feature matrix, and inputting the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.
[0052] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device 200 described above can refer to the process of the aforementioned SVM classification method based on multi-granularity features, which will not be described here.
[0053] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by one or more processors to enable the one or more processors to implement the SVM classification method based on multi-granularity features provided by the embodiment of the present application.
[0054] The computer readable storage medium can be an internal storage unit of the terminal device 200, for example, a hard disk or a memory of the terminal device 200. The computer readable storage medium can also be an external storage device of the terminal device 200, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0055] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A SVM classification method based on multi-granularity features, characterized in that: include Preprocess the text to be classified to obtain the target text; Segmenting the target text based on a preset phrase segmentation model to obtain multiple phrases of the target text; Generating a multi-granularity feature vector for each of the phrases based on a preset multi-granularity feature vector generation method, and generating an initial feature matrix based on each of the multi-granularity feature vectors; The initial feature matrix is subjected to dimensionality reduction processing based on a preset feature matrix dimensionality reduction method to obtain a target feature matrix, and the target feature matrix is input into a preset SVM text classification model to obtain a classification result of the text to be classified.
2. The SVM classification method based on multi-granularity features according to claim 1 is characterized in that: The preprocessing of the text to be classified to obtain the target text includes: The stop words in the text to be classified are removed based on a preset stop word library to obtain the target text.
3. The SVM classification method based on multi-granularity features according to claim 1 is characterized in that: The method for generating a multi-granularity feature vector based on a preset method generates a multi-granularity feature vector for each of the phrases, and generates an initial feature matrix based on each of the multi-granularity feature vectors, including: For each of the phrases, calculating the percentage of the phrase in the target text, generating an application domain fingerprint sequence of the phrase based on a preset application domain fingerprint sequence generation method, and obtaining a semantic feature vector of the phrase; For each of the phrases, the percentage, application field fingerprint sequence, and semantic feature vector corresponding to the phrase are arranged in sequence to obtain a multi-granularity feature vector corresponding to the phrase; Each of the multi-granularity feature vectors is sequentially inserted into a preset blank matrix to obtain the initial feature matrix.
4. The SVM classification method based on multi-granularity features according to claim 3 is characterized in that: The method of reducing the dimension of the initial feature matrix based on a preset feature matrix dimension reduction method to obtain a target feature matrix includes: Calculating the information gain corresponding to each application field fingerprint bit based on the initial feature matrix, and performing multi-granularity feature vector dimensionality reduction processing on the initial feature matrix based on the information gain corresponding to each application field fingerprint bit to obtain an intermediate feature matrix; Performing binary combinations on the multi-granularity feature vectors in the intermediate feature matrix to obtain a plurality of binary combination pairs; For each of the binary combination pairs, the percentages corresponding to the two multi-granularity feature vectors in the binary combination pair are deleted to obtain the two target feature vectors corresponding to the binary combination pair, and the Pearson correlation coefficient between the two target feature vectors corresponding to the binary combination pair is calculated, and when the Pearson correlation coefficient is greater than the preset Pearson correlation coefficient, the two multi-granularity feature vectors corresponding to the binary combination pair are merged into one multi-granularity feature vector.
5. The SVM classification method based on multi-granularity features according to claim 4 is characterized in that: The information gain corresponding to each application field fingerprint bit is calculated based on the initial feature matrix, and the multi-granularity feature vector dimensionality reduction processing is performed on the initial feature matrix based on the information gain corresponding to each application field fingerprint bit to obtain an intermediate feature matrix, including: Calculate the overall entropy of each application field fingerprint bit and the individual entropy corresponding to each application field fingerprint bit based on the initial feature matrix; For each of the application field fingerprint bits, determining the difference between the overall entropy and the individual entropy corresponding to the application field fingerprint bit as the information gain corresponding to the application field fingerprint bit; For each of the application domain fingerprint bits, if the information gain corresponding to the application domain fingerprint bit is less than the preset information gain, the vector corresponding to the application domain fingerprint bit is deleted from the initial feature matrix to obtain the intermediate feature matrix.
6. The SVM classification method based on multi-granularity features according to claim 5 is characterized in that: The calculating, based on the initial feature matrix, the overall entropy of each application field fingerprint bit and the individual entropy corresponding to each application field fingerprint bit respectively includes: For each of the application field fingerprint bits, perform a dot product between the vector corresponding to the application field fingerprint bit and the vector corresponding to each of the percentages in the initial feature matrix to obtain a target value corresponding to the application field fingerprint bit; Adding the target values to obtain a sum of the target values; For each of the application field fingerprint bits, determining a ratio of a target value corresponding to the application field fingerprint bit to a sum of the target values as a weight coefficient corresponding to the application field fingerprint bit; Determine the total entropy of the fingerprint bits of each application field based on each weight coefficient; The conditional entropy corresponding to each of the application field fingerprint bits is determined based on a preset conditional entropy calculation method.
7. A SVM classification system based on multi-granularity features, characterized in that: include The preprocessing module is used to preprocess the text to be classified to obtain the target text; A segmentation module, configured to segment the target text based on a preset phrase segmentation model to obtain a plurality of phrases of the target text; A generating module, configured to generate a multi-granularity feature vector for each of the phrases based on a preset multi-granularity feature vector generating method, and to generate an initial feature matrix based on each of the multi-granularity feature vectors; The input module is used to perform dimensionality reduction processing on the initial feature matrix based on a preset feature matrix dimensionality reduction method to obtain a target feature matrix, and input the target feature matrix into a preset SVM text classification model to obtain a classification result of the text to be classified.