A computer text classification system and its text classification method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-08-14
AI Technical Summary
[0005]针对现有技术的不足,本发明提供了一种计算机文本分类系统及其文本分类方法,解决了上述背景技术中提出的传统方法通常依赖于单一的、预先设定的分类模型与静态的特征表示的情况,以及无法实时且充分地挖掘与利用文本深层的结构化语义信息的问题
1.本发明中,在进行计算机文本分类时,通过构建目标领域文本知识图谱,并基于此生成深层的文本语义组合特征数据,能够充分挖掘并结构化表示文本中的概念、实体及其关系,解决了传统方法因依赖浅层特征而导致的语义理解泛化能力不足的问题,提升了特征表示对复杂语义和跨领域文本的刻画精度。
Smart Images

Figure CN122570720A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to a computer text classification system and a text classification method thereof. Background Technology
[0002] Natural Language Processing (NLP) is an important research area in the field of artificial intelligence, integrating knowledge from linguistics, computer science, machine learning, mathematics, cognitive psychology, and multiple other disciplines.
[0003] Currently, in the field of computer text classification, traditional methods typically rely on a single, pre-defined classification model and static feature representation. When performing diverse, cross-domain, and semantically complex text classification tasks, they cannot fully and timely mine and utilize the deep structured semantic information of the text. When there is a deviation between the domain and language style of the text and the model's preset scenario, it will result in inaccurate feature representation and insufficient understanding and generalization ability of the classification model.
[0004] Therefore, a computer text classification system and its text classification method are proposed to solve the above problems. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a computer text classification system and its text classification method, which solves the problems of traditional methods mentioned in the background art, which usually rely on a single, pre-defined classification model and static feature representation, and are unable to mine and utilize the deep structured semantic information of text in real time and fully.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a computer text classification system and a text classification method thereof, the method comprising the following steps: S1. Collect the training text data set and the text data set to be classified in the target domain; S2. Perform text preprocessing and primary vectorization processing on the training text data set and the text data set to be classified to generate standard vectorized training text data and standard vectorized text data to be classified. S3. Perform deep semantic parsing on the standard vectorized training text data to construct target domain text knowledge graph data; S4. Based on the standard vectorized text data to be classified and the target domain text knowledge graph data, perform text semantic combination feature generation processing to construct text semantic combination feature data to be classified; S5. Perform intelligent matching processing of classifier model type on the semantic combination feature data of the text to be classified and the standard text semantic combination feature data corresponding to the pre-stored multiple text classifier models to generate target text classifier model type feature data. S6. Based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, call the corresponding text classifier model to perform text classification and model optimization processing, and generate text classification result data and optimized target text classifier model data.
[0007] Preferably, the step S1 of collecting the training text data set and the text data set to be classified in the target domain includes the following steps: S11. Using a web crawler engine, collect multi-source heterogeneous text information from the specified target domain knowledge base, academic database and industry website according to the preset topic keywords and collection frequency, and generate the original training text data set. S12. Receive the text file to be processed and the input text stream submitted by the user through the system interaction interface, and generate the original text data set to be classified.
[0008] Preferably, step S2 involves preprocessing and performing basic vectorization on the training text dataset and the text dataset to be classified to generate standard vectorized training text data and standard vectorized text data to be classified, including the following steps: S21. Perform data cleaning processing on the original training text data set and the original text data set to be classified respectively. The data cleaning processing includes removing irrelevant characters, correcting spelling errors, unifying the encoding format, and generating clean training text data and clean text data to be classified. S22. Perform word segmentation and part-of-speech tagging on the cleaning training text data and the cleaning text data to be classified, respectively, and generate word-segmented training text data and word-segmented text data to be classified. S23. Using the bag-of-words model combined with the TF-IDF weight calculation method, perform primary vectorization transformation on the word-segmented and labeled training text data and the word-segmented and labeled text data to be classified, respectively, to generate the standard vectorized training text data and the standard vectorized text data to be classified.
[0009] Preferably, step S3, which involves performing deep semantic parsing on the standard vectorized training text data to construct a target domain text knowledge graph, includes the following steps: S31. Perform named entity recognition processing on the standard vectorized training text data, extract entity objects in the text, and generate text entity set data; S32. Based on dependency parsing and semantic role labeling technology, the relationships between entity objects contained in the text entity set data in the standard vectorized training text data are parsed to generate entity relationship triplet data. S33. Using the text entity set data as nodes and the entity relation triplet data as edges, construct a graph network structure, and use a graph embedding algorithm to perform vector representation of nodes and edges to generate the target domain text knowledge graph data. The graph embedding algorithm learns node vector representations by minimizing the following loss function: ; in, For loss function, Let be the set of all edges in the graph. For a connection node and nodes The edge, To be at a given central node Under the condition that its neighboring nodes The probability of occurrence is calculated from the node vector using the softmax function.
[0010] Preferably, the step S4, which involves generating text semantic combination features based on the standard vectorized text data to be classified and the target domain text knowledge graph data, includes the following steps: S41. For the standard vectorized text data to be classified, use an attention mechanism to calculate the semantic association weight between its text vector and the related entity node vector in the target domain text knowledge graph data; S42. Based on the semantic association weights, the high-dimensional vector representation of the standardized vectorized text data to be classified is weighted and fused with the subgraph vector representation of the relevant entities and relationships extracted from the target domain text knowledge graph data; S43. Perform dimensionality reduction and normalization on the weighted and fused high-dimensional feature vector to generate structured semantic combination feature data of the text to be classified.
[0011] Preferably, step S5 involves performing intelligent matching processing of the semantic combination feature data of the text to be classified with the standard text semantic combination feature data corresponding to various pre-stored text classifier models to generate target text classifier model type feature data, which includes the following steps: S51. Preconstruct standard text semantic combination feature data matrices corresponding to multiple text classifier models, wherein the multiple text classifier models include support vector machine model, naive Bayes model, convolutional neural network model, recurrent neural network model and pre-trained language model; S52. Using a population-based metaheuristic optimization algorithm, the standard text semantic combination feature data with the highest matching degree is found in the search space of the standard text semantic combination feature data matrix. The execution process of the metaheuristic optimization algorithm includes initializing the population, global search in the exploration phase and local optimization in the development phase. The matching degree is calculated using the following similarity function: ; in, The similarity value is... The semantic combination feature data vector of the text to be classified. For the first A standard text semantic combination feature data vector, For vector dot product operation, and These are the L2 norms of the corresponding vectors; S53. When the algorithm meets the convergence condition and reaches the maximum number of iterations, it outputs the text classifier model type identifier corresponding to the standard text semantic combination feature data that has the highest matching degree with the text semantic combination feature data to be classified, and generates the target text classifier model type feature data.
[0012] Preferably, step S6, based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, calls the corresponding text classifier model to perform text classification and model optimization processing, generating text classification result data and optimized target text classifier model data, includes the following steps: S61. Based on the target text classifier model type feature data, call the corresponding target text classifier model from the pre-stored classifier model library; S62. Input the semantic combination feature data of the text to be classified into the target text classifier model for classification calculation, output the preliminary classification label, and generate the text classification result data. S63. Based on the text classification result data of the current batch and the corresponding semantic combination feature data of the text to be classified, fine-tune the internal parameters of the target text classifier model, update the corresponding standard features in the standard text semantic combination feature data matrix, and generate the optimized target text classifier model data.
[0013] Preferably, the system includes: The text acquisition and preprocessing module acquires training text through a multi-source network acquisition unit, receives text to be classified through an interactive interface unit, and outputs standard vectorized text data through a text cleaning and vectorization unit. The semantic understanding and representation module receives the standard vectorized text data, parses the text semantic structure through the named entity recognition and relation extraction unit, generates target domain text knowledge graph data through the knowledge graph construction and embedding unit, and outputs text semantic combination feature data through the semantic feature fusion unit. The classifier intelligent matching module receives the text semantic combination feature data, provides a comparison benchmark through a pre-stored standard feature matrix unit, performs intelligent search matching through a metaheuristic optimization matching unit, and outputs the target classifier model type feature data. The classification execution and optimization module receives the target classifier model type feature data and the text semantic combination feature data, calls the corresponding model through the classifier model scheduling unit, performs classification and generates results through the classification calculation unit, and optimizes the model parameters through the online fine-tuning unit. The system self-learning optimization module receives the classification results and optimized model data output by the classification execution and optimization module, analyzes performance indicators through the classification effect evaluation unit, dynamically adjusts the standard feature library through the feature matrix update unit, and optimizes the search parameters of the metaheuristic optimization matching unit through the matching strategy parameter tuning unit. The visualization report generation module integrates the text classification result data, model performance indicators, and matching decision criteria. Through the multi-dimensional data fusion unit and interactive chart generation unit, it outputs a classification result report and a system performance evaluation dashboard.
[0014] Preferably, the metaheuristic optimization matching unit in the classifier intelligent matching module specifically includes: The population initialization subunit randomly initializes a set of candidate solutions in the search space of the standard feature matrix as a search agent population; Explore the behavioral simulation subunit, driving the search agent to perform a wide range of random walks in the search space to discover potential matching regions; Develop a behavior simulation subunit to drive the search agent to perform a fine search of potential matching regions discovered during the exploration phase in order to locate the optimal standard feature data; The iterative control and output subunit controls the number of iterations of the exploration and development behavior, and outputs the classifier model type identifier corresponding to the standard feature data with the highest matching degree when the termination condition is met.
[0015] Preferably, the classification performance evaluation unit in the system self-learning optimization module specifically includes: The accuracy and recall calculation subunit calculates the accuracy, recall, and F1 score of the classification model based on the validation set and the classification results of the current batch. The confusion matrix analysis sub-unit generates a confusion matrix to analyze the model's classification bias and confusion for different categories of text. The feature contribution analysis subunit analyzes the contribution of different dimensions of features in the text semantic combination feature data to the classification decision and identifies key semantic features.
[0016] Compared with the prior art, the present invention provides a computer text classification system and its text classification method, which have the following beneficial effects: 1. In this invention, when performing computer text classification, a target domain text knowledge graph is constructed, and deep text semantic combination feature data is generated based on this graph. This fully mines and structurally represents the concepts, entities and their relationships in the text, solving the problem of insufficient semantic understanding generalization ability caused by the reliance on shallow features in traditional methods, and improving the accuracy of feature representation in depicting complex semantics and cross-domain texts.
[0017] 2. In this invention, when performing computer text classification, a metaheuristic optimization algorithm is used to intelligently match the classifier model type. The semantic combination feature data of the text to be classified is intelligently searched and matched with the standard text semantic combination feature data of various pre-stored classifier models. This allows for dynamic and adaptive selection of the target text classifier model type for texts with different characteristics, solving the classification bias caused by model-text mismatch. Furthermore, after classification is performed, the model parameters are optimized in real time through an online fine-tuning mechanism, enabling the system to have self-correction and adaptability, thus ensuring the relevance and optimality of the classification decision.
[0018] 3. In this invention, when performing computer text classification, a knowledge graph is constructed and utilized through named entity recognition, relation extraction, and graph embedding algorithms. This achieves a deep fusion of external domain knowledge and the semantics of the text itself, making the generated semantic combination features more discriminative. This solves the problem of insufficient feature discriminative power caused by the failure to utilize domain knowledge in traditional methods, reduces classification errors caused by incomplete feature representation, and thus improves the accuracy, robustness, and adaptability to diverse tasks of classification. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the steps of a computer text classification method according to the present invention. Figure 2 This is a schematic diagram of the architecture of a computer text classification system according to the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figures 1-2 The specific implementation of a computer text classification system and its text classification method is as follows, and the method includes the following steps: S1. Collect the training text data set and the text data set to be classified in the target domain; S2. Perform text preprocessing and primary vectorization on the training text dataset and the text dataset to be classified to generate standard vectorized training text data and standard vectorized text data to be classified. S3. Perform deep semantic parsing on the standard vectorized training text data to construct a text knowledge graph data for the target domain; S4. Based on the standard vectorized text data to be classified and the target domain text knowledge graph data, perform text semantic combination feature generation processing to construct the text semantic combination feature data to be classified. S5. Perform intelligent matching processing of the semantic combination feature data of the text to be classified with the standard text semantic combination feature data corresponding to the pre-stored multiple text classifier models to generate target text classifier model type feature data. S6. Based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, call the corresponding text classifier model to perform text classification and model optimization, and generate text classification result data and optimized target text classifier model data.
[0022] S1 involves collecting the training text dataset and the text dataset to be classified within the target domain, which includes the following steps: S11. Using a web crawler engine, collect multi-source heterogeneous text information from the specified target domain knowledge base, academic database and industry website according to the preset topic keywords and collection frequency, and generate the original training text data set. S12. Receive the text file to be processed and the input text stream submitted by the user through the system interaction interface, and generate the original text data set to be classified.
[0023] S2 performs text preprocessing and primary vectorization on the training text dataset and the text dataset to be classified, generating standard vectorized training text data and standard vectorized text data to be classified, including the following steps: S21. Perform data cleaning processing on the original training text data set and the original text data set to be classified, respectively. The data cleaning processing includes removing irrelevant characters, correcting spelling errors, unifying the encoding format, and generating clean training text data and clean text data to be classified. S22. Perform word segmentation and part-of-speech tagging on the clean training text data and the clean text data to be classified, respectively, and generate word-segmented training text data and word-segmented text data to be classified. S23. Using the bag-of-words model combined with the TF-IDF weight calculation method, perform primary vectorization transformation on the word-segmented and labeled training text data and the word-segmented and labeled text data to be classified, respectively, to generate standard vectorized training text data and standard vectorized text data to be classified.
[0024] In S3, the standard vectorized training text data undergoes deep semantic parsing to construct a target domain text knowledge graph, which includes the following steps: S31. Perform named entity recognition processing on the standard vectorized training text data, extract the entity objects in the text, and generate text entity set data. S32. Based on dependency parsing and semantic role labeling technology, the relationships between entity objects contained in the text entity set data in the standard vectorized training text data are parsed to generate entity relationship triplet data. S33. Using text entity set data as nodes and entity relation triple data as edges, construct a graph network structure, and use graph embedding algorithm to vectorize the nodes and edges to generate target domain text knowledge graph data. Graph embedding algorithms learn node vector representations by minimizing the following loss function: ; in, For loss function, Let be the set of all edges in the graph. For a connection node and nodes The edge, To be at a given central node Under the condition that its neighboring nodes The probability of occurrence, which is calculated from the node vector using the softmax function; Specifically, during training, the graph embedding algorithm performs training on each node in the graph. The predicted probability of its context neighbor node v The calculation is performed as follows: First, each node and... Mapped to low-dimensional vectors respectively and Then, the softmax function is used to calculate the value at a given time. Under the conditions, The probability of being its neighbor node is expressed by the formula: ; in, The set of all nodes in the graph. For nodes and nodes The vector dot product is used to measure the similarity between two nodes. The algorithm optimizes the loss function. This makes the connected nodes, i.e., edges By maximizing the co-occurrence probability, a node vector representation that preserves the graph network structure is learned. and ; Optimize the loss function using negative sampling technique Specifically, for each positive sample edge Random sampling does not belong to The neighboring nodes are used as negative samples, and the loss function is approximately: ,in For the sigmoid function, It is a negative sampling distribution.
[0025] In S4, text semantic combination feature generation is performed based on standard vectorized text data to be classified and target domain text knowledge graph data. The construction of text semantic combination feature data to be classified includes the following steps: S41. For the standardized vectorized text data to be classified, use the attention mechanism to calculate the semantic association weight between its text vector and the related entity node vector in the target domain text knowledge graph data. Specifically, the calculation process of the attention mechanism is as follows: the overall vector representation of the standardized vectorized text data to be classified is used as the query vector. The first element in the target domain text knowledge graph data Vector representation of each related entity node As a key vector, the semantic association weight between the text and the entity node. Calculated using the following formula: ; in, For attention scoring function, This is a trainable weight matrix, trained by using standardized vectorized training text data and its corresponding set of text entities, aiming to ensure that text vectors correctly focus on the entities they contain. This matrix is then optimized using the backpropagation algorithm. The weight is calculated based on the total number of entity nodes associated with the current text to be classified. This reflects the semantic relevance between the text and different entity nodes; S42. Based on semantic association weights, the high-dimensional vector representation of the standardized vectorized text data to be classified is weighted and fused with the subgraph vector representation of relevant entities and relationships extracted from the target domain text knowledge graph data; S43. Perform dimensionality reduction and normalization on the weighted and fused high-dimensional feature vectors to generate structured semantic combination feature data of the text to be classified.
[0026] In S5, the semantic combination feature data of the text to be classified is intelligently matched with the standard text semantic combination feature data corresponding to various pre-stored text classifier models to generate target text classifier model type feature data. This process includes the following steps: S51. Pre-construct standard text semantic combination feature data matrices corresponding to various text classifier models, including support vector machine model, naive Bayes model, convolutional neural network model, recurrent neural network model and pre-trained language model; S52. A population-based metaheuristic optimization algorithm is adopted to find the standard text semantic combination feature data with the highest matching degree in the search space of the standard text semantic combination feature data matrix. The execution process of the metaheuristic optimization algorithm includes initializing the population, global search in the exploration phase and local optimization in the development phase. Specifically, in this embodiment, the metaheuristic optimization algorithm employs the particle swarm optimization algorithm, where the position of each search particle... This represents a row index in the standard feature matrix, i.e., the identifier of a candidate standard text semantic combination feature data vector, and its speed update formula is: The position update formula is: ,in, For particle velocity, For inertial weights, , As a learning factor, , A random number in the range [0, 1] This represents the optimal position in the history of an individual particle. The fitness function is the same as the similarity function, representing the global historical best position of the population. The algorithm iteratively updates particle positions to maximize the fitness value, thereby completing intelligent search and matching in the standard feature matrix; The matching degree is calculated using the following similarity function: ; in, The similarity value is... The semantic combination feature data vector of the text to be classified. For the first A standard text semantic combination feature data vector, For vector dot product operation, and These are the L2 norms of the corresponding vectors; Specifically, in the evaluation phase of the metaheuristic optimization algorithm, in addition to using cosine similarity, the following distance metric function is also used as an auxiliary evaluation index of matching degree to more comprehensively measure the differences between vectors during the search process: ; in, The semantic combination feature data vector of the text to be classified With the A standard text semantic combination feature data vector The Euclidean distance between them The total dimension of the feature vector. and They are vectors and In the The algorithm aims to minimize the eigenvalues in the dimension during the search process. and maximize In order to find the best matching criteria features; S53. When the algorithm meets the convergence condition and reaches the maximum number of iterations, it outputs the text classifier model type identifier corresponding to the standard text semantic combination feature data that has the highest matching degree with the text semantic combination feature data to be classified, and generates the target text classifier model type feature data.
[0027] S6, based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, calls the corresponding text classifier model to perform text classification and model optimization, generating text classification result data and optimized target text classifier model data, including the following steps: S61. Based on the target text classifier model type feature data, call the corresponding target text classifier model from the pre-stored classifier model library; S62. Input the semantic combination feature data of the text to be classified into the target text classifier model for classification calculation, output the preliminary classification label, and generate text classification result data. S63. Based on the text classification results data of the current batch and the corresponding semantic combination feature data of the text to be classified, fine-tune the internal parameters of the target text classifier model, update the corresponding standard features in the standard text semantic combination feature data matrix, and generate the optimized target text classifier model data.
[0028] The system includes: The text acquisition and preprocessing module acquires training text through a multi-source network acquisition unit, receives text to be classified through an interactive interface unit, and outputs standard vectorized text data through a text cleaning and vectorization unit. The semantic understanding and representation module receives standard vectorized text data, parses the semantic structure of the text through the named entity recognition and relation extraction unit, generates target domain text knowledge graph data through the knowledge graph construction and embedding unit, and outputs text semantic combination feature data through the semantic feature fusion unit. The classifier intelligent matching module receives text semantic combination feature data, provides a comparison benchmark through pre-stored standard feature matrix units, performs intelligent search matching through metaheuristic optimization matching units, and outputs target classifier model type feature data. The classification execution and optimization module receives target classifier model type feature data and text semantic combination feature data, calls the corresponding model through the classifier model scheduling unit, performs classification and generates results through the classification calculation unit, and optimizes model parameters through the online fine-tuning unit. The system's self-learning optimization module receives the classification results and optimized model data output by the classification execution and optimization module. It analyzes performance indicators through the classification effect evaluation unit, dynamically adjusts the standard feature library through the feature matrix update unit, and optimizes the search parameters of the metaheuristic optimization matching unit through the matching strategy parameter tuning unit. The visualization report generation module integrates text classification result data, model performance indicators, and matching decision criteria. Through the multi-dimensional data fusion unit and interactive chart generation unit, it outputs classification result reports and system performance evaluation dashboards.
[0029] The metaheuristic optimization matching unit in the classifier intelligent matching module specifically includes: The population initialization subunit randomly initializes a set of candidate solutions in the search space of the standard feature matrix as a search agent population; Specifically, the population initialization subunit is for each search agent. An initial position is randomly assigned within the index space of the standard characteristic matrix, and its mathematical representation is as follows: ; in, For the first The initial position of each search agent is the row index in the standard feature matrix it points to. This represents the total number of standard eigenvectors in the standard feature matrix. To generate a uniformly distributed random integer between 1 and M; Explore the behavioral simulation subunit, driving the search agent to perform a wide range of random walks in the search space to discover potential matching regions; Develop a behavior simulation subunit to drive the search agent to perform a fine search of potential matching regions discovered during the exploration phase in order to locate the optimal standard feature data; The iterative control and output subunit controls the number of iterations of the exploration and development behavior, and outputs the classifier model type identifier corresponding to the standard feature data with the highest matching degree when the termination condition is met.
[0030] The classification performance evaluation unit in the system's self-learning optimization module specifically includes: The accuracy and recall calculation subunit calculates the accuracy, recall, and F1 score of the classification model based on the validation set and the classification results of the current batch. The confusion matrix analysis sub-unit generates a confusion matrix to analyze the model's classification bias and confusion for different categories of text. The feature contribution analysis subunit analyzes the contribution of different dimensions of features in the text semantic combination feature data to this classification decision and identifies key semantic features.
[0031] The operational steps of a computer text classification system and its text classification method are as follows: Step 1: Text Data Collection First, the system uses a web crawler engine to collect multi-source heterogeneous text information from designated target domain knowledge bases, academic databases, and industry websites according to preset topic keywords and collection frequencies, generating a raw training text data set. At the same time, it receives user-submitted text files to be processed and input text streams through the system interaction interface, generating a raw text data set to be classified.
[0032] Step 2: Text Preprocessing and Primary Vectorization The collected original training text dataset and the original unclassified text dataset are cleaned by removing irrelevant characters, correcting spelling errors, and unifying the encoding format to generate clean text data. Then, the clean text is segmented and labeled with parts of speech. Finally, the bag-of-words model combined with the TF-IDF weight calculation method is used to perform a primary vectorization transformation on the segmented and labeled text data, thereby generating standardized vectorized training text data and standardized vectorized unclassified text data with a unified format.
[0033] Step 3: Construct a textual knowledge graph for the target domain: Based on standard vectorized training text data, deep semantic parsing of text is performed. First, entity objects in the text are extracted through named entity recognition to generate text entity set data. Then, dependency parsing and semantic role labeling techniques are used to parse the relationships between entity objects and generate entity relationship triple data. Finally, a graph network structure is constructed with entities as nodes and relationships as edges, and a graph embedding algorithm is used to vectorize the nodes and edges, thereby generating target domain text knowledge graph data rich in semantic structure.
[0034] Step 4: Generate text semantic combination features: For standard vectorized text data to be classified, an attention mechanism is used to calculate the semantic association weights between the overall text vector and the relevant entity node vectors in the target domain text knowledge graph data. The attention weight matrix here has been trained during the knowledge graph construction stage. Then, based on the calculated semantic association weights, the high-dimensional vector representation of the text is weighted and fused with the subgraph vector representations of relevant entities and relationships extracted from the knowledge graph. Finally, the fused high-dimensional feature vector is subjected to dimensionality reduction and normalization to generate structured semantic combination feature data of the text to be classified that deeply integrates domain knowledge.
[0035] Step 5: Intelligent matching of classifier model types: The system pre-stores standard text semantic combination feature data matrices corresponding to various text classifier models. It adopts a population-based metaheuristic optimization algorithm to find the standard feature with the highest matching degree for the text semantic combination feature data to be classified in the search space of the standard feature matrix. The matching degree is calculated by the cosine similarity function. The algorithm updates the position of the search agent iteratively to maximize the similarity value and finally outputs the target text classifier model type feature data corresponding to the matching result.
[0036] Step Six: Categorized Execution and System Self-Optimization: Based on the target text classifier model type feature data, the corresponding target text classifier model is called from the model library. The semantic combination feature data of the text to be classified is input into the model for classification calculation, and preliminary classification labels are output to generate text classification result data. Subsequently, the system enters the self-optimization stage: based on the classification results and feature data of the current batch, the internal parameters of the target classifier model are fine-tuned, and the corresponding standard features in the standard feature matrix are updated synchronously, thereby generating optimized target text classifier model data and realizing continuous evolution of system performance.
[0037] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0038] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A computer text classification method, characterized in that, The method includes the following steps: S1. Collect the training text data set and the text data set to be classified in the target domain; S2. Perform text preprocessing and primary vectorization processing on the training text data set and the text data set to be classified to generate standard vectorized training text data and standard vectorized text data to be classified. S3. Perform deep semantic parsing on the standard vectorized training text data to construct target domain text knowledge graph data; S4. Based on the standard vectorized text data to be classified and the target domain text knowledge graph data, perform text semantic combination feature generation processing to construct text semantic combination feature data to be classified; S5. Perform intelligent matching processing of classifier model type on the semantic combination feature data of the text to be classified and the standard text semantic combination feature data corresponding to the pre-stored multiple text classifier models to generate target text classifier model type feature data. S6. Based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, call the corresponding text classifier model to perform text classification and model optimization processing, and generate text classification result data and optimized target text classifier model data.
2. The computer text classification method according to claim 1, characterized in that, The step S1, which involves collecting the training text data set and the text data set to be classified within the target domain, includes the following steps: S11. Using a web crawler engine, collect multi-source heterogeneous text information from the specified target domain knowledge base, academic database and industry website according to the preset topic keywords and collection frequency, and generate the original training text data set. S12. Receive the text file to be processed and the input text stream submitted by the user through the system interaction interface, and generate the original text data set to be classified.
3. The computer text classification method according to claim 1, characterized in that, The steps in S2 to perform text preprocessing and primary vectorization on the training text dataset and the text dataset to be classified, generating standard vectorized training text data and standard vectorized text data to be classified, include the following: S21. Perform data cleaning processing on the original training text data set and the original text data set to be classified respectively. The data cleaning processing includes removing irrelevant characters, correcting spelling errors, unifying the encoding format, and generating clean training text data and clean text data to be classified. S22. Perform word segmentation and part-of-speech tagging on the cleaning training text data and the cleaning text data to be classified, respectively, and generate word-segmented training text data and word-segmented text data to be classified. S23. Using the bag-of-words model combined with the TF-IDF weight calculation method, perform primary vectorization transformation on the word-segmented and labeled training text data and the word-segmented and labeled text data to be classified, respectively, to generate the standard vectorized training text data and the standard vectorized text data to be classified.
4. The computer text classification method according to claim 1, characterized in that, The steps in S3 to perform deep semantic parsing on the standard vectorized training text data and construct the target domain text knowledge graph data include: S31. Perform named entity recognition processing on the standard vectorized training text data, extract entity objects in the text, and generate text entity set data; S32. Based on dependency parsing and semantic role labeling technology, the relationships between entity objects contained in the text entity set data in the standard vectorized training text data are parsed to generate entity relationship triplet data. S33. Using the text entity set data as nodes and the entity relationship triple data as edges, construct a graph network structure, and use a graph embedding algorithm to perform vector representation of nodes and edges to generate the target domain text knowledge graph data. The graph embedding algorithm learns node vector representations by minimizing the following loss function: ; in, For loss function, Let be the set of all edges in the graph. For a connection node and nodes The edge, To be at a given central node Under the condition that its neighboring nodes The probability of occurrence is calculated from the node vector using the softmax function.
5. The computer text classification method according to claim 1, characterized in that, The step S4, which involves generating semantic combination features of the text based on the standard vectorized text data to be classified and the target domain text knowledge graph data, includes the following steps: S41. For the standard vectorized text data to be classified, use an attention mechanism to calculate the semantic association weight between its text vector and the related entity node vector in the target domain text knowledge graph data; S42. Based on the semantic association weights, the high-dimensional vector representation of the standardized vectorized text data to be classified is weighted and fused with the subgraph vector representation of the relevant entities and relationships extracted from the target domain text knowledge graph data; S43. Perform dimensionality reduction and normalization on the weighted and fused high-dimensional feature vector to generate structured semantic combination feature data of the text to be classified.
6. The computer text classification method according to claim 1, characterized in that, In step S5, the process of intelligently matching the semantic combination feature data of the text to be classified with the standard text semantic combination feature data corresponding to various pre-stored text classifier models to generate target text classifier model type feature data includes the following steps: S51. Preconstruct standard text semantic combination feature data matrices corresponding to multiple text classifier models, wherein the multiple text classifier models include support vector machine model, naive Bayes model, convolutional neural network model, recurrent neural network model and pre-trained language model; S52. Using a population-based metaheuristic optimization algorithm, the standard text semantic combination feature data with the highest matching degree is found in the search space of the standard text semantic combination feature data matrix. The execution process of the metaheuristic optimization algorithm includes initializing the population, global search in the exploration phase and local optimization in the development phase. The matching degree is calculated using the following similarity function: ; in, The similarity value is... The semantic combination feature data vector of the text to be classified. For the first A standard text semantic combination feature data vector, For vector dot product operation, and These are the L2 norms of the corresponding vectors; S53. When the algorithm meets the convergence condition and reaches the maximum number of iterations, it outputs the text classifier model type identifier corresponding to the standard text semantic combination feature data that has the highest matching degree with the text semantic combination feature data to be classified, and generates the target text classifier model type feature data.
7. The computer text classification method according to claim 1, characterized in that, In step S6, based on the semantic combination feature data of the text to be classified and the type feature data of the target text classifier model, the corresponding text classifier model is invoked to perform text classification and model optimization, generating text classification result data and optimized target text classifier model data, including the following steps: S61. Based on the target text classifier model type feature data, call the corresponding target text classifier model from the pre-stored classifier model library; S62. Input the semantic combination feature data of the text to be classified into the target text classifier model for classification calculation, output the preliminary classification label, and generate the text classification result data. S63. Based on the text classification result data of the current batch and the corresponding semantic combination feature data of the text to be classified, fine-tune the internal parameters of the target text classifier model, update the corresponding standard features in the standard text semantic combination feature data matrix, and generate the optimized target text classifier model data.
8. A computer text classification system for implementing the computer text classification method according to any one of claims 1-7, characterized in that, The system includes: The text acquisition and preprocessing module acquires training text through a multi-source network acquisition unit, receives text to be classified through an interactive interface unit, and outputs standard vectorized text data through a text cleaning and vectorization unit. The semantic understanding and representation module receives the standard vectorized text data, parses the text semantic structure through the named entity recognition and relation extraction unit, generates target domain text knowledge graph data through the knowledge graph construction and embedding unit, and outputs text semantic combination feature data through the semantic feature fusion unit. The classifier intelligent matching module receives the text semantic combination feature data, provides a comparison benchmark through a pre-stored standard feature matrix unit, performs intelligent search matching through a metaheuristic optimization matching unit, and outputs the target classifier model type feature data. The classification execution and optimization module receives the target classifier model type feature data and the text semantic combination feature data, calls the corresponding model through the classifier model scheduling unit, performs classification and generates results through the classification calculation unit, and optimizes the model parameters through the online fine-tuning unit. The system self-learning optimization module receives the classification results and optimized model data output by the classification execution and optimization module, analyzes performance indicators through the classification effect evaluation unit, dynamically adjusts the standard feature library through the feature matrix update unit, and optimizes the search parameters of the metaheuristic optimization matching unit through the matching strategy parameter tuning unit. The visualization report generation module integrates the text classification result data, model performance indicators, and matching decision criteria. Through the multi-dimensional data fusion unit and interactive chart generation unit, it outputs a classification result report and a system performance evaluation dashboard.
9. A computer text classification system according to claim 8, characterized in that: The metaheuristic optimization matching unit in the classifier intelligent matching module specifically includes: The population initialization subunit randomly initializes a set of candidate solutions in the search space of the standard feature matrix as a search agent population; Explore the behavioral simulation subunit, driving the search agent to perform a wide range of random walks in the search space to discover potential matching regions; Develop a behavior simulation subunit to drive the search agent to perform a fine search of potential matching regions discovered during the exploration phase in order to locate the optimal standard feature data; The iterative control and output subunit controls the number of iterations of the exploration and development behavior, and outputs the classifier model type identifier corresponding to the standard feature data with the highest matching degree when the termination condition is met.
10. A computer text classification system according to claim 8, characterized in that: The classification performance evaluation unit in the system self-learning optimization module specifically includes: The accuracy and recall calculation subunit calculates the accuracy, recall, and F1 score of the classification model based on the validation set and the classification results of the current batch. The confusion matrix analysis sub-unit generates a confusion matrix to analyze the model's classification bias and confusion for different categories of text. The feature contribution analysis subunit analyzes the contribution of different dimensions of features in the text semantic combination feature data to the classification decision and identifies key semantic features.