An interactive data construction method, device and equipment and storage medium

CN116644168BActive Publication Date: 2026-11-03CHONGQING CHANGAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310645661.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-11-03
Estimated Expiration
2043-06-01

AI Technical Summary

Technical Problem

Existing technologies struggle to address the generalization problem of constructing customized data without a basic corpus or templates. They are unable to effectively solve the problem of constructing and augmenting customized data to meet a wide range of semantic interaction needs.

Method used

By acquiring small sample data of interactions, a generative language model is selected for fine-tuning. Data to be processed is collected and vectorized into text. Similar texts are queried using an embedding vector database and input into the fine-tuned generative language model. Customized dataset labels, generalized data corpus, and customized responses are output, realizing the construction of mass-produced interactive data from 0 to 1 and performing data augmentation.

Benefits of technology

It enables the construction of customized data and the generalization enhancement of data under the condition of no basic corpus or no basic template, which meets a wide range of semantic interaction needs and improves the efficiency and quality of data construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116644168B_ABST
    Figure CN116644168B_ABST
Patent Text Reader

Abstract

The application provides an interactive data construction method, device and equipment and a storage medium system, relates to the technical field of natural language processing, and comprises the following steps: acquiring interactive small sample data, forming an interactive small sample data set; selecting a generative language large model for constructing data and data enhancement, fine-tuning the generative language large model based on the interactive small sample data set; collecting interactive data to be processed, performing text vectorization on the interactive data, obtaining text vectors corresponding to the interactive data, searching for a preset embedding vector database based on the text vectors, and obtaining similar text of the interactive data; inputting the interactive data and the similar text of the interactive data into the fine-tuned generative language large model, and outputting a customized data set label, data generalization corpus, a class regular expression and a customized reply. The application realizes the construction of mass-produced interactive data from 0-1 and data enhancement, and meets the requirements of extensive semantic interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing, and in particular to an interactive data construction method, apparatus, device, and storage medium. Background Technology

[0002] Semantic interaction, a technique within natural language processing, is a complex application in smart cockpits. For OEMs, building the interaction dataset from scratch is one of the most challenging aspects of their in-house development. Due to the generalizability and ambiguity of language, recognizing a wide range of interaction needs has become a significant barrier to product development.

[0003] In traditional models, building an interactive dataset from scratch often requires a lengthy process, involving crucial steps such as product definition, data tracking, data collection, data annotation, and manual review. The data collection phase typically uses regular expressions and dictionaries to obtain generalized data. However, the diverse range of language expressions means that regular expressions cannot cover complex semantics, making the construction of mass-production data and its augmentation a key challenge for OEMs to achieve independent control over voice processing. Generative large-scale models offer a solution to these problems. A hot research area in natural language processing, generative large-scale models utilize intelligent agent models encompassing vast amounts of knowledge. Through machine learning prediction and optimization, these models creatively generate and annotate data, meeting the current data construction needs for zero-shot learning.

[0004] Existing technology discloses a method for generating dialogue data, which involves obtaining a target dialogue data template, including one or more target single-turn dialogue data templates, and each target single-turn dialogue data template including one or more keyword slots and related information for each keyword slot, including position information and attribute information. For each keyword slot, based at least on the attribute information of the keyword slot, one or more target keywords matching the keyword slot are determined from a keyword dataset. For each target single-turn dialogue data template, based on the position information of one or more keyword slots, one or more target keywords are filled into the target single-turn dialogue data template to obtain target dialogue data. On the one hand, filling keywords into the target single-turn dialogue data template to obtain target dialogue data solves the keyword generalization problem through rule-based replacement, but cannot solve the overall semantic generalization problem. On the other hand, this method constructs data with basic corpus and basic templates, and in highly customized domains, it cannot build customized data from scratch and generalize it. Summary of the Invention

[0005] To address the shortcomings of the existing technologies, the present invention aims to solve the problem of how to construct customized data from scratch and generalize and enhance it without any basic corpus or templates, thereby enabling the construction of mass-produced interactive data from 0 to 1 and performing data enhancement to meet a wide range of semantic interaction needs.

