Methods, apparatuses, computing devices, and storage media for classifying text

By employing a deep learning-based multi-model training and weighted summation method, the problem of interference from contextual features and category similarity in traditional hierarchical multi-label text classification is solved, achieving higher text classification accuracy.

CN116932760BActive Publication Date: 2026-04-21SHANGHAI BIREN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI BIREN TECH CO LTD
Filing Date
2023-07-26
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Traditional hierarchical multi-label text classification methods cannot comprehensively consider the contextual features of the text and are easily affected by the similarity between different categories, leading to classification errors.

Method used

By constructing multiple classification models based on deep learning, training the models using the hierarchical relationships between categories, and combining the correlation between text and category, as well as the correlation between entity words and category, a weighted summation method is used to determine the category of the text, thereby reducing the interference of text similarity between different categories.

Benefits of technology

It improves the accuracy of text classification, especially hierarchical multi-label classification, and can better take into account the contextual features of the text and reduce misclassification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932760B_ABST
    Figure CN116932760B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention relate to a method for classifying text, the method comprising: acquiring text to be classified; generating a correlation between the text and each of a plurality of categories based on the text via a first model constructed based on deep learning; determining entity words in the text based on the text; generating a correlation between the entity words and each category based on the entity words in the text via a second model constructed based on deep learning; and determining the category of the text based at least on the correlation between the text and each category, and the correlation between the entity words and each category. The present invention can improve the accuracy of text classification, and further improve the accuracy of hierarchical multi-label classification of text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention generally relate to the field of natural language processing, and more specifically to methods, apparatus, computing devices, and storage media for classifying text. Background Technology

[0002] Text classification refers to classifying text according to a specific classification system or standard to determine its category. Typically, text classification includes single-label text classification (i.e., one text corresponds to one label) and multi-label text classification (i.e., one text corresponds to multiple labels). Multi-label text classification can be further divided into standard multi-label text classification (i.e., the multiple labels corresponding to the text are independent of each other) and hierarchical multi-label text classification (i.e., there is a hierarchical relationship between the multiple labels corresponding to the text).

[0003] For hierarchical multi-label text classification, the hierarchical relationship between labels needs to be considered when classifying text. This avoids situations where multiple category labels generated for the same text lack a hierarchical relationship; for example, a second-level category generated for a given text may not be a subcategory of the first-level category. Traditional methods for hierarchical multi-label text classification mainly include the following two types: 1. Determining a word frequency model for each level of category based on statistical methods, and determining the text's categories at each level (such as first-level, second-level, and third-level categories, where the second-level category is a subcategory of the first-level category, the third-level category is a subcategory of the second-level category, and so on) based on the mapping relationship between keywords in the text identified by the word frequency model; 2. Training corresponding classification models for different levels based on deep learning, and determining the text's categories at each level through the trained classification models at different levels.

[0004] However, the first method mentioned above cannot comprehensively consider the contextual features of the text to be classified, which can easily lead to misclassification. In the second method mentioned above, when texts of different categories have similar sentence structures and content, there is a lot of interference, which can easily lead to misclassification.

[0005] In summary, the shortcomings of traditional schemes for hierarchical multi-label text classification are: they cannot comprehensively consider the contextual features of the text, and they are easily affected by the similarity between different categories of text, leading to classification errors. Summary of the Invention

[0006] To address the aforementioned problems, this invention provides a method, computing device, and storage medium for classifying text, which improves the accuracy of text classification and further enhances the accuracy of hierarchical multi-label text classification.

[0007] According to a first aspect of the present invention, a method for classifying text is provided, comprising: acquiring text to be classified; generating a correlation between the text and each of a plurality of categories based on the text via a first model constructed based on deep learning; determining entity words in the text based on the text; generating a correlation between the entity words and each category based on the entity words in the text via a second model constructed based on deep learning; and determining a category of the text based at least on the correlation between the text and each category, and the correlation between the entity words and each category.

[0008] In some embodiments, determining entity words in text based on text includes: extracting entity words from text based on text via an entity recognition model built on deep learning.

[0009] In some embodiments, the method further includes: determining modifiers in the text based on the text; generating the relevance of the modifiers to each category via a second model based on the modifiers in the text; and determining the category of the text based on the relevance of the text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category.

[0010] In some embodiments, determining the category of text includes: weighted summation of the relevance of the text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category, to determine the category of text.

