Method and device for content classification and computing equipment

CN121925653APending Publication Date: 2026-04-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2024-07-12
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Generative models face challenges in content classification tasks, such as unclear, vague, or ambiguous user input prompts leading to poor classification results, and a lack of sufficient supervised learning data resulting in insufficient classification accuracy.

Method used

By utilizing external knowledge bases to generate samples, high-quality prompt words are automatically constructed and combined with the target content to be categorized to achieve accurate content classification.

Benefits of technology

It improves the accuracy and effectiveness of generative models in content classification, especially when user input is insufficient or the topic is unclear, and can generate accurate classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121925653A_ABST
    Figure CN121925653A_ABST
Patent Text Reader

Abstract

The invention provides a content classification method and device, computing equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: generating a sample of a classification task based on a knowledge base injected into a generative model and user input, wherein the knowledge base comprises knowledge documents related to cue word generation; on the basis of the sample and the to-be-classified target content, a prompt word used for classifying the target content is constructed; and determining the category of the target content based on the cue word. In this way, according to the technical scheme disclosed by the invention, the sample can be generated based on the user intention by utilizing the external knowledge base of the generative model, and the high-quality cue word capable of being used for the generative model is automatically generated in combination with the to-be-classified target content, so that accurate content classification is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus and computing devices for content classification Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method, apparatus, computing device, computer-readable storage medium, and computer program product for content classification. Background Technology

[0002] Generative models are a class of machine learning models that learn the inherent patterns and distributions of data to generate new data samples similar to the training data. The development of generative models has progressed from early simple applications based on probabilistic graphical models to recent breakthroughs in complex deep learning models such as GANs (Generative Adversarial Networks) and Transformers. With the continuous advancement of deep learning technology, generative models can handle more complex data distributions and generate higher-quality, more realistic data samples. They are widely used in various fields such as image generation, text creation, audio synthesis, and content classification, demonstrating powerful generative capabilities and broad application prospects.

[0003] A prompt is input text used to guide a generative model in producing specific outputs. When using a generative model, a prompt is typically a phrase or sentence that describes the topic, style, or other characteristics of the content the user wants to generate. Prompts are crucial to the output quality of the generative model.

[0004] Summary of the Invention

[0005] This disclosure provides a method, apparatus, computing device, computer-readable storage medium, and computer program product for content classification using a generative model. It can generate examples based on user intent using an external knowledge base and automatically generate high-quality prompt words that can be used in a generative model in combination with the target content to be classified, thereby achieving accurate content classification.

[0006] According to a first aspect of this disclosure, a method for content classification is provided, comprising: generating examples for a classification task based on a knowledge base injected into a generative model and user input, the knowledge base including knowledge documents related to the generation of prompt words; constructing prompt words for classifying the target content based on the examples and the target content to be classified; and determining the category of the target content based on the prompt words.

[0007] According to a second aspect of this disclosure, an apparatus for content classification is provided, comprising: a sample generation unit configured to generate samples for a classification task based on a knowledge base injected into a generative model and user input, the knowledge base including knowledge documents related to prompt word generation; a prompt word construction unit configured to construct prompt words for classifying the target content based on the samples and the target content to be classified; and a content category determination unit configured to determine the category of the target content based on the prompt words.

[0008] According to a third aspect of this disclosure, a computing device is provided, comprising: at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform the method as described in the first aspect of this disclosure.

[0009] According to a fourth aspect of this disclosure, a non-transient computer storage medium is provided, including machine-executable instructions that, when executed by a device, cause the device to perform the method as described in the first aspect of this disclosure.

[0010] According to a fifth aspect of this disclosure, a computer program product is provided, including machine-executable instructions that, when executed by a device, cause the device to perform the method as described in the first aspect of this disclosure.

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

[0012] The above and other objects, features, and advantages of embodiments of the present disclosure will become more readily understood from the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the present disclosure will be described by way of example and non-limitation, wherein:

[0013] Figure 1 illustrates a schematic diagram of an environment in which various embodiments of the present disclosure can be implemented;