[0006] To achieve the above-mentioned technical effects, the technical solution of the present invention is as follows: An interactive data construction method includes the following steps: Obtain interactive small sample data and assemble an interactive small sample dataset; Select a generative language model for building data and data augmentation, and fine-tune the generative language model based on the interactive few-sample dataset; Collect the interaction data to be processed, convert the interaction data into text vectors to obtain the text vectors corresponding to the interaction data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interaction data; The interaction data and similar texts are input into the finely tuned generative language model, which outputs customized dataset labels, generalized data corpus, regular expressions, and customized responses.

[0007] Furthermore, the fine-tuning of the generative language model is performed through a fine-tuning task.

[0008] Furthermore, the fine-tuning tasks include: dataset label generation task, data generalization corpus generation task, regular expression generation task, and customized response generation task; The dataset label generation task specifically includes: firstly, in the data input stage of the generative language model, the input data of the generative language model is converted into first label information; based on the first label information, second label information is constructed in the data output stage of the generative language model; then, the second label information with the state list is added to the second label information, and the second label information with the state list is converted into third label information, and the semantics of the third label information is output; finally, the semantics of the third label information is transformed to obtain the label output result. The data generalization corpus generation task specifically includes: converting the input data of the generative language large model into generalized corpus information corresponding to small sample data, and adding output constraints to the generalized corpus information to obtain the generalized corpus output result; The regular expression generation task specifically includes: converting the input data of the large generative language model into generalized text data corresponding to small sample data, abstracting the generalized text data into a rule format, and obtaining the rule output result; The customized response generation task specifically includes: incorporating a state list into the input data of the generative language model, transforming the input data of the generative language model, and obtaining customized output results.

[0009] Furthermore, the interactive data consists of unlabeled corpus from the existing internet, generalized data of the unlabeled corpus from the existing internet, and a status list. The unlabeled corpus from the existing internet includes product documents, function lists, product detail descriptions, manuals, information sources, weather data, news data, music data, hot word mapping data, and a knowledge base.

[0010] Furthermore, the step of vectorizing the interaction data into text specifically includes: The interactive data, including product documents, feature lists, product detail descriptions, manuals, information sources, weather data, news data, music data, hot word mapping data, and knowledge bases, is represented using text vectorization. The product documents and feature lists are converted into corresponding first embedding vectors (embedding1), the product detail descriptions and manuals are converted into second embedding vectors (embedding2), the information sources, weather data, and news data are converted into third embedding vectors (embedding3), the hot word mapping data is converted into fourth embedding vectors (embedding4), and the knowledge base is converted into fifth embedding vectors (embedding5). An embedding vector dataset is formed using the first embedding vector embedding1, the second embedding vector embedding2, the third embedding vector embedding3, the fourth embedding vector embedding4, and the fifth embedding vector embedding5. Based on the embedded vector dataset, similar text for interactive data is obtained by querying the preset embedding vector database.

[0011] Furthermore, the specific processing steps for inputting the interaction data and similar texts into the fine-tuned generative language model include: dataset label construction, data text enhancement, rule strengthening, and customized response construction. The dataset label construction first involves converting the unlabeled corpus from the existing network and similar texts from the interactive data into corresponding instructions and action units. Then, through a multi-round prompting learning process, the output text of the fine-tuned generative language model is converted into output text in a defined format. The output text in the defined format is referred to as the customized dataset label. The text enhancement involves constructing a generalized corpus of the interactive data and similar texts, adding finely tuned output constraints of the generative language model to this generalized corpus, guiding the generalization function of the generative language model, and obtaining the generalized corpus of data. The rule enhancement involves constructing generalized text data of the interaction data, abstracting the generalized text data into a fine-tuned rule format, and obtaining a regular expression-like structure. The customized response construction involves adding a state list to the interaction data and similar texts, transforming the interaction data and similar texts of the input generative language model to obtain a customized response.

[0012] Furthermore, the status list includes: background and foreground execution units, address information points, charging status, Bluetooth status, Wi-Fi status, whether registration permissions are required, and contextual business domain.

[0013] The present invention also proposes an interactive data construction device, comprising: a data acquisition unit, a generative language large model fine-tuning unit, a data transformation unit, and a customized data generation unit; The data acquisition unit is used to acquire interactive small sample data to form an interactive small sample dataset. The generative language large model fine-tuning unit is used to select the generative language large model to build data and data augmentation, and to fine-tune the generative language large model based on the interactive small sample dataset; The data conversion unit is used to collect the interactive data to be processed, convert the interactive data into text vectors to obtain the text vectors corresponding to the interactive data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interactive data. The customized data generation unit is used to input the interactive data and similar texts into the fine-tuned generative language model, and output customized dataset labels, data generalization corpus, regular expressions, and customized responses.