[0011] In some embodiments, the method further includes: generating a correlation between the text and each of a plurality of subcategories based on the text via a third model constructed based on deep learning, wherein the plurality of categories are primary categories and the plurality of subcategories are secondary categories; generating a correlation between entity words in the text and each subcategory based on a fourth model constructed based on deep learning; and determining the subcategory of the text based on the correlation between the text and each subcategory, and the correlation between entity words and each subcategory.

[0012] In some embodiments, determining the subcategories of text includes: generating the relevance of modifiers to each subcategories via a fourth model based on modifiers in the text; and determining the subcategories of text based on the relevance of text to each subcategories, the relevance of entity words to each subcategories, and the relevance of modifiers to each subcategories.

[0013] In some embodiments, determining the subcategories of text includes: weighted summing of the relevance of the text to each subcategory, the relevance of entity words to each subcategory, and the relevance of modifiers to each subcategory, to determine the subcategories of the text.

[0014] According to a second aspect of the present invention, an apparatus for classifying text is provided, comprising: a text acquisition module configured to acquire text to be classified; a text-category correlation generation module configured to generate a correlation between the text and each of a plurality of categories based on the text via a first model constructed based on deep learning; an entity word determination module configured to determine entity words in the text based on the text; an entity word-category correlation generation module configured to generate a correlation between entity words and each category based on entity words in the text via a second model constructed based on deep learning; and a text category determination module configured to determine the category of the text based at least on the correlation between the text and each category, and the correlation between entity words and each category.

[0015] According to a third aspect of the present invention, a computing device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of the first aspect of the present invention.

[0016] According to a fourth aspect of the invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to perform the method of the first aspect of the invention.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0018] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements.

[0019] Figure 1 A schematic diagram of the model training logic for a text classification scheme applicable to embodiments of the present invention is shown.

[0020] Figure 2 A schematic diagram illustrating the principle of text classification according to an embodiment of the present invention is shown.

[0021] Figure 3 A schematic diagram of a system for classifying text according to an embodiment of the present invention is shown.

[0022] Figure 4 A flowchart of a method for classifying text according to an embodiment of the present invention is shown.

[0023] Figure 5 A flowchart of a method for classifying text according to an embodiment of the present invention is shown.

[0024] Figure 6 A flowchart of a method for multi-level classification of text according to an embodiment of the present invention is shown.

[0025] Figure 7 A block diagram schematically illustrates a computing device suitable for implementing embodiments of the present invention. Detailed Implementation

[0026] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0027] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0028] As mentioned above, in traditional hierarchical multi-label text classification schemes, if a word frequency model is determined for each category level based on statistical methods, and the text's category is determined according to the mapping relationship between keywords in the text identified by this word frequency model and the category, the contextual features of the text will not be considered. For example, in the application scenario of classifying e-commerce products, for the text "newborn moisturizing face cream," based on the keyword "face cream" identified by the word frequency model, it could belong to either the category "maternal and infant clothing" or the category "luxury cosmetics." Because the feature of "newborn" in the text cannot be combined to determine the text's category, it is easy to misclassify the text as belonging to the "luxury cosmetics" category. However, if we train corresponding classification models for different levels based on deep learning, and use the trained classification models at different levels to determine the categories of text, although we can take into account the contextual features of the text, for texts with similar sentence structures and content but different categories, such as text 1 "Grassland Pasture Pillow-Pack Sterilized Whole Milk" (first-level category: beverage, second-level category: milk) and text 2 "German Grassland Pasture Pillow-Pack Sterilized Whole Milk" (first-level category: imported beverage, second-level category: imported milk), the high similarity between the texts can easily lead to misclassification.

[0029] In summary, the shortcomings of traditional schemes for hierarchical multi-label text classification are: they cannot comprehensively consider the contextual features of the text, and they are easily affected by the similarity between different categories of text, leading to classification errors.

[0030] To at least partially address one or more of the aforementioned problems and other potential issues, exemplary embodiments of the present invention propose a scheme for classifying text. In this scheme, interference from text similarity between different categories is reduced by utilizing the hierarchical relationships between categories to train corresponding classification models for each category (and each subcategory).

[0031] Figure 1 A schematic diagram of the model training logic for a text classification scheme applicable to embodiments of the present invention is shown.