[0014] Figure 2 shows a flowchart of a method for content classification according to an embodiment of the present disclosure;

[0015] Figure 3 shows a schematic block diagram of a system for content classification according to an embodiment of the present disclosure;

[0016] Figure 4 shows a schematic block diagram of guiding a user to perform a second user input according to an embodiment of the present disclosure;

[0017] Figure 5 shows a schematic flowchart of whether a user confirms the validity of a sample according to an embodiment of the present disclosure;

[0018] Figure 6 shows a schematic flowchart of unrestricted clustering according to an embodiment of the present disclosure;

[0019] Figure 7 shows a schematic block diagram of model distillation according to an embodiment of the present disclosure;

[0020] Figure 8 shows a schematic block diagram of an apparatus for content classification according to an embodiment of the present disclosure; and

[0021] Figure 9 shows a block diagram of a device capable of implementing several embodiments of the present disclosure. Detailed Implementation

[0022] The concept of this disclosure will now be described with reference to various exemplary embodiments shown in the accompanying drawings. It should be understood that these embodiments are described merely to enable those skilled in the art to better understand and further implement this disclosure, and are not intended to limit the scope of this disclosure in any way. It should be noted that similar or identical reference numerals may be used in the figures where feasible, and similar or identical reference numerals may denote similar or identical elements. Those skilled in the art will understand that alternative embodiments of the structures and / or methods described herein may be employed without departing from the principles and concept of this disclosure as described below.

[0023] In the context of this disclosure, the term "comprising" and its various variations may be understood as open-ended terms meaning "including but not limited to"; the term "based on" may be understood as "at least partially based on"; the term "one embodiment" may be understood as "at least one embodiment"; and the term "another embodiment" may be understood as "at least one other embodiment". Other terms that may appear but are not mentioned herein should not be interpreted or limited in a manner contrary to the concept on which the embodiments of this disclosure are based, unless expressly stated otherwise.

[0024] Currently, with the continuous advancement of deep learning technology, generative models are able to handle more complex data distributions and generate higher quality and more realistic data samples. They are widely used in many fields such as image generation, text creation, audio synthesis, and content classification, demonstrating powerful generative capabilities and broad application prospects.

[0025] While generative models can handle complex text data, automatically extract features, and generate high-quality classification results in content classification tasks, they also face some challenges. For example, with certain complex text data, if the prompts input by the user are not clear, specific, or ambiguous, the generative model may struggle to accurately understand the user's intent, leading to poor classification results. Furthermore, content classification often requires a large amount of supervised learning data, but in real-world business scenarios, there is often insufficient labeled data to support accurate classification by generative models.

[0026] To address or mitigate the aforementioned problems and / or other potential issues, embodiments of this disclosure propose a method for content classification. This method achieves accurate content classification by leveraging an external knowledge base to generate examples based on user intent and automatically generating high-quality prompts that can be used in generative models, in conjunction with the target content to be classified.

[0027] The basic principles and implementation of this disclosure are illustrated below with reference to the accompanying drawings. It should be understood that the exemplary embodiments given are merely intended to enable those skilled in the art to better understand and implement the embodiments of this disclosure, and are not intended to limit the scope of this disclosure in any way.

[0028] Figure 1 illustrates a block diagram of a computing device 100 capable of implementing various implementations of the present disclosure. It should be understood that the computing device 100 shown in Figure 1 is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described in this disclosure. As shown in Figure 1, components of the computing device 100 may include, but are not limited to, one or more processors or processing units 110, memory 120, storage devices 130, one or more communication units 140, one or more input devices 150, and one or more output devices 160.

[0029] In some implementations, computing device 100 can be implemented as various user terminals or service terminals with computing capabilities. Service terminals can be servers, large computing devices, etc., provided by various service providers. User terminals can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, sites, units, devices, multimedia computers, multimedia tablets, internet nodes, communicators, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof. It is also foreseeable that computing device 100 can support any type of user-facing interface (such as "wearable" circuitry).