[0014] The present invention also proposes a computer device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the interactive data construction method.

[0015] The present invention also proposes a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device, causes the computer device to perform the operation of the interactive data construction method described above.

[0016] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: This invention proposes an interactive data construction method, apparatus, device, and storage medium for data construction and data augmentation in semantic understanding within the interactive dialogue domain. First, it fine-tunes a generative language model using a given small sample dataset of interactive data. The fine-tuning aims to teach the generative language model the crucial process of input-output format constraints on output, thus limiting the generated data format. Next, the interactive data to be processed is represented using text vectorization, obtaining the corresponding text vectors. These text vectors are then queried in a pre-defined embedding vector database. This database adds similar text to the interactive data input to the fine-tuned generative language model, ensuring the output quality of the model. Finally, the fine-tuned generative language model processes the input interactive data and similar text, outputting customized dataset labels, generalized corpus, regular expressions, and customized responses. This method generates a series of customized data through the combination of a generative language model and vectorized embedding, enabling the construction and generalization of customized data from scratch without any basic corpus or templates. It achieves the construction of mass-produced interactive data from 0 to 1 and performs data augmentation, meeting a wide range of semantic interaction needs. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an interactive data construction method proposed in an embodiment of the present invention. Figure 2 This diagram illustrates the fine-tuning principle of the generative language large model proposed in this embodiment of the invention. Figure 3 A schematic diagram illustrating the reasoning of an interactive data construction method proposed in an embodiment of the present invention; Figure 4 This is a flowchart illustrating the text vectorization process proposed in this embodiment of the invention. Figure 5 This is a schematic diagram of the structure of an interactive data construction device proposed in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a computer device proposed in an embodiment of the present invention; 500. Interactive data construction device; 510. Data acquisition unit; 520. Generative language large model fine-tuning unit; 530. Data conversion unit; 540. Customized data generation unit; 601. Processor; 602. Memory; 603. Communication interface; 604. Communication bus; 605. Executable instructions. Detailed Implementation

[0018] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent. To better illustrate this embodiment, some parts of the accompanying drawings may be omitted, enlarged, or reduced, and do not represent actual dimensions. The descriptions of directions such as "up" and "down" are not intended to limit this patent. It is understandable to those skilled in the art that some well-known details may be omitted from the accompanying drawings; The positional relationships depicted in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent. The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0019] like Figure 1 As shown, this embodiment proposes an interactive data construction method, including the following steps: S1. Obtain interactive small sample data and form an interactive small sample dataset; S2. Select a generative language model for building data and data augmentation, and fine-tune the generative language model based on the interactive small sample dataset; Step S2 selects a generative language big data model, an artificial intelligence model for natural language processing designed to understand and generate human language. These models are trained on massive amounts of text data and can perform a wide range of tasks, including text summarization, translation, sentiment analysis, and more. They are characterized by their massive scale, containing billions of parameters that help them learn complex patterns in language data. These models are typically based on deep learning architectures, such as transformers, which contributes to their impressive performance on various NLP tasks. With the increasing prevalence of generative language big data models, GPT-type and T5-type generative language big data models are emerging in large numbers. These generative language big data models utilize intelligent agent models that encompass a large amount of knowledge. Through prompt engineering, they creatively generate and label data, meeting the current need for zero-shot data construction. This step uses ChatGPT as an example. It is an excellent generative language model of the GPT class. In the field of smart cockpits, ChatGPT's training corpus is sufficient to cover all the skills of the cockpit. After testing, in zero-shot scenarios, ChatGPT's recognition accuracy in various cockpit domains reached more than 92%, indicating that generative language models represented by ChatGPT have a strong foundation in recognition ability.