[0032] According to embodiments of the present invention, the text to be classified can correspond to multiple categories, such as primary category, secondary category, tertiary category, etc., wherein the secondary category is a subcategory of the primary category, and the tertiary category is a subcategory of the secondary category. For example, Figure 1As shown, a first-level category can include category A, category B, and category C. Second-level categories can include: subcategories of category A (A1, A2, and A3); subcategories of category B (B1 and B2); and subcategories of category C (C1 and C2). A third-level category can include subcategories of each second-level category, for example: subcategories of category A1 (A11 and A12); subcategories of category A2 (A21, A22, and A23), etc.

[0033] According to embodiments of the present invention, multiple models are trained based on the hierarchical relationships between multiple categories. The trained models include: a model corresponding to a first-level category for generating first-level categories of text; a model corresponding to the subcategories included in each of the first-level categories for generating second-level categories of text; and a model corresponding to the subcategories included in each of the second-level categories for generating third-level categories of text. Figure 1 As shown, Model 1 can be used to generate the primary category of text, Model 2 can be used to generate the secondary category of text with the primary category being category A, and Models 3, 4, and 5 can be used to generate the tertiary category of text with the secondary categories being categories A1, A2, and A3, respectively. In this example, Model 1 can be trained based on the primary category information of the training data; Model 2 can be trained based on the secondary category information of the training data with the primary category being category A; and Models 3, 4, and 5 can be trained based on the tertiary category information of the training data with the secondary categories being categories A1, A2, and A3, respectively.

[0034] Compared with the prior art of training a model for each level of category, the above-mentioned inventive concept of the present invention utilizes the inclusion relationship between categories to isolate subcategories of different categories, thereby reducing the interference caused by text similarity between different categories, and significantly improving the accuracy of generating each level of categories (especially such as secondary and tertiary categories) for the text to be classified.

[0035] Furthermore, an exemplary embodiment of the present invention also proposes a scheme for classifying text. In this scheme, based on the text, a correlation between the text and each of a plurality of categories is generated via a first model constructed based on deep learning; based on the text, entity words in the text are determined; based on the entity words in the text, a correlation between the entity words and each category is generated via a second model constructed based on deep learning; and the category of the text is determined based at least on the correlation between the text and each category, and the correlation between the entity words and each category. This allows the contextual features of the text to be considered when classifying the text, while reducing the interference of text similarity between different categories by extracting entity words from the text, thereby improving the accuracy of text classification.

[0036] The following will combine Figures 2 to 7 This invention describes a scheme for classifying text. Figure 2 A schematic diagram of the principle 200 for classifying text according to an embodiment of the present invention is shown.

[0037] According to the inventive concept of the present invention, the category of a text is determined by at least two factors: the correlation between the text and the category, and the correlation between the entity words in the text and the category. This allows for a more accurate determination of the category of the text.

[0038] like Figure 2 As shown, according to an embodiment of the present invention, the text to be classified is, for example, determined by a first classification model to determine the correlation between the text to be classified and the category (201), and entity words are extracted from the text to be classified, and the correlation between entity words in the text to be classified and the category is determined by a second classification model (203). Then, the determined correlation between the text to be classified and the category and the correlation between entity words in the text to be classified and the category are weighted and summed (203) to obtain the category of the text to be classified.

[0039] Compared with existing technologies, this invention, when classifying text, considers both the text itself and the correlation between entity words and categories. This allows the text classification to take into account the contextual features of the text while reducing interference from text similarity between different categories, thereby improving the accuracy of the generated text categories. The following will combine... Figure 3 and Figure 4 The above-described inventive concept of the present invention will be explained in detail.

[0040] Figure 3 A schematic diagram of a system 300 for classifying text according to an embodiment of the present invention is shown. Figure 3 As shown, system 300 may include server 310, computing device 320, and network 330. In some embodiments, server 310 and computing device 320 interact with each other via network 330. It should be understood that system 300 may also include additional units not shown and / or the units shown may be omitted, and the scope of the invention is not limited in this respect.

[0041] Regarding server 310, it is used, for example, to provide text to be categorized. This text to be categorized is, for example, but not limited to, product names used in the e-commerce field. Server 310 can, for example, provide the text to be categorized to computing device 320.

[0042] Regarding the computing device 320, it is used, for example, to determine the category of the acquired text to be classified. Specifically, the computing device 320 acquires the text to be classified; and based on the text, generates the relevance of the text to each of a plurality of categories via a first model constructed based on deep learning. The computing device 320 is also used to determine entity words in the text based on the text; based on the entity words in the text, generates the relevance of the entity words to each category via a second model constructed based on deep learning; and determines the category of the text based at least on the relevance of the text to each category and the relevance of the entity words to each category.