[0030] Processing unit 110 can be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 120. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of computing device 100. Processing unit 110 may also be referred to as a central processing unit (CPU), graphics processing unit (GPU), microprocessor, controller, or microcontroller.

[0031] Computing device 100 typically includes multiple computer storage media. Such media can be any available media accessible to computing device 100, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 120 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Memory 120 may include an auto-completion generator 122 implemented as a program module, which can be configured to perform the content classification functions described herein. The auto-completion generator 122 can be accessed and run by processing unit 110 to implement the corresponding functions.

[0032] Storage device 130 may be a removable or non-removable medium and may include machine-readable media capable of storing information and / or data and accessible within computing device 100. Computing device 100 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in Figure 1, disk drives for reading from or writing to removable, non-volatile disks and optical disk drives for reading from or writing to removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces.

[0033] The communication unit 140 enables communication with other computing devices via a communication medium. Additionally, the functionality of the components of the computing device 100 can be implemented as a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the computing device 100 can operate in a networked environment using logical connections to one or more other servers, personal computers (PCs), or another general network node.

[0034] Input device 150 can be one or more various input devices, such as a mouse, keyboard, trackball, touchscreen, voice input device, etc. Output device 160 can be one or more output devices, such as a monitor, speaker, printer, etc. Computing device 100 can also communicate as needed with one or more external devices (not shown) via communication unit 140. These external devices, such as storage devices, display devices, etc., can communicate with one or more devices that enable user interaction with computing device 100, or with any device (e.g., network card, modem, etc.) that enables computing device 100 to communicate with one or more other computing devices. Such communication can be performed via input / output (I / O) interface (not shown).

[0035] In some implementations, in addition to being integrated into a single device, some or all of the components of computing device 100 may be configured in the form of a cloud computing architecture. In a cloud computing architecture, these components can be remotely deployed and can work together to achieve the functionality described herein. In some implementations, cloud computing provides computing, software, data access, and storage services without requiring end users to know the physical location or configuration of the systems or hardware providing these services. In various implementations, cloud computing provides services over a wide area network (such as the Internet) using appropriate protocols. For example, cloud computing providers offer applications over a wide area network, and these applications can be accessed through a web browser or any other computing component. The software or components of the cloud computing architecture, along with the corresponding data, may be stored on servers at remote locations. Computing resources in a cloud computing environment may be consolidated at remote data center locations or they may be distributed. Cloud computing infrastructure can provide services through shared data centers, even if they appear as a single access point for users. Therefore, the components and functionality described herein can be provided from service providers at remote locations using a cloud computing architecture. Alternatively, they may also be provided from traditional servers, or they may be installed directly or otherwise on client devices.

[0036] Computing device 100 can perform content classification according to various implementations of this disclosure. For example, computing device 100 can receive user input via input device 150, whereby the user input may be a piece of text, speech, or video containing speech provided by the user to be classified. Alternatively, computing device 100 can also read user input from storage device 130 or receive user input from other devices via communication device 140. Furthermore, input device 150 can also receive examples of content classification provided by the user, such as rules indicating the user's desired content classification. Computing device 100 can transmit the user input to auto-completion generator 122. Auto-completion generator 122 can classify the content to be classified based on the user input and the examples of content classification to obtain a classification result. The classification result may be a category from a candidate category set defined in the user input, or a category obtained through clustering.

[0037] For example, user input can include text content to be classified for a classification task, which can be text in various languages, such as Chinese and English. Alternatively, user input can be an audio / video clip containing speech to be classified; in this case, speech recognition technology can be used to convert the speech portion of the audio / video clip into text before the content classification operation. Users can also provide samples for the classification task.

[0038] For example, a sample user input is text to be categorized related to the topic of skiing, including a title and keywords, as shown below:

[0039] And examples provided by users:

[0040] Accordingly, the final classification result is as follows:

[0041] According to embodiments of this disclosure, even when the user input is content on other topics or the number of provided samples is small, an accurate content category can still be obtained, and it is not limited to the topic and number of samples entered by the user.

