Model training methods, devices and storage media

By inputting the summary text generated by the large-scale model into the small-scale model for training, the generated summary model achieves efficient and accurate data processing in customer service communication record classification, solving the problems of low accuracy and low efficiency in the generation of summary text in existing technologies, and reducing operating costs.

CN117370542BActive Publication Date: 2026-05-05CHINA UNITED NETWORK COMM GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA UNITED NETWORK COMM GRP CO LTD
Filing Date
2023-09-12
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy, low efficiency, and susceptibility to noise interference when processing large-scale customer service communication records, especially when processing long texts.

Method used

After generating the summary text using a large-scale model, it is input into a small-scale model for training to generate a summary model. Combining the data generation capabilities of the large-scale model and the low-cost advantage of the small-scale model, the trained summary model is used for data classification.

Benefits of technology

It improves the accuracy and efficiency of generating summary text, reduces operating costs, avoids the high subsequent operating costs of large-scale models, and maintains efficient data processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370542B_ABST
    Figure CN117370542B_ABST
Patent Text Reader

Abstract

This application provides a model training method, apparatus, and storage medium, relating to the field of artificial intelligence, to address the problem of inaccurate data classification results generated by existing models. The method includes: acquiring target data; the target data includes historical data; inputting the historical data into a first model to generate a first summary text corresponding to the historical data; determining a preset number of second summary texts from the first summary texts; training a second model based on the second summary texts and the corresponding historical data to obtain a summary model; the summary model is used to determine the summary text of the data; the first model has a greater data generation capability than the second model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a model training method, apparatus and storage medium. Background Technology

[0002] As the customer service industry continues to expand, the volume of customer service communication records generated is also increasing daily, making thematic classification of these records increasingly important.

[0003] Existing techniques typically use text clustering methods to convert customer service communication records into corresponding text data and extract textual features. A clustering model is then generated based on the textual features of multiple customer service communication records. Finally, based on the similarity between these models, anti-interference processing is applied to the clustering models to obtain the topic classification for each customer service communication record. However, this method suffers from low processing efficiency and accuracy when handling a large number of customer service communication records or records with long text lengths. Summary of the Invention

[0004] This application provides a model training method, apparatus, and storage medium to solve the problem of inaccurate data classification results generated by models in the prior art.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] In a first aspect, a model training method is provided, comprising: acquiring target data; the target data including historical data; inputting the historical data into a first model to generate a first summary text corresponding to the historical data; determining a preset number of second summary texts from the first summary texts; training a second model based on the second summary texts and the historical data corresponding to the second summary texts to obtain a summary model; the summary model is used to determine the summary text of the data; the data generation capability of the first model is greater than that of the second model.

[0007] Optionally, the target data also includes: training data. After generating the summarizing model, the model training method further includes: inputting the training data into the summarizing model to determine the third summary text of the training data; clustering the third summary texts based on the similarity between the third summary texts to determine multiple first clusters; determining the first label of each first cluster; and determining the label of each third summary text based on the first label of each first cluster and the third summary texts in each first cluster.

[0008] Optionally, based on the first label of each first cluster and the third summary text in each first cluster, determining the label of each third summary text includes: receiving first indication information; the first indication information is used to adjust the first cluster and the label of the first cluster; in response to the first indication information, adjusting the first cluster and the label of the first cluster, determining a second cluster and a second label of the second cluster; generating a mapping table based on the third summary text in each second cluster and the second label of each second cluster; the mapping table is used to represent the mapping relationship between each third summary text and the second label.

[0009] Optionally, the target data also includes: real-time data. After generating the mapping table, the model training method further includes: inputting the real-time data into the summarization model to determine the fourth summary text of the real-time data; determining the second label corresponding to the real-time data based on the fourth summary text of the real-time data and the mapping table; and determining the data classification result corresponding to the real-time data based on the second label.

[0010] Optionally, historical data is input into the first model to generate the first summary text corresponding to the historical data, including: determining the prompt template corresponding to the historical data based on the historical data; the prompt template is the format template of the first summary text; and inputting the historical data and the prompt template into the first model to generate the first summary text.

[0011] Optionally, a second model is trained based on the second summary text and the corresponding historical data to obtain a summary model. This model training method further includes: determining a training set, a validation set, and a test set based on the second summary text and the corresponding historical data; Step 1: Training the current model based on the second summary text in the training set and the corresponding historical data to obtain a trained summary model; the current model is the second model, or the model determined in the previous iteration of training; Step 2: Validating the trained summary model based on the second summary text in the validation set and the corresponding historical data to determine whether the loss function value between the fourth summary text generated by the trained summary model and the second summary text satisfies the convergence condition; the fourth summary text is generated by the trained summary model based on the historical data corresponding to the second summary text in the validation set. Step 3: If the conditions are not met, the training summarization model is used as the current model, and steps 1, 2, and 3 are executed iteratively until the loss function value meets the convergence condition; Step 4: If the conditions are met, the training summarization model is tested based on the second summary text in the test set and the historical data corresponding to the second summary text in the test set to determine whether the similarity ratio between the fifth summary text generated by the training summarization model and the second summary text is greater than a preset value; the fifth summary text is the summary text generated by the training summarization model based on the historical data corresponding to the second summary text in the test set; Step 5: If the similarity ratio is less than the preset value, the training summarization model is used as the current model, and steps 1, 2, 3, 4, and 5 are executed iteratively until the similarity ratio is greater than or equal to the preset value; Step 6: If the similarity ratio is greater than or equal to the preset value, the training summarization model is determined to be the summarization model.

[0012] Optionally, the model training also includes: obtaining the text length of the first summary text; determining the first summary text with a text length greater than or equal to a preset length as the sixth summary text; the sixth summary text being a valid summary text whose text length meets the preset length; and determining a preset number of second summary texts from the sixth summary text.