[0020] In step S2, see Figure 2 The fine-tuning of the generative language model is performed through fine-tuning tasks; the fine-tuning tasks include: dataset label generation task, data generalization corpus generation task, regular expression generation task, and customized response generation task; The dataset label generation task specifically includes: The first stage of transformation: First, in the data input stage of the generative language model, the input data "I want to listen to Jay Chou's songs" is transformed into the first label information "#Voice Music Assistant Input#: I want to listen to Jay Chou's songs". Based on the first label information "#Voice Music Assistant Input#: I want to listen to Jay Chou's songs", the second label information "#Voice Music Assistant Output#: {Action: play, Singer: Jay Chou}" is constructed in the data output stage of the generative language model. The second stage of transformation: Then, the status list is added to the second tag information. The second tag information "#Voice Music Assistant Output#: {Action: play, Singer: Jay Chou, Status List: default}" with the status list is transformed into the third tag information "#Voice Music Assistant Input#: Search for Jay Chou's songs in the music field", and the semantics of the third tag information is output as "#Voice Music Assistant Output#: Songs of Blue and White Porcelain and Rice Fragrance have been found". The third stage of transformation: The semantics of the third tag information "#Voice Music Assistant Output#: The songs of Blue and White Porcelain and Rice Fragrance have been found" are transformed to obtain the tag output result "#Voice Music Assistant Output#: {Songs: Blue and White Porcelain, Rice Fragrance}".

[0021] The data generalization corpus generation task specifically includes: converting the input data "#Generalization Assistant Input# Lower the seat leg rest" from the generative language large model into generalized corpus information corresponding to small sample data, and adding output constraints to this generalized corpus information to obtain the generalized corpus output results "#Generalization Assistant Output# Lower the seat leg rest, move the seat leg rest down a little, move the seat leg rest down a little, move the seat leg rest up a little, lower the seat leg support, lower the seat leg support, lower the rear leg support". The regular expression generation task specifically includes: converting the input data of the generative language large model, "#Generalization Assistant Input#View Switch to Back, View Switch to Front, View Switch to Right Back, View Switch to Right Front, View Switch to Left Back, View Switch to Left Front, View Switch to Front", into generalized text data corresponding to small sample data; abstracting the generalized text data into a rule format; and obtaining the rule output result, "#Generalization Assistant Output#(View Switch|Switch View)[Switch to](Back / Front / Right Back / Right Front / Left Back / Left Front)". The customized response generation task specifically includes: incorporating the state list into the input data of the generative language model, transforming the input data of the generative language model "#Voice Music Assistant Input#: {Action: play, Singer: Jay Chou, State List: default}" to obtain the customized output result "#Voice Music Assistant Output#: Found the songs of Blue and White Porcelain and Rice Fragrance"; It should be noted that the specific data generalization corpus generation task, data generalization corpus generation task, regular expression-like generation task, and customized response generation task mentioned above are only examples. In the actual fine-tuning task execution process, it is not limited to the data generalization corpus generation task, data generalization corpus generation task, regular expression-like generation task, and customized response generation task in the example.

[0022] S3. Collect the interaction data to be processed, convert the interaction data into text vectors to obtain the text vectors corresponding to the interaction data, and search the preset embedding vector database based on the text vectors to obtain similar texts of the interaction data; In step S3, the embedding vector database is a special type of database specifically designed for storing and managing vector data. Vector data refers to data composed of multiple numerical values, which typically represent certain features or attributes. For example, a text can be represented as a vector composed of word frequencies. The main characteristic of embedding vector databases is their ability to efficiently store and query large-scale vector data. They typically employ a query method based on embedding vector similarity, retrieving data based on the similarity between vectors. This query method can be used in various application scenarios, such as image search, music recommendation, and text classification. There are many ways to implement embedding vector databases, among which vector indexing is a common approach. This method maps vector data to a high-dimensional space and builds an index structure within this space to support efficient similarity queries. Common vector index structures include KD-trees, ball trees, and LSH. Embedding vector databases have wide applications in fields such as artificial intelligence, machine learning, and big data. They can help users quickly retrieve and analyze large-scale vector data, thereby improving the efficiency and accuracy of data processing.

[0023] See Figure 3 The interactive data refers to the existing unlabeled corpus, such as generalized data and status lists of the existing unlabeled corpus. The existing unlabeled corpus includes product documents, function lists, product detail descriptions, manuals, information sources, weather data, news data, music data, hot word mapping data, and knowledge bases. The generalized data refers to the data of the existing unlabeled corpus after processing by synonym conversion, reduplication, deletion and addition of words, inversion and back translation.