[0042] The technical solutions described above are for illustrative purposes only and are not intended to limit the invention. To explain the principles of the above solutions more clearly, the content classification process will be described in more detail below with reference to Figure 2.

[0043] Figure 2 illustrates a flowchart of a method 200 for content classification according to some embodiments of the present disclosure. In some embodiments, method 200 may be implemented by, for example, the computing device 100 shown in Figure 1. More specifically, method 200 may be implemented by the auto-prompt generator 122 of Figure 1. It should be understood that method 200 may also include additional actions not shown and / or actions shown may be omitted, and the scope of the present disclosure is not limited in this respect.

[0044] For ease of explanation, method 200 will be described with reference to FIG3. FIG3 shows a schematic block diagram 300 of the framework of an auto-completion generator 303 according to an embodiment of the present disclosure. The auto-completion generator 303 is an example implementation of the auto-completion generator 122 of FIG1. ​​It should be noted that the auto-completion generator 303 shown in FIG3 is only schematic, and method 200 can also be implemented by different systems or frameworks. For example, some modules can be omitted or changed, and it is not limited to the framework shown in FIG3.

[0045] As shown in Figure 2, in box 210, computing device 100 generates examples for a classification task based on a knowledge base injected into the generative model and user input. The knowledge base includes knowledge documents related to prompt word generation. Generative models aim to generate new samples or simulate real-world scenarios by learning the distribution and latent structure of data. In some embodiments, the generative model may be a Large Language Model (LLM). This disclosure does not limit the types of generative models.

[0046] As mentioned above, cue words used to guide the output of generative models refer to the input text paragraphs or phrases. These can be questions, text descriptions, dialogues, or any form of text input. Cue words play a crucial role in generative models because they help the model better understand user intent and generate appropriate output text based on the provided context and semantic information.

[0047] A knowledge base is a system or platform for storing, managing, and providing knowledge. It contains a large amount of structured or unstructured information to support various intelligent applications and services. Knowledge bases can be injected into generative models such as LLM to enhance the model's knowledge understanding and generation capabilities. In terms of prompt word generation, a knowledge base can provide background knowledge and information related to specific topics or tasks, helping large language models generate more accurate and meaningful prompt words. Optionally, the knowledge base can be a document-based database; this disclosure does not impose any limitations on this.

[0048] As shown in Figure 3, the knowledge base 301 can be injected into the auto-prompt generator 303 via the knowledge base configuration unit 302. In this application, the auto-prompt generator 303 can be considered as an example implementation of a generative model. In some embodiments, the computing device 100 can first segment and encode the knowledge documents related to prompt generation into a vector library, and then inject this vector library into the auto-prompt generator 303 as the knowledge base 301. Segmenting the knowledge documents, encoding them into a vector library, and then injecting it into the generative model can help the generative model better understand and utilize the knowledge in these documents.

[0049] Optionally, a segmentation method can be adopted based on specific needs and data characteristics. For example, the knowledge document can be segmented into units of different sizes, such as sentences, paragraphs, or chapters. Before encoding the segmented knowledge document into vectors, the text can be preprocessed, including stop word removal, stemming, lemmatization, and punctuation removal. These steps help reduce the dimensionality and complexity of the vectors and improve the accuracy of subsequent steps.

[0050] In some embodiments, encoding segmented text into vectors can be achieved using word embedding techniques, such as Word2Vec, GloVe, or FastText. Word embeddings map words or phrases to vectors in a high-dimensional space, where similar words or phrases are located close to each other in the vector space. Optionally, for sentences or paragraphs, sentence embeddings or document embeddings can be used to generate vector representations of the entire text unit, rather than based on just a single word; for example, the output representations of the BERT, RoBERTa, and GPT series. Optionally, the vector library can be a simple key-value pair store (where the key is an identifier for the text unit and the value is the corresponding vector) or a more complex database or index structure for efficient retrieval and querying. This disclosure does not impose specific limitations on the method of text vectorization or the type of vector library.