[0013] Secondly, a model training apparatus is provided, comprising: an acquisition unit, a generation unit, a determination unit, and a training unit; the acquisition unit is used to acquire target data; the target data includes: historical data; the generation unit is used to input the historical data into a first model and generate a first summary text corresponding to the historical data; the determination unit is used to determine a preset number of second summary texts from the first summary texts; the training unit is used to train a second model based on the second summary texts and the historical data corresponding to the second summary texts to obtain a summary model; the summary model is used to determine the summary text of the data; the data generation capability of the first model is greater than that of the second model.

[0014] Optionally, the target data also includes: training data; after generating the summarizing model, the determining unit is further configured to input the training data into the summarizing model to determine the third summary text of the training data; the determining unit is further configured to cluster the third summary texts based on the similarity between the third summary texts to determine multiple first clusters; the determining unit is further configured to determine the first label of each first cluster; and the determining unit is further configured to determine the label of each third summary text based on the first label of each first cluster and the third summary texts in each first cluster.

[0015] Optionally, the determining unit is specifically configured to: receive first indication information; the first indication information is used to adjust the first cluster and the label of the first cluster; in response to the first indication information, adjust the first cluster and the label of the first cluster, determine the second cluster and the second label of the second cluster; generate a mapping relationship table based on the third summary text in each second cluster and the second label of each second cluster; the mapping relationship table is used to characterize the mapping relationship between each third summary text and the second label.

[0016] Optionally, the target data also includes: real-time data; after generating the mapping relationship table, the determining unit is further used to input the real-time data into the summarizing model to determine the fourth summary text of the real-time data; the determining unit is further used to determine the second label corresponding to the real-time data based on the fourth summary text of the real-time data and the mapping relationship table; the determining unit is further used to determine the data classification result corresponding to the real-time data based on the second label.

[0017] Optionally, the generation module is specifically used for: determining the prompt template corresponding to the historical data based on the historical data; the prompt template is a format template of the first summary text; inputting the historical data and the prompt template into the first model to generate the first summary text.

[0018] Optionally, the training module is specifically used for: determining the training set, validation set, and test set based on the second summary text and the historical data corresponding to the second summary text; Step 1: Training the current model based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set to obtain the training summary model; the current model is the second model, or the model determined in the previous iteration of training; Step 2: Validating the training summary model based on the second summary text in the validation set and the historical data corresponding to the second summary text in the validation set to determine whether the loss function value between the fourth summary text generated by the training summary model and the second summary text satisfies the convergence condition; the fourth summary text is the summary text generated by the training summary model based on the historical data corresponding to the second summary text in the validation set; Step 3: If it does not satisfy the condition, then the training summary model is terminated. The training model is used as the current model, and steps 1, 2, and 3 are executed iteratively until the loss function value meets the convergence condition; Step 4: If the condition is met, the training summarization model is tested based on the second summary text in the test set and the historical data corresponding to the second summary text in the test set to determine whether the similarity ratio between the fifth summary text generated by the training summarization model and the second summary text is greater than a preset value; the fifth summary text is the summary text generated by the training summarization model based on the historical data corresponding to the second summary text in the test set; Step 5: If the similarity ratio is less than the preset value, the training summarization model is used as the current model, and steps 1, 2, 3, 4, and 5 are executed iteratively until the similarity ratio is greater than or equal to the preset value; Step 6: If the similarity ratio is greater than or equal to the preset value, the training summarization model is determined to be the summarization model.

[0019] Optionally, the acquisition unit is further configured to acquire the text length of the first summary text; the determination unit is further configured to determine the first summary text whose text length is greater than or equal to a preset length as the sixth summary text; the sixth summary text is a valid summary text whose text length meets the preset length; the determination unit is further configured to determine a preset number of second summary texts from the sixth summary text.

[0020] Thirdly, a model training apparatus is provided, including a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory via a bus; when the model training apparatus is running, the processor executes the computer execution instructions stored in the memory, so that the model training apparatus performs the model training method described in the first aspect.

[0021] The model training device can be a network device or a component of a network device, such as a chip system within the network device. This chip system supports the network device in implementing the functions involved in the first aspect and any of its possible implementations, such as acquiring, determining, and transmitting the data and / or information involved in the aforementioned model training method. The chip system includes a chip, but may also include other discrete devices or circuit structures.

[0022] Fourthly, a computer-readable storage medium is provided, comprising computer-executable instructions that, when executed on a computer, cause the computer to perform the model training method described in the first aspect.

[0023] Fifthly, a computer program product is also provided, which includes computer instructions that, when executed on a model training device, cause the model training device to perform the model training method as described in the first aspect above.

[0024] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on the first computer-readable storage medium. The first computer-readable storage medium may be packaged together with the processor of the model training device, or it may be packaged separately from the processor of the model training device; this application embodiment does not limit this.

[0025] The descriptions of the second, third, fourth, and fifth aspects in this application can be referenced to the detailed description of the first aspect; and the beneficial effects of the second, third, fourth, and fifth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.

[0026] In the embodiments of this application, the names of the aforementioned model training devices do not limit the devices or functional modules themselves. In actual implementation, these devices or functional modules may appear under other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of this disclosure and its equivalents.

[0027] The technical solution provided in this application brings at least the following beneficial effects:

[0028] Based on any of the above aspects, embodiments of this application provide a model training method. First, target data is acquired, including historical data. Then, the historical data is input into a first model to generate a first summary text corresponding to the historical data. Next, a preset number of second summary texts can be determined from the first summary texts. Then, based on the second summary texts and the corresponding historical data, a second model is trained to obtain a summary model. The summary model is used to determine the summary text of the data; the first model has a greater data generation capability than the second model.

[0029] As can be seen from the above, this application solves the problems of weak noise resistance, low accuracy, and low efficiency of the small-scale model (i.e., the second model) by inputting historical data into a first model with strong data processing capabilities to generate a first summary text. Then, a second summary text is determined based on the first summary text and input into the second model, which has weaker generation capabilities but lower operating costs, for model training, thereby generating the corresponding summary model. Through this method, the summary model trained on the second model generates summary text with higher accuracy and efficiency, and only incurs the cost of generating the summary text using the first model, without bearing the high cost of subsequent operation of the first model. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the structure of the model training system provided in the embodiments of this application;

