Category division method, text classification method and device, electronic equipment, and medium
By obtaining the category set and similarity judgment of the text to be clustered, and using a preset threshold to correct the noise influence, the problem of the initial cluster center selection affecting the accuracy of text classification is solved, and more accurate text classification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MASHANG CONSUMER FINANCE CO LTD
- Filing Date
- 2022-12-01
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies for text classification suffer from a significant impact due to the selection of initial cluster centers, especially in the presence of noise, leading to a decrease in the accuracy of classification results.
By obtaining the category set of the text to be clustered, the number and similarity of candidate categories are determined. The category division result of the text to be clustered is judged by using a preset similarity threshold, and the influence of noise is corrected by using a dual-class judgment.
It improves the accuracy of text classification, enabling more accurate determination of the category of text to be clustered in the presence of noise, and enhances the reliability of classification results.
Smart Images

Figure CN116150355B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method for classifying categories, a method and apparatus for classifying text, an electronic device, and a medium. Background Technology
[0002] Clustering is the process of dividing a dataset into different clusters according to specific rules, maximizing the similarity of individuals within the same cluster and minimizing the similarity between different clusters. In terms of data, clustering results indicate that individuals with similar characteristics are more likely to cluster together, and vice versa. Clustering has applications in many fields, such as: in biology, it's used to deduce the classification of plants and animals, classify genes, and gain insights into the inherent structure of populations; in geographic information, it can be used to identify similar areas in Earth observation databases, group car insurance policyholders, and group houses in a city based on type, value, and geographical location. Furthermore, with the expansion of clustering applications, it has also been used for text classification. Summary of the Invention
[0003] This application provides a category division method, a text classification method and apparatus, an electronic device, and a medium that can improve the accuracy of text classification results.
[0004] Firstly, this application provides a classification method, including:
[0005] Obtain the category set of the first text to be clustered and the category set of the second text to be clustered; wherein, the first text to be clustered and the second text to be clustered are any two texts to be clustered in the initial text to be clustered set; both the category set of the first text to be clustered and the category set of the second text to be clustered include multiple candidate categories, which are categories obtained after clustering the texts to be clustered under different numbers of categories;
[0006] Determine the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category;
[0007] The similarity between the first text to be clustered and the second text to be clustered is determined based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same category.
[0008] The classification results of the first text to be clustered and the second text to be clustered are determined based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
[0009] Secondly, this application provides a text classification method, which includes:
[0010] Obtain the initial set of texts to be clustered;
[0011] The initial set of texts to be clustered is clustered based on a category partitioning method to obtain the classification results of each text to be clustered; wherein the category partitioning method adopts any one of the category partitioning methods provided in the first aspect.
[0012] Thirdly, this application provides a classification device, comprising:
[0013] The acquisition module is used to acquire the category set of the first text to be clustered and the category set of the second text to be clustered; wherein, the first text to be clustered and the second text to be clustered are any two texts to be clustered in the initial text to be clustered set; both the category set of the first text to be clustered and the category set of the second text to be clustered include multiple candidate categories, which are categories obtained after clustering the texts to be clustered under different numbers of categories;
[0014] The first determining module is used to determine the number of candidate categories to which the first text to be clustered and the second text to be clustered belong;
[0015] The second determining module is used to determine the similarity between the first text to be clustered and the second text to be clustered based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same category;
[0016] The third determining module is used to determine the category division result of the first text to be clustered and the second text to be clustered based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
[0017] Fourthly, this application provides a text classification device, which includes:
[0018] The information acquisition module is used to acquire the initial set of texts to be clustered;
[0019] The text clustering module is used to cluster the texts to be clustered in the initial text set to be clustered based on a category partitioning method, and to obtain the classification results of each text to be clustered; wherein the category partitioning method adopts any of the category partitioning methods provided in the first aspect.
[0020] Fifthly, this application provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the category classification method provided in the first aspect or the text classification method provided in the second aspect.
[0021] In a sixth aspect, this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processor core, implements the category classification method provided in the first aspect or the text classification method provided in the second aspect.
[0022] The classification method provided in this application determines the classification result of the texts to be clustered by comparing any two texts to be clustered in the initial set of texts to be clustered. That is, it determines the number of candidate categories to which the first text and the second text belong (first judgment); then, based on the total number of candidate categories of the first text and the second text and the number of candidate categories to which they belong, it determines the similarity between the first text and the second text (second judgment). Since the similarity is determined by the total number of candidate categories and the number of candidate categories to which they belong, and the candidate categories are derived from the category set, whether the texts to be clustered belong to the same category is determined by a double classification judgment. Even if the category set of the texts to be clustered is biased due to noise, it can be corrected by the subsequent similarity judgment, making the classification result more accurate.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description
[0024] The accompanying drawings are provided to further illustrate the present application and form part of the specification. They are used together with the embodiments of the present application to explain the application and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed example embodiments described with reference to the accompanying drawings, in which:
[0025] Figure 1 A flowchart illustrating a category classification method provided in this application embodiment;
[0026] Figure 2 A flowchart illustrating a text classification method provided in this application embodiment;
[0027] Figure 3 A block diagram of a category classification device provided in an embodiment of this application;
[0028] Figure 4 A block diagram of a text classification device provided in an embodiment of this application;
[0029] Figure 5 This is a block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the technical solutions of this application, exemplary embodiments of this application are described below in conjunction with the accompanying drawings, including various details of the embodiments of this application to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] Where there is no conflict, the various embodiments of this application and the features thereof may be combined with each other.
[0032] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0033] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, they specify the presence of features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Words such as “connected” or “linked” are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0034] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0035] In text classification methods of related technologies, a text point to be clustered is randomly selected from the dataset as the first initial cluster center. The shortest distance between each text point to be clustered and the current existing cluster center is calculated. Then, the probability of each text point being selected as the next cluster center is calculated, and the text point with the highest probability is selected as the next cluster center. The text point farther away from the current cluster center is more likely to be selected as the next cluster center. The above steps are repeated to obtain multiple cluster centers, each corresponding to a category. When the distribution of text points to be clustered in the dataset is unbalanced, the selection of the initial cluster center has a significant impact on the text classification results, especially in the presence of noise. If the initial cluster center is a noisy text point, the classification results are easily skewed by the noisy text points, seriously affecting the accuracy of text classification.
[0036] The text classification method according to embodiments of this application can be executed by electronic devices such as terminal devices or servers. Terminal devices can be user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. Servers can be independent physical servers, server clusters composed of multiple physical servers, or cloud servers capable of cloud computing. This method can be implemented by a processor calling computer-readable program instructions stored in memory.
[0037] Figure 1 This is a flowchart illustrating a category partitioning method provided in an embodiment of this application. The method involves comparing any two texts in the initial set of texts to be clustered to determine if they belong to the same category. Other texts to be clustered are then compared one by one with the texts whose categories have already been determined, traversing the entire initial set of texts to be clustered. For example... Figure 1 As shown, the classification methods include:
[0038] In step S101, the category set of the first text to be clustered and the category set of the second text to be clustered are obtained; wherein, the first text to be clustered and the second text to be clustered are the texts to be clustered in the initial set of texts to be clustered; the category set of the first text to be clustered and the category set of the second text to be clustered include multiple candidate categories of the same number, and each candidate category is determined under different numbers of categories; wherein, the number of categories is used to characterize the number of cluster centers when clustering the texts to be clustered.
[0039] In some embodiments, the first set of categories of the text to be clustered and the second set of categories of the text to be clustered are obtained through a step of generating the set of categories of the text to be clustered.
[0040] In some embodiments, the step of generating a set of categories for the text to be clustered includes: determining the number of categories based on the category cardinality of the text to be clustered; wherein the category cardinality is the number of categories into which the text to be clustered is classified; clustering the texts to be clustered in the initial set of texts to be clustered under each number of categories to obtain candidate categories for each text to be clustered under each number of categories; wherein each text to be clustered corresponds to one candidate category under each number of categories; and generating a set of categories corresponding to the text to be clustered based on the candidate categories corresponding to the texts to be clustered under each number of categories.
[0041] According to embodiments of this application, the clustering of each text to be clustered under each number of categories yields a category for each text to be clustered under each number of categories. The category set of the first text to be clustered contains multiple candidate categories, which are determined under multiple numbers of categories. The category set of the second text to be clustered also contains multiple candidate categories, which are determined under multiple numbers of categories.
[0042] In this embodiment, the number of categories (also known as the number of cluster centers) is represented by the k-value. The k-value can be determined as 25, 30, 35, 40, 45, 50, 55, etc. When the k-value is 25, the texts to be clustered in the initial set of texts to be clustered are classified under 25 cluster centers, and each text to be clustered can belong to one of the 25 categories. When the k-value is 30, the texts to be clustered in the initial set of texts to be clustered are divided into 30 categories, and each text to be clustered belongs to one of the 30 categories.
[0043] In this embodiment, it is assumed that the initial set of texts to be clustered includes N texts, namely text_1 to text_N. Each text is classified under a different number of categories to obtain the candidate category corresponding to each number of categories. For example, when classifying under 25 categories, the possible classification result for text_1 is 2, and the possible classification result for text_2 is 6. When clustering under 30 categories, the possible classification result for text_1 is 31, and the possible classification result for text_2 is 31.
[0044] As shown in Table 1, the candidate categories of the first text to be clustered, text_1, are as follows: when K is 25, candidate category 2 of the first text to be clustered, when K is 30, candidate category 31 of the first text to be clustered, candidate category 58 of the first text to be clustered, candidate category 122 of the first text to be clustered, candidate category 158 of the first text to be clustered, candidate category 200 of the first text to be clustered, and candidate category 268 of the first text to be clustered, when K is 55.
[0045] Table 1. k-values and corresponding category distributions
[0046] K value K=25 K=30 K=35 K=40 K=45 K=50 K=55 category 1-25 26-55 56-90 91-130 131-175 176-225 226-280 text_1 2 31 58 122 158 200 268 text_2 6 31 58 105 158 200 268 … … … … … … … … text_N 6 32 58 122 170 200 280
[0047] In some embodiments, determining the number of clusters based on the class base value of the text to be clustered includes: determining the class base value of the text to be clustered; and amplifying the number of cluster centers based on the class base value of the text to be clustered to obtain multiple different amplified class values, wherein the number of clusters includes the class base value and multiple different amplified class values.
[0048] In some embodiments, the category base value can be determined based on prior knowledge of the data. For example, users can use experience knowledge to determine the classification of basic dialogue based on different scenarios, and determine the category base value of the text to be clustered based on the classification. For example, the category base value can be determined as n, where n is an integer greater than 1.
[0049] For example, a portion of the text to be clustered is randomly selected without replacement from the initial set of texts to be clustered. This selected text is then manually classified. If there are n categories, the cardinality of the categories is n. The cardinality n is then amplified, i.e., the number of cluster centers is increased, resulting in the amplified category value, which determines the number of categories k. The number of categories k includes both the cardinality value and the amplified category value.
[0050] For example, assuming the base value n is 40, after amplifying the number of cluster centers, the amplified values of the clusters are 25, 30, 35, 45, 50, 55, etc. Therefore, the number of clusters includes 25, 30, 35, 40, 45, 50, and 55.
[0051] In some embodiments, the number of cluster centers is increased based on the class base value of the text to be clustered to obtain multiple different class amplification values, including: increasing and / or decreasing the class base value of the text to be clustered by a predetermined step size to obtain multiple different class amplification values.
[0052] According to an embodiment of this application, assuming the category base value is n, the set of possible values for the number of categories K is:
[0053]
[0054] K num =2*i+1
[0055] Among them, K num The total number of K values is represented by d; the step size for different K values is d, with a range of [2, 5]; and i represents the number of step sizes between the maximum and minimum K values, with a range of [3, 5]. Assuming n = 40, d = 5, and i = 3, the set of K values is [25, 30, 35, 40, 45, 50, 55]. The class base values 40, 25, 30, and 35 are the class augmentation values obtained by decreasing the step size by 5, while 45, 50, and 55 are the class augmentation values obtained by increasing the step size by 5. This solves the problem of determining the k value, yields a large number of effective classes, and allows for the classification of text to be clustered under multiple different class sizes, preparing data for the final classification of text to be clustered based on similarity.
[0056] In step S102, the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category is determined.
[0057] As shown in Table 1, when k = 30, the first text to be clustered, text_1, and the second text to be clustered, text_2, belong to category 31; when k = 35, they belong to category 58; when k = 45, they belong to category 158; when k = 50, they belong to category 200; and when k = 55, they belong to category 268. Therefore, when the number of categories k equals 30, 35, 45, 50, and 55, the first text to be clustered, text_1, and text_2 belong to the same candidate category. Thus, the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category is 5.
[0058] In some embodiments, determining the number of candidate categories to which the first text to be clustered and the second text to be clustered belong is included: determining the candidate categories corresponding to the category set corresponding to the first text to be clustered and the category set corresponding to the second text to be clustered under the same number of categories, determining whether the candidate categories of the category set corresponding to the first text to be clustered and the category set corresponding to the second text to be clustered are the same under each number of categories, and obtaining the number of candidate categories to which the first text to be clustered and the second text to be clustered belong.
[0059] As shown in Table 1, for the texts to be clustered, text_1 and text_2, the candidate categories are the same when K = 30, 45, 50, and 55.
[0060] In step S103, the similarity between the first text to be clustered and the second text to be clustered is determined based on the number of candidate categories to which the first text to be clustered and the second text to be clustered belong, and the total number of categories in the category set of the first text to be clustered.
[0061] According to embodiments of this application, the similarity between the first text to be clustered and the second text to be clustered is determined as: the ratio of the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category to the total number of candidate categories corresponding to the first text to be clustered and the second text to be clustered. For example, if the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category is m, and the total number of candidate categories corresponding to the first text to be clustered and the second text to be clustered is M, then the similarity between the first text to be clustered and the second text to be clustered is m / M. The larger the value of m / M, the higher the similarity between the first text to be clustered and the second text to be clustered, and the more likely they are to be clustered into the same data type.
[0062] In step S104, the classification results of the first text to be clustered and the second text to be clustered are determined based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
[0063] The classification result can be whether the first text to be clustered and the second text to be clustered belong to the same category.
[0064] Determining whether the first and second texts to be clustered belong to the same category based on the similarity between the first and second texts to be clustered and a preset similarity threshold includes:
[0065] If the similarity between the first text to be clustered and the second text to be clustered is greater than a preset similarity threshold, then the first text to be clustered and the second text to be clustered belong to the same category; if the similarity between the first text to be clustered and the second text to be clustered is less than or equal to the preset similarity threshold, then the first text to be clustered and the second text to be clustered do not belong to the same category.
[0066] The similarity between the first and second texts to be clustered can be calculated using m / M, where m represents the number of times the first and second texts belong to the same candidate category, and M represents the total number of candidate categories for the first and second texts. The similarity threshold can be a value between [0.6, 0.8].
[0067] For example, as shown in Table 1, if the number of categories k takes the values of 25, 30, 35, 40, 45, 50, and 55, that is, the total number of candidate categories for the first and second texts to be clustered is 7, therefore, M equals 7. Comparing the first text to be clustered, text_1, and the second text to be clustered, text_2, when k = 30, the first text to be clustered, text_1, and text_2 belong to category 31; when k = 35, the first text to be clustered, text_1, and text_2 belong to category 58; when k = 45, the first text to be clustered, text_1, and text_2 belong to category 158; when k = 50, the first text to be clustered, text_1, and text_2 belong to category 200; and when k = 55, the first text to be clustered, text_1, and text_2 belong to category 268. Therefore, when the number of categories k equals 30, 35, 45, 50, and 55, the first text to be clustered, text_1, and text_2 belong to the same candidate category. Therefore, m equals 5. If the similarity m / M between the first text to be clustered (text_1) and the second text to be clustered (text_2) is equal to 5 / 7, and the similarity threshold is 0.6, then the first text to be clustered (text_1) and the second text to be clustered (text_2) are determined to belong to the same category.
[0068] After determining whether the first text to be clustered, text_1, and the second text to be clustered, text_2, belong to the same category, the first text to be clustered, text_1, is compared with other texts to be clustered in the initial set of texts to be clustered in turn, until the comparison between the first text to be clustered, text_1, and the Nth text to be clustered, text_N, is completed.
[0069] When k equals 25, 35, and 50, the first text to be clustered, text_1, and the Nth text to be clustered, text_N, belong to the same candidate category. Therefore, m equals 3. Thus, the similarity m / M between the first text to be clustered, text_1, and the Nth text to be clustered is 3 / 7, which is less than the similarity threshold of 0.6. Therefore, it is determined that the first text to be clustered, text_1, and the Nth text to be clustered, text_N, do not belong to the same category.
[0070] The text classification method provided in this application determines the category division result of the texts to be clustered by comparing any two texts in the initial text set to be clustered. That is, it determines the number of candidate categories to which the first text and the second text belong (first judgment); then, based on the total number of candidate categories of the first text and the second text, and the number of candidate categories to which they belong, it determines the similarity between the first text and the second text (second judgment). Since the similarity is determined by the total number of candidate categories and the number of candidate categories to which they belong, and the candidate categories are derived from the category set, whether the texts to be clustered belong to the same category is determined by a double category judgment. Even if the category set of the texts to be clustered is biased due to noise, it can be corrected by the subsequent similarity judgment, making the category division result more accurate.
[0071] Secondly, this application provides a text classification method.
[0072] Figure 2 A flowchart illustrating a text classification method provided in an embodiment of this application. (Refer to...) Figure 2 The method includes:
[0073] In step S21, an initial set of texts to be clustered is obtained;
[0074] The initial set of texts to be clustered is a set of texts to be clustered.
[0075] According to embodiments of this application, the initial text to be clustered may include semantic text from multiple different business scenarios, or semantic text from different themes within a single business scenario. For example, multiple different business scenarios include financial telephone sales scenarios, financial loan recovery scenarios, etc. Semantic text generated in the financial telephone sales scenario and semantic text generated in the financial loan recovery scenario are mixed together to form the initial text set to be clustered; or, semantics related to excuses for refusing sales (the theme of "refusing sales") in the financial telephone sales scenario are mixed with semantics related to reasons for accepting sales (the theme of "accepting sales") to form the initial text set to be clustered; or, semantic content related to "non-repayment," "partial repayment," and "full repayment" (the theme of "repayment status") in the financial loan recovery scenario constitutes the initial text set to be clustered. The text classification method of this application can be applied to the initial text sets to be clustered in the above-mentioned situations, and the semantic text of the initial text sets to be clustered is clustered into different theme categories based on semantic content. For example, full repayment is classified into the first category, partial repayment into the second category, non-repayment into the third category, and so on.
[0076] In step S22, the texts to be clustered in the initial text set to be clustered are clustered based on the category partitioning method to obtain the classification results corresponding to each text to be clustered in the text set to be clustered.
[0077] The classification method can be the first aspect classification method provided in the embodiments of this application, which will not be elaborated here for the sake of saving space.
[0078] In some embodiments, clustering is performed on the texts to be clustered in the initial text set to be clustered based on a category partitioning method to obtain the classification results corresponding to each text to be clustered in the text set to be clustered, including:
[0079] Based on the category partitioning method, each text to be clustered in the i-th round of the text set is traversed sequentially to determine the text belonging to the i-th category. When i is 1, the first round of the text set is the initial text set; when i > 1, the i-th round of the text set is the set of texts remaining after removing the texts belonging to the (i-1)-th category determined in the (i-1)-th round. After n rounds of clustering, all texts in the initial text set are classified, and the n categories are sorted according to the number of texts in each category. The classification result corresponding to each text in the initial text set is determined based on the sorting result.
[0080] In each round of traversal, the text to be clustered in one category can be determined. In the (i-1)th round, the text to be clustered in the (i-1)th category can be determined. In the i-th round of traversal, the text to be clustered in the (i-1)th category is removed, and the remaining text to be clustered is formed into the text to be clustered in the i-th round.
[0081] According to an embodiment of this application, n categories can be sorted from highest to lowest based on the number of texts to be clustered in each category, and the texts to be clustered corresponding to the top h candidate categories in the sorted list can be output. Only the texts to be clustered corresponding to the top h candidate categories are output; subsequent steps process these texts, saving manpower costs associated with reviewing or using the classification results. Here, h is a positive integer less than n.
[0082] In some embodiments, based on the category partitioning method, each text to be clustered in the i-th round of the text set to be clustered is traversed sequentially to determine the text to be clustered belonging to the i-th category. When i=1, the first round of traversal is performed, obtaining the text to be clustered belonging to the first category. Here, the first category can be the category of the first text to be clustered. Then, the text to be clustered belonging to the first candidate category obtained in the first round of traversal is removed from the initial text set to be clustered, resulting in the text to be clustered for the second round of traversal. That is, the remaining text to be clustered after the first round of traversal is traversed a second time to obtain the text to be clustered for the second candidate category obtained in the second round of traversal. Then, the text to be clustered for the second candidate category obtained in the second round of traversal is removed from the remaining text to be clustered after the first round of traversal, resulting in the text to be clustered for the third round of traversal. This process continues until all the text to be clustered in the initial text set to be clustered is classified, that is, each text to be clustered is classified.
[0083] In some embodiments, based on a category partitioning method, each text to be clustered in the i-th round of the text set to be clustered is sequentially traversed to determine the text to be clustered belonging to the i-th category, including:
[0084] Based on the category partitioning method, determine whether the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the i-th category; if the j-th text to be clustered does not belong to the same category as the text to be clustered that has been identified as the same category, determine whether the (j+1)-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the same category; if the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the same category, assign the j-th text to the i-th category.
[0085] Where j is greater than 2 and less than N. i any integer N i denoted as the number of texts to be clustered in the i-th round of text set; when j=2, the texts to be clustered that have been determined to be of the same category are any one of the texts to be clustered in the i-th round of text set.
[0086] For example, referring to Table 1, when the first text to be clustered, text_1, and the second text to be clustered, text_2, are determined to belong to category 31, when determining the category of the third text to be clustered, if the third text to be clustered, text_3, belongs to category 31, then the third text to be clustered, text_3, is assigned to category 31; if the third text to be clustered, text_3, does not belong to category 31, then the category determination is performed again in round i+1. If the category of the third text to be clustered, text_3, still cannot be determined in round i+1, then the category determination is performed again in round i+2, and so on, until all texts to be clustered are classified.
[0087] In some embodiments, based on a category partitioning method, determining whether the j-th text to be clustered belongs to the same category as the text to be clustered already identified as the i-th category includes:
[0088] Based on the category partitioning method, each text to be clustered that has been identified as category i is compared with the j-th text to be clustered. If the j-th text to be clustered belongs to the same category as all the texts to be clustered that have been identified as category i, then the j-th text to be clustered is assigned to category i.
[0089] According to an embodiment of this application, when determining whether the j-th text to be clustered belongs to the same category as the text to be clustered already identified as the i-th category, it is necessary to perform category judgment between each of the texts to be clustered already identified as the i-th category and the j-th text to be clustered, based on the category partitioning method. If the j-th text to be clustered belongs to the same category as all the texts to be clustered already identified as the i-th category, then the j-th text to be clustered belongs to the i-th category. If the j-th text to be clustered does not belong to the same category as any of the texts to be clustered in the i-th category, then the j-th text to be clustered does not belong to the i-th category.
[0090] For example, if the first text to be clustered, text_1, and the second text to be clustered, text_2, have already been identified as the 31st category, then classifying the third text to be clustered, text_3, requires comparing the third text to be clustered, text_3, with the first text to be clustered, text_1, and also with the second text to be clustered, text_2, based on the same category partitioning method. If the comparison result is that the third text to be clustered, text_3, the first text to be clustered, text_1, and the second text to be clustered, text_2, all belong to the same category, then the third text to be clustered, text_3, is also determined to belong to the 31st category.
[0091] The text classification method provided in this application clusters the texts in the initial text set to be clustered based on a category partitioning method to obtain the classification results of each text to be clustered. The category partitioning method determines the category partitioning result of the texts to be clustered by comparing any two texts to be clustered in the initial text set to be clustered, that is, determining the number of candidate categories to which the first text and the second text belong (first judgment); then, based on the total number of candidate categories of the first text and the second text and the number of candidate categories to which they belong, the similarity between the first text and the second text is determined (second judgment). Since the similarity is determined by the total number of candidate categories and the number of candidate categories to which they belong, and the candidate categories are derived from the category set, whether the texts to be clustered belong to the same category is determined by a double category judgment. Even if the category set of the texts to be clustered is biased due to noise, it can be corrected by the subsequent similarity judgment, making the category partitioning result more accurate.
[0092] It is understood that the various method embodiments mentioned above in this application can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this application will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0093] In addition, this application also provides a category division device that can be used to implement any category division method provided in this application, a text classification device that can be used to implement any text classification method provided in this application, an electronic device, and a computer-readable storage medium. All of the above can be used to implement any category division method or text classification method provided in this application. The corresponding technical solutions and descriptions are described in the corresponding section of the method, and will not be repeated here.
[0094] Thirdly, embodiments of this application provide a category classification device.
[0095] Figure 3 This is a block diagram of a category classification device provided in an embodiment of this application. (Refer to...) Figure 3 This application provides a category classification device, which includes:
[0096] The acquisition module 301 is used to acquire the category set of the first text to be clustered and the category set of the second text to be clustered; wherein, the first text to be clustered and the second text to be clustered are any two texts to be clustered in the initial text to be clustered set; the category set of the first text to be clustered and the category set of the second text to be clustered both include multiple candidate categories, and the multiple candidate categories are the categories obtained after clustering the texts to be clustered under different numbers of categories.
[0097] The first determining module 302 is used to determine the number of first and second texts to be clustered that belong to the same candidate category.
[0098] The second determining module 303 is used to determine the similarity between the first text to be clustered and the second text to be clustered based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same candidate category.
[0099] The third determining module 304 is used to determine the category division results of the first text to be clustered and the second text to be clustered based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
[0100] In some embodiments, the category set is obtained through the following steps: determining the number of categories based on the category cardinality value; the category cardinality value is the number of texts to be clustered in the initial text set to be clustered that are classified; under each category number, clustering is performed on the texts to be clustered in the initial text set to be clustered to obtain candidate categories for each text to be clustered under each category number; wherein, each text to be clustered corresponds to one candidate category under one category number; and a category set corresponding to the text to be clustered is generated based on the candidate categories corresponding to the texts to be clustered under each category number.
[0101] In some embodiments, the number of categories is determined by the following steps: determining the initial category base value of the text to be clustered; incrementing and / or decrementing the category base value by a predetermined step size to obtain multiple different category augmentation values; and determining the number of categories based on the category base value and the multiple different category augmentation values.
[0102] In some embodiments, the second determining module 303 is further configured to determine the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category, and to obtain the similarity between the first text to be clustered and the second text to be clustered by comparing the total number of candidate categories of the first text to be clustered and the second text to be clustered.
[0103] The classification device provided in this application includes an acquisition module that acquires a category set of a first text to be clustered and a category set of a second text to be clustered; a first determination module that determines the number of candidate categories to which the first text to be clustered and the second text to be clustered belong (first determination); and a second determination module that determines the similarity between the first text to be clustered and the second text to be clustered based on the total number of candidate categories and the number of candidate categories to which they belong (second determination). Since the similarity is determined by the total number of candidate categories and the number of candidate categories to which they belong, and the candidate categories are derived from the category set, the third determination module is derived after a double classification judgment. Even if the category set of the text to be clustered is biased due to noise, it can be corrected by subsequent similarity judgment, making the classification result more accurate.
[0104] Figure 4 This is a block diagram of a text classification device provided in an embodiment of this application.
[0105] Reference Figure 4 This application provides a text classification device, which includes:
[0106] Information acquisition module 41 is used to acquire the initial set of texts to be clustered.
[0107] The text clustering module 42 is used to cluster the texts in the initial text set to be clustered based on the category partitioning method, and obtain the classification results of each text to be clustered.
[0108] The classification method is based on comparing any two texts in the initial set of texts to be clustered in turn to determine the classification result of the texts to be clustered.
[0109] In this application embodiment, the classification method includes:
[0110] Obtain the category set of the first text to be clustered and the category set of the second text to be clustered; wherein, the first text to be clustered and the second text to be clustered are two different texts to be clustered in the initial text set to be clustered; the category set of the first text to be clustered and the category set of the second text to be clustered include the same number of multiple candidate categories, and the multiple candidate categories are determined under different numbers of categories; wherein, the number of categories is the number of texts to be clustered in the text set to be clustered that are classified;
[0111] Determine the number of candidate categories to which the first and second texts to be clustered belong; determine the similarity between the first and second texts to be clustered based on the total number of candidate categories and the number of candidate categories to which they belong; determine whether the first and second texts to be clustered belong to the same category based on the similarity between the first and second texts to be clustered and a preset similarity threshold.
[0112] Text clustering module 42 is used to cluster the texts in the initial text set to be clustered based on the category partitioning method, and to obtain the classification results corresponding to each text in the text set to be clustered, including:
[0113] Based on the category partitioning method, each text to be clustered in the text set to be clustered in the i-th round is traversed sequentially to determine the text to be clustered belonging to the i-th category; where, when i is 1, the text set to be clustered in the first round is the initial text set to be clustered; when i > 1, the text set to be clustered in the i-th round is the set of texts to be clustered remaining after removing the texts to be clustered belonging to the i-1-th category determined in the (i-1)-th round.
[0114] After n rounds of clustering, all the texts in the initial set of texts to be clustered are classified, and the n categories are sorted according to the number of texts to be clustered in each category;
[0115] Based on the sorting results, determine the classification result corresponding to each text in the initial set of texts to be clustered.
[0116] Text clustering module 42 is used to sequentially traverse each text to be clustered in the i-th round of the text set based on the category partitioning method, and determine the text to be clustered belonging to the i-th category, including:
[0117] Based on the category partitioning method, determine whether the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the i-th category;
[0118] If the j-th text to be clustered does not belong to the same category as the text to be clustered that has been identified as belonging to the same category, determine whether the (j+1)-th text to be clustered belongs to the same category as the text to be clustered that has been identified as belonging to the same category.
[0119] If the j-th text to be clustered belongs to the same category as the text to be clustered that has already been identified as belonging to the same category, the j-th text to be clustered will be assigned to the i-th category;
[0120] Where j is greater than 2 and less than N. i any integer N idenoted as the number of texts to be clustered in the i-th round of text set; when j=2, the texts to be clustered that have been determined to be of the same category are any one of the texts to be clustered in the i-th round of text set.
[0121] Text clustering module 42 is used to determine, based on the category partitioning method, whether the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the i-th category, including:
[0122] Based on the category partitioning method, each text to be clustered that has been identified as the i-th category is compared with the j-th text to be clustered.
[0123] If the j-th text to be clustered belongs to the same category as all the texts to be clustered that have been identified as the i-th category, then the j-th text to be clustered is assigned to the i-th category.
[0124] The text clustering module 42 is used to perform the steps of generating the category set of the first text to be clustered and the category set of the second text to be clustered, including: determining the number of categories based on the category cardinality of the text to be clustered; clustering the texts to be clustered in the initial set of texts to be clustered under each category number to obtain the candidate category of each text to be clustered under each category number; wherein, one text to be clustered corresponds to one candidate category under one category number; and generating the category set corresponding to the text to be clustered based on the candidate categories corresponding to the text to be clustered under each category number.
[0125] The text clustering module 42 is used to determine the number of clusters based on the class base value of the text to be clustered, including: determining the class base value of the text to be clustered; and amplifying the number of cluster centers based on the class base value of the text to be clustered to obtain multiple different amplified class values, wherein the number of clusters includes the class base value and multiple different amplified class values.
[0126] The text clustering module 42 is used to amplify the number of cluster centers based on the class base value of the text to be clustered, and obtain multiple different class amplification values, including: increasing and / or decreasing the class base value of the text to be clustered by a predetermined step size to obtain multiple different class amplification values.
[0127] The text classification devices described in the above embodiments can be applied to text classification of text content in multiple different business scenarios; these multiple different business scenarios include at least: financial telephone sales scenario and loan recovery scenario;
[0128] When text classification methods are applied to financial telemarketing scenarios, the text categories to be clustered should at least include: excuses for refusing sales; and acceptance of sales offers.
[0129] When text classification methods are applied to loan recovery scenarios, the text categories to be clustered should include at least: non-repayment category; partial repayment category; and full repayment category.
[0130] In this application, a text classification device is used to cluster the texts in the initial set of texts to be clustered. The similarity between the first and second texts to be clustered can be determined by the number of identical candidate categories included in the category set of the first text to be clustered and the total number of categories in the category set of the first text to be clustered. Then, the similarity is compared with a preset similarity threshold to determine whether the first and second texts to be clustered belong to the same category. When the similarity is greater than the preset similarity threshold, it can be determined that the first and second texts to be clustered belong to the same category. The introduction of similarity helps to more accurately judge the semantic similarity between the first and second texts to be clustered. When the similarity is greater than the preset similarity threshold, it is more accurate to judge that the first and second texts to be clustered belong to the same category.
[0131] Figure 5 This is a block diagram of an electronic device provided in an embodiment of this application.
[0132] Reference Figure 5 This application provides an electronic device, which includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 to enable the at least one processor 501 to perform the above-described text classification method.
[0133] This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor / processor core, implements the aforementioned text category segmentation method and text classification method. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0134] This application also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-mentioned text category division method and text classification method.
[0135] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0136] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0137] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0138] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing the status information of the computer-readable program instructions. These electronic circuits can execute the computer-readable program instructions to implement various aspects of this application.
[0139] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0140] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0141] These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable text sorting device to produce a machine such that, when executed by the processor of the computer or other programmable text sorting device, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable text sorting device, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0142] Computer-readable program instructions may also be loaded onto a computer, other programmable text sorting device, or other device to cause a series of operational steps to be performed on the computer, other programmable text sorting device, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable text sorting device, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0143] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0144] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for general illustrative purposes only and should not be construed as limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this application as set forth by the appended claims.
Claims
1. A method for classifying categories, characterized in that, include: Obtain a first set of categories for the text to be clustered and a second set of categories for the text to be clustered; wherein the first set of categories and the second set of categories for the text to be clustered are any two texts to be clustered in the initial set of texts to be clustered; both the first set of categories and the second set of categories for the text to be clustered include multiple candidate categories, which are categories obtained after clustering the texts to be clustered under different numbers of categories; the number of categories is obtained by increasing and / or decreasing the category base value with a predetermined step size; Determine the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category; The similarity between the first text to be clustered and the second text to be clustered is determined based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same category. The classification results of the first text to be clustered and the second text to be clustered are determined based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
2. The method according to claim 1, characterized in that, The steps for obtaining the category set include: The number of categories is determined based on the category cardinality value; the category cardinality value is the number of texts in the initial set of texts to be clustered that have been classified. For each number of categories, the texts to be clustered in the initial set of texts to be clustered are clustered to obtain candidate categories for each text under each number of categories; wherein, each text to be clustered corresponds to one candidate category under one number of categories; A set of categories corresponding to the text to be clustered is generated based on the candidate categories corresponding to each category number.
3. The method according to claim 2, characterized in that, The steps for determining the number of categories include: Determine the initial class base values for the text to be clustered; Based on the category base value, increments and / or decreases by a predetermined step size to obtain multiple different category amplification values; The number of categories is determined based on the category base value and the multiple different category amplification values.
4. The method according to claim 1, characterized in that, The determination of the similarity between the first text to be clustered and the second text to be clustered, based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same category, includes: The number of times the first text to be clustered and the second text to be clustered belong to the same candidate category is determined, and the similarity between the first text to be clustered and the second text to be clustered is obtained by comparing the number of times the first text to be clustered and the second text to be clustered belong to the same candidate category with the total number of candidate categories of the first text to be clustered and the second text to be clustered.
5. A text classification method, characterized in that, include: Obtain the initial set of texts to be clustered; The initial set of texts to be clustered is clustered based on a category partitioning method to obtain the classification results of each text to be clustered; wherein the category partitioning method is the category partitioning method described in any one of claims 1 to 4.
6. The method according to claim 5, characterized in that, The method of clustering the texts in the initial set of texts to be clustered based on category partitioning to obtain the classification results of each text to be clustered includes: Based on the aforementioned category partitioning method, each text to be clustered in the i-th round of text to be clustered is traversed sequentially to determine the text to be clustered belonging to the i-th category; wherein, when i is 1, the first round of text to be clustered is the initial text to be clustered set; when i > 1, the i-th round of text to be clustered is the set of text to be clustered remaining after removing the text to be clustered belonging to the (i-1)-th category determined in the (i-1)-th round; After n rounds of clustering, all the texts to be clustered in the initial set of texts to be clustered are classified, and the n categories are sorted according to the number of texts to be clustered in each category; The classification result of each text to be clustered in the initial set of texts to be clustered is determined based on the sorting result.
7. The method according to claim 6, characterized in that, The step of, based on the category partitioning method, sequentially traversing each text to be clustered in the i-th round of the text set to be clustered, and determining the text to be clustered belonging to the i-th category, includes: Based on the aforementioned category division method, determine whether the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the i-th category; If the j-th text to be clustered does not belong to the same category as the text to be clustered that has been identified as belonging to the same category, determine whether the (j+1)-th text to be clustered belongs to the same category as the text to be clustered that has been identified as belonging to the same category. If the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as belonging to the same category, the j-th text to be clustered will be assigned to the i-th category; Where j is greater than 2 and less than N i any integer N i The number of texts to be clustered in the i-th round of text set is denoted as ; when j=2, the texts to be clustered that have been determined to be of the same category are any one of the texts to be clustered in the i-th round of text set.
8. The method according to claim 7, characterized in that, The step of determining whether the j-th text to be clustered belongs to the same category as the text to be clustered that has been identified as the i-th category, based on the category partitioning method, includes: Based on the aforementioned category division method, each of the texts to be clustered that has been identified as the i-th category is compared with the j-th text to be clustered for category determination; If the j-th text to be clustered belongs to the same category as each of the texts to be clustered that have been identified as the i-th category, then the j-th text to be clustered is assigned to the i-th category.
9. A classification device, characterized in that, include: An acquisition module is used to acquire a first set of categories for texts to be clustered and a second set of categories for texts to be clustered; wherein the first set of categories for texts to be clustered and the second set of categories for texts to be clustered are any two texts to be clustered in the initial set of texts to be clustered; both the first set of categories for texts to be clustered and the second set of categories for texts to be clustered include multiple candidate categories, which are obtained after clustering the texts to be clustered under different numbers of categories; the number of categories is obtained by increasing and / or decreasing based on the category base value with a predetermined step size; a first determination module is used to determine the number of times the first set of categories for texts to be clustered and the second set of categories for texts to be clustered belong to the same candidate category; The second determining module is used to determine the similarity between the first text to be clustered and the second text to be clustered based on the total number of candidate categories of the first text to be clustered and the number of candidate categories belonging to the same category; The third determining module is used to determine the category division result of the first text to be clustered and the second text to be clustered based on the similarity between the first text to be clustered and the second text to be clustered and a preset similarity threshold.
10. A text classification device, characterized in that, include: The information acquisition module is used to acquire the initial set of texts to be clustered; The text clustering module is used to cluster the texts to be clustered in the initial text set to be clustered based on a category partitioning method, and to obtain the classification results of each text to be clustered; wherein the category partitioning method adopts the category partitioning method according to any one of claims 1 to 4.
11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the classification method as described in any one of claims 1-4 or the text classification method as described in any one of claims 5-8.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the category division method as described in any one of claims 1-4 or the text classification method as described in any one of claims 5-8.