[0024] See Figure 4 The step of vectorizing the interactive data into text specifically includes: Product documents, feature lists, product detail descriptions, seat leg rest adjustment points, manuals, information sources, weather data, news data, music data, hot word mapping data, and knowledge bases are represented using text vectorization to represent interactive data. The product document and the function list are respectively converted into the corresponding first embedding vector embedding1. The product document refers to the document that describes the product. In this example, the product is a smart car. The function list includes: seat settings, viewing angle settings and music settings, etc. The product details description and manual are respectively converted into a second embedding vector, embedding2. The product details description includes: lowering the seat leg rest, switching the view to the rear, switching the view to the front, switching the view to the right rear, switching the view to the right front, switching the view to the left rear, switching the view to the left front, switching the view to the front, etc. The manual refers to the user manual of the smart car. The information source, weather data, music data, and news data are respectively converted into a third embedding vector, embedding3. The information source is the driver who issues the voice command, the weather data refers to data about weather descriptions, and the music data refers to data about music descriptions, such as: I want to listen to Jay Chou's songs, {action: play, artist: Jay Chou, status list: default}. The hot word mapping data is converted into a fourth embedding vector, embedding4. The hot word mapping data includes hot words that have a mapping relationship with the specified words. The knowledge base is converted into a fifth embedding vector, embedding5. The knowledge base is a centralized self-service collection in which information about products, services, specific topics, or the entire enterprise is stored, organized, and shared.

[0025] An embedding vector dataset is formed using the first embedding vector embedding1, the second embedding vector embedding2, the third embedding vector embedding3, the fourth embedding vector embedding4, and the fifth embedding vector embedding5. Based on the embedded vector dataset, similar text for interactive data is obtained by querying the preset embedding vector database.

[0026] The purpose of text vectorization is to incorporate domain-specific and real-time data to ensure the quality of model output. By combining specific data, features, and products, unique and customized datasets can be generated. For example, if a company has a specific scenario involving zero-gravity seat settings, product details, feature lists, and constraints can be abstracted using text feature vector embedding. Other time-related business data, such as weather, music, and news, incorporates relevant text by adding time and source information to ensure the real-time nature of the generated data. Examples include: "February 21, 2023, Chongqing, sunny, domain: music, I want to listen to Jay Chou's songs," "February 23, 2023, Beijing, cloudy, domain: cabin settings, lower the seat leg rest," and "February 25, 2023, Guangzhou, light rain, domain: perspective settings, switch perspective to rear, switch perspective to front, switch perspective to right rear, switch perspective to right front, switch perspective to left rear, switch perspective to left front, switch perspective to front," etc. By combining highly abstract text vectorization with a finely tuned generative language model as a foundation, domain-specific data construction and enhancement can be achieved.

[0027] S4. Input the interaction data and similar texts into the fine-tuned generative language model, and output customized dataset labels, generalized data corpus, regular expressions, and customized responses.

[0028] In step S4, the process of inputting the interaction data and similar texts into the fine-tuned generative language model includes: dataset label construction, data text enhancement, rule strengthening, and customized response construction. In the data construction from 0 to 1, there is no batch of mass-produced data, only product definition documents or unlabeled corpora from the live network. The dataset label construction first involves converting unlabeled corpora from the existing internet and similar texts from the interactive data into corresponding instructions and action units, and then using a three-round cue learning process, specifically including: The first round of prompting learning process: transforming the user input data "I want to listen to Jay Chou's songs" into fourth tag information {domain: music, action: play, artist: Jay Chou}; The second round of prompting learning engineering: Incorporating a state list into the fourth label information {domain: music, action: play, artist: Jay Chou}, the fourth label information is transformed into the fifth label information {domain: music, action: play, artist: Jay Chou, state list: default}. The fifth label information {domain: music, action: play, artist: Jay Chou, state list: default} is then input into the finely tuned generative language model, outputting a statement similar to the sixth label information "Songs for Blue and White Porcelain and Rice Fragrance have been found"; The third round of prompting learning project: transform the sixth tag information "The song of blue and white porcelain and rice fragrance has been found" into {song: blue and white porcelain and rice fragrance}; The output text of the fine-tuned generative language model is transformed into output text in a defined format {songs: Blue and White Porcelain, Rice Fragrance}, and the output text in the defined format is denoted as the customized dataset label; To achieve the above outputs, the generative language model needs fine-tuning. This fine-tuning requires constructing interactive small sample data. The goal is to allow the generative language model to learn the important process of input-output format constraints on output. In the construction of dataset labels, a system prompt is used to provide preconditions, enabling the generative language model to recognize and generate the sentence in a customized manner. The language rules of the fine-tuned data are strengthened to constrain the format of the generated data. Furthermore, in the construction of labels, textual abstract features of customized actions and intentions need to be introduced through embedding. This is because the understanding of customization is the product definition, and the embedding of the descriptive text becomes the most similar vector of customized semantics. By introducing this vector, customized output can be obtained.