[0031] Figure 2 A schematic diagram of a hardware structure of the model training device provided in the embodiments of this application;

[0032] Figure 3 Another hardware structure diagram of the model training device provided in the embodiments of this application;

[0033] Figure 4 A schematic flowchart illustrating a model training method provided in an embodiment of this application;

[0034] Figure 5 A flowchart illustrating another model training method provided in an embodiment of this application;

[0035] Figure 6 A flowchart illustrating another model training method provided in an embodiment of this application;

[0036] Figure 7 A flowchart illustrating another model training method provided in an embodiment of this application;

[0037] Figure 8 A flowchart illustrating another model training method provided in an embodiment of this application;

[0038] Figure 9 A flowchart illustrating another model training method provided in an embodiment of this application;

[0039] Figure 10 A flowchart illustrating another model training method provided in an embodiment of this application;

[0040] Figure 11 This is a schematic diagram of the structure of a model training device provided in an embodiment of this application. Detailed Implementation

[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0042] It should be noted that in the embodiments of this application, the words "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0043] To facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art can understand that the terms "first" and "second" are not intended to limit the quantity or execution order.

[0044] Before providing a detailed introduction to the model training method provided in this application, let me briefly introduce the background of this application.

[0045] As the customer service industry continues to expand, the volume of customer service communication records generated is also increasing daily, making thematic classification of these records increasingly important.

[0046] Existing techniques typically use text clustering methods to convert customer service communication records into corresponding text data and extract textual features from this data. A clustering model is then generated based on the textual features of multiple customer service communication records. Finally, based on the similarity between these clustering models, anti-interference processing is applied to the clustering models to obtain the topic classification corresponding to the customer service communication records.

[0047] However, because large-scale models incur high runtime costs, smaller-scale models with lower generation and noise resistance are typically used for data processing. While smaller-scale models are cheaper to deploy, they produce less accurate and diverse summary texts, and are prone to data over-coupling. Therefore, the generated summary texts cannot adequately summarize the target data, and smaller-scale models suffer from low processing efficiency and accuracy when handling large volumes of customer service communication records.

[0048] Furthermore, small-scale models are easily affected by noise in the data when processing data, resulting in incorrect outputs. Especially in real-world business scenarios, noise in the data can include: speech-to-text recognition errors, interjections, and homophones.

[0049] Furthermore, smaller-scale models tend to have lower accuracy when processing longer summary texts.

[0050] However, while large-scale models have significant advantages in processing data, they also have higher deployment costs and require more memory resources.

[0051] To address the aforementioned issues, this application provides a model training method. First, target data, including historical data, is acquired. Then, the historical data is input into a first model to generate a first summary text corresponding to the historical data. Next, a predetermined number of second summary texts can be determined from the first summary texts. Then, based on the second summary texts and the corresponding historical data, a second model is trained to obtain a summary model. The summary model is used to determine the summary text of the data; the first model has a greater data generation capability than the second model.

[0052] As can be seen from the above, this application solves the problems of weak noise resistance, low accuracy, and low efficiency of the small-scale model (i.e., the second model) by inputting historical data into a first model with strong data processing capabilities to generate a first summary text. Then, a second summary text is determined based on the first summary text and input into the second model, which has weaker generation capabilities but lower operating costs, for model training, thereby generating the corresponding summary model. Through this method, the summary model trained on the second model generates summary text with higher accuracy and efficiency, and only incurs the cost of generating the summary text using the first model, without bearing the high cost of subsequent operation of the first model.

[0053] This model training method is applicable to model training systems. Figure 1 One structure of the model training system is shown. For example... Figure 1 As shown, the model training system includes: electronic device 101, terminal 102, and network management device 103.

[0054] Among them, electronic device 101 is connected to terminal 102 and network management device 103 for communication.

[0055] Optionally, the electronic device 101 is used to train a summarizing model and generate a summary text of the target data based on the summarizing model. Then, the classification result of the target data is determined based on the summary text.

[0056] Optionally, terminal 102 is used to generate first instruction information in response to an instruction operation performed by a model trainer on terminal 102.

[0057] Optionally, the network management device 103 is used to store recorded communication conversations between users and customer service representatives.

[0058] In practical applications, electronic device 101 can connect to multiple terminals 102. For ease of understanding, this application uses the example of one electronic device 101 connected to one terminal 102 for illustration.

[0059] Optionally, the physical device of electronic device 101 can be a terminal, a server, or other types of electronic devices.

[0060] Optionally, when the physical device of electronic device 101 is a terminal, the terminal can be a device that provides voice and / or data connectivity to a user, a handheld device with wireless connectivity, or other processing devices connected to a wireless modem. The terminal can communicate with one or more core networks via a radio access network (RAN). The terminal can be a mobile terminal, such as a mobile phone (or "cellular" phone) and a computer with a mobile terminal, or a portable, pocket-sized, handheld, computer-embedded, or vehicle-mounted mobile device that exchanges voice and / or data with the radio access network, such as a mobile phone, tablet computer, laptop computer, netbook, or personal digital assistant (PDA).

[0061] Optionally, when the physical device of electronic device 101 is a server, the server can be one of the servers in a server cluster (composed of multiple servers), a chip in the server, a system-on-a-chip in the server, or a virtual machine (VM) deployed on a physical machine. This application embodiment does not limit this.

[0062] Optionally, when electronic device 101 is a server, it and network management device 103 can be multiple devices that are set up independently, or they can be integrated into the same device.

[0063] It is easy to understand that when electronic device 101 and network management device 103 are integrated into the same device, the communication method between them is the same as the communication between modules within the device. In this case, the communication process between the two devices is the same as the communication process between the two devices when electronic device 101 and network management device 103 are independent of each other.

[0064] For ease of understanding, this application uses the example of electronic device 101 and network management device 103 being independent of each other.

[0065] The basic hardware structure of the electronic devices 101 in the model training system is similar, both including Figure 2 or Figure 3 The components included in the model training device shown below. Figure 2 and Figure 3 Taking the model training device shown as an example, the hardware structure of electronic device 101 is introduced.