[0051] As shown in Figure 3, user input 304 can be provided to the auto-prompt word generator 303 to generate sample 305. In some embodiments, user input 304 may include a first user input and a second user input. The first user input may indicate the intent of the classification task. For example, the first user input may be:

[0052] The auto-prompt generator 303 can utilize a knowledge base to first determine the paradigm of a sample based on the first user input. This paradigm can indicate the format of the input and output for the classification task. For example, based on the exemplary first user input described above, the auto-prompt generator 303 can determine the paradigm of the following sample:

[0053] In some embodiments, after receiving the first user input, the auto-prompt generator 303 may attempt to guide the user to provide a second user input through dialogue. Figure 4 shows a schematic block diagram of guiding a user to provide a second user input according to an embodiment of the present disclosure. As shown in Figure 4, the user guidance interface 400 may include a prompt, an input box 401, and a button 402. The user can enter the second user input in the input box 401 according to the prompt, and then click the button 402 to send it to the auto-prompt generator 303. The second user input may include sample content conforming to the above paradigm. For example, based on the exemplary first user input described above, the second user input may be:

[0054] Returning to Figure 3, the auto-suggestion generator 303 can utilize a knowledge base to generate a final example based on the second user input. For example, based on the aforementioned exemplary first and second user inputs, the final generated example could be:

[0055] In some embodiments, the user may provide only a small amount of sample content conforming to the paradigm in the second user input. In this case, the auto-suggestion generator 303 can use a knowledge base to generalize the second user input to generate expanded sample content to obtain the final example. For example, the second user input may only provide one sample content conforming to the paradigm:

[0056] The auto-suggestion generator 303 can then utilize knowledge from relevant domains in the knowledge base to obtain generalized extended sample content:

[0057] Referring again to Figure 2, in box 220, computing device 100 constructs prompts for classifying the target content based on the sample and the target content to be classified. As shown in Figure 3, sample 305 can be provided to automatic prompt generator 303 to obtain complete prompts 306. For example, the target content to be classified is:

[0058] Combining the examples obtained from the generalized extended sample content above, we can obtain the final complete prompt words:

[0059] In some embodiments, as shown in FIG3, the auto-prompt generator 303 can obtain a sample result 307 using sample content and obtain user feedback on the sample result 307. In response to user feedback confirming that the classification result of the sample content is acceptable, the auto-prompt generator 303 can determine to use the sample to generate subsequent prompts for the classification task; in response to user feedback confirming that the classification result of the sample content is unacceptable, the auto-prompt generator 303 can guide the user to provide new user input to obtain a new sample for generating new prompts 306.

[0060] Figure 5 illustrates a schematic flowchart of user confirmation of sample validity according to an embodiment of the present disclosure. As shown in Figure 5, the auto-prompt generator 303 can generate several sample results 501 based on the current sample. Based on the sample results, the user can confirm whether the sample is valid 502. If the user confirms it is valid, the auto-prompt generator 303 can continue to generate prompts based on the sample; if the user confirms it is invalid, the auto-prompt generator 303 can guide the user to provide a new sample 503.

[0061] Referring back to Figure 3, in some embodiments, the prompt word 306 can also indicate that the category of the target content is selected from one or more candidate category tag sets, or is a clustering tag. For example, a candidate category tag set can be added when constructing the prompt word 306. An exemplary prompt word 306 with a candidate category tag set is as follows:

[0062] Referring again to Figure 2, in box 230, the computing device 100 determines the category of the target content based on the prompt words. As shown in Figure 3, after user feedback confirms its suitability, the prompt word 306 can be provided to the automatic prompt word generator 303 to obtain the classification result 308. Optionally, the classification result 308 can be one or more tags from a user-preset set of candidate category tags, and output in the form of a data table.

[0063] In some embodiments, when generating paradigms, examples, and prompts, the automatic prompt generator 303 can retrieve the most relevant text content (e.g., based on similarity of vector representations) in the knowledge base 301 and provide the retrieved most relevant text content as part of the input to the generative model, thereby guiding the generative model to output paradigms, examples, and prompts.