[0029] The text enhancement involves constructing generalized corpus information of similar text to the interactive data "#Generalization Assistant Input# Lower the seat legrest a bit". The construction methods are not limited to synonym conversion, reduplication, word deletion and addition, inversion, back translation, etc. Fine-tuned output constraints of the generative language model are added to this generalized corpus information to guide the generalization function of the generative language model, resulting in the generalized corpus information "#Generalization Assistant Output# Lower the seat legrest a bit, move the seat leg down a little, move the seat leg support down a bit, move the seat leg support up a little, move the seat leg support down a little, lower the seat leg support ... "Lower the seat leg support, lower the rear leg support"; In text enhancement, a word mapping table containing interactive data is abstracted into a customized embedding. For example, if the input is "#Generalization Assistant Input# Lower the seat leg support", the corresponding generalized data corpus will be "#Generalization Assistant Output# Lower the seat leg support, move the seat leg down a little, move the seat leg support down, move the seat leg support up a little, move the seat leg support down a little, lower the seat calf support, lower the seat leg support, lower the rear leg support", thus strengthening the generalization ability of the fine-tuned generative language model and ultimately achieving data generalization ability in the customized domain. Data text enhancement requires data quality, while the fine-tuning process mainly adjusts semantic quality.

[0030] The rule enhancement involves constructing generalized text data of the interactive data, such as "#generalized assistant input#view switched to back, view switched to front, view switched to right back, view switched to right front, view switched to left back, view switched to left front, view switched to front". The product then abstracts this generalized text data into a finely tuned rule format, such as "(view switching|switch view) [switch to] (back / front / right back / right front / left back / left front)". This rule is formed by merging multiple statements, and its rule generation capability is guided by a finely tuned generative language model. This rule format is denoted as a regular expression. The customized response is constructed by incorporating a status list into the interaction data and similar text. The interaction data "#Voice Music Assistant Input#: {Action: play, Singer: Jay Chou, Status List: default}" input to the generative language model is transformed with similar text to obtain the customized response "#Voice Music Assistant Output#: Songs of Blue and White Porcelain and Rice Fragrance have been found".

[0031] In custom response construction, if source or network issues arise despite semantic correctness, or if the current state differs from the normal state, the response result often needs adjustment. During the second and third stage transformations, a state list is frequently considered, including: background and foreground execution units, address information points, charging status, Bluetooth status, Wi-Fi status, registration permissions, and contextual business domain. Custom response construction only works correctly when all states are at their default values; otherwise, a custom response is generated, such as "#Voice Music Assistant Output#: Unable to connect to the network, please connect and try again." For example, if the input "Play Jay Chou's songs" encounters a network problem, the response should be "#Voice Music Assistant Output#: Unable to connect to the network, please connect and try again."

