Method and device for data enhancement and voice air conditioning equipment
By using a large language model with decoder-only and encoder-only architectures, combined with prompt word templates and discriminative models, the problem of generated data not conforming to users' real interaction habits in existing technologies is solved, achieving more realistic and effective data augmentation and improving the interactive experience of voice-activated air conditioning devices.
Patent Information
- Application Number
- CN202411260645.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2026-03-13
AI Technical Summary
The methods used in existing NLP data augmentation techniques are rather rigid, resulting in augmented data that does not conform to users' real interaction habits and has poor authenticity.
Data is generated using a pre-trained large language model based on a decoder-only architecture, and then judged using a pre-trained large language model based on an encoder-only architecture. Key information in the sparse corpus is extracted through prompt word templates to generate data that is semantically similar to real user commands. The authenticity of the generated data is then judged by a discriminant model.
It generates more realistic and effective augmented data, improves the authenticity and accuracy of voice interaction, and reduces the development cost of data augmentation technology.
Smart Images

Figure CN121658624A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, such as a method and apparatus for data enhancement and a voice-activated air conditioning device. Background Technology
[0002] For modern home appliances with high technological content, such as air conditioners, voice interaction is an inevitable development trend. Many manufacturers have already added voice interaction entry points to their air conditioner products. Current voice interaction methods are based on rules or statistics, utilizing NLP (Natural Language Processing) and other technologies to understand user intent. Therefore, in certain interaction scenarios, when unexpected corpora or intents appear during the design phase, it can severely degrade the user experience.
[0003] Among related technologies, NLP data augmentation techniques are used to augment data based on synonym replacement, word embedding replacement, back translation, noise injection, and other methods to obtain a large amount of data.
[0004] In the process of implementing the embodiments of this disclosure, at least the following problems were found in the related art:
[0005] The methods used in NLP data augmentation techniques are rather rigid, and the augmented data obtained does not conform to users' real interaction habits, resulting in poor authenticity.
[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments, but rather as a prelude to the detailed description that follows.
[0008] This disclosure provides a method and apparatus for data augmentation, as well as a voice-activated air conditioning device, to obtain more realistic and effective augmented data.
[0009] In some embodiments, the method for data augmentation includes: acquiring sparse corpus; obtaining prompt words based on prompt word templates from the sparse corpus; obtaining generated data based on the prompt words using a generative model; and judging the generated data using a discriminative model to obtain a predicted probability that the generated data belongs to the generated category, and determining the generated data as augmented data if the predicted probability is less than a preset probability value; wherein the generative model includes a pre-trained large language model based on a decoder-only architecture, and the discriminative model includes a pre-trained large language model based on an encoder-only architecture.
[0010] Optionally, acquiring sparse data includes: acquiring voice interaction data between the user and the device through a voice input terminal; converting the voice interaction data into text data as user command data; and matching the user command data with a user interaction data database to identify sparse data in the user command data.
[0011] Optionally, the user command corpus is matched with the user interaction corpus database to determine sparse corpus in the user command corpus, including: vectorizing the target user command corpus to obtain vectorized corpus data; performing similarity matching between the vectorized corpus data and the corpus data in the user interaction corpus database to obtain a similarity value; and determining the target user command corpus as sparse corpus if the similarity value is less than a first preset value.
[0012] Optionally, prompt words are obtained from sparse corpus, including: parsing sparse corpus to obtain various user intentions, scene information and user information; arranging and combining various user intentions, scene information and user information to generate user scene intention combinations; and generating prompt words corresponding to user scene intention combinations based on prompt word templates.
[0013] Optionally, the generative model is trained as follows: extract real user command corpus from a user interaction corpus database; generate training commands based on prompt word templates and the real user command corpus; construct a command dataset by using the real user command corpus as data labels for the training commands; and train the generative model based on the command dataset, so that the trained generative model can generate corpus data similar to the real user command corpus based on the training commands.
[0014] Optionally, a generative model is trained based on the instruction dataset, including one or more first iteration operations; the first iteration operation includes: using the trained instructions to perform forward propagation through the generative model to generate predicted instructions; calculating a first loss value between the predicted instructions and the user's real instruction corpus; updating the weights of the generative model based on the first loss value through a backpropagation algorithm; wherein, the convergence condition of the first iteration operation is that the number of iterations reaches a first preset number, or the first loss value is less than a second preset value.
[0015] Optionally, the discriminant model is trained as follows: The generated instruction corpus output by the generating model and the real user instruction corpus from the user interaction corpus database are obtained; wherein the category of the generated instruction corpus is the generated category, and the category of the real user instruction corpus is the real category; the output layer of the discriminant model is adjusted so that the discriminant model can output the probabilities of both the generated and real categories; based on the generated instruction corpus and the real user instruction corpus, the discriminant model is trained so that the trained discriminant model can output the prediction result of the category to which the instruction corpus belongs.
[0016] Optionally, a discrimination model is trained based on the generated instruction corpus and the user's actual instruction corpus, including one or more second iteration operations. The second iteration operation includes: forward propagating the generated instruction corpus and the user's actual instruction corpus through the discrimination model to obtain the prediction result of the category to which the instruction corpus belongs; calculating a second loss value based on the prediction result and the actual category to which the instruction corpus belongs; and updating the weights of the discrimination model through a backpropagation algorithm based on the second loss value. The convergence condition of the second iteration operation is that the number of iterations reaches a second preset number, or the second loss value is less than a third preset value.
[0017] In some embodiments, the apparatus for data augmentation includes a processor and a memory storing program instructions, the processor being configured to perform the data augmentation method as described above when the program instructions are executed.
[0018] In some embodiments, the voice-activated air conditioning device includes: a voice-activated air conditioning device body; and the data enhancement device described above, which is installed on the voice-activated air conditioning device body.
[0019] The data enhancement method and apparatus, and voice-activated air conditioning device provided in this disclosure can achieve the following technical effects:
[0020] In this embodiment, the generative model includes a pre-trained large language model based on an encoder-only architecture suitable for text generation tasks, and the discriminative model includes a pre-trained large language model based on a decoder-only architecture suitable for text classification tasks. Using prompt word templates, key information from sparse corpora can be extracted as prompt words. These prompt words are then input into the generative model to obtain generated data semantically similar to real user commands. Finally, the discriminative model can distinguish between generated and real-class data. Based on the predicted probabilities output by the discriminative model, if the predicted probability of the generated data belonging to the generated category is less than a preset probability value, it indicates that the discriminative model cannot distinguish the generated data from real user commands, thus determining that the generated data is more realistic and effective augmented data.
[0021] The above general description and the description below are exemplary and illustrative only and are not intended to limit this application. Attached Figure Description
[0022] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations and drawings do not constitute a limitation on the embodiments. Elements having the same reference numerals in the drawings are shown as similar elements. The drawings are not to be scaled. And wherein:
[0023] Figure 1 This is a schematic diagram of a data augmentation method provided in an embodiment of this disclosure;
[0024] Figure 2 This is a schematic diagram of another data augmentation method provided in an embodiment of this disclosure;
[0025] Figure 3 This is a schematic diagram of another data augmentation method provided in an embodiment of this disclosure;
[0026] Figure 4 This is a schematic diagram of a method for training a generative model provided in an embodiment of this disclosure;
[0027] Figure 5 This is a schematic diagram of a method for training a discriminative model provided in an embodiment of this disclosure;
[0028] Figure 6 This is a schematic diagram of an apparatus for data augmentation provided in an embodiment of this disclosure. Detailed Implementation
[0029] To provide a more detailed understanding of the features and technical content of the embodiments of this disclosure, the implementation of the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for illustrative purposes only and are not intended to limit the embodiments of this disclosure. In the following technical description, for ease of explanation, several details are used to provide a full understanding of the disclosed embodiments. However, one or more embodiments may still be implemented without these details. In other cases, well-known structures and devices may be simplified in their depiction to simplify the drawings.
[0030] The terms "first," "second," etc., used in the technical solutions described in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this disclosure described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0031] Unless otherwise stated, the term "multiple" means two or more.
[0032] In this embodiment of the disclosure, the character " / " indicates that the objects before and after it are in an "or" relationship. For example, A / B means: A or B.
[0033] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0034] The term "correspondence" can refer to an association or binding relationship. The correspondence between A and B means that there is an association or binding relationship between A and B.
[0035] In the interaction process of voice-activated air conditioning, it is necessary to enhance certain problem corpora for separate optimization and research. Based on the generative capabilities of pre-trained large language models, a large amount of similar data can be generated using the currently discovered limited problem corpora. Therefore, combining... Figure 1 As shown, this disclosure provides a method for data augmentation, wherein the execution subject of the method may be a processor, and the method includes:
[0036] S001, the processor acquires sparse corpus.
[0037] S002, the processor obtains prompt words based on the prompt word template and sparse corpus.
[0038] S003, the processor obtains generated data based on the prompt words, using a generative model.
[0039] S004, the processor, based on the discriminant model, discriminates the generated data and obtains the predicted probability that the generated data belongs to the generated category. If the predicted probability is less than the preset probability value, the generated data is determined to be augmented data.
[0040] The generative models include pre-trained large language models with decoder-only architectures ranging from 3B to 10B, suitable for text generation tasks, while the discriminative models include pre-trained large language models with encoder-only architectures ranging from 10B to 70B, suitable for text classification tasks.
[0041] In this embodiment, key information from sparse corpora can be extracted using prompt word templates as prompt words. These prompt words are then input into a generation model to obtain generated data that is semantically similar to real user commands. Finally, a discriminant model can distinguish between generated and real data. Based on the predicted probability output by the discriminant model, if the predicted probability that the generated data belongs to the generation category is less than a preset probability value, it indicates that the discriminant model cannot distinguish the generated data from real user commands, thus determining that the generated data is more realistic and effective augmented data. For example, if the discriminant model's predicted probability that the generated data belongs to the generation category is 0.1, and the preset probability value is 0.3, it indicates that the generated data has strong realism and cannot be judged by the discriminant model.
[0042] Optionally, acquiring sparse data includes: acquiring voice interaction data between the user and the device through a voice input terminal; converting the voice interaction data into text data as user command data; and matching the user command data with a user interaction data database to identify sparse data in the user command data.
[0043] Combination Figure 2 As shown, this disclosure provides another method for data augmentation, including:
[0044] S101, the processor obtains voice interaction data between the user and the device through the voice call-in terminal.
[0045] S102, the processor converts the voice interaction data into text data as user command corpus.
[0046] S103, the processor matches the user command corpus with the user interaction corpus database and determines sparse corpus in the user command corpus.
[0047] S104, the processor obtains prompt words based on prompt word templates and sparse corpus.
[0048] S105, the processor obtains generated data based on the prompt words, using a generative model.
[0049] S106, the processor, based on the discriminant model, discriminates the generated data and obtains the predicted probability that the generated data belongs to the generated category. If the predicted probability is less than the preset probability value, the generated data is determined to be augmented data.
[0050] In this embodiment, during the use of the voice-activated air conditioner, the user can issue commands to the air conditioner through the voice input interface, such as "turn on the air conditioner" or "set the temperature to 26 degrees." Therefore, the voice interaction data between the user and the voice-activated air conditioner can be acquired through the voice input interface. Preprocessing the voice interaction data, such as noise reduction, echo cancellation, and gain control, can improve the accuracy of speech recognition. Using automatic speech recognition technology, the voice interaction data can be converted into text data as user command corpus. The user command corpus is matched with a user interaction corpus database to identify sparse data within the user command corpus. This sparse data consists of uncommon or difficult-to-understand commands, which will be the focus of data augmentation.
[0051] Optionally, the user command corpus is matched with the user interaction corpus database to determine sparse corpus in the user command corpus, including: vectorizing the target user command corpus to obtain vectorized corpus data; performing similarity matching between the vectorized corpus data and the corpus data in the user interaction corpus database to obtain a similarity value; and determining the target user command corpus as sparse corpus if the similarity value is less than a first preset value.
[0052] In this embodiment, vectorization involves converting the textual target user command corpus into numerical vectorized corpus data. This can be achieved using methods such as the bag-of-words model, TF-IDF (Term Frequency-Inverse Document Frequency), and Word Embeddings. Then, using cosine similarity, Euclidean distance, or other similarity metrics, the vectorized corpus data is matched with the corpus data in the user interaction corpus database. A first preset value is set to determine if the corpus is sufficiently similar. If the similarity value is lower than the first preset value, the corpus is considered sparse. The user interaction corpus database stores a large amount of corpus data, including original user interaction data, voice air conditioning responses, user information (gender, age, region, etc.) parsed through big data and intent recognition models, environmental information (indoor temperature, indoor humidity, set temperature, set humidity, season, usage time, etc.), usage scenarios, and usage intent.
[0053] Optionally, based on the prompt word template, prompt words are obtained from the sparse corpus, including: parsing the sparse corpus to obtain various user intentions, scene information, and user information; arranging and combining the various user intentions, scene information, and user information to generate user scene intention combinations; and generating prompt words corresponding to user scene intention combinations based on the prompt word template.
[0054] Combination Figure 3 As shown, this disclosure provides another method for data augmentation, including:
[0055] S201, the processor acquires sparse corpus.
[0056] S202, the processor parses sparse corpus to obtain various user intents, scene information and user information.
[0057] S203, the processor arranges and combines various user intents, scene information and user information to generate user scene intent combinations.
[0058] S204, the processor generates prompts corresponding to user scenario intent combinations based on prompt word templates.
[0059] S205, the processor obtains generated data based on the prompt words, using a generative model.
[0060] S206, the processor, based on the discriminant model, discriminates the generated data and obtains the predicted probability that the generated data belongs to the generated category. If the predicted probability is less than the preset probability value, the generated data is determined to be augmented data.
[0061] In this embodiment, parsing sparse corpora yields user intent, scene information, user information, and user feedback. User intent includes actions such as cooling, heating, fan control, playing music, and casual conversation; scene information includes indoor temperature, humidity, time, and season. Based on the parsed scene information, user intent, and user information, new user scene intent combinations are generated through permutations and combinations. Corresponding prompts are generated based on pre-defined prompt word templates and user scene intent combinations. The prompt word templates are set according to attributes stored in the database. For example, a prompt word template could be: "You are an air conditioner user in {} region, {} age, {} gender. You are currently in {} season, the outside weather is {}, the usage time is {}, the indoor temperature is {}, the humidity is {}, and your instruction intent for the air conditioner is {}. Please provide 10 corresponding instruction corpora based on the above information." The prompt word template is populated based on the user scene intent combinations to obtain the prompt words corresponding to the user scene intent combinations. Inputting the prompt words into the generation model yields multiple instruction corpora corresponding to the prompt words.
[0062] Optionally, the generative model is trained as follows: extract real user command corpus from a user interaction corpus database; generate training commands based on prompt word templates and the real user command corpus; construct a command dataset by using the real user command corpus as data labels for the training commands; and train the generative model based on the command dataset, so that the trained generative model can generate corpus data similar to the real user command corpus based on the training commands.
[0063] Combination Figure 4As shown, this disclosure provides a method for training a generative model, wherein the execution entity of the method may be a processor, and the method includes:
[0064] S301, the processor extracts real user command data from the user interaction corpus database.
[0065] The S302 processor generates training instructions based on prompt word templates and real user command corpora.
[0066] S303: The processor uses real user command data as data labels for training commands to construct a command dataset.
[0067] S304, the processor trains a generative model based on the instruction dataset, enabling the trained generative model to generate corpus data similar to the user's real instruction corpus based on the training instructions.
[0068] In this embodiment, prompt words corresponding to the user's actual command corpus can be generated based on the prompt word template, and these prompt words are used as training instructions. An instruction dataset is constructed, including training instructions and their labels. A generative model is trained based on the instruction dataset, enabling the trained model to generate corpus data similar to the user's actual command corpus, but not completely identical to it.
[0069] Optionally, a generative model is trained based on the instruction dataset, including one or more first iteration operations; the first iteration operation includes: using the trained instructions to perform forward propagation through the generative model to generate predicted instructions; calculating a first loss value between the predicted instructions and the user's real instruction corpus; updating the weights of the generative model based on the first loss value through a backpropagation algorithm; wherein, the convergence condition of the first iteration operation is that the number of iterations reaches a first preset number, or the first loss value is less than a second preset value.
[0070] In this embodiment, during the first iteration, training instructions are input into the generative model. These instructions are processed through each layer of the model, and the predicted instructions are output at the final layer. A suitable loss function, such as cross-entropy loss, is selected to measure the difference between the predicted instructions and the user's actual instructions, and a first loss value is calculated. The gradient of the loss function with respect to the model parameters is calculated using the backpropagation algorithm and the chain rule. The gradient represents the slope of the loss function in the parameter space, indicating the direction of the fastest increase in the loss function. The weights of the generative model are updated using the gradient and an optimization algorithm. The purpose of the weight update is to reduce the loss value and improve the similarity between the predicted instructions and the user's actual instructions.
[0071] Optionally, the discriminant model is trained as follows: The generated instruction corpus output by the generating model and the real user instruction corpus from the user interaction corpus database are obtained; wherein the category of the generated instruction corpus is the generated category, and the category of the real user instruction corpus is the real category; the output layer of the discriminant model is adjusted so that the discriminant model can output the probabilities of both the generated and real categories; based on the generated instruction corpus and the real user instruction corpus, the discriminant model is trained so that the trained discriminant model can output the prediction result of the category to which the instruction corpus belongs.
[0072] Combination Figure 5 As shown, this disclosure provides a method for training a discriminative model. The execution entity of this method may be a processor, and the method includes:
[0073] S401, the processor acquires the generated instruction corpus output by the generative model and the real user instruction corpus from the user interaction corpus database.
[0074] S402, the processor adjusts the output layer of the discriminant model so that the discriminant model can output the probabilities of the generated or true categories.
[0075] S403: The processor trains a discrimination model based on the generated instruction corpus and the user's real instruction corpus, so that the trained discrimination model can output the prediction result of the category to which the instruction corpus belongs.
[0076] In this embodiment, the discriminant model is used to output the predicted probability of the category to which the instruction corpus belongs. Therefore, during the training process, generated instruction corpora and real user instruction corpora are needed as training data so that the trained discriminant model can accurately predict the category to which the instruction corpus belongs.
[0077] Optionally, a discrimination model is trained based on the generated instruction corpus and the user's actual instruction corpus, including one or more second iteration operations. The second iteration operation includes: forward propagating the generated instruction corpus and the user's actual instruction corpus through the discrimination model to obtain the prediction result of the category to which the instruction corpus belongs; calculating a second loss value based on the prediction result and the actual category to which the instruction corpus belongs; and updating the weights of the discrimination model through a backpropagation algorithm based on the second loss value. The convergence condition of the second iteration operation is that the number of iterations reaches a second preset number, or the second loss value is less than a third preset value.
[0078] In this embodiment, during each second iteration, a generated instruction corpus or a user-generated instruction corpus is input into the discriminant model, and the predicted category of the instruction corpus is output. Based on the predicted result and the actual category of the instruction corpus, a second loss value is calculated using a loss function, such as binary cross-entropy loss. Finally, the gradient of the loss function with respect to the model parameters is calculated using the backpropagation algorithm and the chain rule, and the weights of the discriminant model are updated using the gradient and an optimization algorithm.
[0079] This disclosure proposes a data augmentation solution for sparse data in voice-based air conditioning interaction data. By leveraging the general capabilities of a pre-trained large language model, more realistic and effective data of the same type can be generated as augmentation data in a shorter time, facilitating timely adjustments to the voice model based on user pain points. Utilizing pre-trained large language model technology eliminates the need for special adjustments for specific problems, significantly reducing the development cost of data augmentation techniques.
[0080] Combination Figure 6 As shown, this disclosure provides an apparatus 300 for data enhancement, including a processor 500 and a memory 501. Optionally, the apparatus may further include a communication interface 502 and a bus 503. The processor 500, communication interface 502, and memory 501 can communicate with each other via the bus 503. The communication interface 502 can be used for information transmission. The processor 500 can call logical instructions in the memory 501 to execute the data enhancement method described in the above embodiments.
[0081] Furthermore, the logic instructions in the aforementioned memory 501 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium.
[0082] The memory 501, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of this disclosure. The processor 500 executes functional applications and data processing by running the program instructions / modules stored in the memory 501, that is, it implements the data enhancement method in the above embodiments.
[0083] The memory 501 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 501 may include high-speed random access memory and may also include non-volatile memory.
[0084] This disclosure provides a voice-activated air conditioning device, including: a voice-activated air conditioning device body, and the aforementioned data enhancement device. The data enhancement device is installed in the voice-activated air conditioning device body. The installation relationship described herein is not limited to placement inside the voice-activated air conditioning device, but also includes installation connections with other components of the voice-activated air conditioning device, including but not limited to physical connections, electrical connections, or signal transmission connections. Those skilled in the art will understand that the data enhancement device can be adapted to feasible voice-activated air conditioning device bodies, thereby realizing other feasible embodiments.
[0085] This disclosure provides a computer-readable storage medium storing computer-executable instructions configured to perform the above-described data augmentation method.
[0086] The technical solutions of this disclosure can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes one or more instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in this disclosure. The aforementioned storage medium can be a non-transitory storage medium, including: a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media capable of storing program code.
[0087] The foregoing description and accompanying drawings fully illustrate embodiments of this disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, procedural, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the terminology used in this application is for describing embodiments only and is not intended to limit the technical solutions described herein. As used in the technical solutions described herein, the singular forms “a,” “an,” and “the” are intended to equally include the plural forms unless the context clearly indicates otherwise. Similarly, the term “and / or” as used herein means including one or more of the associated listed items and all possible combinations thereof. Additionally, when used in this application, the term "comprise" and its variations "comprises" and / or "comprising" refer to the presence of stated features, integrals, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof. Without further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of other identical elements in the process, method, or apparatus that includes said element. In this document, each embodiment may focus on the differences from other embodiments, and similar or identical parts between embodiments can be referred to mutually. For methods, products, etc., disclosed in the embodiments, if they correspond to the method section disclosed in the embodiments, the relevant parts can be referred to the description of the method section.
[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this disclosure. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0089] The methods and products (including but not limited to devices and equipment) disclosed in the embodiments herein can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units may be merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to implement this embodiment according to actual needs. Furthermore, the functional units in the embodiments of this disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code 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 that 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. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different blocks may also occur in a different order than disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. Each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, can 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.
Claims
1. A method for data augmentation, characterized in that, include: Obtain sparse corpus; Based on the prompt word template, prompt words are obtained from sparse corpus; Based on the generative model, generated data is obtained according to prompt words; Based on the discriminant model, the generated data is discriminated to obtain the predicted probability that the generated data belongs to the generated category. If the predicted probability is less than the preset probability value, the generated data is determined to be augmented data. The generative model includes a pre-trained large language model based on a decoder-only architecture, and the discriminative model includes a pre-trained large language model based on an encoder-only architecture.
2. The method according to claim 1, characterized in that, Obtain sparse corpora, including: The system obtains voice interaction data between the user and the device by calling the entry point via voice. Voice interaction data is converted into text data to serve as user command corpus; The user command corpus is matched with the user interaction corpus database to identify sparse corpus within the user command corpus.
3. The method according to claim 2, characterized in that, The user command corpus is matched with the user interaction corpus database to identify sparse data within the user command corpus, including: Vectorize the target user's command corpus to obtain vectorized corpus data; The similarity values are obtained by matching the vectorized corpus data with the corpus data in the user interaction corpus database. If the similarity value is less than the first preset value, the target user instruction corpus is determined to be sparse corpus.
4. The method according to claim 1, characterized in that, Based on the prompt word template, prompt words are obtained from sparse corpora, including: Parse sparse corpora to obtain various user intents, context information, and user information; The system can arrange and combine various user intents, scenario information, and user information to generate user scenario intent combinations. Based on the prompt word template, generate prompt words corresponding to the user's scenario intent combination.
5. The method according to any one of claims 1 to 4, characterized in that, The generative model is trained as follows: Extract real user command data from a user interaction corpus database; Training instructions are generated based on prompt word templates and real user command corpora. Use real user commands as data labels for training commands to construct a command dataset; The generative model is trained based on the instruction dataset, enabling the trained generative model to generate corpus data similar to the user's real instruction corpus based on the training instructions.
6. The method according to claim 5, characterized in that, The model is trained based on the instruction dataset, including one or more first iteration operations; the first iteration operations include: The training instructions are used to propagate forward through the generative model to generate prediction instructions. Calculate the first loss value between the predicted command and the user's actual command corpus; Based on the first loss value, the weights of the generated model are updated using the backpropagation algorithm; The convergence condition for the first iteration operation is that the number of iterations reaches a first preset number, or the first loss value is less than a second preset value.
7. The method according to any one of claims 1 to 4, characterized in that, The discriminant model is trained as follows: Obtain the generated instruction corpus output by the generative model and the real user instruction corpus from the user interaction corpus database; wherein, the category to which the generated instruction corpus belongs is the generated category, and the category to which the real user instruction corpus belongs is the real category; Adjust the output layer of the discriminant model so that it can output the probabilities of either generated or true categories; Based on the generated instruction corpus and the user's real instruction corpus, a discrimination model is trained so that the trained discrimination model can output the prediction result of the category to which the instruction corpus belongs.
8. The method according to claim 7, characterized in that, Based on the generated command corpus and the user's real command corpus, a discrimination model is trained, including one or more second iteration operations; the second iteration operations include: The generated command corpus and the user's real command corpus are forward-propagated through a discriminative model to obtain the prediction result of the category to which the command corpus belongs; The second loss value is calculated based on the prediction results and the actual category of the instruction corpus; Based on the second loss value, the weights of the discrimination model are updated using the backpropagation algorithm; The convergence condition for the second iteration operation is that the number of iterations reaches the second preset number, or the second loss value is less than the third preset value.
9. An apparatus for data augmentation, comprising a processor and a memory storing program instructions, characterized in that, The processor is configured to perform the data augmentation method as described in any one of claims 1 to 8 when executing the program instructions.
10. A voice-activated air conditioning device, characterized in that, include: The main body of the voice-activated air conditioning unit; The data enhancement apparatus as described in claim 9 is installed on the main body of the voice air conditioning device.