Configurable heterogeneous data classification method based on large model
By using user-defined multi-level classification templates and word vector model vectorization, combined with multimodal large models to extract feature information, the problems of high training cost and poor classification effect in unstructured data classification are solved. Flexible and accurate heterogeneous data classification is achieved, reducing the dependence on labeled data and large models and reducing the illusion phenomenon.
Patent Information
- Application Number
- CN202610072959.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-02-17
AI Technical Summary
Existing technologies require a large amount of labeled data and a cumbersome training process for unstructured data classification. Furthermore, users cannot customize classification templates, resulting in high training costs and poor classification performance. In particular, the classification performance is poor for data with poor metadata quality, and classification based solely on large models is prone to illusion problems.
By receiving user-defined multi-level classification templates, vectorizing them using a word vector model, and extracting feature information from a multimodal large model, input prompt words are constructed to facilitate classification by a large language model. Euclidean distance is used to match classification items, user-defined templates are supported, and classification items and their hierarchical relationships can be dynamically configured through a graphical interface, reducing the dependence on labeled data and large models.
It enables flexible and accurate classification of heterogeneous data, reduces training costs and labeling data requirements, improves classification efficiency and accuracy, reduces illusion phenomena, and supports efficient classification of models with a small number of parameters.
Smart Images

Figure CN121542820A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, and in particular to a configurable heterogeneous data classification method based on a large model. BACKGROUND
[0002] Although the text classification based on a large model can solve the classification under the condition of low metadata quality, and can directly classify without fine-tuning training, most solutions still use annotated data to supervise fine-tuning, which will lead to the need for annotated data, complicated training process, and large overhead; the training process does not cover the illusion problem. The traditional classification method based on NLP and Bert model has the following shortcomings: a large amount of annotated data is needed, the training process is complicated, the classification effect of data types not covered by the training process is poor, and the classification template can only be limited to the annotated data and the classification template used during training, the user cannot customize the template, and the classification effect of data with missing original data labels or insufficient description information is poor.
[0003] Therefore, there is an urgent need for a configurable heterogeneous data classification method based on a large model to solve the classification problem of unstructured data, especially non-text data, to solve the problem that the user cannot customize the classification template or has to re-annotate the data for training every time the classification template is modified, to solve the illusion problem caused by pure large model classification, and to have good classification ability for data with poor data quality and fuzzy metadata description through the reasoning ability of the large model, and to achieve good classification effect with a small amount of model parameters. SUMMARY
[0004] According to the first aspect of the present application, the present application claims a configurable heterogeneous data classification method based on a large model, comprising the following steps: Step S1: receiving a multi-level classification template defined by a user, wherein the multi-level classification template comprises at least one classification item, and a plurality of sub-classification items can be configured under the first classification item; Step S2: using a word vector model to perform vectorization processing on each classification item in the multi-level classification template to generate a classification item vector, and storing all classification item vectors in a vector database; Step S3: extracting feature information of data to be classified by a multi-modal large model to generate structured metadata, wherein the feature information includes data abstract and data features; Step S4: constructing an input prompt word based on a prompt word engineering, wherein the input prompt word comprises the structured metadata and the first classification item in the multi-level classification template; Step S5: Input the input prompt word into the large language model to obtain the primary classification result, calculate the Euclidean distance between the vector of the primary classification result and the classification item vector stored in the vector database, select the classification item with the smallest distance as the primary classification result and save it; Step S6: Query whether there are any sub-categories in the first-level classification result. If there are sub-categories, read the sub-categories and repeat steps S4 to S5 based on the sub-categories until there are no sub-categories. If there are no sub-categories, output the final classification result.
[0005] Furthermore, in step 1, the multi-level classification template is configured through a graphical user interface, supporting the dynamic addition, modification, or deletion of classification items and their hierarchical relationships.
[0006] Furthermore, step S2, which involves vectorizing each category item in the multi-level classification template using a word vector model, also includes the following sub-steps: Sub-step S2.1: Parse the hierarchical structure of the classification template and convert each classification item into a standard text description, wherein the standard text description includes the classification item name and its parent classification item name; Sub-step S2.2: Encode each standard text description using a pre-trained word vector model to generate a high-dimensional vector representation; Sub-step S2.3: Normalize the generated vectors to ensure that all vectors are in the same metric space; Sub-step S2.4: Store the normalized vectors and their corresponding classification item identifiers in the vector database, and establish a fast retrieval index.
[0007] Furthermore, step S3, extracting feature information from the data to be classified using a multimodal large model, also includes the following sub-steps: Sub-step S3.1: Select the corresponding multimodal model branch according to the type of data to be classified, where the type includes text, image, audio or video; Sub-step S3.2: For non-text data, extract low-level features and high-level semantic features. The low-level features include color distribution, texture features or spectral features, and the high-level semantic features include object recognition results, scene description or sentiment tendency. Sub-step S3.3: Combine the extracted features into structured metadata, which is stored in key-value pair format and includes field names and feature values; Sub-step S3.4: For missing or ambiguous metadata fields, use the reasoning capabilities of the multimodal model to complete or clarify them, and generate a complete metadata description.
[0008] Furthermore, in step S4, when constructing input prompt words, the method also includes filtering the primary category items and retaining only the category items whose relevance to the structured metadata is higher than a preset threshold.
[0009] Furthermore, in step S5, the number of parameters used in the large language model does not exceed 32B.
[0010] Furthermore, in step S5, when calculating the Euclidean distance, an approximate nearest neighbor search algorithm is used to accelerate the vector matching process.
[0011] Furthermore, in step S6, when steps S4 to S5 are repeated, the prompt words used in each iteration include the current level's category items and all parent category paths.
[0012] Furthermore, the method also includes step S7: Once the final classification results are output, the metadata, prompts, and classification results of this classification will be stored in the historical database for use in optimizing subsequent prompts.
[0013] Furthermore, in step S6, when outputting the final classification result, the classification confidence score and the matching classification item vector identifier are also output simultaneously.
[0014] This invention proposes a configurable heterogeneous data classification method based on a large model, aiming to achieve flexible and accurate classification of multimodal data. It allows users to customize multi-level classification templates through a graphical interface. A word vector model is used to convert each classification item into vectors and store them in a database to support subsequent similarity matching. For text, image, audio, or video data to be classified, features are extracted using a large multimodal model to generate structured metadata. Combined with prompt word engineering, the metadata and classification items are combined to construct input prompt words, which are then fed into a large language model to obtain preliminary classification results. The best-matching category is determined by calculating the Euclidean distance between the prompt words and the pre-stored vectors. This process iterates along the classification hierarchy until the final result is obtained. This invention effectively supports heterogeneous data classification, reduces dependence on labeled data and large models, and balances classification accuracy, configurability, and efficiency. Attached Figure Description
[0015] Figure 1 A flowchart illustrating the workflow of a configurable heterogeneous data classification method based on a large model, as claimed in an embodiment of the present invention. Figure 2 The second workflow diagram is shown for a configurable heterogeneous data classification method based on a large model, as claimed in an embodiment of the present invention. Figure 3 The third flowchart is a configurable heterogeneous data classification method based on a large model, as claimed in an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0017] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0018] According to the first embodiment of the present invention, referring to Figure 1 This invention claims protection for a configurable heterogeneous data classification method based on a large model, comprising the following steps: Step S1: Receive a user-defined multi-level classification template, wherein the multi-level classification template includes at least one level classification item, and multiple levels of sub-classification items can be configured under the first level classification item; Step S2: Use a word vector model to vectorize each category item in the multi-level classification template to generate a category item vector, and store all category item vectors in a vector database; Step S3: Extract feature information from the data to be classified using a multimodal large model to generate structured metadata, wherein the feature information includes data summary and data features; Step S4: Based on the prompt word engineering, construct input prompt words, which include the structured metadata and the first-level category items in the multi-level classification template; Step S5: Input the input prompt word into the large language model to obtain the primary classification result, calculate the Euclidean distance between the vector of the primary classification result and the classification item vector stored in the vector database, select the classification item with the smallest distance as the primary classification result and save it; Step S6: Query whether there are any sub-categories in the first-level classification result. If there are sub-categories, read the sub-categories and repeat steps S4 to S5 based on the sub-categories until there are no sub-categories. If there are no sub-categories, output the final classification result.
[0019] In this embodiment, a web interface is provided for users to define category templates. Users can create primary categories (such as "Transportation") and add multi-level subcategories (such as "Transportation Facilities" -> "Toll System"). The templates are stored in JSON format and contain fields such as category ID, name, and parent ID.
[0020] Load a pre-trained word vector model (such as Word2Vec or BERT). Iterate through each category in the classification template to generate a text description (such as "Transportation - Transportation Facilities - Toll System"). Encode the description into vectors to generate fixed-dimensional vectors. After L2 normalization, store the vectors in a vector database (such as FAISS or Chroma) and create an index.
[0021] Select a multimodal model based on the data type to be classified (e.g., CLIP for images, Whisper for audio). Feature extraction: For images, extract visual features and semantic labels; for audio, extract keywords after converting to text. Features are organized as structured metadata (JSON format), including fields such as "data_type", "content_summary", and "key_features".
[0022] The prompt template is: "Based on the following metadata {metadata} and first-level category items {category item list}, please determine the most appropriate first-level category." The system retrieves all first-level category items from the category template and filters items with low relevance to the metadata (based on word frequency or semantic similarity).
[0023] Large language models (such as the Qwen model with 7B parameters) receive prompt words and output primary classification results in text format (such as "transportation").
[0024] The initial classification results are encoded into vectors, and the Euclidean distances between the vectors and all vectors in the vector database are calculated. The classification item corresponding to the smallest distance is selected as the first-level classification result. The results are saved to the database.
[0025] Query the category template to check if there are subcategories in the primary category results.
[0026] If there are subcategories (such as "transportation facilities"), update the prompt to: "Based on metadata {metadata} and secondary category items {list of subcategories}, please determine the most suitable secondary category." Repeat the prompt construction, model inference, and vector matching process.
[0027] When there are no subcategories, output the complete category path (e.g., "Transportation -> Transportation Facilities -> Toll Collection System").
[0028] Furthermore, in step 1, the multi-level classification template is configured through a graphical user interface, supporting the dynamic addition, modification, or deletion of classification items and their hierarchical relationships.
[0029] In this embodiment, users create a classification tree by dragging and dropping nodes through a web interface. The system verifies the hierarchical logic in real time to prevent circular dependencies. When the template is modified, the system automatically regenerates vectors and updates the database.
[0030] Furthermore, referring to Figure 2 In step S2, the word vector model is used to vectorize each category item in the multi-level classification template, which also includes the following sub-steps: Sub-step S2.1: Parse the hierarchical structure of the classification template and convert each classification item into a standard text description, wherein the standard text description includes the classification item name and its parent classification item name; Sub-step S2.2: Encode each standard text description using a pre-trained word vector model to generate a high-dimensional vector representation; Sub-step S2.3: Normalize the generated vectors to ensure that all vectors are in the same metric space; Sub-step S2.4: Store the normalized vectors and their corresponding classification item identifiers in the vector database, and establish a fast retrieval index.
[0031] Furthermore, referring to Figure 3 In step S3, extracting feature information from the data to be classified using a multimodal large model further includes the following sub-steps: Sub-step S3.1: Select the corresponding multimodal model branch according to the type of data to be classified, where the type includes text, image, audio or video; Sub-step S3.2: For non-text data, extract low-level features and high-level semantic features. The low-level features include color distribution, texture features or spectral features, and the high-level semantic features include object recognition results, scene description or sentiment. Sub-step S3.3: Combine the extracted features into structured metadata, which is stored in key-value pair format and includes field names and feature values; Sub-step S3.4: For missing or ambiguous metadata fields, use the reasoning capabilities of the multimodal model to complete or clarify them, and generate a complete metadata description.
[0032] Furthermore, in step S4, when constructing input prompt words, the method also includes filtering the primary category items and retaining only the category items whose relevance to the structured metadata is higher than a preset threshold.
[0033] Furthermore, in step S5, the number of parameters used in the large language model does not exceed 32B.
[0034] Furthermore, in step S5, when calculating the Euclidean distance, an approximate nearest neighbor search algorithm is used to accelerate the vector matching process.
[0035] Furthermore, in step S6, when steps S4 to S5 are repeated, the prompt words used in each iteration include the current level's category items and all parent category paths.
[0036] Furthermore, the method also includes step S7: Once the final classification results are output, the metadata, prompts, and classification results of this classification will be stored in the historical database for use in optimizing subsequent prompts.
[0037] Furthermore, in step S6, when outputting the final classification result, the classification confidence score and the matching classification item vector identifier are also output simultaneously.
[0038] In this embodiment, the two major categories of Tongyi Qianwen and Deepseek were connected through the Alibaba Bailian Big Model Base. Referring to Table 1, multiple models, from full-blooded (671B to 7B to quantization model), were tested.
[0039] Through testing with real traffic data, experiments show that after optimization with prompt word engineering, even a small 7B model can achieve good classification results with relatively complete metadata and clear descriptions. However, it is prone to illusion problems. Therefore, the solution that solves the RAG problem solves the illusion problem and enables small models to classify well.
[0040] Table 1. Partial experimental data:
[0041] The specific embodiments of the invention have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to the invention are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.
Claims
1. A configurable heterogeneous data classification method based on a large model, characterized in that, Includes the following steps: Step S1: Receive a user-defined multi-level classification template, wherein the multi-level classification template includes at least one level classification item, and multiple levels of sub-classification items can be configured under the first level classification item; Step S2: Use a word vector model to vectorize each category item in the multi-level classification template to generate a category item vector, and store all category item vectors in a vector database; Step S3: Extract feature information from the data to be classified using a multimodal large model to generate structured metadata, wherein the feature information includes data summary and data features; Step S4: Based on the prompt word engineering, construct input prompt words, which include the structured metadata and the first-level category items in the multi-level classification template; Step S5: Input the input prompt word into the large language model to obtain the primary classification result, calculate the Euclidean distance between the vector of the primary classification result and the classification item vector stored in the vector database, select the classification item with the smallest distance as the primary classification result and save it; Step S6: Query whether there are any sub-categories in the first-level classification result. If there are sub-categories, read the sub-categories and repeat steps S4 to S5 based on the sub-categories until there are no sub-categories. If there are no sub-categories, output the final classification result.
2. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step 1, the multi-level classification template is configured through a graphical user interface, supporting the dynamic addition, modification, or deletion of classification items and their hierarchical relationships.
3. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S2, the word vector model is used to vectorize each category item in the multi-level classification template, which also includes the following sub-steps: Sub-step S2.1: Parse the hierarchical structure of the classification template and convert each classification item into a standard text description, wherein the standard text description includes the classification item name and its parent classification item name; Sub-step S2.2: Encode each standard text description using a pre-trained word vector model to generate a high-dimensional vector representation; Sub-step S2.3: Normalize the generated vectors to ensure that all vectors are in the same metric space; Sub-step S2.4: Store the normalized vectors and their corresponding classification item identifiers in the vector database, and establish a fast retrieval index.
4. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S3, extracting feature information from the data to be classified using a multimodal large model also includes the following sub-steps: Sub-step S3.1: Select the corresponding multimodal model branch according to the type of data to be classified, where the type includes text, image, audio or video; Sub-step S3.2: For non-text data, extract low-level features and high-level semantic features. The low-level features include color distribution, texture features or spectral features, and the high-level semantic features include object recognition results, scene description or sentiment tendency. Sub-step S3.3: Combine the extracted features into structured metadata, which is stored in key-value pair format and includes field names and feature values; Sub-step S3.4: For missing or ambiguous metadata fields, use the reasoning capabilities of the multimodal model to complete or clarify them, and generate a complete metadata description.
5. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S4, when constructing input prompt words, the method also includes filtering the primary category items and retaining only the category items whose relevance to the structured metadata is higher than a preset threshold.
6. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S5, the number of parameters used in the large language model does not exceed 32B.
7. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S5, when calculating the Euclidean distance, an approximate nearest neighbor search algorithm is used to accelerate the vector matching process.
8. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S6, when steps S4 to S5 are repeated, the prompt words used in each iteration include the current level's category items and all parent category paths.
9. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, It also includes step S7: Once the final classification results are output, the metadata, prompts, and classification results of this classification will be stored in the historical database for use in optimizing subsequent prompts.
10. The configurable heterogeneous data classification method based on a large model as described in claim 1, characterized in that, In step S6, when outputting the final classification result, the classification confidence score and the matching classification item vector identifier are also output simultaneously.
Citation Information
Patent Citations
Text classification method and device based on large language model
CN117609493A
Text classification method, device and system based on large language model, storage medium and product
CN119647408A
Heterogeneous data conversion method and system based on multi-modal large model
CN120973851A
Government affair intelligent interaction and information extraction method and device, equipment and medium
CN120996013A
Multimodal data heterogeneous transformer-based asset recognition method, system, and device
US12236699B1