[0064] Continuing with the example above, the prompt words 306 with the candidate category label set are provided to the automatic prompt word generator 303 (i.e., the generative model), resulting in the following classification results:

[0065] Optionally, the classification result 308 can also be an unlimited set of cluster labels. Since unlimited clustering ultimately generates long-tail data, causing the clustering result to lose its intended meaning and fail to effectively reflect the inherent structure or pattern of the content data, further simplification and merging of the classification result 308 is necessary. In some embodiments, the computing device 100 can determine an initial set of cluster labels based on the frequency of the cluster labels, and then merge cluster labels that do not belong to the initial set into the initial set based on the similarity of the semantic information of the cluster labels, to form a simplified set of cluster labels.

[0066] Figure 6 illustrates a schematic flowchart of unrestricted clustering according to an embodiment of the present disclosure. As shown in Figure 6, the auto-prompt generator 303 can first perform large-sample label generation 601. Based on the classification results, the auto-prompt generator 303 can count the Top N cluster labels with the highest frequency in the classification results to obtain an initial cluster label set 603. Optionally, the Top N cluster labels can be stored in the initial cluster label set 603 in vector form, wherein the vectorization process can employ word vector embedding technology. In some embodiments, the cosine similarity of word vectors can also be used to initially merge overly similar labels among the Top N cluster labels before adding them to the initial cluster label set 603.

[0067] After obtaining the initial cluster label set 603, the auto-suggestion generator 303 can determine whether the remaining long-tail cluster labels are similar to the labels in the initial cluster label set 603 based on the similarity (e.g., cosine similarity of word vectors) between the remaining long-tail cluster labels and the labels in the initial cluster label set 603. If similar, the long-tail cluster label is merged into the initial cluster label set 603 to finally obtain a simplified cluster label set 604. Thus, the auto-suggestion generator 303 will only provide a limited number of cluster labels.

[0068] Referring back to Figure 3, in some embodiments, the computing device 100 can also obtain multiple models through model distillation based on the obtained classification result 308, where each model corresponds to a category, and then use the obtained multiple models to perform content classification. Model distillation, also known as small model distillation, is a technique that transfers knowledge from a large neural network model (often called a "teacher model") to a small neural network model (often called a "student model"), aiming to improve the inference speed of the model by reducing the number of model parameters and computational complexity, while maintaining or approaching the performance of the teacher model. In content classification tasks, model distillation helps improve the quality and accuracy of data, thereby improving the performance of the classification model.

[0069] Figure 7 shows a schematic block diagram of model distillation according to an embodiment of the present disclosure. As shown in Figure 7, the classification result 308 contains n labels. The computing device 100 can provide a student model 701 for each label and use the output of the generative model and intermediate layer output of the present disclosure to guide the training of the student model 701. For example, model 1 701-1 is provided for label 1, model 2 701-2 is provided for label 2, and so on. For the general length of the input text for the content classification task, student models 701 can be built using stacks of 3x, 6x, and 9x Transformer Encoders respectively. Optionally, the computing device 100 can input the content to be classified into each trained student model 701, and then determine the final content category based on the score of the content to be classified by each student model 701.

[0070] Figure 8 shows a schematic block diagram of an apparatus 800 for content classification according to an embodiment of the present disclosure. The apparatus 800 can be implemented in, for example, an auto-prompt generator 122 in a computing device 100 shown in Figure 1. As shown in Figure 8, the apparatus 800 includes: a sample generation unit 810, a prompt construction unit 820, and a content category determination unit 830.

[0071] The example generation unit 810 can be configured to generate examples for the classification task based on a knowledge base injected into the generative model and user input. The knowledge base includes knowledge documents related to prompt word generation. The prompt word construction unit 820 can be configured to construct prompt words for classifying the target content based on the examples and the target content to be classified. The content category determination unit 830 can be configured to determine the category of the target content based on the prompt words.