[0066] like Figure 2 The diagram shown is a hardware structure schematic of a model training device provided in an embodiment of this application. The model training device includes a processor 21, a memory 22, a communication interface 23, and a bus 24. The processor 21, memory 22, and communication interface 23 are connected via the bus 24.

[0067] Processor 21 is the control center of the model training device. It can be a single processor or a collective term for multiple processing elements. For example, processor 21 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0068] As one embodiment, processor 21 may include one or more CPUs, for example Figure 2 CPU0 and CPU1 are shown in the diagram.

[0069] The memory 22 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.

[0070] In one possible implementation, the memory 22 can exist independently of the processor 21. The memory 22 can be connected to the processor 21 via a bus 24 and is used to store instructions or program code. When the processor 21 calls and executes the instructions or program code stored in the memory 22, it can implement the model training method provided in the following embodiments of this application.

[0071] In this embodiment, the software programs stored in the memory 22 of the model training device 101 are different, so the functions implemented by the model training device 101 are different. The functions performed by each device will be described with reference to the following flowchart.

[0072] In another possible implementation, the memory 22 can also be integrated with the processor 21.

[0073] Communication interface 23 is used for connecting the model training device to other devices via a communication network, such as Ethernet, wireless access network, or wireless local area network (WLAN). Communication interface 23 may include a receiving unit for receiving data and a sending unit for sending data.

[0074] Bus 24 can be an industry standard architecture (ISA) bus, a peripheral component interconnect (PCI) bus, or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 2 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0075] Figure 3 Another hardware structure of the model training device in an embodiment of this application is shown. For example... Figure 3 As shown, the model training device may include a processor 31 and a communication interface 32. The processor 31 is coupled to the communication interface 32.

[0076] The functions of processor 31 can be referred to in the description of processor 21 above. In addition, processor 31 also has a storage function, and can perform the functions of memory 22 mentioned above.

[0077] The communication interface 32 is used to provide data to the processor 31. This communication interface 32 can be an internal interface of the model training device, or it can be an external interface of the model training device (equivalent to communication interface 23).