[0032] In this embodiment, the generative language model is first fine-tuned using a given small sample dataset of interactions. The purpose of this fine-tuning is to enable the generative language model to learn the crucial process of input-output format constraints, thus limiting the generated data format. Next, the interactive data to be processed is represented using text vectorization to obtain the corresponding text vectors. These text vectors are then queried in a pre-defined embedding vector database. This process adds similar text to the input data of the fine-tuned generative language model, ensuring the output quality of the model. Finally, the fine-tuned generative language model processes the input interactive data and similar text to output customized dataset labels, generalized corpus, regular expressions, and customized responses. This method generates a series of customized data through the combination of a generative language model and vectorized embedding, enabling the construction and generalization of customized data from scratch without any basic corpus or templates. It achieves the construction of mass-produced interactive data from 0 to 1 and performs data augmentation, meeting a wide range of semantic interaction needs. In this embodiment, the generative language model is first fine-tuned using a given small sample dataset of interactions. The fine-tuning aims to teach the generative language model the crucial process of input-output format constraints, thus limiting the generated data format. Next, the interactive data to be processed is represented using text vectorization to obtain the corresponding text vectors. These text vectors are then queried in a pre-defined embedding vector database. This process adds similar text to the input data of the fine-tuned generative language model, ensuring the output quality of the model. Finally, the fine-tuned generative language model processes the input interactive data and similar text, outputting customized dataset labels, generalized corpus, regular expressions, and customized responses. This method, through the combination of a generative language model and vectorized embedding, generates a series of customized data, enabling the construction and generalization of customized data from scratch without any basic corpus or templates. It achieves the construction of mass-produced interactive data from 0 to 1 and performs data augmentation, meeting a wide range of semantic interaction needs. Furthermore... This embodiment also proposes an interactive data construction device 500, see [link to documentation]. Figure 5 It includes: a data acquisition unit 510, a generative language large model fine-tuning unit 520, a data transformation unit 530, and a customized data generation unit 540; The data acquisition unit 510 is used to acquire interactive small sample data to form an interactive small sample dataset. The generative language large model fine-tuning unit 520 is used to select the generative language large model to construct data and data augmentation, and to fine-tune the generative language large model based on the interactive small sample dataset. The data conversion unit 530 is used to collect the interactive data to be processed, convert the interactive data into text vectors to obtain the text vectors corresponding to the interactive data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interactive data. The customized data generation unit 540 is used to input the interaction data and similar texts into the fine-tuned generative language model, and output customized dataset labels, data generalization corpus, regular expressions, and customized responses.

[0033] This embodiment also proposes a computer device, see [link to documentation]. Figure 6 It includes: a processor 601, a memory 602, a communication interface 603 and a communication bus 604, wherein the processor 601, the memory 602 and the communication interface 603 communicate with each other through the communication bus 604; The processor 601, memory 602, and communication interface 603 communicate with each other via communication bus 604. Communication interface 603 is used to communicate with other network elements, such as clients or other servers. The processor 601 executes executable instructions 605, specifically performing the relevant steps described above in the embodiment of the interactive data construction method.

[0034] Specifically, executable instructions 605 may include program code. Processor 601 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0035] Memory 602 is used to store executable instructions 605. Memory 602 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0036] Executable instruction 605 can be invoked by processor 601 to cause the computer device to perform the following operations: Obtain interactive small sample data and assemble an interactive small sample dataset; Select a generative language model for building data and data augmentation, and fine-tune the generative language model based on the interactive few-sample dataset; Collect the interaction data to be processed, convert the interaction data into text vectors to obtain the text vectors corresponding to the interaction data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interaction data; The interaction data and similar texts are input into the finely tuned generative language model, which outputs customized dataset labels, generalized data corpus, regular expressions, and customized responses.

[0037] This embodiment also proposes a computer-readable storage medium storing at least one executable instruction. When the executable instruction is executed on a computer device, it causes the computer device to perform the operation of the interactive data construction method described above, specifically including the following steps: Obtain interactive small sample data and assemble an interactive small sample dataset; Select a generative language model for building data and data augmentation, and fine-tune the generative language model based on the interactive few-sample dataset; Collect the interaction data to be processed, convert the interaction data into text vectors to obtain the text vectors corresponding to the interaction data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interaction data; The interaction data and similar texts are input into the finely tuned generative language model, which outputs customized dataset labels, generalized data corpus, regular expressions, and customized responses.

[0038] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively describe all possible implementations here.

Claims