[0072] It should be noted that the additional actions or steps shown in Figures 2 to 7 can be implemented by the device 800 shown in Figure 8. For example, the device 800 may include more modules or units to implement the actions or steps described above, or some of the units or modules shown in Figure 8 may be further configured to implement the actions or steps described above. This will not be repeated here.

[0073] Figure 9 shows a schematic block diagram of an example device 900 that can be used to implement embodiments of the present disclosure. As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 902 or loaded from a storage unit 906 into a random access memory (RAM) 903. Various programs and data required for the operation of the device 900 may also be stored in the RAM 903. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0074] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0075] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as method 200. For example, in some embodiments, method 200 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform method 200 by any other suitable means (e.g., by means of firmware).

[0076] In some embodiments, the methods and processes described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure.

[0077] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0078] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.

[0079] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​and conventional procedural programming languages. The computer-readable program instructions may execute entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0080] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0081] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0082] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

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

Claims

1. A method for content classification, comprising: Examples of classification tasks are generated based on a knowledge base injected into the generative model and user input, wherein the knowledge base includes knowledge documents related to prompt word generation; Based on the example and the target content to be classified, construct prompt words for classifying the target content; as well as Based on the prompt words, the category of the target content is determined.

2. The method according to claim 1, further comprising: The relevant knowledge documents generated from the prompt words are segmented and encoded into a vector library; as well as The vector library is injected into the generative model to form the knowledge base.

3. The method of claim 1, wherein generating examples of the classification task based on the knowledge base injected into the generative model and user input comprises: Based on the knowledge base and the first user input indicating the intent of the classification task, the paradigm of the sample is determined; as well as The sample is generated based on the knowledge base, the paradigm, and the second user input, wherein the second user input includes sample content that conforms to the paradigm.

4. The method of claim 3, wherein the paradigm indicates the format of the inputs and outputs for the classification task.

5. The method of claim 3, wherein generating the sample comprises: Based on the knowledge base and the second user input, extended sample content is generated as the example.

6. The method of claim 1, wherein the prompt word indicates that the category of the target content is selected from one or more candidate category tags, or is a clustering tag.

7. The method according to claim 1, further comprising: Obtain user feedback on the category of the target content; as well as In response to the feedback confirming that the category is qualified, it is determined that the example will be used to generate subsequent prompt words for the classification task.

8. The method according to claim 7, further comprising: In response to the feedback confirming that the category is unqualified, the samples for the classification task are regenerated. example.

9. The method according to claim 1, further comprising: The generative model performs the classification task on the content set to obtain the clustering label for each content. as well as By merging the clustering labels, a simplified set of clustering labels is generated.

10. The method of claim 9, wherein merging the clustering labels comprises: Based on the frequency of the clustering labels, an initial set of clustering labels is determined; as well as Based on the similarity of the semantic information of the clustering labels, clustering labels that do not belong to the initial clustering label set are merged into the initial clustering label set to form the simplified clustering label set.

11. The method according to claim 1, further comprising: Based on the classification results of a set of content obtained by performing the classification task based on the generative model, multiple models are obtained through model distillation, where each model corresponds to a category; as well as The classification task is performed using the aforementioned multiple models.

12. A system for content classification, comprising: The example generation unit is configured to generate examples for the classification task based on a knowledge base injected into the generative model and user input, wherein the knowledge base includes knowledge documents related to prompt word generation; The prompt word construction unit is configured to construct prompt words for classifying the target content based on the example and the target content to be classified; as well as The content category determination unit is configured to determine the category of the target content based on the prompt words.

13. A computing device, comprising: At least one processing unit; At least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the computing device to perform the method as described in any one of claims 1 to 11.

14. A computer storage medium comprising machine-executable instructions that, when executed by a device, cause the device to perform the method as claimed in any one of claims 1 to 11.

15. A computer program product comprising machine-executable instructions that, when executed by a device, cause the device to perform the method as described in any one of claims 1 to 11.