[0078] It should be pointed out that, Figure 2 (or Figure 3 The structure shown in the diagram does not constitute a limitation on the model training device, except... Figure 2 (or Figure 3In addition to the components shown in the diagram, the model training device may include more or fewer components than those shown in the diagram, or combine certain components, or have different component arrangements.

[0079] The model training method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0080] like Figure 4 As shown, the model training method provided in this application embodiment is applied to electronic devices, and the model training method includes: S401-S404.

[0081] S401, Electronic equipment acquires target data.

[0082] The target data includes historical data.

[0083] Optionally, the target data can be audio recordings of communication between users and customer service stored on the network management device.

[0084] Specifically, when processing large-scale target data, it is necessary to train the model using historical data to obtain the model corresponding to the historical data. This can greatly improve the processing efficiency of large-scale target data.

[0085] Optionally, one way for an electronic device to acquire target data is as follows: the electronic device sends a request to a network management device that stores the target data to acquire the target data. The network management device responds to the request and sends the target data to the electronic device.

[0086] S402. The electronic device inputs historical data into the first model and generates the first summary text corresponding to the historical data.

[0087] Optionally, the first model can be a large pre-trained language model (chat generalized linear model-6B, chat GLM-6B) capable of handling tens of millions of data points.

[0088] Optionally, the summary text can be a text data that summarizes the main content of historical data for the user.

[0089] Specifically, by obtaining the first summary text, the main content of the communication between users and customer service in historical data can be obtained, which facilitates subsequent classification.

[0090] For example, in combination Figure 1 Assuming the historical data consists of 200,000 communication records between users and customer service, electronic device 101 can input these 200,000 communication records into the chat GLM-6B model for model training, thereby generating a summary of the main content of the 200,000 communication records between users and customer service (also known as the first summary text corresponding to the historical data).

[0091] For example, suppose the communication record between the user and customer service includes: the customer's phone bill is overdue, the customer inquires about the monthly overdue payment, and the customer service informs the customer of the amount and details of the charges. Electronic device 101 can summarize the communication record between the user and customer service and generate a summary text corresponding to the communication record.

[0092] S403. The electronic device determines a preset number of second summary texts from the first summary text.

[0093] Specifically, a predetermined number of summary texts are randomly selected from the first summary text and used as experimental data for training the summary model. While maintaining the functionality of the summary model, training the model using the second summary text is more efficient.

[0094] For example, in combination Figure 1 Assuming the preset quantity is 60,000, electronic device 101 randomly selects 60,000 first summary texts and corresponding historical data from 200,000 texts to generate second summary texts and corresponding historical data.

[0095] S404. The electronic device trains the second model based on the second summary text and the historical data corresponding to the second summary text to obtain the summary model.

[0096] The summary model is used to determine the summary text of the data.

[0097] The first model has a greater data generation capability than the second model.

[0098] Optionally, the second model can be a Chinese generative pre-trained language (T5-PEGASUS) model.

[0099] Optionally, the summarization model can be an artificial intelligence model that summarizes the main content of a text based on its content.

[0100] Specifically, while the first model has a stronger data processing capability, its subsequent operating cost is higher. The summary text generated by the first model can be input into the second model for training, thereby obtaining a summary model. This summary model combines the data processing capabilities of the first model with the lower deployment cost of the second model.

[0101] For example, in combination Figure 1 Assuming the second model is the T5-PEGASUS model, the electronic device can input 60,000 second summary texts and the historical data corresponding to the second summary texts into the second model for model training, thereby obtaining the summary model.

[0102] In this embodiment, the electronic device processes historical data through a first model and converts the historical data into a first summary text. The electronic device then inputs the generated first summary text into a second model, thereby generating a summary model that combines the data processing capabilities of the first model with the deployment cost advantages of the second model.

[0103] In some embodiments, combined with Figure 4 ,like Figure 5 As shown, the target data also includes: training data. After generating the summary model, the training method of the model also includes: S501-S504.

[0104] S501. The electronic device inputs the training data into the summarization model to determine the third summary text of the training data.

[0105] Specifically, after the summary model is generated, it needs to be further trained to generate a mapping relationship between multiple third summary texts and their respective categories.

[0106] Optionally, the electronic device inputs the training data into the summarizing model, and the specific steps for determining the third summary text of the training data are similar to those in S404. The specific steps for the electronic device inputting the training data into the summarizing model and determining the third summary text of the training data can be referred to in S404, and will not be repeated here.

[0107] S502. The electronic device clusters the third summary texts based on the similarity between them, and determines multiple first clusters.

[0108] Optionally, similarity is the ratio of the number of identical or similar words in two third-party summary texts to the total number of words in the two third-party summary texts.

[0109] If two different words belong to the same semantic category in a large corpus, then the two words are determined to be similar words.

[0110] Optionally, the electronic device can group third-summary texts with a similarity greater than a preset value into the same first cluster.

[0111] For example, in combination Figure 1Suppose the third summary text is "User queries consumption status" and "User inquires about this month's call charge usage record". It is assumed that "query" and "inquire", "consumption and call charge usage", and "status and record" in the database belong to the same semantic category. In this case, electronic device 101 can determine that "User queries consumption status" and "User inquires about this month's call charge usage record" have 14 similar characters and 4 identical characters, for a total of 20 words in the third summary text. Therefore, the similarity between "User queries consumption status" and "User inquires about this month's call charge usage record" = (14+4)÷20 = 90%.

[0112] If the preset value is 80%, then the electronic device can determine that "user query consumption status" and "user inquire about this month's call charges" belong to the same first cluster.

[0113] S503, The electronic device determines the first label of each first cluster.

[0114] Specifically, the first label is a summary of the first cluster.

[0115] For example, suppose that "User Inquiry about Consumption Status" and "User Inquiry about This Month's Phone Bill Usage Record" belong to the same first cluster, namely "User Inquiry about This Month's Consumption Status," and the first label corresponding to "User Inquiry about This Month's Consumption Status" is "Inquiry about User Consumption-related Questions." In this case, the electronic device can determine that the first label corresponding to the first cluster to which "User Inquiry about Consumption Status" and "User Inquiry about This Month's Phone Bill Usage Record" belong is "Inquiry about User Consumption-related Questions."

[0116] S504. The electronic device determines the label of each third summary text based on the first label of each first cluster and the third summary text in each first cluster.

[0117] Optionally, one implementation of the electronic device determining the label of each third summary text based on the first label of each first cluster and the third summary text within each first cluster is as follows: The electronic device generates corresponding instruction information in response to the operation of the model trainer. Then, using the aforementioned instruction information, the first cluster and the first label are adjusted to generate new clusters and new labels. Finally, the third summary text is matched with the new labels to obtain the label corresponding to each third summary text.

[0118] In this embodiment, a first cluster and its corresponding first label are generated, and then, based on the first label, the corresponding label for each third summary text is determined, thereby establishing the relationship between the third summary text and the label. This method can cluster large amounts of summary data, improving the efficiency of target data classification.

[0119] In some embodiments, combined with Figure 5 ,like Figure 6 As shown, in S504 above, the method by which the electronic device determines the label of each third summary text based on the first label of each first cluster and the third summary text in each first cluster specifically includes: S601-S603.

[0120] S601, The electronic device receives the first instruction information.

[0121] The first indication information is used to adjust the first cluster and the label of the first cluster.

[0122] Optionally, one implementation of the electronic device receiving the first instruction information is as follows: the model trainer can perform an operation to adjust the first cluster on the model training terminal, and correspondingly, the model training terminal can respond to the adjustment operation by the model trainer and generate the first instruction information. Then, the model training terminal can send the first instruction information.

[0123] For example, in combination Figure 1 Assume the device operated by the model trainer is terminal 102. In this case, the model trainer can perform an instruction operation on the model training device to adjust the existing first cluster. Correspondingly, terminal 102 can respond to the above operation and generate first instruction information.

[0124] S602, the electronic device responds to the first instruction information, adjusts the first cluster and the label of the first cluster, and determines the second cluster and the second label of the second cluster.

[0125] Optionally, the second tag can be an electronic device that adjusts the first tag according to the first instruction information to obtain a more accurate second tag.

[0126] Optionally, since the first label generated by the electronic device based on the clustering algorithm may be inaccurate or incomplete, two first labels with similar meanings can be merged.

[0127] For example, suppose the first cluster label contains both "User inquires about this month's consumption" and "User inquires about data usage fees". In this case, the electronic device 101 can determine that the second cluster to which both "User inquires about this month's consumption" and "User inquires about data usage fees" belong is "User inquires about this month's consumption".

[0128] S603, the electronic device generates a mapping relationship based on the third summary text in each second cluster and the second label of each second cluster.

[0129] The mapping table is used to represent the mapping relationship between each third summary text and the second tag.

[0130] Specifically, for an electronic device to classify target data, it needs to generate a summary text corresponding to each target data point. Then, based on the mapping relationship between the summary text and the second label, it determines the second label to which each third summary text belongs. Therefore, determining the mapping relationship between the summary text and the second label is crucial for classifying target data.

[0131] For example, in combination Figure 1 Assuming the communication log between the user and customer service roughly includes: the customer's phone bill is overdue, the customer inquires about the monthly overdue payment, and the customer service representative informs the user of the amount and details of the charges. In this case, the electronic device can determine that the second tag corresponding to the above communication log is "user inquiring about data usage fees".

[0132] In this embodiment of the application, the electronic device can adjust the first tag according to the first instruction information to generate a second tag, and then generate a mapping relationship between the second tag and the third summary text.

[0133] In some embodiments, combined with Figure 6 ,like Figure 7 As shown, the target data also includes: real-time data. After generating the mapping table, the model training method also includes: S701-S703.

[0134] S701. The electronic device inputs real-time data into the summary model and determines the fourth summary text of the real-time data.

[0135] Optionally, the electronic device inputs real-time data into the summarization model to determine the fourth summary text of the real-time data. The specific steps are similar to those of the electronic device generating the third summary text based on the training data. Therefore, the specific steps of the electronic device inputting real-time data into the summarization model to determine the fourth summary text of the real-time data can be referred to S501 and will not be repeated here.

[0136] S702. The electronic device determines the second tag corresponding to the real-time data based on the fourth summary text of the real-time data and the mapping relationship table.

[0137] For example, in combination Figure 1 Assuming the real-time communication records between the user and customer service roughly include: customer's phone bill arrears, customer inquiring about monthly arrears, and customer service informing the user of the consumption amount and details, electronic device 101 can determine that the second tag corresponding to the real-time data is "user inquiring about data traffic fees".

[0138] S703: The electronic device determines the data classification result corresponding to the real-time data based on the second tag.

[0139] For example, in combination Figure 1 Suppose that electronic device 101 can determine that the second label corresponding to the real-time data is "user inquiries about traffic cost issues". In this case, electronic device 101 can determine that the data classification result to which the real-time data belongs is the category of "user inquiries about traffic cost issues".

[0140] In this embodiment, the electronic device receives real-time data and generates a fourth summary text corresponding to the real-time data. Then, through a mapping table between the third summary text and the second tag, the second tag corresponding to the real-time data is determined, thereby enabling a quick and accurate determination of the data classification result corresponding to the real-time data.

[0141] In some embodiments, combined with Figure 7 ,like Figure 8 As shown, in S402 above, the method by which the electronic device inputs historical data into the first model and generates the first summary text corresponding to the historical data specifically includes: S801-S802.

[0142] S801. The electronic device determines the prompt template corresponding to the historical data based on the historical data.

[0143] The prompt template is the format template for the first summary text.

[0144] Specifically, to ensure consistency in the format of the generated text, a prompt template corresponding to the historical data must be entered when generating the first summary text.

[0145] Optionally, the prompt template can be a text template for "the problem the user communicated with customer service, the customer service response and processing results, and the user's feedback information".

[0146] S802, The electronic device inputs historical data and prompt templates into the first model and generates the first summary text.

[0147] Optionally, the electronic device inputs historical data and prompt templates into the first model to generate the first summary text. The specific steps are similar to those in S402. The electronic device inputs historical data and prompt templates into the first model to generate the first summary text. The specific steps are similar to those in S402 and will not be repeated here.

[0148] In this embodiment of the application, the consistency of the first summary text format is maintained by inputting the prompt template corresponding to the historical data when generating the first summary text.

[0149] In some embodiments, combined with Figure 8 ,like Figure 9As shown, in the above S404, the method of training the second model based on the second summary text and the historical data corresponding to the second summary text to obtain the summary model also includes: S901-S907.

[0150] S901. The electronic device determines the training set, validation set, and test set based on the second summary text and the historical data corresponding to the second summary text.

[0151] Optionally, one way for the electronic device to determine the training set, validation set, and test set based on the second summary text and the historical data corresponding to the second summary text is as follows: the electronic device can group the second summary text according to a preset number, thereby determining the second summary text and the historical data corresponding to the second summary text belonging to the training set, the second summary text and the historical data corresponding to the second summary text belonging to the validation set, and the second summary text and the historical data corresponding to the second summary text belonging to the test set.

[0152] Specifically, in order to ensure that the summary model trained based on the second summary text and the historical data corresponding to the second summary text generates sufficiently accurate summary text, and that the loss function value corresponding to the generated summary text satisfies the convergence condition.

[0153] For example, suppose the training set, validation set, and test set are grouped in a 7:2:1 ratio, and suppose the second summary text and the historical data corresponding to the second summary text total 60,000 records. In this case, the electronic device 101 can determine that the number of records in the training set, validation set, and test set are 42,000, 12,000, and 6,000 records, respectively.

[0154] S902. The electronic device trains the current model based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set to obtain the training summary model.

[0155] The current model is either the second model or the model determined during the previous iteration of training.

[0156] Optionally, the electronic device trains the current model based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set. The specific steps for obtaining the training summary model are similar to those in S404. Therefore, the specific steps for the electronic device to train the current model based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set can be referred to in S404 and will not be repeated here.

[0157] S903. The electronic device validates the training summary model based on the second summary text in the validation set and the historical data corresponding to the second summary text in the validation set, and determines whether the loss function value between the fourth summary text generated by the training summary model and the second summary text satisfies the convergence condition.

[0158] The fourth summary text is the summary text generated by the training summary model based on the historical data corresponding to the second summary text in the validation set.

[0159] Specifically, by determining whether the loss function between the second and fourth summary texts meets the convergence condition, it can be determined whether the training summary model exhibits overcoupling. When overcoupling occurs, it indicates poor applicability; the results remain unchanged even when the input data differs.

[0160] S904 If not satisfied, the electronic device will use the training summary model as the current model and iteratively execute S902, S903, and S904 until the loss function value satisfies the convergence condition.

[0161] Specifically, when the loss function value between the fourth summary text and the second summary text does not meet the convergence condition, the electronic device can determine that the training summary model has over-coupling.

[0162] S905. If satisfied, the electronic device tests the training summary model based on the second summary text in the test set and the historical data corresponding to the second summary text in the test set, and determines whether the similarity ratio between the fifth summary text generated by the training summary model and the second summary text is greater than a preset value.

[0163] The fifth summary text is a summary text generated by the training summary model based on the historical data corresponding to the second summary text in the test set.

[0164] For example, assuming a preset value of 70%, the similarity ratio between the second summary text and the fifth summary text generated based on the historical data corresponding to the second summary text is 80%. In this case, the electronic device 101 can determine that the accuracy of the summary text generated by the training summary model is high.

[0165] S906. If the similarity ratio is less than the preset value, the electronic device will use the training summary model as the current model and iteratively execute S902, S903, S904, S905 and S906 until the similarity ratio is greater than or equal to the preset value.

[0166] Specifically, when the similarity ratio is less than the preset value, it indicates that the accuracy of the summary text generated by the training summary model is low. Therefore, the summary model needs to be retrained until the similarity ratio meets the preset value.

[0167] S907. If the similarity ratio is greater than or equal to the preset value, the electronic device determines the training summary model as the summary model.

[0168] Specifically, electronic devices can determine the accuracy of the summary text generated by the summarization model by comparing similarity ratios.

[0169] In this embodiment of the application, the generated summary model is made more accurate and has a wider range of applications through iterative training of the model. By determining whether the loss function between the fourth summary text and the second summary text meets the convergence requirement, the phenomenon of over-coupling when the summary model generates summary text is avoided.

[0170] In some embodiments, combined with Figure 8 ,like Figure 9 As shown, the model training method also includes:

[0171] S1001, The electronic device obtains the text length of the first summary text.

[0172] Optionally, the text length can be the number of words contained in the summary text.

[0173] For example, in combination Figure 1 Suppose the first summary text is "The user inquired about this month's spending, customer service provided feedback on the user's spending records, and the user expressed satisfaction with the customer service response." In this case, electronic device 101 can determine that the length of the first summary text is 34 characters.

[0174] S1002. The electronic device determines the first summary text with a text length greater than or equal to a preset length as the sixth summary text.

[0175] The sixth abstract text is a valid abstract text whose text length meets the preset length.

[0176] Specifically, when the length of the first summary text exceeds a preset length, the electronic device can determine that the first summary text is a valid summary text. Conversely, a first summary text with a length below the preset length is considered invalid. Invalid summary texts may be spam calls or low-quality phone recordings, which are not helpful for model training. Therefore, the electronic device needs to select a first summary text with a length greater than the preset length as the summary text for training the summarizing model.

[0177] For example, assuming a preset length of 10 characters, the first summary text has a length of 34 characters. In this case, the electronic device can determine that the aforementioned first summary text is the sixth summary text.

[0178] S1003. The electronic device determines a preset number of second summary texts from the sixth summary text.

[0179] Optionally, the specific steps for the electronic device to determine a preset number of second summary texts from the sixth summary text are similar to those in S403. Therefore, the specific steps for the electronic device to determine a preset number of second summary texts from the sixth summary text can be referred to in S404, and will not be repeated here.

[0180] In this embodiment, the electronic device can first obtain the text length of the first summary text, and then determine the valid summary text whose text length is greater than a preset length based on the text length of the first summary text. This method can improve the efficiency of model training and eliminate the interference of invalid summary text on the summarization model.

[0181] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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 this application.

[0182] This application embodiment can divide the model training device into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0183] like Figure 11 The diagram shown is a structural schematic of a model training device provided in an embodiment of this application. This model training device can be used to perform... Figures 4-10 The method for training the model shown. Figure 11The model training device shown includes: an acquisition unit 1101, a generation unit 1102, a determination unit 1103, and a training unit 1104; the acquisition unit 1101 is used to acquire target data; the target data includes historical data; the generation unit 1102 is used to input the historical data into the first model and generate the first summary text corresponding to the historical data; the determination unit 1103 is used to determine a preset number of second summary texts from the first summary texts; the training unit 1104 is used to train the second model based on the second summary texts and the historical data corresponding to the second summary texts to obtain a summary model; the summary model is used to determine the summary text of the data; the data generation capability of the first model is greater than that of the second model.