1. A method for constructing interactive data, characterized in that, Includes the following steps: Obtain interactive small sample data and assemble an interactive small sample dataset; Select a generative language model for building data and data augmentation, and fine-tune the generative language model based on the interactive few-sample dataset; The fine-tuning of the generative language model is performed through fine-tuning tasks, which include: dataset label generation task, data generalization corpus generation task, regular expression generation task, and customized response generation task. The dataset label generation task specifically includes: First, in the data input stage of the generative language model, the input data of the generative language model is converted into first label information. Based on the first label information, second label information is constructed in the data output stage of the generative language model. Then, a state list is added to the second label information, and the second label information with the state list is converted into third label information, and the semantics of the third label information is output. Finally, the semantics of the third label information is transformed to obtain the label output result. The state list includes: background and foreground execution units, address information points, charging status, Bluetooth status, Wi-Fi status, whether registration permissions are required, and contextual business domain. The data generalization corpus generation task specifically includes: converting the input data of the generative language large model into generalized corpus information corresponding to small sample data, and adding output constraints to the generalized corpus information to obtain the generalized corpus output result; The regular expression generation task specifically includes: converting the input data of the large generative language model into generalized text data corresponding to small sample data, abstracting the generalized text data into a rule format, and obtaining the rule output result; The customized response generation task specifically includes: incorporating a state list into the input data of the generative language model, transforming the input data of the generative language model, and obtaining customized output results; Collect interactive data to be processed, convert the interactive data into text vectors to obtain text vectors corresponding to the interactive data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interactive data; the text vectorization of the interactive data specifically includes: The interactive data, including product documents, feature lists, product detail descriptions, manuals, information sources, weather data, news data, music data, hot word mapping data, and knowledge base, are represented using text vectorization. The product documents and feature lists are converted into corresponding first embedding vectors (embedding1), the product detail descriptions and manuals are converted into second embedding vectors (embedding2), the information sources, weather data, and news data are converted into third embedding vectors (embedding3), the hot word mapping data is converted into fourth embedding vectors (embedding4), and the knowledge base is converted into fifth embedding vectors (embedding5). An embedding vector dataset is formed using the first embedding vector embedding1, the second embedding vector embedding2, the third embedding vector embedding3, the fourth embedding vector embedding4, and the fifth embedding vector embedding5. Based on the embedded vector dataset, similar text to the interactive data is obtained by querying the preset embedding vector database; The interaction data and similar texts are input into the finely tuned generative language model, which outputs customized dataset labels, generalized data corpus, regular expressions, and customized responses. The specific processing steps of inputting the interaction data and similar texts into the fine-tuned generative language model include: dataset label construction, data text enhancement, rule strengthening, and customized response construction. The dataset label construction first involves converting the unlabeled corpus from the existing network and similar texts from the interactive data into corresponding instructions and action units. Then, through a multi-round prompting learning process, the output text of the fine-tuned generative language model is converted into output text in a defined format. The output text in the defined format is referred to as the customized dataset label. The text enhancement involves constructing a generalized corpus of the interactive data and similar texts, adding finely tuned output constraints of the generative language model to this generalized corpus, guiding the generalization function of the generative language model, and obtaining the generalized corpus of data. The rule enhancement involves constructing generalized text data of the interaction data, abstracting the generalized text data into a fine-tuned rule format, and obtaining a regular expression-like structure. The customized response construction involves adding a state list to the interaction data and similar texts, transforming the interaction data and similar texts of the input generative language model to obtain a customized response.

2. The interactive data construction method according to claim 1, characterized in that, The interactive data consists of unlabeled corpus from the existing web, generalized data of the unlabeled corpus from the existing web, and a status list. The unlabeled corpus from the existing web includes product documents, function lists, product detail descriptions, manuals, information sources, weather data, news data, music data, hot word mapping data, and a knowledge base.

3. An interactive data construction apparatus, the apparatus being used to execute the interactive data construction method as described in claim 1 or 2, characterized in that, include: Data acquisition unit, generative language large model fine-tuning unit, data transformation unit, and customized data generation unit; The data acquisition unit is used to acquire interactive small sample data to form an interactive small sample dataset. The generative language large model fine-tuning unit is used to select the generative language large model to build data and data augmentation, and to fine-tune the generative language large model based on the interactive small sample dataset; The data conversion unit is used to collect the interactive data to be processed, convert the interactive data into text vectors to obtain the text vectors corresponding to the interactive data, and search a preset embedding vector database based on the text vectors to obtain similar texts of the interactive data. The customized data generation unit is used to input the interactive data and similar texts into the fine-tuned generative language model, and output customized dataset labels, data generalization corpus, regular expressions, and customized responses.

4. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the interactive data construction method as described in any one of claims 1-2.

5. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the operation of the interactive data construction method as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Generative large language model training method and model-based man-machine voice interaction method

    CN116127046A