Text classification method and device based on generative large model, storage medium and refrigeration equipment system
By dynamically selecting corpus examples using a generative large model and employing multiple prompting strategies, the problem of low text classification accuracy in application scenarios such as smart refrigerators is solved, achieving efficient text classification results.
Patent Information
- Application Number
- CN202411173169.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, text classification methods based on deep learning models struggle to provide a sufficient number and variety of training samples for applications such as smart refrigerators, resulting in low text classification accuracy and poor classification performance.
A generative large model is adopted. By acquiring the text to be classified, a candidate corpus sample set is determined from the existing corpus sample library. Candidate corpus samples with multiple prompting strategies are selected, and the generative large model is used to classify the text. Corpus samples are dynamically selected and prompt word information is generated by combining multiple prompting strategies.
It improves the accuracy and flexibility of text classification, is applicable to various text classification scenarios, and achieves accurate classification based on a small number of samples.
Smart Images

Figure CN121597832A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of text classification technology, and in particular relates to a text classification method, apparatus, storage medium and cooling equipment system based on a generative large model. Background Technology
[0002] The continuous development of technologies such as artificial intelligence has increased the speed of product iteration and updates for enterprises, and the artificial intelligence of home appliances has gradually become the mainstream development trend.
[0003] Human-like smart refrigerators are no longer limited to the single task of storage in daily family life. They are constantly making breakthroughs in vision and voice, integrating question-and-answer systems into the product to provide comprehensive services to users. Smart refrigerators can handle various downstream tasks in the natural language domain. Text classification is a common downstream task handled by smart refrigerators. For example, smart refrigerators and users can achieve various human-computer interaction scenarios such as intelligent retrieval, intelligent recommendation, and intelligent question answering through multimodal data methods such as text, voice, and images. These are all closely related to text generation and classification methods, making text generation and classification a key part of the application of artificial intelligence technology.
[0004] Accurate text classification enables users to find the information they need faster and more accurately. Currently, a common text classification method involves supervised learning training of deep learning models (such as BERT) using a large amount of scene-related corpus, and then classifying the text based on the trained deep learning model. However, this deep learning-based text classification method has strict requirements for training samples. With the increasing variety of applications for smart refrigerators, it is difficult to provide a sufficient number and diversity of training samples, resulting in poor model training performance, low text classification accuracy, and poor classification results. Summary of the Invention
[0005] This application aims to address at least one of the technical problems existing in the prior art. To this end, this application proposes a text classification method, apparatus, storage medium, cooling equipment system, and computer program product based on a generative large model, which can improve the accuracy of text classification and achieve good text classification results.
[0006] Firstly, this application provides a text classification method based on a generative large model, including:
[0007] Get the text to be categorized;
[0008] Based on the text to be classified, a candidate corpus sample set is determined from the created corpus sample library;
[0009] Select at least one candidate corpus example from the candidate corpus example set for each of the multiple prompting strategies;
[0010] Based on the aforementioned prompting strategy and the selected corresponding candidate corpus examples, the text to be classified is classified using a generative large model.
[0011] In some embodiments, determining a candidate corpus sample set from an existing corpus sample library based on the text to be classified includes:
[0012] Vectorize the text to be classified and each corpus sample in the created corpus sample library;
[0013] The similarity between the text to be classified and each of the corpus examples is calculated based on the vectorization results.
[0014] All corpus examples with a similarity greater than a preset threshold are selected as candidate corpus examples to obtain a candidate corpus example set.
[0015] In some embodiments, selecting at least one candidate corpus example corresponding to each of multiple prompting strategies from the candidate corpus example set includes:
[0016] Determine the number of sample configurations corresponding to each of the multiple prompting strategies;
[0017] Select the candidate corpus examples from the candidate corpus example set, the number of which is equal to the number of corresponding example configurations, as the candidate corpus examples corresponding to the corresponding prompting strategy.
[0018] In some embodiments, classifying the text to be classified using a generative large model based on the prompting strategy and selected corresponding candidate corpus examples includes:
[0019] Based on the text to be classified, the prompting strategy, and the corresponding selected candidate corpus use cases, generate prompt word information corresponding to each prompting strategy;
[0020] The classification result of the text to be classified is determined based on the different responses of the generative large model under different prompt word information.
[0021] In some embodiments, determining the classification result of the text to be classified based on the different responses of the generative large model under different cue word information includes:
[0022] Each of the aforementioned prompt words is repeatedly input into the generative large model multiple times to obtain multiple model response results corresponding to the corresponding prompt words.
[0023] Based on a competition-style analysis, determine whether there is a winning result among all the model response results;
[0024] The classification result of the text to be classified is determined based on the analysis results.
[0025] In some embodiments, determining the classification result of the text to be classified based on the analysis results includes:
[0026] When the analysis results indicate the existence of a superior result, the superior result is used as the classification result of the text to be classified.
[0027] When the analysis results indicate that there is no winning result, candidate corpus samples are reselected from the candidate corpus sample set, and the process returns to the step of generating prompt word information corresponding to each prompt strategy based on the text to be classified, the prompt strategy, and the corresponding selected candidate corpus use cases.
[0028] Secondly, this application provides a text classification device based on a generative large model, comprising:
[0029] The acquisition unit is used to acquire the text to be classified.
[0030] The determining unit is used to determine a candidate corpus sample set from the created corpus sample library based on the text to be classified;
[0031] The selection unit is used to select at least one candidate corpus sample corresponding to each of the multiple prompting strategies from the candidate corpus sample set;
[0032] The classification unit is used to classify the text to be classified using a generative large model based on the prompting strategy and the selected corresponding candidate corpus examples.
[0033] In some embodiments, the determining unit is specifically used for:
[0034] Vectorize the text to be classified and each corpus sample in the created corpus sample library;
[0035] The similarity between the text to be classified and each of the corpus samples is calculated based on the vectorization results.
[0036] All corpus examples with a similarity greater than a preset threshold are selected as candidate corpus examples to obtain a candidate corpus example set.
[0037] In some embodiments, the selection unit is specifically used for:
[0038] Determine the number of sample configurations corresponding to each of the multiple prompting strategies;
[0039] Select the candidate corpus examples from the candidate corpus example set, the number of which is equal to the number of corresponding example configurations, as the candidate corpus examples corresponding to the corresponding prompting strategy.
[0040] In some embodiments, the classification unit is specifically used for:
[0041] Based on the text to be classified, the prompting strategy, and the corresponding selected candidate corpus use cases, generate prompt word information corresponding to each prompting strategy;
[0042] The classification result of the text to be classified is determined based on the different responses of the generative large model under different prompt word information.
[0043] In some embodiments, the classification unit is specifically used for:
[0044] Each of the aforementioned prompt words is repeatedly input into the generative large model multiple times to obtain multiple model response results corresponding to the corresponding prompt words.
[0045] Based on a competition-style analysis, determine whether there is a winning result among all the model response results;
[0046] The classification result of the text to be classified is determined based on the analysis results.
[0047] In some embodiments, the classification unit is specifically used for:
[0048] When the analysis results indicate the existence of a superior result, the superior result is used as the classification result of the text to be classified.
[0049] When the analysis results indicate that there is no winning result, candidate corpus samples are reselected from the candidate corpus sample set, and the process returns to the step of generating prompt word information corresponding to each prompt strategy based on the text to be classified, the prompt strategy, and the corresponding selected candidate corpus use cases.
[0050] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the text classification method based on a generative large model as described above.
[0051] Fourthly, this application provides a refrigeration equipment system, including a refrigeration device and a server connected in communication. The server includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the text classification method based on the generative large model described above.
[0052] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the text classification method based on a generative large model as described above.
[0053] The text classification method, apparatus, storage medium, cooling equipment system, and computer program product based on generative large-scale models provided in this application acquire the text to be classified; determine a candidate corpus sample set from an existing corpus sample library based on the text to be classified; select at least one candidate corpus sample corresponding to each of multiple prompting strategies from the candidate corpus sample set; and classify the text to be classified using a generative large-scale model based on the prompting strategies and the selected corresponding candidate corpus samples. That is, by dynamically selecting corpus samples and combining multiple prompting strategies to generate prompt word information for text classification, it can achieve accurate classification of user input text based on a small number of samples, and is applicable to various text classification scenarios, with high flexibility, good classification effect, and strong reliability. Attached Figure Description
[0054] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0055] Figure 1 This is a schematic diagram of an application scenario for the refrigeration equipment system provided in the embodiments of this application;
[0056] Figure 2 This is a flowchart illustrating the text classification method based on a generative large model provided in an embodiment of this application;
[0057] Figure 3 This is another flowchart illustrating the text classification method based on a generative large model provided in this application embodiment;
[0058] Figure 4 This is a schematic diagram of the structure of the text classification device based on a generative large model provided in the embodiments of this application;
[0059] Figure 5 This is a schematic diagram of the structure of the refrigeration equipment system provided in the embodiments of this application;
[0060] Figure 6 This is a schematic diagram of the hardware structure of the refrigeration equipment system provided in the embodiments of this application. Detailed Implementation
[0061] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0062] This application provides a text classification method, apparatus, storage medium, cooling equipment system, and computer program product based on a generative large model.
[0063] Please see Figure 1 and Figure 2 , Figure 1 This is a schematic diagram illustrating an application scenario of the refrigeration equipment system provided in the embodiments of this application. Figure 2 This is a flowchart illustrating the text classification method based on a generative large model provided in this application embodiment. This text classification method based on a generative large model is applied to a refrigeration equipment system. The refrigeration equipment system may include a refrigeration device 100 and a client 200 corresponding to the refrigeration device 100. The refrigeration device 100 may be a refrigerator, and the client 200 may be a mobile phone / tablet, or an app / web client on the mobile phone / tablet. The refrigeration device 100 and the client 200 can communicate wirelessly via signals such as 5G, 6G, Wi-Fi, wired connection, or Bluetooth. The following description uses a refrigerator as an example to illustrate the refrigeration device 100.
[0064] Continue as Figure 1 As shown, the refrigeration device 100 can be a refrigerator with audio and video capture capabilities and a user interface. The refrigerator is equipped with a microphone array 30 for audio capture, a camera 20 for video recording, a speaker 40 for voice interaction with the user, and an interactive screen 10 for text or graphical interaction with the user. The interactive screen 10 can be mounted on the refrigerator door. When the user opens the refrigerator door, the camera 20 records the user's actions, generating video data. The speaker 40 and microphone 30 work together to interact with the user via audio in a question-and-answer format. The client 200, using a mobile phone as an example, allows users to communicate with the refrigerator via text or voice, manage food information within the refrigerator, and control the refrigerator's operating status.
[0065] In addition, the cooling system may include other external devices, such as external temperature sensors, cameras 20 or microphones 30 and speakers 40 built into other devices, smart speakers, VR / AR, etc. These devices can be connected to the cooling device 100 or the client 200 via wireless signals.
[0066] Specifically, in Figure 2 In this text classification method based on a generative large model, the steps 301-304 may be included, wherein:
[0067] 301. Obtain the text to be classified.
[0068] The text to be categorized can be text data directly input by the user. For example, the user can input text data through the text input box provided by the app, mini-program, or web client on the tablet, such as "Can people with high blood pressure eat Kung Pao Chicken?" Alternatively, the text to be categorized can be text converted from other modal data, such as voice data, video data, or image data. This non-text data can be collected by the refrigeration system or by other devices that collect it and send it to the refrigeration system via the network; there are no restrictions here. For example, video and image data can be collected by the camera in the refrigerator or tablet, and voice data can be collected by devices such as microphones or microphone arrays in the refrigerator or tablet. For instance, when a user speaks the question "Can people with high blood pressure eat Kung Pao Chicken?" into the refrigerator or a tablet connected to the refrigerator, the microphone array built into the refrigerator or tablet can collect the voice data.
[0069] 302. Based on the text to be classified, determine the candidate corpus sample set from the created corpus sample library.
[0070] The corpus examples in the sample corpus are standard corpora with classification labels. These labels can be obtained through manual annotation or by automatic annotation followed by manual adjustment. Since large models have a natural advantage in natural language understanding, the classification labels designed for vertical scenarios should reflect the true meaning of the intent to reduce the difficulty for large models to understand the labels.
[0071] The corpus examples are typically stored in the form of "query-label" pairs. These are either downloaded from an online corpus of a specific domain (such as refrigeration equipment), user-created corpus, or corpus automatically generated by tools. Each category label should cover a sufficient number of corpus examples. If there are insufficient corpus examples, new corpus examples can be generated based on existing corpus examples using similar text generation techniques.
[0072] In some embodiments, see Figure 3 , Figure 3 This is another flowchart illustrating the text classification method based on a generative large model provided in this application embodiment. Step 302 above may specifically include steps 3021-3023, wherein:
[0073] 3021. Vectorize the text to be classified and each corpus example in the created corpus sample library;
[0074] 3022. Calculate the similarity between the text to be classified and each example in the corpus based on the vectorization results;
[0075] 3023. Select all corpus samples with a similarity greater than the preset threshold as candidate corpus samples to obtain a candidate corpus sample set.
[0076] Among these, appropriate similarity matching algorithms can be selected according to actual needs, such as, but not limited to, Jaccard, Cosine, and Levenshtein algorithms. The purpose of text vectorization is to unify the query part of the text to be classified and each corpus example in the corpus sample library into the same vector space. By calculating the similarity between vectors, the similarity between the text to be classified and the corpus examples is determined, and then corpus examples with high similarity are selected as candidate corpus examples.
[0077] 303. Select at least one candidate corpus example from the candidate corpus example set for each of the multiple prompting strategies.
[0078] Many of the prompting strategies are designed for few-shot prompting, with different strategies using different numbers of samples. For example, prompting strategies include, but are not limited to, single-shot prompting, three-shot prompting, five-shot prompting, and eight-shot prompting.
[0079] In some embodiments, please continue to see Figure 3 The above step 303 may specifically include:
[0080] Determine the number of sample configurations corresponding to each of the multiple prompting strategies, and select candidate corpus samples from the candidate corpus sample set whose number is equal to the number of corresponding sample configurations, as the candidate corpus samples corresponding to the corresponding prompting strategy.
[0081] For example, for suggestion strategy 1-shot, the number of sample configurations is 1, and for suggestion strategy 3-shot, the number of sample configurations is 3. The candidate corpus samples in the sample set can be sorted in descending order of similarity, and an appropriate number of candidate corpus samples can be selected sequentially. There can be overlap between candidate corpus samples corresponding to different suggestion strategies; for example, for 1-shot, the first candidate corpus sample in the sorted list is selected, and for 3-shot, the first three candidate corpus samples are selected.
[0082] 304. Based on the prompting strategy and the selected candidate corpus examples, classify the text to be classified using a generative large model.
[0083] In some embodiments, please continue to see Figure 3 Step 304 above may specifically include steps 3041 and 3042, wherein:
[0084] 3041. Based on the text to be classified, the prompting strategy, and the corresponding selected candidate corpus use cases, generate prompt word information corresponding to each prompting strategy.
[0085] When generating prompt information, candidate corpus examples and the text to be classified are filled into the corresponding positions in the prompt template. The prompt template design should follow the format of "task background + task instruction + example + user input + candidate label". Based on this format, users can adjust the prompt template structure according to the actual situation of the model.
[0086] For example, a prompt template can be roughly shown as follows:
[0087] {
[0088] "Task Background": xx
[0089] "Task Instructions": xx
[0090] "Sample": "query-label"*N(N-shot)
[0091] User Input: xx
[0092] Candidate Tags: xx
[0093] }
[0094] The prompt word information corresponding to prompt strategy 1-shot can be displayed as follows:
[0095] {
[0096] "Task Background": Now you are a text classifier, and you need to classify user text in the context of a refrigerator according to a given label system.
[0097] "Task Instructions": Please analyze the user text, study the example, and output the results in JSON format. Do not output any other irrelevant content.
[0098] Example: {"query": "label"}(1-shot)
[0099] User Input: xx
[0100] Candidate Labels: {label1; label2; label3…}
[0101] }
[0102] 3042. Based on the different responses of the generative large model under different prompt word information, determine the classification result of the text to be classified.
[0103] In some embodiments, step 3042 may specifically include:
[0104] Each prompt word is repeatedly input into the generative large model multiple times to obtain multiple model response results corresponding to the prompt word;
[0105] Based on a competition format, analyze whether there is a winning result among all model response results;
[0106] The classification result of the text to be classified is determined based on the analysis results.
[0107] Furthermore, the above step of "determining the classification result of the text to be classified based on the analysis results" specifically includes:
[0108] When the analysis results indicate the existence of a superior result, that superior result is used as the classification result for the text to be classified.
[0109] When the analysis results indicate that there is no winning result, select new candidate corpus samples from the candidate corpus sample set and return to execute step 3041 above.
[0110] Each time a prompt word is input into the model, contextualization needs to be disabled, making each output a separate model interaction. The minimum number of repetitions for a single prompt word can be set manually, typically at least three times. After three inputs, the three model responses are compared to determine the winner (i.e., the response that appears most frequently). If the winner is not determined (e.g., all three responses appear only once), a fourth input is performed, and the comparison continues until a winner is determined. Only then is inputting the prompt word stopped.
[0111] After multiple model inputs for each prompt word, a competition is conducted to compare all model responses again to determine the winning option (i.e., the model response with the most occurrences). If this is insufficient, new prompt words are generated from the candidate corpus sample set and input into the model until a winning option is determined. The selection rules for each reselection of candidate corpus samples are manually set. For example, they can be sorted by similarity from high to low, moving one step forward from the first selected candidate corpus sample. For instance, if candidate corpus samples 1-8 are selected initially, and their model responses ultimately fail to yield a winning option, then candidate corpus samples 2-9 are selected for the second round.
[0112] It should be noted that, since the candidate corpus examples used to construct the prompt word information in this embodiment are dynamically selected through text similarity matching, suitable candidate corpus examples can be matched for each sentence of user text input, thereby generating appropriate prompt word information. Compared with the existing method of directly and statically writing corpus examples into the prompt template, which can only generate prompt word information for a specific classification scenario, the dynamic selection of corpus examples in this embodiment can be applied to various text classification scenarios, offering high flexibility. At the same time, by combining multiple prompt strategies and determining the text classification result from the model response results corresponding to these prompt strategies through a competition, the accuracy and reliability of text classification can be effectively improved.
[0113] As described above, the text classification method based on a generative large model provided in this application obtains the text to be classified; determines a candidate corpus sample set from an existing corpus sample library based on the text to be classified; selects at least one candidate corpus sample corresponding to each of the various prompting strategies from the candidate corpus sample set; and classifies the text to be classified using a generative large model based on the prompting strategy and the selected corresponding candidate corpus sample. That is, by dynamically selecting candidate corpus samples and combining multiple prompting strategies to generate prompt word information for text classification, it can achieve accurate classification of user input text based on a small number of samples, and is applicable to various text classification scenarios, with high flexibility, good classification effect, and strong reliability.
[0114] Based on the methods described in the above embodiments, this application also provides a text classification method based on a generative large model, applied to a refrigeration equipment system. Please refer to... Figure 4 , Figure 4 This is a schematic diagram of the structure of a text classification device based on a generative large model provided in an embodiment of this application. The text classification device 400 based on a generative large model includes an acquisition unit 401, a determination unit 402, a selection unit 403, and a classification unit 404, wherein:
[0115] 401. Acquisition Unit, used to acquire the text to be classified;
[0116] 402. Determine the unit, used to determine the candidate corpus sample set from the created corpus sample library based on the text to be classified;
[0117] 403. Selection unit, used to select at least one candidate corpus sample from the candidate corpus sample set for each of the multiple prompting strategies;
[0118] 404. Classification unit, used to classify the text to be classified using a generative large model based on the prompting strategy and the selected corresponding candidate corpus samples.
[0119] In some embodiments, the determining unit 402 is specifically used for:
[0120] Vectorize the text to be classified and each corpus sample in the created corpus sample library;
[0121] Calculate the similarity between the text to be classified and each example in the corpus based on the vectorization results;
[0122] All corpus examples with a similarity greater than a preset threshold are selected as candidate corpus examples, thus obtaining a candidate corpus example set.
[0123] In some embodiments, the selection unit 403 is specifically used for:
[0124] Determine the number of sample configurations corresponding to each of the multiple prompting strategies;
[0125] Select the candidate corpus examples from the candidate corpus example set, the number of which is equal to the number of corresponding example configurations, as the candidate corpus examples corresponding to the corresponding prompting strategy.
[0126] In some embodiments, the classification unit 404 is specifically used for:
[0127] Based on the text to be classified, the prompting strategy, and the corresponding selected candidate corpus use cases, generate prompt word information corresponding to each prompting strategy;
[0128] The classification result of the text to be classified is determined based on the different responses of the generative large model under different prompt word information.
[0129] In some embodiments, the classification unit 404 is specifically used for:
[0130] Each prompt word is repeatedly input into the generative large model multiple times to obtain multiple model response results corresponding to the prompt word;
[0131] Based on a competition format, analyze whether there is a winning result among all model response results;
[0132] The classification result of the text to be classified is determined based on the analysis results.
[0133] In some embodiments, the classification unit 404 is specifically used for:
[0134] When the analysis results indicate the existence of a superior result, the superior result is used as the classification result for the text to be classified.
[0135] When the analysis results indicate that there is no winning result, candidate corpus samples are reselected from the candidate corpus sample set, and the process returns to the steps described above, which generate prompt word information corresponding to each prompt strategy based on the text to be classified, the prompt strategy, and the corresponding selected candidate corpus use cases.
[0136] It should be noted that the specific details of each module unit in the above-mentioned generative large model-based text classification device 400 have been described in detail in the embodiments of the above-mentioned generative large model-based text classification method, and will not be repeated here.
[0137] In some embodiments, the text classification device based on a generative large model in this application can be a refrigeration equipment system, or a component within the refrigeration equipment system, such as an integrated circuit or a chip. The refrigeration equipment system includes, but is not limited to, refrigerators, freezers, display cases, beverage cabinets, wine cabinets, refrigerated display cases, and refrigerated vending machines, etc., and has diverse structural forms and a wide range of applications.
[0138] In some embodiments, such as Figure 5 As shown, this application embodiment also provides a refrigeration equipment system 500, including a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the program is executed by the processor 501, it implements the various processes of the above-described text classification method embodiment based on generative large models and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0139] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0140] Figure 6 A schematic diagram of the hardware structure of a refrigeration equipment system according to an embodiment of this application.
[0141] The refrigeration equipment system 600 includes, but is not limited to, the following components: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, and processor 610.
[0142] Those skilled in the art will understand that the refrigeration system 600 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 610 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 6 The structure of the refrigeration equipment system shown in the figure does not constitute a limitation on the refrigeration equipment system. The refrigeration equipment system may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0143] It should be understood that, in this embodiment, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042. The GPU 6041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 606 may include a display panel 6061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 607 includes at least one of a touch panel 6071 and other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.
[0144] The memory 609 can be used to store software programs and various data. The memory 609 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 609 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 609 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0145] Processor 610 may include one or more processing units; processor 610 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 610.
[0146] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described text classification method embodiment based on a generative large model and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0147] The processor is the processor in the refrigeration equipment system described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0148] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described text classification method based on a generative large model.
[0149] The processor is the processor in the refrigeration equipment system described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0150] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0152] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0153] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0154] In the description of this application, "multiple" means two or more.
[0155] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0156] Although embodiments of this application have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of this application, the scope of which is defined by the claims and their equivalents.
Claims
1. A text classification method based on a generative large model, characterized in that, include: Get the text to be categorized; Based on the text to be classified, a candidate corpus sample set is determined from the created corpus sample library; Select at least one candidate corpus example from the candidate corpus example set for each of the multiple prompting strategies; Based on the aforementioned prompting strategy and the selected corresponding candidate corpus examples, the text to be classified is classified using a generative large model.
2. The text classification method based on a generative large model according to claim 1, characterized in that, The step of determining a candidate corpus sample set from the created corpus sample library based on the text to be classified includes: Vectorize the text to be classified and each corpus sample in the created corpus sample library; The similarity between the text to be classified and each of the corpus samples is calculated based on the vectorization results. All corpus examples with a similarity greater than a preset threshold are selected as candidate corpus examples to obtain a candidate corpus example set.
3. The text classification method based on a generative large model according to claim 1, characterized in that, The step of selecting at least one candidate corpus example corresponding to each of the multiple prompting strategies from the candidate corpus example set includes: Determine the number of sample configurations corresponding to each of the multiple prompting strategies; Select the candidate corpus examples from the candidate corpus example set, the number of which is equal to the number of corresponding example configurations, as the candidate corpus examples corresponding to the corresponding prompting strategy.
4. The text classification method based on a generative large model according to claim 1, characterized in that, The step of classifying the text to be classified using a generative large model based on the prompting strategy and the selected corresponding candidate text samples includes: Based on the text to be classified, the prompting strategy, and the corresponding selected candidate corpus use cases, generate prompt word information corresponding to each prompting strategy; The classification result of the text to be classified is determined based on the different responses of the generative large model under different prompt word information.
5. The text classification method based on a generative large model according to claim 4, characterized in that, The step of determining the classification result of the text to be classified based on the different responses of the generative large model under different prompt word information includes: Each of the aforementioned prompt words is repeatedly input into the generative large model multiple times to obtain multiple model response results corresponding to the corresponding prompt words. Based on a competition-style analysis, determine whether there is a winning result among all the model response results; The classification result of the text to be classified is determined based on the analysis results.
6. The text classification method based on a generative large model according to claim 5, characterized in that, The step of determining the classification result of the text to be classified based on the analysis results includes: When the analysis results indicate the existence of a superior result, the superior result is used as the classification result of the text to be classified. When the analysis results indicate that there is no winning result, candidate corpus samples are reselected from the candidate corpus sample set, and the process returns to the step of generating prompt word information corresponding to each prompt strategy based on the text to be classified, the prompt strategy, and the corresponding selected candidate corpus use cases.
7. A text classification device based on a generative large model, characterized in that, include: The acquisition unit is used to acquire the text to be classified. The determining unit is used to determine a candidate corpus sample set from the created corpus sample library based on the text to be classified; The selection unit is used to select at least one candidate corpus sample corresponding to each of the multiple prompting strategies from the candidate corpus sample set; The classification unit is used to classify the text to be classified using a generative large model based on the prompting strategy and the selected corresponding candidate corpus examples.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the text classification method based on a generative large model as described in any one of claims 1-6.
9. A refrigeration equipment system, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the text classification method based on a generative large model as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the text classification method based on a generative large model as described in any one of claims 1-6.