[0043] In some embodiments, the computing device 320 may have one or more processing units, including dedicated processing units such as GPUs, FPGAs, and ASICs, and general-purpose processing units such as CPUs. Additionally, one or more virtual machines may run on each computing device. The computing device 320 may include, for example, a text acquisition module 321, a text-to-category correlation generation module 322, an entity word determination module 323, an entity word-to-category correlation generation module 324, and a text category determination module 325. The aforementioned text acquisition module 321, text-to-category correlation generation module 322, entity word determination module 323, entity word-to-category correlation generation module 324, and text category determination module 325 may be configured on one or more computing devices 320.

[0044] Regarding the text acquisition module 321, it is used to acquire the text to be classified.

[0045] Regarding the text-category relevance generation module 322, it is used to generate the relevance of text to each of multiple categories based on text, via a first model built based on deep learning.

[0046] The entity word determination module 323 is used to determine entity words in text based on the text.

[0047] Regarding the entity word and category relevance generation module 324, it is used to generate the relevance between entity words and each category based on entity words in the text via a second model built based on deep learning.

[0048] Regarding the text category determination module 325, it is used to determine the category of the text based at least on the relevance of the text to each category and the relevance of the entity words to each category.

[0049] Figure 4 A flowchart of a method 400 for classifying text according to an embodiment of the present invention is shown. Method 400 may be derived from, for example... Figure 7 The electronic device shown can be executed at point 700, or it can be executed at point 700. Figure 3The described computing device 320 performs the operation. It should be understood that method 400 may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the invention is not limited in this respect.

[0050] In step 402, the computing device 320 obtains the text to be classified.

[0051] In step 404, the computing device 320 generates the relevance of the text to each of the multiple categories based on the text via a first model built based on deep learning.

[0052] The first model built based on deep learning can be any deep learning-based text classification model suitable for generating the correlation between text and categories, such as a neural network model based on Long Short-Term Memory (LSTM).

[0053] Regarding relevance, it can be represented by weights. For example, for an LSTM-based neural network model, it can generate a score for each category of text. The higher the score, the higher the relevance between the text and that category, and the greater the corresponding weight. Conversely, the lower the score, the lower the relevance between the text and that category, and the smaller the corresponding weight.

[0054] In step 406, the computing device 320 determines entity words in the text based on the text.

[0055] Regarding the identification of entity words in text, entity words can be determined, for example, via an entity recognition model. According to embodiments of the present invention, entity words can be extracted from the text via an entity recognition model built based on deep learning. For example, if the text to be classified is "newborn moisturizing face cream," then the entity word extracted by the entity recognition model is "face cream"; if the text to be classified is "grassland pasture pillow-pack sterilized whole milk," then the entity word extracted by the entity recognition model is "milk."

[0056] In step 408, the computing device 320 generates the relevance between entity words and each category based on entity words in the text via a second model.

[0057] Regarding the second model, it can be a word weight model, such as the TF-IDF (Term Frequency-Inverse Document Frequency) model. According to an embodiment of the invention, based on entity words extracted from the text, the correlation between entity words and categories can be obtained via a TF-IDF model. Similar to what was described above, this correlation can also be represented by weights.

[0058] In step 410, the computing device 320 determines the category of the text based at least on the relevance of the text to each category and the relevance of the entity words to each category.

[0059] According to embodiments of the present invention, the category of the text can be determined by weighted summation, for example, of the relevance of the text to each category and the relevance of the entity words to each category. For example, the similarity weights between the text and the entity words in the text and the categories can be determined separately, and then a weighted summation can be performed based on the weights between the text and each category and the weights between the entity words and each category to determine the category of the text.

[0060] Regarding the determined text category, it can be a series of categories, such as first-level category, second-level category, third-level category, etc.

[0061] As can be seen from the above, by generating the relevance between the text and each category through the first model, the contextual features of the text can be fully considered when classifying the text. Furthermore, by generating the relevance between entity words in the text and each category through the second model, the weight of entity word considerations can be increased when classifying the text, avoiding excessive influence of contextual features on the classification. Therefore, according to embodiments of the present invention, by determining the text category based on the relevance between the text and each category, and the relevance between entity words and each category, the contextual features of the text can be considered when classifying the text, thereby improving the accuracy of text classification.

[0062] According to other embodiments of the present invention, the category of the text can be further determined by combining modifiers in the text.