[0184] Optionally, the target data also includes: training data; after generating the summarizing model, the determining unit 1103 is further configured to input the training data into the summarizing model to determine the third summary text of the training data; the determining unit 1103 is further configured to cluster the third summary text based on the similarity between the third summary texts to determine multiple first clusters; the determining unit 1103 is further configured to determine the first label of each first cluster; the determining unit 1103 is further configured to determine the label of each third summary text based on the first label of each first cluster and the third summary text in each first cluster.

[0185] Optionally, the determining unit 1103 is specifically configured to: receive first indication information; the first indication information is used to adjust the first cluster and the label of the first cluster; in response to the first indication information, adjust the first cluster and the label of the first cluster, determine the second cluster and the second label of the second cluster; generate a mapping relationship table based on the third summary text in each second cluster and the second label of each second cluster; the mapping relationship table is used to characterize the mapping relationship between each third summary text and the second label.

[0186] Optionally, the target data also includes: real-time data; after generating the mapping relationship table, the determining unit 1103 is further used to input the real-time data into the summarizing model to determine the fourth summary text of the real-time data; the determining unit 1103 is further used to determine the second label corresponding to the real-time data based on the fourth summary text of the real-time data and the mapping relationship table; the determining unit 1103 is further used to determine the data classification result corresponding to the real-time data based on the second label.

