Information classification method and device based on hierarchical classification model
Through the information classification method based on the hierarchical classification model, the problem of low accuracy of information classification in the prior art is solved, and more efficient and accurate information classification is achieved.
Patent Information
- Application Number
- CN202210741221.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-06-28
AI Technical Summary
The prior art has problems such as large number of models and blurred subcategories in the information-level classification, resulting in low classification accuracy.
Using the information classification method based on the hierarchical classification model, the hierarchical classification results are generated by obtaining the pending text information and inputting it into the preset hierarchical classification model, and the hierarchical category label of the text is determined based on the results.
It improves the efficiency and accuracy of information classification and can classify information more clearly.
Smart Images

Figure CN115238150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to an information classification method and device based on a hierarchical classification model. Background Art
[0002] In real life, with the rapid development of the Internet around the world, the amount of information people face is growing exponentially, and the amount of information processing is also changing accordingly.
[0003] At present, the navigation menu plays an important role for users of major short video and e-commerce platforms. The navigation menu is mainly used to help users find the required information and materials in complex pages. Taking advertising materials as an example, in order to facilitate searching, there are usually multi-layer relationships in the navigation menu, so that the materials can be classified more clearly. However, the current hierarchical classification of information is usually based on the training model of the parent category of the first layer, and then a model is trained for each parent category to distinguish the subcategories under the parent category to obtain a hierarchical classification result. This method will not only result in a large number of models, but also lead to unclear boundaries between the multiple subcategories under each parent category, which in turn leads to low accuracy of category classification in the hierarchical classification results. It can be seen that how to improve the accuracy of information classification is particularly important. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide an information classification method and device based on a hierarchical classification model, which can classify information through the hierarchical classification model, can help improve the efficiency of information classification, and can help improve the accuracy of information classification.
[0005] In order to solve the above technical problems, the first aspect of the present invention discloses an information classification method based on a hierarchical classification model, the method comprising:
[0006] Obtain the text information to be processed that needs to be classified;
[0007] Inputting the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, wherein the hierarchical classification result includes a classification result of each level in a hierarchical set, wherein the hierarchical set includes at least two levels, and different levels correspond to different level identifiers and different levels correspond to different classification result ranges;
[0008] The hierarchical category label corresponding to the text information to be processed is determined according to the hierarchical classification result.
[0009] As an optional implementation, in the first aspect of the present invention, the classification result of each level includes a category label corresponding to each level;
[0010] Wherein, determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result includes:
[0011] According to the category labels corresponding to all the levels in the hierarchical classification result, analyzing whether there is a correlation relationship between any two category labels corresponding to the levels, and obtaining an analysis result;
[0012] When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels have the association relationship, the category labels corresponding to all the levels are determined as the level category labels corresponding to the text information to be processed;
[0013] When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship, all independent levels are screened out from all the levels, and the level category label corresponding to the text information to be processed is determined according to the level identifier corresponding to each of the independent levels, the level identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels;
[0014] Among them, the category label corresponding to each of the independent levels does not have the association relationship with the category label corresponding to any other level among all the levels except the independent level; all the remaining levels are the levels among all the levels except all the independent levels.
[0015] As an optional implementation, in the first aspect of the present invention, determining the hierarchical category label corresponding to the to-be-processed text information according to the hierarchical classification result further includes:
[0016] When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship, determining the confidence of the category label corresponding to each level;
[0017] Filtering out the highest confidence from all the confidences, and determining whether the highest confidence satisfies a preset confidence condition;
[0018] When it is determined that the highest confidence level satisfies the preset confidence level condition, the target category label corresponding to the highest confidence level and the target level corresponding to the target category label are determined as the level category label corresponding to the text information to be processed.
[0019] As an optional implementation, in the first aspect of the present invention, determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical identifier corresponding to each of the independent hierarchies, the hierarchical identifier corresponding to each of the remaining hierarchies, and the category label corresponding to each of the remaining hierarchies includes:
[0020] According to the analysis result of whether the association relationship exists between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all the associated level groups is greater than or equal to 1; when the number of the associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has the association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one of the associated level groups does not have the association relationship with the category label of any level in the other associated level group;
[0021] According to the number of all the independent levels and all the associated level groups, a level set to be processed is determined from all the levels, wherein the level set to be processed includes all the first levels that meet the category label correction condition and / or all the second levels that meet the deletion condition;
[0022] When the set of levels to be processed includes the first level, performing a correction operation on each label corresponding to the first level in the level classification result to update the level classification result;
[0023] When the set of levels to be processed includes the second level, performing a deletion operation on each of the second levels and the corresponding labels in the level classification result to update the level classification result;
[0024] The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
[0025] As an optional implementation, in the first aspect of the present invention, determining a set of levels to be processed from all the levels according to the number of all the independent levels and all the associated level groups includes:
[0026] When the number of all the associated hierarchical groups is equal to 1, for each of the independent hierarchies, it is determined whether there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, and a determination result corresponding to the independent hierarchical level is obtained; a set of hierarchical levels to be processed is determined according to the determination results corresponding to all the independent hierarchies; wherein, when the determination result corresponding to the independent hierarchical level indicates that there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the first hierarchical level in the set of hierarchical levels to be processed; when the determination result corresponding to the independent hierarchical level indicates that there is no hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the second hierarchical level in the set of hierarchical levels to be processed;
[0027] When the number of all the associated hierarchical groups is greater than 1, determining the group confidence corresponding to each of the associated hierarchical groups, and selecting a target associated hierarchical group that meets the preset group confidence condition from all the associated hierarchical groups; determining all the independent hierarchies and all the hierarchies included in the remaining associated hierarchical groups except the target associated hierarchical group as a hierarchical set to be determined;
[0028] For each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain a judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment results corresponding to all the levels to be judged; wherein, when the judgment result corresponding to the level to be judged indicates that there is at least one level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the first level in the level set to be processed; when the judgment result corresponding to the level to be judged indicates that there is no level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the second level in the level set to be processed;
[0029] Among them, the range of classification results corresponding to the hierarchical level is greater than the range of classification results corresponding to the hierarchical level.
[0030] As an optional implementation, in the first aspect of the present invention, performing a correction operation on the category label corresponding to each first level in the hierarchical classification result includes:
[0031] For each of the first levels in the hierarchical classification results, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level;
[0032] The level of the subsequent adjacent level corresponding to the first level is lower than the first level and is adjacent to the first level;
[0033] When the succeeding adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the original category label corresponding to the succeeding adjacent level corresponding to the first level; when the succeeding adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the corrected category label corresponding to the succeeding adjacent level corresponding to the first level.
[0034] As an optional implementation, in the first aspect of the present invention, for each of the first levels in the hierarchical classification results, the performing of a correction operation on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level includes:
[0035] Determine the semantic keywords corresponding to the first level;
[0036] Calculating the degree of match between the semantic keyword corresponding to the first level and each keyword included in a preset keyword library, wherein the preset keyword library matches the hierarchical level corresponding to the first level;
[0037] The highest matching degree is determined from all the matching degrees, and a keyword corresponding to the highest matching degree is determined, and the category label corresponding to the first level is corrected according to the keyword corresponding to the highest matching degree.
[0038] As an optional implementation, in the first aspect of the present invention, before obtaining the text information to be processed that needs to be classified, the method further includes:
[0039] Performing a text vectorization operation on the original text information to be processed to obtain an initial text vector, and determining the initial text vector as the text information to be processed;
[0040] The step of performing a text vectorization operation on the original text information to be processed to obtain an initial text vector includes:
[0041] Performing a word segmentation operation on the original text information to be processed to obtain a character sequence corresponding to the original text information to be processed, wherein the character sequence includes a plurality of word segmentation results;
[0042] For each of the word segmentation results, convert the word segmentation result into a word vector corresponding to the word segmentation result, and perform a concatenation operation on the word vectors corresponding to all the word segmentation results to obtain a sentence vector corresponding to the original text information to be processed;
[0043] Inserting a vector corresponding to a preset marking symbol at the starting position of the sentence vector to update the sentence vector;
[0044] Determine a position encoding vector that matches the updated sentence vector, and generate an initial text vector based on the updated sentence vector and the position encoding vector.
[0045] The second aspect of the present invention discloses an information classification device based on a hierarchical classification model, the device comprising:
[0046] An acquisition module is used to acquire the text information to be processed that needs to be classified;
[0047] An input module, used for inputting the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, wherein the hierarchical classification result includes a classification result of each level in a hierarchical set, wherein the hierarchical set includes at least two levels, and different levels correspond to different level identifiers and different levels correspond to different classification result ranges;
[0048] A determination module is used to determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result.
[0049] As an optional implementation, in the second aspect of the present invention, the classification result of each level includes a category label corresponding to each level;
[0050] The determining module comprises:
[0051] An analysis submodule, for analyzing whether there is a correlation relationship between any two category labels corresponding to the levels in the hierarchical classification result, and obtaining an analysis result;
[0052] A determination submodule, configured to determine the category labels corresponding to all the levels as the level category labels corresponding to the text information to be processed when the analysis result indicates that the category labels corresponding to any two of the levels in all the levels have the association relationship;
[0053] A screening submodule, configured to screen out all independent levels from all the levels when the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship;
[0054] The determination submodule is further used to determine the level category label corresponding to the text information to be processed according to the level identifier corresponding to each of the independent levels, the level identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels;
[0055] Among them, the category label corresponding to each of the independent levels does not have the association relationship with the category label corresponding to any other level among all the levels except the independent level; all the remaining levels are the levels among all the levels except all the independent levels.
[0056] As an optional implementation, in the second aspect of the present invention, the determination submodule is further used to determine the confidence of the category label corresponding to each of the levels when the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship;
[0057] The screening submodule is further used to screen out the highest confidence from all the confidences;
[0058] The determining module further includes:
[0059] A judgment submodule, judging whether the highest confidence level meets a preset confidence level condition;
[0060] The determination submodule is also used to determine the target category label corresponding to the highest confidence and the target level corresponding to the target category label as the level category label corresponding to the text information to be processed when the judgment submodule determines that the highest confidence meets the preset confidence condition.
[0061] As an optional implementation, in the second aspect of the present invention, the determination submodule determines the hierarchical category label corresponding to the text information to be processed according to the hierarchical identifier corresponding to each of the independent levels, the hierarchical identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels in a specific manner:
[0062] According to the analysis result of whether the association relationship exists between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all the associated level groups is greater than or equal to 1; when the number of the associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has the association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one of the associated level groups does not have the association relationship with the category label of any level in the other associated level group;
[0063] According to the number of all the independent levels and all the associated level groups, a level set to be processed is determined from all the levels, wherein the level set to be processed includes all the first levels that meet the category label correction condition and / or all the second levels that meet the deletion condition;
[0064] When the set of levels to be processed includes the first level, performing a correction operation on each label corresponding to the first level in the level classification result to update the level classification result;
[0065] When the set of levels to be processed includes the second level, performing a deletion operation on each of the second levels and the corresponding labels in the level classification result to update the level classification result;
[0066] The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
[0067] As an optional implementation, in the second aspect of the present invention, the determination submodule determines the to-be-processed level set from all the levels according to the number of all the independent levels and all the associated level groups in a manner as follows:
[0068] When the number of all the associated hierarchical groups is equal to 1, for each of the independent hierarchies, it is determined whether there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, and a determination result corresponding to the independent hierarchical level is obtained; a set of hierarchical levels to be processed is determined according to the determination results corresponding to all the independent hierarchies; wherein, when the determination result corresponding to the independent hierarchical level indicates that there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the first hierarchical level in the set of hierarchical levels to be processed; when the determination result corresponding to the independent hierarchical level indicates that there is no hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the second hierarchical level in the set of hierarchical levels to be processed;
[0069] When the number of all the associated hierarchical groups is greater than 1, determining the group confidence corresponding to each of the associated hierarchical groups, and selecting a target associated hierarchical group that meets the preset group confidence condition from all the associated hierarchical groups; determining all the independent hierarchies and all the hierarchies included in the remaining associated hierarchical groups except the target associated hierarchical group as a hierarchical set to be determined;
[0070] For each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain a judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment results corresponding to all the levels to be judged; wherein, when the judgment result corresponding to the level to be judged indicates that there is at least one level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the first level in the level set to be processed; when the judgment result corresponding to the level to be judged indicates that there is no level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the second level in the level set to be processed;
[0071] Among them, the range of classification results corresponding to the hierarchical level is greater than the range of classification results corresponding to the hierarchical level.
[0072] As an optional implementation, in the second aspect of the present invention, the determination submodule performs a correction operation on each label corresponding to the first level in the hierarchical classification result in the following manner:
[0073] For each of the first levels in the hierarchical classification results, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level;
[0074] The level of the subsequent adjacent level corresponding to the first level is lower than the first level and is adjacent to the first level;
[0075] When the succeeding adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the original category label corresponding to the succeeding adjacent level corresponding to the first level; when the succeeding adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the corrected category label corresponding to the succeeding adjacent level corresponding to the first level.
[0076] As an optional implementation, in the second aspect of the present invention, the determination submodule performs a correction operation on the category label corresponding to the first level for each of the first levels in the hierarchical classification results based on the category label corresponding to the subsequent adjacent level corresponding to the first level in the following manner:
[0077] Determine the semantic keywords corresponding to the first level;
[0078] Calculating the degree of match between the semantic keyword corresponding to the first level and each keyword included in a preset keyword library, wherein the preset keyword library matches the hierarchical level corresponding to the first level;
[0079] The highest matching degree is determined from all the matching degrees, and a keyword corresponding to the highest matching degree is determined, and the category label corresponding to the first level is corrected according to the keyword corresponding to the highest matching degree.
[0080] As an optional implementation, in the second aspect of the present invention, the device further includes:
[0081] An operation module, used for performing a text vectorization operation on the original text information to be processed to obtain an initial text vector before the acquisition module acquires the text information to be processed that needs to be classified;
[0082] The determination module is further used to determine the initial text vector as the text information to be processed;
[0083] The specific method of the operation module performing the text vectorization operation on the original text information to be processed to obtain the initial text vector is as follows:
[0084] Performing a word segmentation operation on the original text information to be processed to obtain a character sequence corresponding to the original text information to be processed, wherein the character sequence includes a plurality of word segmentation results;
[0085] For each of the word segmentation results, convert the word segmentation result into a word vector corresponding to the word segmentation result, and perform a concatenation operation on the word vectors corresponding to all the word segmentation results to obtain a sentence vector corresponding to the original text information to be processed;
[0086] Inserting a vector corresponding to a preset marking symbol at the starting position of the sentence vector to update the sentence vector;
[0087] Determine a position encoding vector that matches the updated sentence vector, and generate an initial text vector based on the updated sentence vector and the position encoding vector.
[0088] The third aspect of the present invention discloses another information classification device based on a hierarchical classification model, the device comprising:
[0089] A memory storing executable program code;
[0090] a processor coupled to the memory;
[0091] The processor calls the executable program code stored in the memory to execute the information classification method based on the hierarchical classification model disclosed in the first aspect of the present invention.
[0092] The fourth aspect of the present invention discloses a computer storable medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the information classification method based on the hierarchical classification model disclosed in the first aspect of the present invention.
[0093] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0094] In an embodiment of the present invention, the text information to be processed that needs to be classified is obtained, and the text information to be processed is input into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, and the hierarchical classification result includes the classification result of each level in the hierarchical set, and the hierarchical set includes at least two levels, and different levels correspond to different level identifiers and different levels correspond to different classification result ranges. It can be seen that the implementation of the present invention can hierarchically classify information through a hierarchical classification model, which can be beneficial to improving the efficiency of information classification, and can be beneficial to improving the accuracy of information classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0096] Figure 1 It is a flowchart of an information classification method based on a hierarchical classification model disclosed in an embodiment of the present invention;
[0097] Figure 2 It is a flowchart of another information classification method based on a hierarchical classification model disclosed in an embodiment of the present invention;
[0098] Figure 3 It is a structural schematic diagram of an information classification device based on a hierarchical classification model disclosed in an embodiment of the present invention;
[0099] Figure 4 It is a structural schematic diagram of another information classification device based on a hierarchical classification model disclosed in an embodiment of the present invention;
[0100] Figure 5 It is a structural diagram of another information classification device based on a hierarchical classification model disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0101] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0102] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0103] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0104] The present invention discloses an information classification method and device based on a hierarchical classification model, which can classify information hierarchically through the hierarchical classification model, which can be beneficial to improving the efficiency of information classification and the accuracy of information classification. The following are detailed descriptions.
[0105] Embodiment 1
[0106] See also Figure 1 , Figure 1 : is a flowchart of an information classification method based on a hierarchical classification model disclosed in an embodiment of the present invention. Figure 1 The described information classification method based on the hierarchical classification model can be applied to an information classification device based on the hierarchical classification model, and can also be applied to a cloud server or local service for information classification based on the hierarchical classification model, which is not limited in the embodiments of the present invention. Figure 1 As shown, the information classification method based on the hierarchical classification model may include the following operations:
[0107] 101. Obtain text information to be processed that needs to be classified.
[0108] In the embodiment of the present invention, optionally, the text information to be processed that needs to be classified can be obtained in real time, can be obtained periodically according to a preset time period, or can be obtained according to a received acquisition instruction, which is not limited in the embodiment of the present invention.
[0109] In the embodiment of the present invention, optionally, the text information to be processed may be a piece of text information, or may be text information including multiple sentences or multiple words, which is not limited in the embodiment of the present invention.
[0110] 102. Input the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed.
[0111] In the embodiment of the present invention, the hierarchical classification result includes the classification result of each level in the hierarchical set, the hierarchical set includes at least two levels, different levels correspond to different level identifiers and different levels correspond to different classification result ranges.
[0112] In the embodiment of the present invention, optionally, the hierarchical classification result includes a category label corresponding to each level.
[0113] In the embodiment of the present invention, optionally, the level set includes all levels in the level classification result.
[0114] In the embodiment of the present invention, further optionally, the hierarchical identification of each level includes the hierarchical level corresponding to the level. It should be noted that the classification result range corresponding to the high level is greater than the classification result range corresponding to the low level. For example, when the classification result corresponding to the high level is food, the classification result corresponding to the low level also belongs to food. For example, the classification result corresponding to the low level can be one of fruits, vegetables, and snacks.
[0115] 103. Determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result.
[0116] In an embodiment of the present invention, it is optional to determine whether the hierarchical classification result meets a preset output condition. When it is determined that the hierarchical classification result meets the preset output condition, the hierarchical classification result can be determined as a hierarchical category label corresponding to the text information to be processed.
[0117] It can be seen that implementation Figure 1 The described information classification method based on the hierarchical classification model can obtain the text information to be processed that needs to be classified, input the text information to be processed into a pre-set hierarchical classification model, obtain the hierarchical classification result of the text information to be processed, determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result, and can hierarchically classify the information through the hierarchical classification model, which can help improve the efficiency of information classification, and can help improve the accuracy of information classification.
[0118] In an optional embodiment, the classification result of each level includes a category label corresponding to each level; wherein determining the level category label corresponding to the text information to be processed according to the level classification result includes:
[0119] According to the category labels corresponding to all levels in the hierarchical classification results, analyze whether there is a correlation between the category labels corresponding to any two levels to obtain the analysis results;
[0120] When the analysis result indicates that there is a correlation between the category labels corresponding to any two levels in all levels, the category labels corresponding to all levels are determined as the level category labels corresponding to the text information to be processed;
[0121] When the analysis result indicates that the category labels corresponding to any two levels in all levels do not have a correlation relationship, all independent levels are screened out from all levels, and the level category label corresponding to the text information to be processed is determined according to the level identifier corresponding to each independent level, the level identifier corresponding to each remaining level, and the category label corresponding to each remaining level;
[0122] Among them, the category label corresponding to each independent level has no association relationship with the category label corresponding to any other level in all levels except the independent level; all remaining levels are the levels in all levels except all independent levels.
[0123] In this optional embodiment, optionally, the category label corresponding to each level can be a category keyword corresponding to each level. Analyzing whether there is an association relationship between the category labels corresponding to any two levels can include: analyzing the correlation between the category labels corresponding to any two levels, judging whether the correlation between the category labels corresponding to the any two levels is greater than or equal to a preset correlation threshold, when judging that the correlation between the category labels corresponding to the any two levels is greater than or equal to the preset correlation threshold, it is determined that there is an association relationship between the category labels corresponding to the any two levels; when judging that the correlation between the category labels corresponding to the any two levels is less than the preset correlation threshold, it is determined that there is no association relationship between the category labels corresponding to the any two levels.
[0124] In this optional embodiment, it should be noted that the remaining levels are levels that are associated with the category labels corresponding to at least one level among all the levels.
[0125] It can be seen that implementing this optional embodiment can analyze whether there is a correlation between the category labels corresponding to any two levels in the hierarchical classification results to obtain an analysis result. When the analysis result indicates that the category labels corresponding to all levels are correlated, the category labels corresponding to all levels are determined as the hierarchical category labels corresponding to the text information to be processed. When the analysis result indicates that the category labels corresponding to any two levels in all levels do not all have a correlation, all independent levels are screened out from all levels, and the hierarchical category label corresponding to the text information to be processed is determined according to the level identifier corresponding to each independent level, the level identifier corresponding to each remaining level, and the category label corresponding to each remaining level. This can help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, as well as help improve the efficiency of obtaining the hierarchical category label corresponding to the text information to be processed, help improve the efficiency of information classification, and help improve the accuracy of information classification.
[0126] In another optional embodiment, determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result further includes:
[0127] When the analysis result indicates that there is no correlation between the category labels corresponding to any two levels in all levels, the confidence of the category labels corresponding to each level is determined;
[0128] Filter out the highest confidence level from all confidence levels, and determine whether the highest confidence level meets a preset confidence level condition;
[0129] When it is determined that the highest confidence meets the preset confidence condition, the target category label corresponding to the highest confidence and the target level corresponding to the target category label are determined as the level category label corresponding to the text information to be processed.
[0130] In this optional embodiment, the confidence level is also called reliability, confidence level, or confidence coefficient, that is, when sampling is used to estimate the overall parameter, due to the randomness of the sample, the conclusion is always uncertain. Therefore, a probability statement method is adopted, that is, the interval estimation method in mathematical statistics, that is, the estimated value and the overall parameter are within a certain allowable error range, and the corresponding probability is called the confidence level.
[0131] In this optional embodiment, for example, when the category label corresponding to the first level is food and beverage, the category label corresponding to the second level is women's clothing, and the category label corresponding to the third level is high heels, it is determined that there is no association relationship between the three category labels corresponding to the levels, and the confidence of the category label corresponding to each level is determined; if the confidence of the category label corresponding to the first level is the highest, food and beverage is used as the hierarchical category label corresponding to the text information to be processed; if the confidence of the category label corresponding to the second level is the highest, the category label corresponding to the first level is corrected according to the category label "women's clothing" corresponding to the second level, and the corrected category label corresponding to the first level can be "clothing", and it is deleted. The category label corresponding to the third level, the category label "clothing" corresponding to the first level and the category label "women's clothing" corresponding to the second level are determined as the hierarchical category labels corresponding to the text information to be processed; if the confidence of the category label corresponding to the third level is the highest, the category labels corresponding to the first and second levels are corrected according to the category label "shoes" corresponding to the third level. After the correction, the category label corresponding to the first level can be "footwear", and the label corresponding to the second level after the correction can be "women's shoes", and the category label "footwear" corresponding to the first level, the category label "women's shoes" corresponding to the second level, and the category label "high heels" corresponding to the third level are determined as the hierarchical category labels corresponding to the text information to be processed.
[0132] In this optional embodiment, optionally, when it is determined that the highest confidence does not meet a preset confidence condition, the hierarchical category label corresponding to the text to be processed is not output; or, the process may be terminated.
[0133] In this optional embodiment, optionally, determining the target category label corresponding to the highest confidence and the target level corresponding to the target category label as the level category label corresponding to the text information to be processed includes:
[0134] Analyze the target level corresponding to the highest confidence to obtain a hierarchical analysis result. When the hierarchical analysis result is used to indicate that the target level is the lowest level, complete the category label corresponding to the level before the target level according to the target level and the target category label corresponding to the highest confidence, and determine the target category label corresponding to the highest confidence and the category label corresponding to each level after completion as the hierarchical category label corresponding to the text information to be processed. It should be noted that the level before the target level includes every level before the target level.
[0135] When the hierarchical analysis result is used to indicate that the target hierarchical level is the highest hierarchical level, all hierarchical levels after the target hierarchical level and the category labels corresponding to each hierarchical level are deleted, and the target category label corresponding to the highest confidence level is determined as the hierarchical category label corresponding to the text information to be processed;
[0136] When the hierarchical analysis result is used to indicate that the target level is neither the highest level nor the lowest level, all levels after the target level and the category label corresponding to each level are deleted, and based on the target level and the target category label, the category label corresponding to each level before the target level is completed, and the target level, the target category label, and the category label corresponding to each level before each completed target level are determined as the hierarchical category labels corresponding to the text information to be processed.
[0137] In this optional embodiment, determining whether the highest confidence level satisfies a preset confidence level condition may be determining whether the highest confidence level is greater than or equal to a preset confidence level threshold, wherein the preset confidence level threshold may be 0.5.
[0138] It can be seen that the implementation of this optional embodiment can determine the confidence of the category label corresponding to each level when the analysis results indicate that there is no association between the category labels corresponding to any two levels in all levels, screen out the highest confidence from all confidences, and judge whether the highest confidence meets the pre-set confidence condition. If so, the target category label corresponding to the highest confidence and the target level corresponding to the target category label are determined as the level category label corresponding to the text information to be processed. When there is no association among all levels, the level category label corresponding to the text information to be processed can be determined according to the confidence, which can help improve the intelligence of information classification, can help improve the accuracy of information hierarchical classification, and can help improve the efficiency of hierarchical classification of information.
[0139] In yet another optional embodiment, determining the level category label corresponding to the text information to be processed according to the level identifier corresponding to each independent level, the level identifier corresponding to each remaining level, and the category label corresponding to each remaining level includes:
[0140] According to the analysis result of whether there is an association relationship between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all associated level groups is greater than or equal to 1; when the number of associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has an association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one associated level group has no association relationship with the category label of any level in the other associated level group;
[0141] According to the number of all independent levels and all associated level groups, a set of levels to be processed is determined from all levels, where the set of levels to be processed includes all first levels that meet the category label correction condition and / or all second levels that meet the deletion condition;
[0142] When the set of hierarchies to be processed includes the first hierarchical level, performing a correction operation on each label corresponding to the first hierarchical level in the hierarchical classification result to update the hierarchical classification result;
[0143] When the set of levels to be processed includes the second level, a deletion operation is performed on each second level and the corresponding label in the level classification result to update the level classification result;
[0144] The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
[0145] In this optional embodiment, optionally, for the same associated hierarchy group, the category label corresponding to any hierarchy has an associated relationship with the category labels corresponding to all the hierarchies in the associated hierarchy.
[0146] In this optional embodiment, optionally, each associated level group includes at least one level and a category label corresponding to each level; and the to-be-processed level set includes at least one to-be-processed level.
[0147] In this optional embodiment, optionally, the first level that meets the category label correction condition may be a level in which there is a subsequent level and the category label corresponding to the subsequent level is associated with the level in which the first level is preceding; the second level that meets the deletion condition may be a level in which there is no subsequent level and / or the levels in which the second level and the second level are subsequent levels are all independent labels.
[0148] In this optional embodiment, optionally, the updated hierarchical classification result does not have an independent hierarchy.
[0149] In this optional embodiment, optionally, for example, if the number of levels is 3, and the hierarchical category label of the first level is catering food, the hierarchical category label of the second level is snack food, and the hierarchical category label of the third level is shoes, then the hierarchical category labels of the first level and the second level are associated, then the third level is determined as the second level and the third level and the hierarchical category label corresponding to the third level are deleted to update the hierarchical classification result, and the updated hierarchical classification result is catering food-snack food; if the number of levels is 3, and the hierarchical category label of the first level is catering food, the hierarchical category label of the second level is women's clothing, and the hierarchical category label of the third level is chocolate, then the hierarchical category label of the second level does not have an associated relationship with the hierarchical category labels of the first level and the third level, then the hierarchical category label of the second level is corrected according to the hierarchical category label of the third level, chocolate, and the correction is made. The second-level hierarchical category label can be snack food, and the hierarchical classification result is updated according to the first-level, second-level and third-level hierarchical category labels, and the updated hierarchical classification result is catering food-snack food-chocolate; if the number of levels is 3, and the first-level hierarchical category label is clothing, shoes and bags, the second-level hierarchical category label is snack food, and the third-level hierarchical category label is chocolate, then the first-level hierarchical category label has no association with the second-level and third-level hierarchical category labels, then the first-level hierarchical category label is corrected according to the second-level hierarchical category label snack food, and the corrected first-level hierarchical category label can be catering food, and the hierarchical classification result is updated according to the first-level, second-level and third-level hierarchical category labels, and the updated hierarchical classification result is catering food-snack food-chocolate.
[0150] It can be seen that the implementation of this optional embodiment can divide all remaining levels into at least one associated level group according to the analysis result of whether there is an association relationship between the category labels corresponding to all remaining levels, determine a set of levels to be processed from all levels according to the number of all independent levels and all associated level groups, and perform corresponding processing operations on each level to be processed in the set of levels to be processed to update the level classification result, and determine the updated level classification result as the level category label corresponding to the text information to be processed. This can help improve the intelligence of determining the level category label corresponding to the text information to be processed, can help improve the accuracy of obtaining the level category label corresponding to the text information to be processed, and can further help improve the accuracy of hierarchical classification of information.
[0151] In yet another optional embodiment, according to the number of all independent levels and all associated level groups, a set of levels to be processed is determined from all levels, including:
[0152] When the number of all associated hierarchical groups is equal to 1, for each independent hierarchical level, determine whether there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, and obtain a determination result corresponding to the independent hierarchical level; determine a hierarchical level set to be processed according to the determination results corresponding to all independent hierarchical levels; wherein, when the determination result corresponding to the independent hierarchical level indicates that there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, the independent hierarchical level is the first hierarchical level set to be processed; when the determination result corresponding to the independent hierarchical level indicates that there is no hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, the independent hierarchical level is the second hierarchical level set to be processed;
[0153] When the number of all associated hierarchical groups is greater than 1, determine the group confidence corresponding to each associated hierarchical group, and select a target associated hierarchical group that meets the preset group confidence condition from all associated hierarchical groups; determine all independent hierarchies and all hierarchies included in the remaining associated hierarchical groups except the target associated hierarchical group as a hierarchical set to be determined;
[0154] For each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain the judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment results corresponding to all levels to be judged; wherein, when the judgment result corresponding to the level to be judged indicates that there is at least one level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the first level in the level set to be processed; when the judgment result corresponding to the level to be judged indicates that there is no level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the second level in the level set to be processed;
[0155] Among them, the range of classification results corresponding to the hierarchical level is greater than the range of classification results corresponding to the hierarchical level.
[0156] In this optional embodiment, the number of target association level groups is 1.
[0157] In this optional embodiment, optionally, determining the group confidence corresponding to each associated hierarchical group may include: for each associated hierarchical group, calculating the confidence of the hierarchical label corresponding to each level included in the associated hierarchical group, calculating the average confidence between the confidences of the hierarchical labels corresponding to all levels included in the associated hierarchical group based on the confidence of the hierarchical label corresponding to each level included in the associated hierarchical group, and determining the average confidence as the group confidence corresponding to the associated hierarchical group. In this way, by calculating the confidence of the hierarchical label corresponding to each level in each associated hierarchical group and averaging the confidences, and using the average as the group confidence corresponding to the associated hierarchical group, it can be helpful to improve the accuracy of determining the group confidence corresponding to each associated hierarchical group, and it can be helpful to improve the accuracy of determining the set of levels to be judged, and then it can be helpful to improve the intelligence of determining the hierarchical category labels corresponding to the text information to be processed, and it can be helpful to improve the accuracy of obtaining the hierarchical category labels corresponding to the text information to be processed, and then it can be helpful to improve the accuracy of hierarchical classification of information.
[0158] In this optional embodiment, for example, when there are two association level groups, and one association level group is catering food-snack food, and the other association level group is women's shoes-high heels, the group confidence corresponding to each association level group is determined, and if the confidence of the association level group corresponding to catering food-snack food is higher than the association level group corresponding to women's shoes-high heels, the association level group corresponding to catering food-snack food is determined as the target association level group.
[0159] In this optional embodiment, screening the target associated hierarchical group that meets the preset group confidence condition from all associated hierarchical groups may include: screening the highest group confidence from all group confidences according to the group confidences corresponding to all associated hierarchical groups, and determining the associated hierarchical group corresponding to the highest group confidence as the target associated hierarchical group. In this way, the associated hierarchical group with the highest group confidence can be determined as the target associated hierarchical group, which can help improve the accuracy of determining the target associated hierarchical group, and can help improve the accuracy of determining the hierarchical set to be judged, and can further help improve the intelligence of determining the hierarchical category label corresponding to the text information to be processed, and can further help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, and can further help improve the accuracy of hierarchical classification of information.
[0160] In this optional embodiment, optionally, determining the set of levels to be processed based on the judgment results corresponding to all levels to be judged may include: for each judgment result corresponding to the level to be judged, analyzing whether the judgment result is used to indicate that there is at least one level in the target associated level group whose level is lower than the level to be judged; if the judgment result is used to indicate that there is at least one level in the target associated level group whose level is lower than the level to be judged, then the level to be judged is the first level in the set of levels to be processed; if the judgment result is used to indicate that there is no level in the target associated level group whose level is lower than the level to be judged, then the level to be judged is the second level in the set of levels to be processed.
[0161] In this optional embodiment, optionally, for example, the classification result range corresponding to the level with a higher hierarchy level may be food, and the classification result range corresponding to the level with a lower hierarchy level may be fruit, wherein fruit belongs to food; the classification result range corresponding to the level with a higher hierarchy level may be clothing, and the classification result range corresponding to the level with a lower hierarchy level may be shirts, and shirts belong to clothing.
[0162] It can be seen that the implementation of this optional embodiment can determine the level set to be processed according to the judgment result of whether there is at least one level in the associated level group whose level is lower than the independent level when the number of associated level groups is 1; when the number of associated level groups is greater than 1, determine the target associated level group, and determine all independent levels and all levels included in the remaining associated groups except the target associated level group as the level set to be judged; for each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain the judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment result corresponding to each level to be judged, and the classification result range corresponding to the level with a higher level is larger than the classification result range corresponding to the level with a lower level; this can help improve the intelligence of determining the level set to be processed, and can help improve the accuracy of determining the level set to be processed, so as to help improve the accuracy of obtaining the level category labels corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0163] In yet another optional embodiment, performing a correction operation on the category label corresponding to each first level in the hierarchical classification result includes:
[0164] For each first level in the hierarchical classification result, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level;
[0165] The level of the subsequent adjacent level corresponding to the first level is lower than the first level and is adjacent to the first level;
[0166] When the succeeding adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the original category label corresponding to the succeeding adjacent level corresponding to the first level; when the succeeding adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the corrected category label corresponding to the succeeding adjacent level corresponding to the first level.
[0167] In this optional embodiment, optionally, the original category label is the original category label of the level, that is, the original category label is a label that does not need to be corrected.
[0168] In this optional embodiment, optionally, when the subsequent adjacent level corresponding to the first level is a first level in the levels to be processed, the method may further include: correcting the subsequent adjacent level corresponding to the first level according to the category label corresponding to the subsequent adjacent level corresponding to the first level, to obtain a corrected category label of the subsequent adjacent level corresponding to the first level.
[0169] It can be seen that the implementation of this optional embodiment can perform a correction operation on the category label corresponding to the first level for each first level in the hierarchical classification result based on the category label corresponding to the subsequent adjacent level corresponding to the first level, wherein when the subsequent adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level is the corresponding original category label, and when the subsequent adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level corresponds to the corrected category label. This can help improve the accuracy of performing a correction operation on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level, can help improve the accuracy of the category label corresponding to the corrected first level, and thus can help improve the accuracy of the hierarchical category label corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0170] In yet another optional embodiment, for each first level in the hierarchical classification result, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level, including:
[0171] Determine the semantic keywords corresponding to the first level;
[0172] Calculating the degree of match between the semantic keyword corresponding to the first level and each keyword included in a preset keyword library, wherein the preset keyword library matches the level corresponding to the first level;
[0173] The highest matching degree is determined from all matching degrees, and a keyword corresponding to the highest matching degree is determined, and the label corresponding to the first level is corrected according to the keyword corresponding to the highest matching degree.
[0174] In this optional embodiment, there are optionally several pre-set keyword libraries, and each keyword library corresponds to a level.
[0175] In this optional embodiment, optionally, for example, when the category label corresponding to the subsequent adjacent level corresponding to the first level is dress, it can be determined that the semantic keyword corresponding to the first level is women's clothing.
[0176] In this optional embodiment, further optionally, after determining the highest matching degree from all matching degrees and before determining the keyword corresponding to the highest matching degree, the method may also include: judging whether the highest matching degree satisfies a preset matching condition; if so, executing the operation of determining the keyword corresponding to the highest matching degree; if not, re-executing the operation of determining the semantic keyword corresponding to the first level, or correcting the category label corresponding to the first level according to the determined semantic keyword corresponding to the first level.
[0177] In this optional embodiment, optionally, correcting the category label corresponding to the first level according to the keyword corresponding to the highest matching degree may include: determining the keyword corresponding to the highest matching degree as the corrected category label corresponding to the first level. In this way, the keyword corresponding to the highest matching degree can be determined as the corrected category label corresponding to the first level, which can help improve the efficiency of correcting the category label corresponding to the first level, and can help improve the accuracy of correcting the category label corresponding to the first level, so as to help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0178] It can be seen that implementing this optional embodiment can determine the semantic keyword corresponding to the first level and calculate the degree of match between the semantic keyword and each keyword included in the pre-set keyword library, and the pre-set keyword library matches the hierarchical level corresponding to the first level, determine the highest degree of match and determine the keyword corresponding to the highest degree of match, and correct the label corresponding to the first level according to the keyword corresponding to the highest degree of match, which can help improve the accuracy of correcting the label corresponding to the first level, and can help improve the intelligence of correcting the label corresponding to the first level, so as to help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, and then can help improve the accuracy of hierarchical classification of information.
[0179] Embodiment 2
[0180] See also Figure 2 , Figure 2 : is a flowchart of an information classification method based on a hierarchical classification model disclosed in an embodiment of the present invention. Figure 2 The described information classification method based on the hierarchical classification model can be applied to an information classification device based on the hierarchical classification model, and can also be applied to a cloud server or a local server for information classification based on the hierarchical classification model, and the embodiments of the present invention are not limited thereto. Figure 2 As shown, the information classification method based on the hierarchical classification model may include the following operations:
[0181] 201. Perform a text vectorization operation on the original text information to be processed to obtain an initial text vector, and determine the initial text vector as the text information to be processed.
[0182] In the embodiment of the present invention, performing a text vectorization operation on the text information to be processed to obtain an initial text vector, and determining the initial text vector as the text information to be processed includes:
[0183] Before obtaining the text information to be processed that needs to be classified, the method further includes:
[0184] Performing a text vectorization operation on the original text information to be processed to obtain an initial text vector, and determining the initial text vector as the text information to be processed;
[0185] The text vectorization operation is performed on the original text information to be processed to obtain the initial text vector, including:
[0186] Perform a word segmentation operation on the original text information to be processed to obtain a text sequence corresponding to the original text information to be processed, the text sequence including multiple word segmentation results;
[0187] For each word segmentation result, convert the word segmentation result into a word vector corresponding to the word segmentation result, perform a concatenation operation on the word vectors corresponding to all word segmentation results, and obtain a sentence vector corresponding to the original text information to be processed;
[0188] Insert a vector corresponding to a preset marker symbol at the beginning of the sentence vector to update the sentence vector;
[0189] A position encoding vector matching the updated sentence vector is determined, and an initial text vector is generated based on the updated sentence vector and the position encoding vector.
[0190] In an embodiment of the present invention, optionally, the pre-set marking symbol can be a CLS symbol, wherein it should be noted that the CLS symbol means classification, which can be understood as being used for downstream classification tasks, that is, compared with other characters / words already in the text, this symbol without obvious semantic information will more "fairly" integrate the semantic information of each character / word in the text, and use the output vector corresponding to the CLS symbol as the semantic representation of the entire text for text classification.
[0191] In an embodiment of the present invention, optionally, for each character segmentation result, converting the character segmentation result into a word vector corresponding to the character segmentation result may include: for each analysis result, converting the character segmentation result into a D-dimensional word vector corresponding to the character segmentation result through a pre-set word embedding layer of a pre-trained model.
[0192] 202. Obtain text information to be processed that needs to be classified.
[0193] 203. Input the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed.
[0194] 204. Determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result.
[0195] In the embodiment of the present invention, for other descriptions of step 202 to step 204, please refer to the detailed description of step 101 to step 103 in the first embodiment, and the embodiment of the present invention will not be repeated.
[0196] It can be seen that implementation Figure 2The described information classification method based on the hierarchical classification model can perform text vectorization operations on the original text information to be processed to obtain an initial text vector, determine the initial text vector as the text information to be processed, and input the text information to be processed into a pre-set hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result, and can perform text vectorization operations on the original text information to be processed to obtain an initial text vector, and can represent the text information to be processed as a series of vectors that can express text semantics, which can help improve the efficiency and accuracy of subsequent hierarchical classification results of the text information to be processed, and further can help improve the efficiency and accuracy of determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification results.
[0197] Embodiment 3
[0198] See also Figure 3 , Figure 3 Schematic diagram of the structure of an information classification device based on a hierarchical classification model disclosed in an embodiment of the present invention. Figure 3 As shown, the information classification device based on the hierarchical classification model may include:
[0199] The acquisition module 301 is used to acquire text information to be processed that needs to be classified.
[0200] The input module 302 is used to input the text information to be processed into a preset hierarchical classification model to obtain the hierarchical classification results of the text information to be processed. The hierarchical classification results include the classification results of each level in the hierarchical set. The hierarchical set includes at least two levels. Different levels correspond to different level identifiers and different levels correspond to different classification result ranges.
[0201] The determination module 303 is used to determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result.
[0202] It can be seen that implementation Figure 3 The described device can obtain text information to be processed that needs to be classified, input the text information to be processed into a pre-set hierarchical classification model, obtain the hierarchical classification result of the text information to be processed, determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result, and can hierarchically classify the information through the hierarchical classification model, which can help improve the efficiency of information classification, and can help improve the accuracy of information classification.
[0203] In an optional embodiment, if Figure 4 As shown, the classification results of each level include the category labels corresponding to each level;
[0204] The determination module 303 includes:
[0205] An analysis submodule 3031 is used to analyze whether there is a correlation relationship between the category labels corresponding to any two levels in the hierarchical classification result, and obtain an analysis result;
[0206] A determination submodule 3032 is used to determine the category labels corresponding to all the levels as the level category labels corresponding to the text information to be processed when the analysis result indicates that there is an association relationship between the category labels corresponding to any two levels in all the levels;
[0207] The screening submodule 3033 is used to screen out all independent levels from all levels when the analysis result indicates that the category labels corresponding to any two levels in all levels do not have a correlation relationship;
[0208] The determination submodule 3032 is further used to determine the level category label corresponding to the text information to be processed according to the level identifier corresponding to each independent level, the level identifier corresponding to each remaining level, and the category label corresponding to each remaining level;
[0209] Among them, the category label corresponding to each independent level has no association relationship with the category label corresponding to any other level in all levels except the independent level; all remaining levels are the levels in all levels except all independent levels.
[0210] It can be seen that implementation Figure 4 The described device can analyze whether there is a correlation between the category labels corresponding to any two levels in the hierarchical classification result to obtain an analysis result. When the analysis result indicates that the category labels corresponding to all levels are correlated, the category labels corresponding to all levels are determined as the hierarchical category labels corresponding to the text information to be processed. When the analysis result indicates that the category labels corresponding to any two levels in all levels do not all exist a correlation, all independent levels are screened out from all levels, and the hierarchical category label corresponding to the text information to be processed is determined according to the level identifier corresponding to each independent level, the level identifier corresponding to each remaining level, and the category label corresponding to each remaining level. This can help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, as well as improve the efficiency of obtaining the hierarchical category label corresponding to the text information to be processed, and can help improve the efficiency of information classification, as well as help improve the accuracy of information classification.
[0211] In another optional embodiment, Figure 4 As shown, the determination submodule 3032 is further used to determine the confidence of the category label corresponding to each level when the analysis result indicates that there is no association relationship between the category labels corresponding to any two levels in all levels;
[0212] The screening submodule 3033 is further used to screen out the highest confidence from all confidences;
[0213] The determination module 303 further includes:
[0214] The judging submodule 3034 judges whether the highest confidence level satisfies a preset confidence level condition;
[0215] The determination submodule 3032 is also used to determine the target category label corresponding to the highest confidence and the target level corresponding to the target category label as the level category label corresponding to the text information to be processed when the judgment submodule 3034 determines that the highest confidence meets the preset confidence condition.
[0216] It can be seen that implementation Figure 4 The described device can determine the confidence of the category label corresponding to each level when the analysis result indicates that there is no association between the category labels corresponding to any two levels in all levels, screen out the highest confidence from all confidences, and judge whether the highest confidence meets the preset confidence condition. If so, the target category label corresponding to the highest confidence and the target level corresponding to the target category label are determined as the level category label corresponding to the text information to be processed. When there is no association among all levels, the level category label corresponding to the text information to be processed can be determined according to the confidence, which can help improve the intelligence of information classification, can help improve the accuracy of information hierarchical classification, and can help improve the efficiency of hierarchical classification of information.
[0217] In yet another optional embodiment, Figure 4 As shown, the determination submodule 3032 determines the hierarchical category label corresponding to the to-be-processed text information according to the hierarchical identifier corresponding to each independent hierarchical level, the hierarchical identifier corresponding to each remaining hierarchical level, and the category label corresponding to each remaining hierarchical level in the following manner:
[0218] According to the analysis result of whether there is an association relationship between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all associated level groups is greater than or equal to 1; when the number of associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has an association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one associated level group has no association relationship with the category label of any level in the other associated level group;
[0219] According to the number of all independent levels and all associated level groups, a set of levels to be processed is determined from all levels, where the set of levels to be processed includes all first levels that meet the category label correction condition and / or all second levels that meet the deletion condition;
[0220] When the set of hierarchies to be processed includes the first hierarchical level, performing a correction operation on each label corresponding to the first hierarchical level in the hierarchical classification result to update the hierarchical classification result;
[0221] When the set of levels to be processed includes the second level, a deletion operation is performed on each second level and the corresponding label in the level classification result to update the level classification result;
[0222] The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
[0223] It can be seen that implementation Figure 4 The described device can divide all remaining levels into at least one associated level group according to the analysis result of whether there is a correlation between the category labels corresponding to all remaining levels, determine a set of levels to be processed from all levels according to the number of all independent levels and all associated level groups, and perform corresponding processing operations on each level to be processed in the set of levels to be processed to update the level classification result, and determine the updated level classification result as the level category label corresponding to the text information to be processed, which can help improve the intelligence of determining the level category label corresponding to the text information to be processed, can help improve the accuracy of obtaining the level category label corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0224] In yet another optional embodiment, Figure 4 As shown, the determination submodule 3032 determines the to-be-processed level set from all levels according to the number of all independent levels and all associated level groups in the following manner:
[0225] When the number of all associated hierarchical groups is equal to 1, for each independent hierarchical level, determine whether there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, and obtain a determination result corresponding to the independent hierarchical level; determine a hierarchical level set to be processed according to the determination results corresponding to all independent hierarchical levels; wherein, when the determination result corresponding to the independent hierarchical level indicates that there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, the independent hierarchical level is the first hierarchical level set to be processed; when the determination result corresponding to the independent hierarchical level indicates that there is no hierarchical level lower than the independent hierarchical level in the associated hierarchical level group, the independent hierarchical level is the second hierarchical level set to be processed;
[0226] When the number of all associated hierarchical groups is greater than 1, determine the group confidence corresponding to each associated hierarchical group, and select a target associated hierarchical group that meets the preset group confidence condition from all associated hierarchical groups; determine all independent hierarchies and all hierarchies included in the remaining associated hierarchical groups except the target associated hierarchical group as a hierarchical set to be determined;
[0227] For each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain the judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment results corresponding to all levels to be judged; wherein, when the judgment result corresponding to the level to be judged indicates that there is at least one level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the first level in the level set to be processed; when the judgment result corresponding to the level to be judged indicates that there is no level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the second level in the level set to be processed;
[0228] Among them, the range of classification results corresponding to the hierarchical level is greater than the range of classification results corresponding to the hierarchical level.
[0229] It can be seen that implementation Figure 4 The described device can determine the level set to be processed according to the judgment result of whether there is at least one level in the associated level group whose level is lower than the independent level when the number of associated level groups is 1; when the number of associated level groups is greater than 1, determine the target associated level group, and determine all independent levels and all levels included in the remaining associated groups except the target associated level group as the level set to be judged; for each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain the judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment result corresponding to each level to be judged, and the classification result range corresponding to the level with a higher level is larger than the classification result range corresponding to the level with a lower level; this can help improve the intelligence of determining the level set to be processed, and can help improve the accuracy of determining the level set to be processed, so as to help improve the accuracy of obtaining the level category labels corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0230] In yet another optional embodiment, Figure 4 As shown, the determination submodule 3032 performs a correction operation on each label corresponding to the first level in the hierarchical classification result in the following manner:
[0231] For each first level in the hierarchical classification result, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level;
[0232] The level of the subsequent adjacent level corresponding to the first level is lower than the first level and is adjacent to the first level;
[0233] When the succeeding adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the original category label corresponding to the succeeding adjacent level corresponding to the first level; when the succeeding adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the succeeding adjacent level corresponding to the first level is the corrected category label corresponding to the succeeding adjacent level corresponding to the first level.
[0234] It can be seen that implementation Figure 4 The described device can perform a correction operation on the category label corresponding to the first level for each first level in the hierarchical classification result based on the category label corresponding to the subsequent adjacent level corresponding to the first level, wherein when the subsequent adjacent level corresponding to the first level is not a level in the level set to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level is the corresponding original category label, and when the subsequent adjacent level corresponding to the first level is a first level in the level set to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level corresponds to the corrected category label. This can help improve the accuracy of performing a correction operation on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level, can help improve the accuracy of the category label corresponding to the corrected first level, and thus can help improve the accuracy of the hierarchical category label corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0235] In yet another optional embodiment, Figure 4 As shown, the determination submodule 3032 performs a correction operation on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level for each first level in the hierarchical classification result, specifically in the following manner:
[0236] Determine the semantic keywords corresponding to the first level;
[0237] Calculating the degree of match between the semantic keyword corresponding to the first level and each keyword included in a preset keyword library, wherein the preset keyword library matches the level corresponding to the first level;
[0238] The highest matching degree is determined from all matching degrees, and a keyword corresponding to the highest matching degree is determined, and the category label corresponding to the first level is corrected according to the keyword corresponding to the highest matching degree.
[0239] It can be seen that implementation Figure 4 The described device can determine the semantic keyword corresponding to the first level and calculate the degree of matching between the semantic keyword and each keyword included in a pre-set keyword library, and the pre-set keyword library matches the hierarchical level corresponding to the first level, determine the highest matching degree and determine the keyword corresponding to the highest matching degree, and correct the label corresponding to the first level according to the keyword corresponding to the highest matching degree, which can help improve the accuracy of correcting the label corresponding to the first level, and can help improve the intelligence of correcting the label corresponding to the first level, so as to help improve the accuracy of obtaining the hierarchical category label corresponding to the text information to be processed, and further can help improve the accuracy of hierarchical classification of information.
[0240] In yet another optional embodiment, Figure 4 As shown, the device also includes:
[0241] An operation module 304 is used to perform a text vectorization operation on the original text information to be processed to obtain an initial text vector before the acquisition module 301 acquires the text information to be processed that needs to be classified;
[0242] The determination module 303 is further used to determine the initial text vector as the text information to be processed;
[0243] The specific method of the operation module 304 performing the text vectorization operation on the original text information to be processed to obtain the initial text vector is as follows:
[0244] Perform a word segmentation operation on the original text information to be processed to obtain a text sequence corresponding to the original text information to be processed, the text sequence including multiple word segmentation results;
[0245] For each word segmentation result, convert the word segmentation result into a word vector corresponding to the word segmentation result, perform a concatenation operation on the word vectors corresponding to all word segmentation results, and obtain a sentence vector corresponding to the original text information to be processed;
[0246] Insert a vector corresponding to a preset marker symbol at the beginning of the sentence vector to update the sentence vector;
[0247] A position encoding vector matching the updated sentence vector is determined, and an initial text vector is generated based on the updated sentence vector and the position encoding vector.
[0248] It can be seen that implementation Figure 4The described device can perform a text vectorization operation on the original text information to be processed to obtain an initial text vector, determine the initial text vector as the text information to be processed, and input the text information to be processed into a pre-set hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result, can perform a text vectorization operation on the original text information to be processed to obtain an initial text vector, can represent the text information to be processed as a series of vectors that can express text semantics, can help improve the efficiency and accuracy of subsequently obtaining the hierarchical classification results of the text information to be processed, and further can help improve the efficiency and accuracy of determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result.
[0249] Embodiment 4
[0250] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another information classification device based on a hierarchical classification model disclosed in an embodiment of the present invention. Figure 5 As shown, the information classification device based on the hierarchical classification model may include:
[0251] A memory 401 storing executable program codes;
[0252] a processor 402 coupled to the memory 401;
[0253] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the information classification method based on the hierarchical classification model described in the first embodiment of the present invention or the second embodiment of the present invention.
[0254] Embodiment 5
[0255] An embodiment of the present invention discloses a computer storable medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps in the information classification method based on the hierarchical classification model described in Embodiment 1 or Embodiment 2 of the present invention.
[0256] Embodiment 6
[0257] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the information classification method based on the hierarchical classification model described in Example 1 or Example 2.
[0258] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0259] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0260] Finally, it should be noted that the information classification method and device based on the hierarchical classification model disclosed in the embodiment of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical scheme of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical schemes described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical schemes from the spirit and scope of the technical schemes of the embodiments of the present invention.
Claims
1. An information classification method based on a hierarchical classification model, characterized in that: The method comprises: Obtain the text information to be processed that needs to be classified; Inputting the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, wherein the hierarchical classification result includes a classification result of each level in a hierarchical set, wherein the hierarchical set includes at least two levels, and different levels correspond to different level identifiers and different levels correspond to different classification result ranges; Determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result; The classification result of each level includes a category label corresponding to each level; Wherein, determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result includes: According to the category labels corresponding to all the levels in the hierarchical classification result, analyzing whether there is a correlation relationship between any two category labels corresponding to the levels, and obtaining an analysis result; When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels have the association relationship, the category labels corresponding to all the levels are determined as the level category labels corresponding to the text information to be processed; When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship, all independent levels are screened out from all the levels, and the level category label corresponding to the text information to be processed is determined according to the level identifier corresponding to each of the independent levels, the level identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels; Wherein, the category label corresponding to each of the independent levels does not have the association relationship with the category label corresponding to any other level in all the levels except the independent level; all the remaining levels are the levels in all the levels except all the independent levels; The step of determining the level category label corresponding to the text information to be processed according to the level identifier corresponding to each of the independent levels, the level identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels includes: According to the analysis result of whether the association relationship exists between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all the associated level groups is greater than or equal to 1; when the number of the associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has the association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one of the associated level groups does not have the association relationship with the category label of any level in the other associated level group; According to the number of all the independent levels and all the associated level groups, determining a level set to be processed from all the levels, wherein the level set to be processed includes all the first levels that meet the category label correction condition and / or all the second levels that meet the deletion condition; When the set of levels to be processed includes the first level, performing a correction operation on each category label corresponding to the first level in the level classification result to update the level classification result; When the set of levels to be processed includes the second level, performing a deletion operation on each of the second levels and the corresponding category labels in the level classification result to update the level classification result; The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
2. The information classification method based on the hierarchical classification model according to claim 1 is characterized in that: The step of determining the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result also includes: When the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not have the association relationship, determining the confidence of the category label corresponding to each level; Filtering out the highest confidence from all the confidences, and determining whether the highest confidence satisfies a preset confidence condition; When it is determined that the highest confidence meets the preset confidence condition, the target category label corresponding to the highest confidence and the target level corresponding to the target category label are determined as the level category label corresponding to the text information to be processed.
3. The information classification method based on the hierarchical classification model according to claim 1 is characterized in that: According to the number of all the independent levels and all the associated level groups, determining a level set to be processed from all the levels, including: When the number of all the associated hierarchical groups is equal to 1, for each of the independent hierarchies, it is determined whether there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, and a determination result corresponding to the independent hierarchical level is obtained; a set of hierarchical levels to be processed is determined according to the determination results corresponding to all the independent hierarchies; wherein, when the determination result corresponding to the independent hierarchical level indicates that there is at least one hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the first hierarchical level in the set of hierarchical levels to be processed; when the determination result corresponding to the independent hierarchical level indicates that there is no hierarchical level lower than the independent hierarchical level in the associated hierarchical group, the independent hierarchical level is the second hierarchical level in the set of hierarchical levels to be processed; When the number of all the associated hierarchical groups is greater than 1, determining the group confidence corresponding to each of the associated hierarchical groups, and selecting a target associated hierarchical group that meets the preset group confidence condition from all the associated hierarchical groups; determining all the independent hierarchies and all the hierarchies included in the remaining associated hierarchical groups except the target associated hierarchical group as a hierarchical set to be determined; For each level to be judged in the level set to be judged, judge whether there is at least one level in the target associated level group whose level is lower than the level to be judged, and obtain a judgment result corresponding to the level to be judged; determine the level set to be processed according to the judgment results corresponding to all the levels to be judged; wherein, when the judgment result corresponding to the level to be judged indicates that there is at least one level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the first level in the level set to be processed; when the judgment result corresponding to the level to be judged indicates that there is no level in the target associated level group whose level is lower than the level to be judged, the level to be judged is the second level in the level set to be processed; Among them, the range of classification results corresponding to the hierarchical level is greater than the range of classification results corresponding to the hierarchical level.
4. The information classification method based on the hierarchical classification model according to claim 3 is characterized in that: The performing a correction operation on each category label corresponding to the first level in the hierarchical classification result includes: For each of the first levels in the hierarchical classification results, a correction operation is performed on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level; The level of the subsequent adjacent level corresponding to the first level is lower than the first level and is adjacent to the first level; When the subsequent adjacent level corresponding to the first level is not a level in the set of levels to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level is the original category label corresponding to the subsequent adjacent level corresponding to the first level; when the subsequent adjacent level corresponding to the first level is a first level in the set of levels to be processed, the category label corresponding to the subsequent adjacent level corresponding to the first level is the corrected category label corresponding to the subsequent adjacent level corresponding to the first level.
5. The information classification method based on the hierarchical classification model according to claim 4 is characterized in that: For each of the first levels in the hierarchical classification results, performing a correction operation on the category label corresponding to the first level based on the category label corresponding to the subsequent adjacent level corresponding to the first level includes: Determine the semantic keywords corresponding to the first level; Calculating the degree of match between the semantic keyword corresponding to the first level and each keyword included in a preset keyword library, wherein the preset keyword library matches the hierarchical level corresponding to the first level; The highest matching degree is determined from all the matching degrees, and a keyword corresponding to the highest matching degree is determined, and the category label corresponding to the first level is corrected according to the keyword corresponding to the highest matching degree.
6. The information classification method based on a hierarchical classification model according to claim 1, characterized in that: Before obtaining the text information to be processed that needs to be classified, the method further includes: Performing a text vectorization operation on the original text information to be processed to obtain an initial text vector, and determining the initial text vector as the text information to be processed; The step of performing a text vectorization operation on the original text information to be processed to obtain an initial text vector includes: Performing a word segmentation operation on the original text information to be processed to obtain a character sequence corresponding to the original text information to be processed, wherein the character sequence includes a plurality of word segmentation results; For each of the word segmentation results, convert the word segmentation result into a word vector corresponding to the word segmentation result, and perform a concatenation operation on the word vectors corresponding to all the word segmentation results to obtain a sentence vector corresponding to the original text information to be processed; Inserting a vector corresponding to a preset marking symbol at the starting position of the sentence vector to update the sentence vector; Determine a position encoding vector that matches the updated sentence vector, and generate an initial text vector based on the updated sentence vector and the position encoding vector.
7. An information classification device based on a hierarchical classification model, characterized in that: The device comprises: An acquisition module is used to acquire the text information to be processed that needs to be classified; An input module, used for inputting the text information to be processed into a preset hierarchical classification model to obtain a hierarchical classification result of the text information to be processed, wherein the hierarchical classification result includes a classification result of each level in a hierarchical set, wherein the hierarchical set includes at least two levels, and different levels correspond to different level identifiers and different levels correspond to different classification result ranges; A determination module, used to determine the hierarchical category label corresponding to the text information to be processed according to the hierarchical classification result; The classification result of each level includes a category label corresponding to each level; The determining module comprises: An analysis submodule, for analyzing whether there is a correlation relationship between any two category labels corresponding to the levels in the hierarchical classification result, and obtaining an analysis result; A determination submodule, configured to determine the category labels corresponding to all the levels as the level category labels corresponding to the text information to be processed when the analysis result indicates that the category labels corresponding to any two of the levels in all the levels have the association relationship; A screening submodule, configured to screen out all independent levels from all the levels when the analysis result indicates that the category labels corresponding to any two of the levels in all the levels do not all have the association relationship; The determination submodule is further used to determine the level category label corresponding to the text information to be processed according to the level identifier corresponding to each of the independent levels, the level identifier corresponding to each of the remaining levels, and the category label corresponding to each of the remaining levels; Wherein, the category label corresponding to each of the independent levels does not have the association relationship with the category label corresponding to any other level in all the levels except the independent level; all the remaining levels are the levels in all the levels except all the independent levels; The determination submodule determines the hierarchical category label corresponding to the to-be-processed text information according to the hierarchical identifier corresponding to each of the independent hierarchies, the hierarchical identifier corresponding to each of the remaining hierarchies, and the category label corresponding to each of the remaining hierarchies in the following manner: According to the analysis result of whether the association relationship exists between the category labels corresponding to all the remaining levels, all the remaining levels are divided into at least one associated level group; the number of all the associated level groups is greater than or equal to 1; when the number of the associated level groups is greater than 1, for the same associated level group, the category label corresponding to any level has the association relationship with the category label corresponding to at least one level in the associated level group, and for any two associated level groups, the category label of any level in one of the associated level groups does not have the association relationship with the category label of any level in the other associated level group; According to the number of all the independent levels and all the associated level groups, determining a level set to be processed from all the levels, wherein the level set to be processed includes all the first levels that meet the category label correction condition and / or all the second levels that meet the deletion condition; When the set of levels to be processed includes the first level, performing a correction operation on each category label corresponding to the first level in the level classification result to update the level classification result; When the set of levels to be processed includes the second level, performing a deletion operation on each of the second levels and the corresponding category labels in the level classification result to update the level classification result; The updated hierarchical classification result is determined as the hierarchical category label corresponding to the text information to be processed.
8. An information classification device based on a hierarchical classification model, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the information classification method based on the hierarchical classification model as described in any one of claims 1-6.
Citation Information
Patent Citations
Method and device for training business model and determining text classification categories
CN111737474A
Bid invitation text classification method and device, storage medium and terminal
CN113688232A