[0063] Figure 5 A flowchart of a method 500 for classifying text according to an embodiment of the present invention is shown. Method 500 may be derived from, for example... Figure 7 The method is performed at the illustrated electronic device 700. It should be understood that method 500 may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the invention is not limited in this respect.

[0064] In step 502, the computing device 320 acquires the text to be classified.

[0065] In step 504, the computing device 320 generates the relevance of the text to each of the multiple categories based on the text via a first model built based on deep learning.

[0066] Regarding step 504, please refer to step 404 above, which will not be detailed here.

[0067] In step 506, the computing device 320 determines entity words and modifiers in the text based on the text.

[0068] According to embodiments of the present invention, both entity words and modifiers can be determined from text. For example, entity words and modifiers are extracted from the text via an entity recognition model built based on deep learning. In some embodiments, the entity recognition model may be, for example, a BiLSTM-CRF model. In the example described above, for the text to be classified, “Grassland Pasture Pillow-Pack Sterilized Whole Milk”, the extracted entity word is “milk”, and the extracted modifiers are “whole milk” and “sterilized”; for the text to be classified, “German Grassland Pasture Pillow-Pack Sterilized Whole Milk”, the extracted entity word is “milk”, and the extracted modifiers are “whole milk”, “sterilized”, and “Germany”.

[0069] In step 508, the computing device 320 generates the relevance of entity words to each category and the relevance of modifiers to each category based on entity words and modifiers in the text via a second model.

[0070] As described above in step 508, the second model can be a word weight model such as the TF-IDF model. According to embodiments of the present invention, based on entity words and modifiers extracted from the text, the correlation between entity words and categories, and the correlation between modifiers and categories, are obtained via the TF-IDF model. In some embodiments, the correlation can be represented by weights.

[0071] In step 510, the computing device 320 determines the category of the text based on the relevance of the text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category.

[0072] According to embodiments of the present invention, the category of the text can be determined by weighted summation, for example, of the relevance of the text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category. See step 410 above for details, which will not be elaborated here.

[0073] As can be seen from the above, by simultaneously extracting entity words and modifiers from the text to be classified, the second model can better classify texts with the same entity words. Therefore, according to embodiments of the present invention, by determining the text category based on the relevance of the text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category, the contextual features of the text can be considered when classifying the text. Furthermore, by extracting entity words and modifiers from the text, the interference of text similarity between different categories is reduced, thereby improving the accuracy of text classification.

[0074] According to embodiments of the present invention, the following can be further... Figure 2 The principle 200 for classifying text shown is applied to hierarchical multi-label text classification. Specifically, according to embodiments of the present invention, it can be based on... Figure 3 Method 300 and / or Figure 4 Method 400 identifies multiple categories corresponding to the text to be classified. For example, in a method based on... Figure 3 Method 300 and / or Figure 4 Based on the method 400 that determines the category of the text, a similar method is used to further determine the subcategories of the text.

[0075] Figure 6 A flowchart of a method 600 for multi-level text classification according to an embodiment of the present invention is shown. Method 600 may be derived from, for example... Figure 7 The method is performed at the illustrated electronic device 700. It should be understood that method 600 may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the invention is not limited in this respect.

[0076] In step 602, the computing device 320 determines the category of the text from multiple categories.

[0077] Regarding the determination of text categories, methods 300 and / or 400 mentioned above can be used, which will not be elaborated here.

[0078] In step 604, the computing device 320 generates the relevance of the text to each of the multiple subcategories based on the text via a third model built based on deep learning.

[0079] Regarding the multiple subcategories, these are subcategories of the text category determined in step 602. According to embodiments of this disclosure, when multiple categories are first-level categories, the multiple subcategories are second-level categories; when multiple categories are second-level categories, the multiple subcategories are third-level categories; and so on. For example, refer to... Figure 1 If the text category is determined to be category A in the first-level category in step 602, then the multiple subcategories are category A1, category A2 and category A3 in the second-level category.

[0080] The steps for generating the correlation between the text and each of the multiple subcategories are similar to those for generating the correlation between the text and each of the multiple categories, and can be referred to step 404 above, so they will not be repeated here. However, it should be understood that since what is generated here is the correlation between the text and the subcategories, the third model built based on deep learning is different from the first model in step 404.

[0081] In step 606, the computing device 320 generates the relevance between the entity words and each subcategory based on the entity words in the text via the fourth model.

[0082] In step 608, the computing device 320 determines the sub-category of the text based on the relevance of the text to each sub-category and the relevance of the entity words to each sub-category.