[0187] Optionally, the generation module is specifically used for: determining the prompt template corresponding to the historical data based on the historical data; the prompt template is a format template of the first summary text; inputting the historical data and the prompt template into the first model to generate the first summary text.

[0188] Optionally, the training module is specifically used for: determining the training set, validation set, and test set based on the second summary text and the historical data corresponding to the second summary text; Step 1: Training the current model based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set to obtain the training summary model; the current model is the second model, or the model determined in the previous iteration of training; Step 2: Validating the training summary model based on the second summary text in the validation set and the historical data corresponding to the second summary text in the validation set to determine whether the loss function value between the fourth summary text generated by the training summary model and the second summary text satisfies the convergence condition; the fourth summary text is the summary text generated by the training summary model based on the historical data corresponding to the second summary text in the validation set; Step 3: If it does not satisfy the condition, then the training summary model is terminated. The training model is used as the current model, and steps 1, 2, and 3 are executed iteratively until the loss function value meets the convergence condition; Step 4: If the condition is met, the training summarization model is tested based on the second summary text in the test set and the historical data corresponding to the second summary text in the test set to determine whether the similarity ratio between the fifth summary text generated by the training summarization model and the second summary text is greater than a preset value; the fifth summary text is the summary text generated by the training summarization model based on the historical data corresponding to the second summary text in the test set; Step 5: If the similarity ratio is less than the preset value, the training summarization model is used as the current model, and steps 1, 2, 3, 4, and 5 are executed iteratively until the similarity ratio is greater than or equal to the preset value; Step 6: If the similarity ratio is greater than or equal to the preset value, the training summarization model is determined to be the summarization model.

