Artificial intelligence-based title generation method, apparatus, device, and storage medium
By cleaning and adversarial training the pre-trained language model, an AI-based title generation model is generated, which solves the problem of inaccurate title generation in existing technologies and achieves efficient and accurate title generation in open domain scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PING AN PROPERTY INSURANCE CO LTD
- Filing Date
- 2023-05-11
- Publication Date
- 2026-06-02
AI Technical Summary
Existing methods for generating titles based on rules such as word weights are difficult to guarantee the accuracy of generated titles in natural text and cannot meet the title generation needs of open-domain articles.
An AI-based approach is employed, which involves acquiring a pre-collected title dataset, cleaning it using various data cleaning rules, and training a pre-trained language model using adversarial training and noise reduction strategies to generate a title generation model. Specifically, this model includes a language model with a T5 encoder-decoder architecture and utilizes techniques such as adversarial training algorithms, masking, and trust loss functions.
The robustness and noise reduction capabilities of the title generation model in open-domain scenarios have been improved, ensuring the accuracy of the generated titles and achieving fast and accurate title generation.
Smart Images

Figure CN116561298B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence development technology, and in particular to artificial intelligence-based title generation methods, apparatus, computer devices, and storage media. Background Technology
[0002] With the explosive growth of internet information, the massive amount of online text poses new challenges to automated information processing. Among these challenges, text title generation has become a crucial part of information processing due to its functions of compressing information, simplifying text, and extracting main ideas.
[0003] Currently, the problem of automatically generating titles for open-domain articles is usually addressed using traditional methods based on rules such as word weights. While these traditional methods are fast, their simple algorithms make it difficult to achieve good results on natural text and cannot guarantee the accuracy of the generated titles. Summary of the Invention
[0004] The purpose of this application is to propose a title generation method, apparatus, computer device, and storage medium based on artificial intelligence, in order to solve the technical problems of existing title generation methods based on rules such as word weights having simple algorithms, making it difficult to achieve good results on natural text, and failing to guarantee the accuracy of the generated titles.
[0005] To address the aforementioned technical problems, this application provides an artificial intelligence-based title generation method, employing the following technical solution:
[0006] Obtain a pre-collected title dataset; wherein the title dataset includes multiple data entries, each of which includes a title and an article;
[0007] The titles in the title dataset are cleaned based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0008] Based on the preset adversarial training strategy and noise reduction strategy, the target text data is used as training data to train the pre-trained language model to obtain the title generation model; wherein, the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0009] Obtain the target text to be recognized;
[0010] The target text is input into the title generation model, and the title generation model processes the target text to generate a target title corresponding to the target text.
[0011] Furthermore, the step of training the pre-trained language model using the target text data as training data based on the preset adversarial training strategy and noise reduction strategy to obtain the title generation model specifically includes:
[0012] The target text data is expanded and searched using a preset adversarial training algorithm to obtain adversarial samples;
[0013] The adversarial samples are masked to obtain masked training samples;
[0014] The masked training samples are input into the pre-trained language model, and the pre-trained language model is trained using the masked training samples to obtain the first pre-trained language model.
[0015] The parameters of the first pre-trained language model are adjusted based on the preset trust loss function until the trust loss function meets the preset convergence condition, thereby obtaining the trained second pre-trained language model.
[0016] The second pre-trained language model is used as the title generation model.
[0017] Furthermore, the step of cleaning the titles in the title dataset based on a variety of preset data cleaning rules to obtain cleaned target text data specifically includes:
[0018] The titles in the title dataset are cleaned based on preset character cleaning rules to obtain the first text data;
[0019] The titles in the first text data are cleaned based on a preset fact consistency rule to obtain the second text data;
[0020] The titles in the second text data are cleaned based on preset language fluency rules to obtain the third text data;
[0021] The third text data is used as the target text data.
[0022] Furthermore, the step of cleaning the titles in the title dataset based on preset character cleaning rules to obtain the first text data specifically includes:
[0023] The first character in the title of the title dataset that meets the preset abnormal conditions is deleted to obtain the processed fourth text data;
[0024] The second character in the title of the fourth text data that meets the preset character conversion conditions is replaced to obtain the fifth text data;
[0025] Obtain the title length of the title in the fifth text data, and filter out the specified titles whose title length is within a preset first length range from the fifth text data;
[0026] The first text data is obtained by filtering out the sixth text data that corresponds to the specified title from the fifth text data.
[0027] Furthermore, the step of cleaning the titles in the first text data based on preset fact consistency rules to obtain the second text data specifically includes:
[0028] For each piece of first text data, a seventh piece of text data is selected from the first text data whose maximum common subsequence length between the title and the article is less than a preset first length threshold.
[0029] The seventh text data is deleted from the first text data to obtain the eighth text data;
[0030] For each piece of eighth text data, a ninth text data is selected from the eighth text data where the number of entities whose titles do not appear in the corresponding articles is greater than a preset first threshold.
[0031] The ninth text data is deleted from the eighth text data to obtain the second text data.
[0032] Furthermore, the step of cleaning the titles in the second text data based on preset language fluency rules to obtain the third text data specifically includes:
[0033] For each piece of second text data, select first specified text data whose title length is greater than a preset second length threshold from the second text data;
[0034] The first specified text data is cleared from the second specified text data to obtain the second specified text data;
[0035] For each piece of second specified text data, select third specified text data from the second specified text data where the number of punctuation marks is greater than a preset second threshold;
[0036] The third specified text data is cleared from the second specified text data to obtain the fourth specified text data;
[0037] For each piece of fourth specified text data, obtain the fifth specified text data whose title contains repeated substrings that satisfy a preset proportion threshold.
[0038] The fifth specified text data is cleared from the fourth specified text data to obtain the third text data.
[0039] Furthermore, after the steps of inputting the target text into the title generation model, processing the target text through the title generation model, and generating a target title corresponding to the target text, the method further includes:
[0040] The target title is cleaned of characters based on preset cleaning rules to obtain the first title;
[0041] The first title is transformed based on preset processing specifications to obtain the second title;
[0042] Store the second header.
[0043] To address the aforementioned technical problems, this application also provides an artificial intelligence-based title generation device, which employs the following technical solution:
[0044] The first acquisition module is used to acquire a pre-collected title dataset; wherein, the title dataset includes multiple data entries, each of which includes a title and an article;
[0045] The first cleaning module is used to clean the titles in the title dataset based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0046] The training module is used to train the pre-trained language model using the target text data as training data based on a preset adversarial training strategy and noise reduction strategy, so as to obtain a title generation model; wherein the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0047] The second acquisition module is used to acquire the target text to be recognized;
[0048] The generation module is used to input the target text into the title generation model, process the target text through the title generation model, and generate a target title corresponding to the target text.
[0049] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:
[0050] Obtain a pre-collected title dataset; wherein the title dataset includes multiple data entries, each of which includes a title and an article;
[0051] The titles in the title dataset are cleaned based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0052] Based on the preset adversarial training strategy and noise reduction strategy, the target text data is used as training data to train the pre-trained language model to obtain the title generation model; wherein, the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0053] Obtain the target text to be recognized;
[0054] The target text is input into the title generation model, and the title generation model processes the target text to generate a target title corresponding to the target text.
[0055] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:
[0056] Obtain a pre-collected title dataset; wherein the title dataset includes multiple data entries, each of which includes a title and an article;
[0057] The titles in the title dataset are cleaned based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0058] Based on the preset adversarial training strategy and noise reduction strategy, the target text data is used as training data to train the pre-trained language model to obtain the title generation model; wherein, the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0059] Obtain the target text to be recognized;
[0060] The target text is input into the title generation model, and the title generation model processes the target text to generate a target title corresponding to the target text.
[0061] Compared with the prior art, the embodiments of this application have the following main advantages:
[0062] In this embodiment, a pre-collected title dataset is first acquired; then, the titles in the title dataset are cleaned according to multiple preset data cleaning rules to obtain cleaned target text data; subsequently, based on preset adversarial training and denoising strategies, the target text data is used as training data to train a pre-trained language model to obtain a title generation model; next, the target text to be identified is acquired; finally, the target text is input into the title generation model, which processes the target text to generate a target title corresponding to the target text. Based on the existing end-to-end pre-trained language model architecture, improvements are made to the training data and model algorithms. By using multiple data cleaning rules to clean the titles in the title dataset to obtain a high-quality title training dataset, and then using improved adversarial training and denoising strategies to train the pre-trained language model, the required title generation model can be generated quickly and accurately. This effectively improves the robustness of the title generation model in open-domain scenarios and enhances its denoising capability, enabling the subsequent use of the title generation model to quickly and accurately generate target titles corresponding to the target text to be identified, ensuring the accuracy of the generated target titles. Attached Figure Description
[0063] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0065] Figure 2 A flowchart of an embodiment of the AI-based title generation method according to this application;
[0066] Figure 3 This is a schematic diagram of the structure of an embodiment of the AI-based title generation apparatus according to this application;
[0067] Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation
[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0069] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0070] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0071] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0072] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0073] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0074] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0075] It should be noted that the AI-based title generation method provided in this application is generally executed by a server / terminal device, and correspondingly, the AI-based title generation device is generally located in the server / terminal device.
[0076] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0077] Continue to refer to Figure 2 The diagram illustrates a flowchart of an embodiment of the AI-based title generation method according to this application. The AI-based title generation method includes the following steps:
[0078] Step S201: Obtain a pre-collected title dataset; wherein the title dataset includes multiple data entries, each of which includes a title and an article.
[0079] In this embodiment, the AI-based title generation method runs on an electronic device (e.g., Figure 1 The server / terminal device shown can acquire the title dataset via wired or wireless connection. It should be noted that the aforementioned wireless connection methods include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future-developed wireless connection methods. Specifically, the aforementioned title dataset refers to a Chinese open-domain title dataset covering fields such as politics, economics, society, science and technology, finance, and sports. The process of acquiring Chinese open-domain title data may include: acquiring multiple preset text acquisition channels; acquiring the initial Chinese open-domain title dataset from each of the text acquisition channels; and integrating all the initial Chinese open-domain title datasets to obtain the Chinese open-domain title dataset. The text acquisition channels may include at least: LCSTS, RASG, THUCNews, NLPCC, CNewSum, News163, Cardata, etc. Chinese open-domain title datasets may include at least: Weibo News Title Dataset, Weibo News Title Dataset, Sina News Data from 2005 to 2011, NLPCC Single Document Summarizing Competition Data, Toutiao Data, an extended version of NLPCC, NetEase News Title Data, Haocheyou News Title Data, etc.
[0080] Step S202: Clean the titles in the title dataset based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0081] In this embodiment, by cleaning the titles in the title dataset without cleaning the articles, the robustness of the model for processing articles in open domains can be effectively improved. The specific implementation process of cleaning the titles in the title dataset based on various preset data cleaning rules to obtain the cleaned target text data will be described in further detail in subsequent embodiments of this application, and will not be elaborated upon here.
[0082] Step S203: Based on the preset adversarial training strategy and noise reduction strategy, the target text data is used as training data to train the pre-trained language model to obtain the title generation model; wherein, the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0083] In this embodiment, the pre-trained language model specifically adopts a T5 encoder-decoder architecture. T5 is based on the Transformer model, implemented by stacking attention blocks and linear layer blocks. The encoding end aims to obtain the hidden feature representation of the input text. It mainly uses a bidirectional self-attention mechanism and a feedforward linear layer, along with layer regularization and residual mechanisms. The decoding end maps the aforementioned hidden features back to the text space and outputs the predicted text. The basic architecture is similar to the encoding end, the difference being that the attention mechanism uses masked self-attention and cross-attention. The T5 model has powerful text generation capabilities and has many applications in the natural language domain. However, since the original model is an English model, it has not yet been widely applied to Chinese open-domain title generation scenarios. This application cleans and organizes a large-scale Chinese open-domain title dataset to train a title generation model applicable to the Chinese domain, and will subsequently make corresponding optimizations for factual consistency and language fluency. In specific training, the encoding end inputs the article for which a title needs to be generated, and the decoding end inputs a reference title. The model generates a title based on the article, and then trains by calculating the cross-entropy loss between the generated title and the reference title. The specific implementation process of using the target text data as training data to train the pre-trained language model based on the preset adversarial training strategy and noise reduction strategy to obtain the title generation model will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.
[0084] Step S204: Obtain the target text to be identified.
[0085] In this embodiment, the target text is the text data of the title to be identified.
[0086] Step S205: Input the target text into the title generation model, process the target text through the title generation model, and generate a target title corresponding to the target text.
[0087] This application first acquires a pre-collected title dataset; then, based on multiple preset data cleaning rules, it cleans the titles in the title dataset to obtain cleaned target text data; subsequently, based on preset adversarial training and denoising strategies, it uses the target text data as training data to train a pre-trained language model to obtain a title generation model; next, it acquires the target text to be recognized; finally, it inputs the target text into the title generation model, which processes the target text to generate a target title corresponding to the target text. Based on the existing end-to-end pre-trained language model architecture, this application improves the training data and model algorithm. By using multiple data cleaning rules to clean the titles in the title dataset to obtain a high-quality title training dataset, and then using improved adversarial training and denoising strategies to train the pre-trained language model, the required title generation model can be generated quickly and accurately. This effectively improves the robustness of the title generation model in open-domain scenarios and enhances its denoising capability, enabling the subsequent use of the title generation model to quickly and accurately generate target titles corresponding to the target text to be recognized, ensuring the accuracy of the generated target titles.
[0088] Among several alternative implementation methods, experiments have shown that the title generation method proposed in this application achieves better results compared to existing methods. The experiments used a benchmark open-domain text generation dataset for evaluation, namely LCSTS (Largescale Chinese Short Text Summarization). Detailed information about the corpus is shown in Table 1; this application uses a portion of the test set for experimental verification.
[0089] training set Validation set test set Sample count 2400591 8685 725 Average text length 103.68 107.86 108.10 Average length of abstract 17.86 18.15 18.66
[0090] Table 1
[0091] The experimental section aims to evaluate the effectiveness of the title generation model proposed in this application. Therefore, this application uses the standard F1 scores of Rouge-1, Rouge-2, Rouge-L, and BLEU of the Chinese text abstract as the evaluation index of the model. The experimental comparison results are given in Table 2.
[0092]
[0093]
[0094] Table 2
[0095] It is worth noting that, as can be observed from Table 2, the title generation method proposed in this application consistently outperforms all these benchmark models in multiple automated metrics. Among them, T5-Origin is the officially released multilingual T5 version model, T5-Fine-Tuning is a T5 model with simple fine-tuning on the LCSTS dataset, and T5-Copy is a T5 model with the addition of the Copy mechanism. As can be seen from the table above, on the same baseline model T5, the method proposed in this application far surpasses T5-Origin, T5-Fine-Tuning, and T5-Copy, indicating that (1) the high-quality Chinese open-domain title training dataset proposed in this application is effective for this task; (2) the training algorithm optimization proposed in this application is effective for this task. Although the introduction of the Copy mechanism can bring performance improvement, the appearance of repeated words will reduce the fluency of the text. However, the adversarial training strategy, mask generation, and trust cross-entropy loss make the model robust and noise reduction in open-domain generation; (3) through comparative experiments, it can also be seen that the heuristic post-processing method proposed in this application can also improve the consistency between the model generation result and the original content.
[0096] In some alternative implementations, step S203 includes the following steps:
[0097] The target text data is expanded and searched using a preset adversarial training algorithm to obtain adversarial samples.
[0098] In this embodiment, adversarial learning is a common method to improve model robustness. It involves adding small noise perturbations to the input data to increase the difficulty of model fitting. This allows the model to learn to resist random perturbations, reducing its sensitivity to inputs or parameters. This prevents the model from becoming overly reliant on the training set data, thus improving its generalization performance in open-domain scenarios. Specifically, the adversarial training algorithm uses the SMART algorithm, adding two regularization losses: smooth adversarial regularization loss and Bregman approximation point optimization loss. Smooth adversarial regularization loss requires the model to output consistent results within a certain perturbation range, which helps avoid overfitting and improves generalization ability. Bregman approximation point optimization aims to make the model parameter distribution similar to the initial distribution in each round, avoiding the model forgetting pre-trained parameters and preserving pre-training knowledge as much as possible. Specifically, smooth adversarial regularization loss adds a small perturbation to the model's embedding layer, requiring the output to remain as constant as possible. Specifically, let x... i Indicates input embedding, This represents the perturbed input embedding, f refers to the model, and SimKL is the symmetric KL divergence. Then, model training needs to minimize the following loss: Bregman approximation optimization, on the other hand, prevents the model parameter θ_(t+1) from deviating too much from the parameter θ_t obtained in previous iterations, and achieves this by minimizing the following loss:
[0099] The adversarial samples are masked to obtain masked training samples.
[0100] The masked training samples are input into the pre-trained language model, and the pre-trained language model is trained using the masked training samples to obtain the first pre-trained language model.
[0101] In this embodiment, by referencing the masking task used in the pre-trained language model, when fine-tuning on Chinese data, random interval masking replacement is performed on the inputs (outputs) at the decoding end of the pre-trained language model. Specifically, the interval sequences that need to be replaced in the text string are selected and uniformly replaced with the special character [MASK]. Then, the pre-trained language model reconstructs the original sequence based on the input text at the encoding end and the parts that were not masked. The loss is calculated using cross-entropy. This method improves the model's noise reduction and inference capabilities by artificially introducing masking noise at the decoding end. Furthermore, unlike the original pre-training task which introduces masking loss at the encoding end, this application does not clean the text at the encoding end during data processing, resulting in a significant amount of unnecessary noise (such as special characters and uncommon sentence structures). Performing masking training on the text itself might affect the stability of the model's generation. Therefore, this application performs the masking training task at the decoding end.
[0102] The parameters of the first pre-trained language model are adjusted based on a preset trust loss function until the trust loss function meets a preset convergence condition, thus obtaining a trained second pre-trained language model.
[0103] In this embodiment, since the current labeled data for article titles may not be entirely accurate, and the cross-entropy used in the pre-trained language model tends to allow the model to output results exactly the same as the labels, leading to model misfitting. To address this issue, it is noted that the model can generally fit simple correct samples quickly in the early stages, while incorrect and difficult correct samples are gradually fitted in the later stages of training. Therefore, the trust loss function is used to replace the cross-entropy function. A probability term p = p(k|x) based on the model's own prediction is added to the original labeled probability distribution q = q(k|x) (where x is the corresponding generated index and k is the vocabulary label), achieving a trade-off between data labeling and trusting its own predictions. Therefore, the cross-entropy is replaced with the trust loss function L. DCE Where δ represents the trust ratio, a value closer to 1 indicates that the model trusts the predicted distribution more, and a value closer to 0 indicates that the model trusts the labeled distribution more: L DCE = -plog(δp+(1-δ)q).
[0104] The second pre-trained language model is used as the title generation model.
[0105] This application uses a preset adversarial training algorithm to expand and search the target text data to obtain adversarial samples; then, it masks the adversarial samples to obtain masked training samples; subsequently, it inputs the masked training samples into the pre-trained language model and trains the pre-trained language model to obtain a first pre-trained language model; subsequently, it adjusts the parameters of the first pre-trained language model based on a preset trust loss function until the trust loss function meets a preset convergence condition to obtain a trained second pre-trained language model, which is then used as the title generation model. Based on the encoder-decoder architecture of the pre-trained language model, this application uses an improved method of adversarial training and denoising strategies to train the pre-trained language model, which can quickly and accurately generate the required title generation model, effectively improving the robustness of open-domain title generation and the denoising capability of open-domain title generation.
[0106] In some optional implementations of this embodiment, step S202 includes the following steps:
[0107] The titles in the title dataset are cleaned based on preset character cleaning rules to obtain the first text data.
[0108] In this embodiment, only the titles are cleaned, not the entire text. This improves the model's robustness to open-domain text processing. The specific implementation process of cleaning the titles in the title dataset based on preset character cleaning rules to obtain the first text data will be described in more detail in subsequent embodiments and will not be elaborated upon here.
[0109] The titles in the first text data are cleaned based on a preset factual consistency rule to obtain the second text data.
[0110] In this embodiment, based on the factual consistency rules corresponding to the factual consistency requirements, titles in the dataset that are inconsistent with the facts of the article can be removed. The specific implementation process of cleaning the titles in the first text data based on the preset factual consistency rules to obtain the second text data will be described in further detail in subsequent embodiments of this application, and will not be elaborated upon here.
[0111] The titles in the second text data are cleaned based on preset language fluency rules to obtain the third text data.
[0112] In this embodiment, based on the language fluency rules corresponding to the language fluency requirements, titles with non-standard language in the dataset can be removed. The specific implementation process of cleaning the titles in the second text data based on the preset language fluency rules to obtain the third text data will be described in further detail in subsequent embodiments of this application, and will not be elaborated upon here.
[0113] The third text data is used as the target text data.
[0114] This application cleans the titles in the title dataset based on preset character cleaning rules to obtain first text data; then, it cleans the titles in the first text data based on preset fact consistency rules to obtain second text data; subsequently, it cleans the titles in the second text data based on preset language fluency rules to obtain third text data; and finally, it uses the third text data as the target text data. After collecting the title dataset, this application cleans the title dataset using character cleaning rules, fact consistency rules, and language fluency rules, which can quickly and accurately obtain a high-quality open-domain title training dataset. This is beneficial for improving the open-domain generation capability, fact consistency, and language fluency of the subsequently generated title generation model from the source.
[0115] In some optional implementations, the step of cleaning the titles in the title dataset based on preset character cleaning rules to obtain the first text data includes the following steps:
[0116] The first character in the title of the title dataset that meets the preset abnormal conditions is deleted to obtain the processed fourth text data.
[0117] In this embodiment, the first character that meets the preset abnormal conditions specifically refers to html characters, emoji symbols, excessive exclamation marks, question marks, and other tone characters, inappropriate spaces between Chinese characters, etc.
[0118] The second character in the title of the fourth text data that meets the preset character conversion conditions is replaced to obtain the fifth text data.
[0119] In this embodiment, certain characters in the four text data are uniformly standardized. For example, all full-width numbers and letters are converted to half-width characters, and Chinese commas, question marks, semicolons, exclamation marks, and various parentheses are all replaced with their corresponding English characters. However, Chinese periods, ellipses, quotation marks, book titles, and dashes are retained to preserve Chinese semantics to the greatest extent possible.
[0120] Obtain the title length of the title in the fifth text data, and filter out the specified titles whose title length is within a preset first length range from the fifth text data.
[0121] In this embodiment, since titles that are too short cannot fully summarize the article content, and titles that are too long would be redundant, neither titles that are too short nor too long are conducive to model learning in the dataset. Therefore, titles are filtered according to a preset first length range (e.g., 15-40 characters).
[0122] The first text data is obtained by filtering out the sixth text data that corresponds to the specified title from the fifth text data.
[0123] This application obtains processed fourth text data by deleting first characters in the titles of the title dataset that meet preset abnormal conditions; then, it replaces second characters in the titles of the fourth text data that meet preset character conversion conditions to obtain fifth text data; next, it obtains the title length of the titles in the fifth text data and filters out specified titles whose title length is within a preset first length range from the fifth text data; subsequently, it filters out sixth text data corresponding to the specified titles from the fifth text data to obtain the first text data. After collecting the title dataset, this application cleans the title dataset using character cleaning rules to obtain the first text data, which is beneficial for subsequent cleaning of the first text data using fact consistency rules and language fluency rules, thereby quickly and accurately obtaining a high-quality open-domain title training dataset. This improves the open-domain generation capability, fact consistency, and language fluency of the subsequently generated title generation model from the source.
[0124] In some optional implementations, the step of cleaning the titles in the first text data based on a preset fact consistency rule to obtain the second text data includes the following steps:
[0125] For each piece of first text data, a seventh piece of text data is selected from the first text data where the length of the longest common subsequence between the title and the article is less than a preset first length threshold.
[0126] In this embodiment, the length of the maximum common subsequence between the title and the article is calculated. If the length of the common subsequence is too short, it indicates that the title is likely completely unrelated to the article and needs to be removed. The method for calculating the common subsequence uses dynamic programming and can be completed in O(n^2) time. The value of the first length threshold is not specifically limited and can be set according to actual usage requirements.
[0127] The seventh text data is deleted from the first text data to obtain the eighth text data.
[0128] For each piece of eighth text data, a ninth text data is selected from the eighth text data where the number of entities whose titles do not appear in the corresponding articles is greater than a preset first threshold.
[0129] In this embodiment, by checking the number of entities in the title that do not appear in the article, if the number is too high, it indicates that the title and the article are likely inconsistent at the entity level, which would reduce factual consistency and necessitates their removal. The value of the aforementioned first quantity threshold is not specifically limited and can be set according to actual usage requirements.
[0130] The ninth text data is deleted from the eighth text data to obtain the second text data.
[0131] For each piece of first text data, this application first selects a seventh piece of text data whose maximum common subsequence length between the title and the article is less than a preset first length threshold. Then, the seventh piece of text data is deleted from the first text data to obtain an eighth piece of text data. Next, for each piece of eighth text data, a ninth piece of text data is selected from the eighth text data whose number of entities whose titles do not appear in the corresponding articles is greater than a preset first quantity threshold. Subsequently, the ninth piece of text data is deleted from the eighth text data to obtain the second piece of text data. This application cleans the collected title dataset using character cleaning rules to obtain the first text data, and then cleans the first text data using fact consistency rules to obtain the second text data. This improves the open-domain generation capability and fact consistency of the subsequently generated title generation model from the source. It also facilitates further cleaning of the second text data using language fluency rules, thereby quickly and accurately obtaining a high-quality open-domain title training dataset, thus improving the open-domain generation capability, fact consistency, and language fluency of the subsequently generated title generation model from the source.
[0132] In some optional implementations of this embodiment, the step of cleaning the title in the second text data based on preset language fluency rules to obtain the third text data includes the following steps:
[0133] For each piece of second text data, select a first specified text data whose title length is greater than a preset second length threshold from the second text data.
[0134] In this embodiment, sentences exceeding the average sentence length but lacking any punctuation to indicate pauses are often a mixture of two sentences or omissions in punctuation. Such data is detrimental to the model's ability to learn and generate fluent sentences and is therefore directly discarded. The value of the aforementioned second length threshold is not specifically limited and can be set according to actual usage requirements.
[0135] The first specified text data is cleared from the second specified text data to obtain the second specified text data.
[0136] For each piece of second specified text data, select third specified text data from the second specified text data whose number of punctuation marks is greater than a preset second quantity threshold.
[0137] In this embodiment, the sentence contains too many punctuation marks and too few unique characters, especially Chinese characters. It often contains a large number of interjections, which are detrimental to the training of the model for title generation and are therefore directly removed. The value of the second quantity threshold mentioned above is not specifically limited and can be set according to actual usage requirements.
[0138] The third specified text data is cleared from the second specified text data to obtain the fourth specified text data.
[0139] For each fourth specified text data, obtain the fifth specified text data from the fourth specified text data whose title contains repeated substrings that satisfy a preset proportion threshold.
[0140] In this embodiment, sentences contain a high percentage of repeated substrings. To maintain diversity in model generation, such data is removed. To improve the efficiency of repeated substring detection, a suffix tree can be used to preprocess the text data. All distinct repeated substrings are identified in the suffix tree, and then filtered based on whether the substrings are mutually inclusive, ultimately resulting in all non-overlapping repeated substrings. The specific value of the aforementioned percentage threshold is not limited and can be set according to actual usage requirements.
[0141] The fifth specified text data is cleared from the fourth specified text data to obtain the third text data.
[0142] For each piece of second text data, this application first selects first designated text data whose title length is greater than a preset second length threshold from the second text data; then, it removes the first designated text data from the second text data to obtain second designated text data; subsequently, for each piece of second designated text data, it selects third designated text data whose number of punctuation marks is greater than a preset second quantity threshold from the second designated text data; and removes the third designated text data from the second designated text data to obtain fourth designated text data; subsequently, for each piece of fourth designated text data, it obtains fifth designated text data whose title contains repeated substrings that meet a preset proportion threshold; and removes the fifth designated text data from the fourth designated text data to obtain third text data. After collecting the title dataset, this application cleans the title dataset using character cleaning rules to obtain first text data, which facilitates the subsequent use of fact consistency rules and language fluency rules to clean the first text data, thereby quickly and accurately obtaining a high-quality open-domain title training dataset. This improves the open-domain generation capability, fact consistency, and language fluency of the subsequently generated title generation model from the source.
[0143] In some optional implementations of this embodiment, after step S205, the electronic device may further perform the following steps:
[0144] The target title is cleaned based on preset cleaning rules to obtain the first title.
[0145] In this embodiment, after generating the target title corresponding to the target text using the title generation model, the generated target title is further cleaned and normalized using heuristic rules, including erroneous entity prediction and replacement, and rule-based correction, based on considerations of the stability and robustness of title generation in open domain scenarios. The heuristic rules are similar to those in the large-scale Chinese open domain data cleanup section; the specific content of the cleanup rules can be found in the aforementioned data cleanup rules, and will not be elaborated upon here.
[0146] The first title is transformed based on preset processing specifications to obtain the second title.
[0147] In this embodiment, the above processing specifications may at least include detecting whether the capitalization and spaces of English characters match the text; otherwise, replacing them with the corresponding text from the article. For excessively long sections, truncation is performed based on punctuation marks. Duplicate substrings are detected and deleted accordingly.
[0148] Store the second header.
[0149] In this embodiment, the storage method for the second heading is not limited; for example, local storage, cloud storage, blockchain storage, etc., can be used.
[0150] This application cleanses the target title using preset cleansing rules to obtain a first title; then, it transforms the first title using preset processing specifications to obtain a second title; the second title is then stored. After generating a target title corresponding to the target text using a title generation model, this application further refines the target title using preset cleansing rules and processing specifications, taking into account the stability and robustness of title generation in open domain scenarios, to generate the final title, thereby further improving the factual consistency and linguistic fluency of the generated title.
[0151] It should be emphasized that, to further ensure the privacy and security of the aforementioned target titles, the target titles can also be stored in a node of a blockchain.
[0152] The blockchain referred to in this application is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.
[0153] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0154] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0155] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0156] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0157] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of an artificial intelligence-based title generation device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0158] like Figure 3 As shown, the AI-based title generation device 300 described in this embodiment includes: a first acquisition module 301, a first cleaning module 302, a training module 303, a second acquisition module 304, and a generation module 305. Wherein:
[0159] The first acquisition module 301 is used to acquire a pre-collected title dataset; wherein, the title dataset includes multiple data entries, each of which includes a title and an article;
[0160] The first cleaning module 302 is used to clean the titles in the title dataset based on a variety of preset data cleaning rules to obtain cleaned target text data.
[0161] Training module 303 is used to train a pre-trained language model using the target text data as training data based on a preset adversarial training strategy and noise reduction strategy to obtain a title generation model; wherein the pre-trained language model is a language model using a T5 encoder-decoder architecture.
[0162] The second acquisition module 304 is used to acquire the target text to be recognized;
[0163] The generation module 305 is used to input the target text into the title generation model, process the target text through the title generation model, and generate a target title corresponding to the target text.
[0164] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0165] In some optional implementations of this embodiment, the training module 303 includes:
[0166] An expansion submodule is used to expand the search of the target text data using a preset adversarial training algorithm to obtain adversarial samples;
[0167] The processing submodule is used to perform masking processing on the adversarial samples to obtain masked training samples;
[0168] The training submodule is used to input the masked training samples into the pre-trained language model, and use the masked training samples to train the pre-trained language model to obtain a first pre-trained language model.
[0169] The adjustment submodule is used to adjust the parameters of the first pre-trained language model based on a preset trust loss function until the trust loss function meets a preset convergence condition, thereby obtaining a trained second pre-trained language model.
[0170] The first determining submodule is used to use the second pre-trained language model as the title generation model.
[0171] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0172] In some optional implementations of this embodiment, the first cleaning module 302 includes:
[0173] The first cleaning submodule is used to clean the titles in the title dataset based on preset character cleaning rules to obtain the first text data;
[0174] The second cleaning submodule is used to clean the titles in the first text data based on a preset fact consistency rule to obtain the second text data;
[0175] The third cleaning submodule is used to clean the titles in the second text data based on preset language fluency rules to obtain the third text data.
[0176] The second determining submodule is used to use the third text data as the target text data.
[0177] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0178] In some optional implementations of this embodiment, the first cleaning submodule includes:
[0179] The first deletion unit is used to delete the first character in the title of the title dataset that meets the preset abnormal conditions, so as to obtain the processed fourth text data.
[0180] The replacement unit is used to replace the second character in the title of the fourth text data that meets the preset character conversion conditions to obtain the fifth text data;
[0181] The first filtering unit is used to obtain the title length of the title in the fifth text data, and filter out the specified title whose title length is within a preset first length range from the fifth text data;
[0182] The second filtering unit is used to filter out the sixth text data corresponding to the specified title from the fifth text data to obtain the first text data.
[0183] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0184] In some optional implementations of this embodiment, the second cleaning submodule includes:
[0185] The third filtering unit is used to filter out the seventh text data from each piece of first text data where the length of the longest common subsequence between the title and the article is less than a preset first length threshold.
[0186] The second deletion unit is used to delete the seventh text data from the first text data to obtain the eighth text data;
[0187] The fourth filtering unit is used to filter out, for each piece of eighth text data, the ninth text data whose title does not appear in the corresponding article and the number of entities is greater than a preset first threshold.
[0188] The third deletion unit is used to delete the ninth text data from the eighth text data to obtain the second text data.
[0189] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0190] In some optional implementations of this embodiment, the third cleaning submodule includes:
[0191] The fifth filtering unit is used to filter out first specified text data whose title length is greater than a preset second length threshold from each piece of second text data;
[0192] The first clearing unit is used to clear the first specified text data in the second text data to obtain the second specified text data;
[0193] The sixth filtering unit is used to filter out third specified text data from each second specified text data where the number of punctuation marks is greater than a preset second quantity threshold.
[0194] The second clearing unit is used to clear the third specified text data in the second specified text data to obtain the fourth specified text data;
[0195] The acquisition unit is used to acquire, for each piece of fourth specified text data, fifth specified text data whose title contains repeated substrings that satisfy a preset proportion threshold.
[0196] The third clearing unit is used to clear the fifth specified text data in the fourth specified text data to obtain the third text data.
[0197] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0198] In some optional implementations of this embodiment, the AI-based title generation device further includes:
[0199] The second cleaning module is used to clean the target title based on preset cleaning rules to obtain the first title;
[0200] The conversion module is used to convert the first title based on a preset processing specification to obtain the second title;
[0201] A storage module for storing the second title.
[0202] In this embodiment, the operations performed by the above modules or units correspond one-to-one with the steps of the artificial intelligence-based title generation method in the aforementioned implementation method, and will not be repeated here.
[0203] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0204] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0205] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0206] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for an artificial intelligence-based title generation method. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.
[0207] In some embodiments, the processor 42 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the AI-based title generation method.
[0208] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.
[0209] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the artificial intelligence-based title generation method described above.
[0210] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0211] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A title generation method based on artificial intelligence, characterized in that, Includes the following steps: Obtain a pre-collected title dataset; wherein the title dataset includes multiple data entries, each of which includes a title and an article; The titles in the title dataset are cleaned based on a variety of preset data cleaning rules to obtain cleaned target text data. Based on the preset adversarial training strategy and noise reduction strategy, the target text data is used as training data to train the pre-trained language model to obtain the title generation model; wherein, the pre-trained language model is a language model using a T5 encoder-decoder architecture. Obtain the target text to be recognized; The target text is input into the title generation model, and the title generation model processes the target text to generate a target title corresponding to the target text. The step of training a pre-trained language model using the target text data as training data to obtain a title generation model based on a preset adversarial training strategy and noise reduction strategy specifically includes: The target text data is expanded and searched using a preset adversarial training algorithm to obtain adversarial samples; The adversarial sample is masked to obtain masked training samples; The masked training samples are input into the pre-trained language model, and the pre-trained language model is trained using the masked training samples to obtain the first pre-trained language model. The parameters of the first pre-trained language model are adjusted based on the preset trust loss function until the trust loss function meets the preset convergence condition, thus obtaining the trained second pre-trained language model; the cross-entropy function is replaced by the trust loss function, and a probability term predicted by the model itself is added to the original labeled probability distribution to achieve a trade-off between data labeling and trusting its own prediction. The second pre-trained language model is used as the title generation model; The step of cleaning the titles in the title dataset based on multiple preset data cleaning rules to obtain cleaned target text data specifically includes: The titles in the title dataset are cleaned based on preset character cleaning rules to obtain the first text data; The titles in the first text data are cleaned based on a preset fact consistency rule to obtain the second text data; The titles in the second text data are cleaned based on preset language fluency rules to obtain the third text data; The third text data is used as the target text data.
2. The title generation method based on artificial intelligence according to claim 1, characterized in that, The step of cleaning the titles in the title dataset based on preset character cleaning rules to obtain the first text data specifically includes: The first character in the title of the title dataset that meets the preset abnormal conditions is deleted to obtain the processed fourth text data; The second character in the title of the fourth text data that meets the preset character conversion conditions is replaced to obtain the fifth text data; Obtain the title length of the title in the fifth text data, and filter out the specified titles whose title length is within a preset first length range from the fifth text data; The first text data is obtained by filtering out the sixth text data that corresponds to the specified title from the fifth text data.
3. The title generation method based on artificial intelligence according to claim 1, characterized in that, The step of cleaning the titles in the first text data based on a preset fact consistency rule to obtain the second text data specifically includes: For each piece of first text data, a seventh piece of text data is selected from the first text data whose maximum common subsequence length between the title and the article is less than a preset first length threshold. The seventh text data is deleted from the first text data to obtain the eighth text data; For each piece of eighth text data, a ninth text data is selected from the eighth text data where the number of entities whose titles do not appear in the corresponding articles is greater than a preset first threshold. The ninth text data is deleted from the eighth text data to obtain the second text data.
4. The title generation method based on artificial intelligence according to claim 1, characterized in that, The step of cleaning the title in the second text data based on preset language fluency rules to obtain the third text data specifically includes: For each piece of second text data, select first specified text data whose title length is greater than a preset second length threshold from the second text data; The first specified text data is cleared from the second specified text data to obtain the second specified text data; For each piece of second specified text data, select third specified text data from the second specified text data where the number of punctuation marks is greater than a preset second threshold; The third specified text data is cleared from the second specified text data to obtain the fourth specified text data; For each piece of fourth specified text data, obtain the fifth specified text data whose title contains repeated substrings that satisfy a preset proportion threshold. The fifth specified text data is cleared from the fourth specified text data to obtain the third text data.
5. The title generation method based on artificial intelligence according to claim 1, characterized in that, After the steps of inputting the target text into the title generation model, processing the target text through the title generation model, and generating a target title corresponding to the target text, the method further includes: The target title is cleaned of characters based on preset cleaning rules to obtain the first title; The first title is transformed based on preset processing specifications to obtain the second title; Store the second header.
6. A title generation device based on artificial intelligence, characterized in that, include: The first acquisition module is used to acquire a pre-collected title dataset; wherein, the title dataset includes multiple data entries, each of which includes a title and an article; The first cleaning module is used to clean the titles in the title dataset based on a variety of preset data cleaning rules to obtain cleaned target text data. The training module is used to train the pre-trained language model using the target text data as training data based on a preset adversarial training strategy and noise reduction strategy, so as to obtain a title generation model; wherein the pre-trained language model is a language model using a T5 encoder-decoder architecture. The second acquisition module is used to acquire the target text to be recognized; The generation module is used to input the target text into the title generation model, process the target text through the title generation model, and generate a target title corresponding to the target text; The training module includes: An expansion submodule is used to expand the search of the target text data using a preset adversarial training algorithm to obtain adversarial samples; The processing submodule is used to perform masking processing on the adversarial samples to obtain masked training samples; The training submodule is used to input the masked training samples into the pre-trained language model, and use the masked training samples to train the pre-trained language model to obtain a first pre-trained language model. The adjustment submodule is used to adjust the parameters of the first pre-trained language model based on a preset trust loss function until the trust loss function meets the preset convergence condition, thereby obtaining a trained second pre-trained language model; the trust loss function is used to replace the cross-entropy function, and a probability term predicted by the model itself is added to the original labeled probability distribution to achieve a trade-off between data labeling and trusting its own prediction. The first determining submodule is used to use the second pre-trained language model as the title generation model; The first cleaning module includes: The first cleaning submodule is used to clean the titles in the title dataset based on preset character cleaning rules to obtain the first text data; The second cleaning submodule is used to clean the titles in the first text data based on a preset fact consistency rule to obtain the second text data; The third cleaning submodule is used to clean the titles in the second text data based on preset language fluency rules to obtain the third text data. The second determining submodule is used to use the third text data as the target text data.
7. A computer device comprising a memory and a processor, the memory storing computer-readable instructions, wherein the processor, when executing the computer-readable instructions, implements the steps of the artificial intelligence-based title generation method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence-based title generation method as described in any one of claims 1 to 5.