[0083] Steps 606 and 608 can be referred to as steps 408 and 410 respectively, and will not be repeated here.

[0084] Furthermore, according to an embodiment of the present invention, the sub-category of the text can be determined by combining modifiers in the text based on the above method 600, including: generating the correlation between modifiers and each sub-category based on the modifiers in the text via a fourth model; and determining the sub-category of the text based on the correlation between the text and each sub-category, the correlation between entity words and each sub-category, and the correlation between modifiers and each sub-category (e.g., weighted summation of the correlation between the text and each sub-category, the correlation between entity words and each sub-category, and the correlation between modifiers and each sub-category).

[0085] As can be seen from the above, according to the embodiments of the present invention, the categories and subcategories of text are determined based on the relevance of text to each category, the relevance of entity words to each category, and the relevance of modifiers to each category, thereby improving the accuracy of text classification at each level when performing hierarchical multi-label classification of text.

[0086] Figure 7 A block diagram schematically illustrates a computing device 700 suitable for implementing embodiments of the present invention. Device 700 may be used to implement execution... Figure 4 Method 400 shown Figure 5 Method 500 and shown Figure 6 The device shown in method 600. (As...) Figure 7 As shown, device 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) 702 or loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. CPU 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 805 is also connected to bus 704.

[0087] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, output unit 707, and storage unit 708. Processing unit 701 executes the various methods and processes described above, such as executing method 400, method 500, or method 600. For example, in some embodiments, method 400, method 500, or method 600 may be implemented as a computer software program stored in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed onto device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by CPU 701, one or more operations of method 400, method 500, or method 600 described above may be performed. Alternatively, in other embodiments, CPU 701 may be configured to execute one or more actions of method 400, method 500, and / or method 600 by any other suitable means (e.g., by means of firmware).

[0088] 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.

[0089] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state 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 a remote computer, 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 circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.

[0090] These computer-readable program instructions can be provided to a processor, general-purpose computer, special-purpose computer, or other programmable data processing unit in a voice interaction device to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing device, these instructions 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, causing a computer, programmable data processing device, and / or other device to operate in a particular manner.

[0091] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

[0092] The above are merely optional embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for hierarchical multi-label classification of text, characterized in that, include: Get the text to be categorized; Based on the text, the relevance of the text to each of the multiple categories is generated via a first model built based on deep learning; Based on the text, identify the entity words in the text; Based on the entity words in the text, the relevance of the entity words to each category is generated via a second model built based on deep learning; The relevance of the text to each category and the relevance of the entity words to each category are weighted and fused according to preset weights to determine the category of the text; as well as Based on the text, a third model built based on deep learning is used to generate the relevance of the text to each of a plurality of subcategories, wherein the plurality of categories are primary categories and the plurality of subcategories are secondary categories, and the first model and the third model are trained based on the subordinate relationships between the primary categories and the secondary categories; Based on the entity words in the text, the relevance between the entity words and each subcategory is generated via the fourth model; and The subcategories of the text are determined based on the relevance of the text to each subcategory and the relevance of the entity words to each subcategory.

2. The method according to claim 1, characterized in that, Based on the text, the entity words identified in the text include: Based on the text, entity words are extracted from the text using an entity recognition model built based on deep learning.

3. The method according to claim 1, characterized in that, Determining the category of the text includes: Based on the text, determine the modifiers in the text; Based on the modifiers in the text, the relevance of the modifiers to each category is generated via the second model; and The category of the text is determined based on the relevance of the text to each category, the relevance of the entity words to each category, and the relevance of the modifiers to each category.

4. The method according to claim 3, characterized in that, Determining the category of the text includes: The category of the text is determined by weighted summation of the relevance of the text to each category, the relevance of the entity words to each category, and the relevance of the modifiers to each category.

5. The method according to claim 1, characterized in that, Determining the subcategories of the text includes: Based on the modifiers in the text, the relevance of the modifiers to each subcategory is generated via the fourth model; and The subcategories of the text are determined based on the relevance of the text to each subcategory, the relevance of the entity words to each subcategory, and the relevance of the modifiers to each subcategory.

6. The method according to claim 5, characterized in that, Determining the subcategories of the text includes: The subcategories of the text are determined by weighted summation of the relevance of the text to each subcategory, the relevance of the entity words to each subcategory, and the relevance of the modifiers to each subcategory.

7. A computing device, comprising: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Method for determining classification information and related device

    CN107844558A

  • Method and device for carrying out multi-label classification on text data

    CN114036944A