[0189] Optionally, the acquisition unit 1101 is further configured to acquire the text length of the first summary text; the determination unit 1103 is further configured to determine the first summary text whose text length is greater than or equal to a preset length as the sixth summary text; the sixth summary text is a valid summary text whose text length meets the preset length; the determination unit 1103 is further configured to determine a preset number of second summary texts from the sixth summary text.

[0190] This application also provides a computer-readable storage medium, which includes computer-executable instructions. When the computer-executable instructions are run on a computer, the computer performs the model training method provided in the above embodiments.

[0191] This application also provides a computer program that can be directly loaded into a memory and contains software code. After being loaded and executed by a computer, the computer program can implement the model training method provided in the above embodiments.

[0192] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this application can be implemented using hardware, software, firmware, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer-readable storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media can be any available medium accessible to a general-purpose or special-purpose computer.

[0193] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0194] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms. Units described as separate components may or may not be physically separate; components shown as units may be one physical unit or multiple physical units, i.e., they may be located in one place or distributed in multiple different places. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0195] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0196] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A model training method, characterized in that, include: Obtain the target data; The target data includes: historical data and training data; The historical data is input into the first model to generate the first summary text corresponding to the historical data; From the first summary text, determine a predetermined number of second summary texts; Based on the second summary text and the historical data corresponding to the second summary text, the second model is trained to obtain the summary model; the summary model is used to determine the summary text of the data; the data generation capability of the first model is greater than that of the second model; The training data is input into the summarization model to determine the third summary text of the training data; Based on the similarity between the third summary texts, the third summary texts are clustered to determine multiple first clusters; Determine the first label for each of the first clusters; Based on the first label of each first cluster and the third summary text in each first cluster, the label of each third summary text is determined.

2. The method according to claim 1, characterized in that, The step of determining the tag of each third summary text based on the first tag of each first cluster and the third summary text in each first cluster includes: Receive first instruction information; the first instruction information is used to adjust the first cluster and the label of the first cluster; In response to the first indication information, the first cluster and its label are adjusted, and the second cluster and its second label are determined; A mapping table is generated based on the third summary text in each of the second clusters and the second label of each of the second clusters; the mapping table is used to represent the mapping relationship between each third summary text and the second label.

3. The method according to claim 2, characterized in that, The target data also includes: real-time data, and after generating the mapping table, it further includes: The real-time data is input into the summarization model to determine the fourth summary text of the real-time data; Based on the fourth summary text of the real-time data and the mapping table, the second tag corresponding to the real-time data is determined; Based on the second label, the data classification result corresponding to the real-time data is determined.

4. The method according to claim 1, characterized in that, The step of inputting the historical data into the first model and generating the first summary text corresponding to the historical data includes: Based on the historical data, a prompt template corresponding to the historical data is determined; the prompt template is the format template of the first summary text. Input the historical data and the prompt template into the first model to generate the first summary text.

5. The method according to any one of claims 1-4, characterized in that, The step of training the second model based on the second summary text and the corresponding historical data to obtain the summary model further includes: Based on the second summary text and the historical data corresponding to the second summary text, the training set, validation set, and test set are determined. Step 1: Based on the second summary text in the training set and the historical data corresponding to the second summary text in the training set, train the current model to obtain a training summary model; the current model is the second model, or the model determined in the previous iteration of training. Step 2: Based on the second summary text in the validation set and the historical data corresponding to the second summary text in the validation set, validate the training summary model to determine whether the loss function value between the fourth summary text generated by the training summary model and the second summary text satisfies the convergence condition; the fourth summary text is the summary text generated by the training summary model based on the historical data corresponding to the second summary text in the validation set. Step 3: If the condition is not met, the trained summary model is used as the current model, and Step 1, Step 2, and Step 3 are executed iteratively until the loss function value satisfies the convergence condition. Step 4: If satisfied, test the training summary model based on the second summary text in the test set and the historical data corresponding to the second summary text in the test set, and determine whether the similarity ratio between the fifth summary text generated by the training summary model and the second summary text is greater than a preset value; the fifth summary text is the summary text generated by the training summary model based on the historical data corresponding to the second summary text in the test set. Step 5: If the similarity ratio is less than a preset value, then the trained summary model is taken as the current model, and steps 1, 2, 3, 4 and 5 are executed iteratively until the similarity ratio is greater than or equal to the preset value. Step 6: If the similarity ratio is greater than or equal to a preset value, then the trained summarizing model is determined to be the summarizing model.

6. The method according to claim 1, characterized in that, Also includes: Obtain the text length of the first summary text; The first summary text whose length is greater than or equal to a preset length is determined as the sixth summary text; The sixth summary text is a valid summary text whose text length meets the preset length. From the sixth summary text, a predetermined number of second summary texts are determined.

7. A model training device, characterized in that, include: Acquire units, generate units, determine units, and train units; The acquisition unit is used to acquire target data; The target data includes: historical data and training data; The generation unit is used to input the historical data into the first model and generate the first summary text corresponding to the historical data; The determining unit is used to determine a preset number of second summary texts from the first summary text; The training unit is used to train the second model based on the second summary text and the historical data corresponding to the second summary text to obtain a summary model; the summary model is used to determine the summary text of the data; the data generation capability of the first model is greater than that of the second model; The determining unit is further configured to input the training data into the summarizing model to determine the third summary text of the training data; The determining unit is further configured to cluster the third summary texts based on the similarity between the third summary texts, and determine multiple first clusters; The determining unit is further configured to determine a first label for each of the first clusters; The determining unit is further configured to determine the label of each third summary text based on the first label of each first cluster and the third summary text in each first cluster.

8. A model training device, characterized in that, It includes a memory and a processor; the memory is used to store computer execution instructions, and the processor is connected to the memory via a bus; when the model training device is running, the processor executes the computer execution instructions stored in the memory to cause the model training device to perform the model training method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer-executable instructions that, when executed on a computer, cause the computer to perform the model training method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Text abstract generation method and device and storage medium

    CN113486172A