A recipe title generation method and device

By extracting and sorting keywords from the source recipe data, and using a network model of permutation rules to generate recipe titles, the problem of long data processing time was solved, and the generation efficiency and coverage were improved.

CN112446206BActive Publication Date: 2025-12-30ALIBABA GROUP HOLDING LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910761972.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-16
Publication Date
2025-12-30
Estimated Expiration
2039-08-16

AI Technical Summary

Technical Problem

In existing technologies, the data processing time in the network during the recipe title generation process is too long, resulting in a decline in model learning ability and low generation efficiency.

Method used

By extracting information from the recipe source data, keywords are obtained, and the order of keywords is adjusted according to the specified arrangement rules. Candidate titles are generated using the network model corresponding to the arrangement rules, and then fused to reduce the amount of input data to the network model and improve the processing speed.

Benefits of technology

This reduces the amount of input data to the network model, improves the processing speed and coverage of recipe title generation, and ensures that the generated recipe titles contain key information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112446206B_ABST
    Figure CN112446206B_ABST
Patent Text Reader

Abstract

The application provides a recipe title generation method and device. The generation method comprises: performing information extraction on to-be-processed recipe source data to obtain keywords in the recipe source data; adjusting the arrangement order between the keywords according to a specified arrangement rule to obtain a keyword sequence; using a network model corresponding to the arrangement rule to obtain a candidate title of the recipe source data according to the keyword sequence; and performing fusion processing on the candidate title from the network model to generate a recipe title. The recipe title generation method provided by the application reduces the processing time of data in a network used for generating a recipe title.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning, specifically to a method and apparatus for generating recipe titles. Background Technology

[0002] The use of technologies such as Natural Language Processing (NLP) to automatically process text data, such as recipes, to obtain titles (e.g., recipe titles) is becoming increasingly widespread in various lifestyle applications. For example, some lifestyle applications feature recipe recommendations; by processing recipe data, attractive recipe titles can be automatically generated.

[0003] In existing technologies, Seq2Seq models, pointer networks, or pointer-generator networks (PGNs) are generally used to process text data (such as recipe data) to obtain the title of the text data (such as the recipe title).

[0004] However, directly inputting text data into these networks to generate text data titles results in excessively long data processing times within the network. Summary of the Invention

[0005] This application provides a method and apparatus for generating recipe titles, thereby reducing the data processing time in the network used to generate recipe titles.

[0006] The method for generating the recipe title includes:

[0007] Information extraction is performed on the source recipe data to be processed to obtain keywords from the source recipe data;

[0008] According to the specified arrangement rules, the order of the keywords is adjusted to obtain a keyword sequence;

[0009] Based on the keyword sequence, candidate titles of the recipe source data are obtained using a network model corresponding to the arrangement rule;

[0010] The candidate titles from the network model are fused to generate recipe titles.

[0011] Optionally, the step of extracting information from the source recipe data to be processed to obtain keywords in the source recipe data includes:

[0012] Perform at least one preprocessing operation, including word segmentation and stop word removal, on the recipe source data to be processed to obtain the words in the recipe source data;

[0013] The words in the recipe source data are statistically analyzed to obtain the inverse text frequency values ​​of the words;

[0014] Keywords in the recipe source data are obtained based on the word frequency inverse text frequency value of the words.

[0015] Optionally, adjusting the order of the keywords according to a specified arrangement rule to obtain a keyword sequence includes:

[0016] Based on the frequency values ​​of the keywords in the recipe source data, the keywords are sorted to obtain a keyword sequence; or...

[0017] Perform random permutation and combination operations on the keywords to obtain a keyword sequence; or,

[0018] Randomly discard at least one of the keywords to obtain a keyword sequence.

[0019] Optionally, obtaining candidate titles for the recipe source data based on the keyword sequence using a network model corresponding to the permutation rule includes:

[0020] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0021] Named entity recognition is performed on the generated title and the original title of the recipe source data to obtain the first named entity of the generated title and the second named entity of the original title;

[0022] Perform a matching operation on the first named entity and the second named entity to obtain the matching degree between the first named entity and the second named entity;

[0023] Based on the matching degree, candidate titles of the recipe source data are obtained.

[0024] Optionally, obtaining candidate titles for the recipe source data based on the keyword sequence using a network model corresponding to the permutation rule includes:

[0025] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0026] Based on the syntax and style of the generated titles, the generated titles are filtered to obtain candidate titles for the recipe source data.

[0027] Optionally, the step of filtering the generated titles based on their syntax and style to obtain candidate titles for the recipe source data includes:

[0028] Obtain a classifier model for filtering the syntax and style of the generated titles;

[0029] The generated title is input into the classifier model to obtain candidate titles for the recipe source data.

[0030] Optionally, obtaining a classifier model for filtering the grammar and style of the generated titles includes:

[0031] Construct a classifier for filtering the syntax and style of the generated titles;

[0032] High-quality titles selected manually are used as positive samples for training the classifier.

[0033] For the positive samples, perform at least one of the following operations: randomly shuffle the order, randomly discard words, and randomly add words. Use the data after the operation as negative samples for training the classifier.

[0034] Using the positive and negative samples, the classifier is trained to obtain a classifier model for filtering the grammar and style of the generated titles.

[0035] Optionally, obtaining candidate titles for the recipe source data based on the keyword sequence using a network model corresponding to the permutation rule includes:

[0036] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0037] The generated title is filtered for sensitive words to obtain candidate titles from the recipe source data.

[0038] Optionally, the step of fusing candidate titles from the network model to generate recipe titles includes:

[0039] Obtain the first candidate title from the first network model;

[0040] Obtain the second candidate title from the second network model;

[0041] According to the specified scoring rules, the first candidate title and the second candidate title are scored to obtain the score of the first candidate title and the score of the second candidate title;

[0042] The recipe title is generated based on the scores of the first candidate title and the second candidate title.

[0043] Optionally, the method for generating the recipe title further includes:

[0044] Based on the degree of matching between the title of the recipe source data and the recipe source data, the title of the recipe source data is filtered to obtain an optimized title for the recipe source data.

[0045] Optionally, the step of filtering the titles of the recipe source data based on the degree of matching between the titles and the recipe source data to obtain optimized titles for the recipe source data includes:

[0046] Construct a quality feature classifier;

[0047] Train the quality feature classifier to obtain the quality feature classifier model;

[0048] The recipe source data is input into the quality feature classifier model to obtain the optimized title of the recipe source data.

[0049] Optionally, training the quality feature classifier to obtain a quality feature classifier model includes:

[0050] The first title and the first recipe source data that were filtered out during the processing of the network model are used as negative samples for the quality feature classifier.

[0051] The second title of the second recipe source data generated by the network model and the second recipe source data are used as positive samples for the quality feature classifier.

[0052] The quality feature classifier is trained based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model.

[0053] Optionally, training the quality feature classifier based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model includes:

[0054] K-fold cross-validation is performed on the negative samples and positive samples of the quality feature classifier to obtain the training samples of the quality feature classifier.

[0055] The quality feature classifier is trained using the training samples of the quality feature classifier to obtain a quality feature classifier model.

[0056] Optionally, the method for generating the recipe title further includes:

[0057] Obtain the network model corresponding to the arrangement rule.

[0058] Optionally, obtaining the network model corresponding to the permutation rule includes:

[0059] Construct a pointer generator network;

[0060] The pointer generator network is trained using the keyword sequence to obtain the network model corresponding to the permutation rule.

[0061] This application provides a recipe title generation apparatus, comprising:

[0062] The extraction unit is used to extract information from the recipe source data to be processed and obtain the keywords in the recipe source data.

[0063] An adjustment unit is used to adjust the order of the keywords according to a specified arrangement rule to obtain a keyword sequence;

[0064] The obtaining unit is used to obtain candidate titles of the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rule;

[0065] The generation unit is used to fuse candidate titles from the network model to generate recipe titles.

[0066] Optionally, the extraction unit is specifically used for:

[0067] Perform at least one preprocessing operation, including word segmentation and stop word removal, on the recipe source data to be processed to obtain the words in the recipe source data;

[0068] The words in the recipe source data are statistically analyzed to obtain the inverse text frequency values ​​of the words;

[0069] Keywords in the recipe source data are obtained based on the word frequency inverse text frequency value of the words.

[0070] Optionally, the adjustment unit is specifically used for:

[0071] Based on the frequency values ​​of the keywords in the recipe source data, the keywords are sorted to obtain a keyword sequence; or...

[0072] Perform random permutation and combination operations on the keywords to obtain a keyword sequence; or,

[0073] Randomly discard at least one of the keywords to obtain a keyword sequence.

[0074] Optionally, the obtaining unit is specifically used for:

[0075] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0076] Named entity recognition is performed on the generated title and the original title of the recipe source data to obtain the first named entity of the generated title and the second named entity of the original title;

[0077] Perform a matching operation on the first named entity and the second named entity to obtain the matching degree between the first named entity and the second named entity;

[0078] Based on the matching degree, candidate titles of the recipe source data are obtained.

[0079] Optionally, the obtaining unit is further configured to:

[0080] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0081] Based on the syntax and style of the generated titles, the generated titles are filtered to obtain candidate titles for the recipe source data.

[0082] Optionally, the obtaining unit is further configured to:

[0083] Obtain a classifier model for filtering the syntax and style of the generated titles;

[0084] The generated title is input into the classifier model to obtain candidate titles for the recipe source data.

[0085] Optionally, the obtaining unit is further configured to:

[0086] Construct a classifier for filtering the syntax and style of the generated titles;

[0087] High-quality titles selected manually are used as positive samples for training the classifier.

[0088] For the positive samples, perform at least one of the following operations: randomly shuffle the order, randomly discard words, and randomly add words. Use the data after the operation as negative samples for training the classifier.

[0089] Using the positive and negative samples, the classifier is trained to obtain a classifier model for filtering the grammar and style of the generated titles.

[0090] Optionally, the obtaining unit is further configured to:

[0091] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0092] The generated title is filtered for sensitive words to obtain candidate titles from the recipe source data.

[0093] Optionally, the generation unit is specifically used for:

[0094] Obtain the first candidate title from the first network model;

[0095] Obtain the second candidate title from the second network model;

[0096] According to the specified scoring rules, the first candidate title and the second candidate title are scored to obtain the score of the first candidate title and the score of the second candidate title;

[0097] The recipe title is generated based on the scores of the first candidate title and the second candidate title.

[0098] Optionally, the recipe title generation device further includes a filtering unit, the filtering unit being used for:

[0099] Based on the degree of matching between the title of the recipe source data and the recipe source data, the title of the recipe source data is filtered to obtain an optimized title for the recipe source data.

[0100] Optionally, the filtering unit is specifically used for:

[0101] Construct a quality feature classifier;

[0102] Train the quality feature classifier to obtain the quality feature classifier model;

[0103] The recipe source data is input into the quality feature classifier model to obtain the optimized title of the recipe source data.

[0104] Optionally, the filtering unit is further configured to:

[0105] The first title and the first recipe source data that were filtered out during the processing of the network model are used as negative samples for the quality feature classifier.

[0106] The second title of the second recipe source data generated by the network model and the second recipe source data are used as positive samples for the quality feature classifier.

[0107] The quality feature classifier is trained based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model.

[0108] Optionally, the filtering unit is further configured to:

[0109] K-fold cross-validation is performed on the negative samples and positive samples of the quality feature classifier to obtain the training samples of the quality feature classifier.

[0110] The quality feature classifier is trained using the training samples of the quality feature classifier to obtain a quality feature classifier model.

[0111] Optionally, the recipe title generation device further includes a network model acquisition unit, which is used for:

[0112] Obtain the network model corresponding to the arrangement rule.

[0113] Optionally, the network model acquisition unit is specifically used for:

[0114] Construct a pointer generator network;

[0115] The pointer generator network is trained using the keyword sequence to obtain the network model corresponding to the permutation rule.

[0116] This application provides a method for generating a title, including:

[0117] Information extraction is performed on the text data to be processed to obtain keywords from the text data;

[0118] The title of the text data is obtained based on the keywords.

[0119] Optionally, obtaining the title of the text data based on the keywords includes:

[0120] According to the specified arrangement rules, the order of the keywords is adjusted to obtain a keyword sequence;

[0121] The title of the text data is obtained based on the keyword sequence.

[0122] Optionally, obtaining the title of the text data based on the keyword sequence includes:

[0123] Based on the keyword sequence, candidate titles for the text data are obtained using a network model corresponding to the arrangement rule;

[0124] The candidate titles from the network model are fused to generate the title of the text data.

[0125] This application provides an electronic device, including:

[0126] processor;

[0127] as well as,

[0128] A memory for storing a computer program, which, after being run by the processor, performs the method as described in any of the preceding items.

[0129] This application provides a computer storage medium storing a computer program that is executed by a processor to perform the method described in any of the preceding claims.

[0130] Compared with the prior art, this application has the following advantages:

[0131] The recipe title generation method provided in this application extracts information from the recipe source data to obtain keywords; adjusts the order of the keywords according to a specified arrangement rule to obtain a keyword sequence; and obtains candidate titles for the recipe source data using a network model corresponding to the arrangement rule based on the keyword sequence. The candidate titles from the network model are then fused to generate the recipe title. This method extracts information from the recipe source data to obtain keywords, and inputs these keywords into a network model for processing, reducing the amount of input data and thus improving the processing time of the recipe source data in the network model. Furthermore, fusing the candidate titles from the network model corresponding to the arrangement rule to generate the recipe title also improves the coverage of the generated recipe titles. Attached Figure Description

[0132] Figure 1 This is a schematic diagram illustrating an application scenario of the recipe title generation method provided in this application.

[0133] Figure 2 This is a flowchart of a method for generating recipe titles provided in the first embodiment of this application.

[0134] Figure 3 This is a schematic diagram of a pointer generator network model that uses a multi-model parallel generation framework to generate recipe titles, according to the first embodiment of this application.

[0135] Figure 4 This is a schematic diagram of a system employing a multi-model parallel generation framework, which relates to the first embodiment of this application.

[0136] Figure 5 This is a schematic diagram of a recipe title generation device provided in the second embodiment.

[0137] Figure 6 This is a flowchart of a title generation method provided in the third embodiment of this application. Detailed Implementation

[0138] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0139] To enable those skilled in the art to better understand the solution of this application, a specific application scenario embodiment of this application will first be described in detail. For example... Figure 1 The diagram illustrates an embodiment of an application scenario for a recipe title generation method provided in this application. In a specific implementation, user 108-1, through client application 107-1 on client device 106-1, sends a command to recipe data server 109 via network 105 to retrieve recipe data. Recipe data server 109 returns the recipe data to client application 107-1 according to the command. Client application 107-1 then sends the recipe data to recipe title generation server 100 via network 105. Upon receiving the recipe data, recipe title generation server 100 sends it to extraction unit 101. Extraction unit 101 extracts information from the source recipe data to obtain keywords. Then, adjustment unit 102 adjusts the order of the keywords according to a specified arrangement rule to obtain a keyword sequence. Next, obtaining unit 103 uses a network model corresponding to the arrangement rule to obtain candidate titles for the source recipe data based on the keyword sequence. Then, the candidate titles from the network model are fused together by the generation unit 104 to generate a recipe title. Finally, the recipe title generation server 100 returns the generated recipe source data title to the client application 107-1.

[0140] The first embodiment of this application provides a method for generating recipe titles. Please refer to... Figure 2 This figure is a flowchart of the first embodiment of this application. The following is in conjunction with... Figure 2 The first embodiment of this application will be described in detail. The method includes the following steps:

[0141] Step S201: Extract information from the source data of the recipes to be processed to obtain the keywords in the source data of the recipes.

[0142] This step is used to extract information from the source data of the recipes to be processed, and to obtain the keywords in the source data of the recipes.

[0143] The step of extracting information from the source recipe data to be processed, and obtaining keywords from the source recipe data, includes:

[0144] Perform at least one preprocessing operation, including word segmentation and stop word removal, on the recipe source data to be processed to obtain the words in the recipe source data;

[0145] The words in the recipe source data are statistically analyzed to obtain the inverse text frequency values ​​of the words;

[0146] Keywords in the recipe source data are obtained based on the word frequency inverse text frequency value of the words.

[0147] Table 1 below provides an example of obtaining keywords from recipe source data. The following explanation uses Table 1 as an example to illustrate this step.

[0148]

[0149] Table 1

[0150] Word segmentation is the process of recombinizing a continuous sequence of characters into a sequence of words according to certain rules. Stop words refer to words that are automatically filtered out before or after processing natural language data (or text) in information processing to save storage space and improve search efficiency. Term Frequency–Inverse Document Frequency (TF-IDF) is a commonly used weighting technique in information retrieval and mining to evaluate the importance of a word to a document in a corpus. The importance of a word is directly proportional to the number of times it appears in the document and inversely proportional to its frequency in the corpus. Since these concepts are common techniques in NLP, only a brief explanation is given here, and the calculation method of TF-IDF will not be illustrated further.

[0151] First, at least one preprocessing operation, including word segmentation and stop word removal, is performed on the recipe source data to be processed in Table 1 to obtain the words in the recipe source data. As shown in Table 1, the recipe source data may include the original title of the recipe (e.g., how to make braised pork belly with radish), preparation steps, personal story, main ingredients, etc. This data is concatenated to form the recipe source data. Then, the words in the recipe source data are statistically analyzed to obtain the inverse text frequency (IMS) values ​​of the words. Finally, based on the IMS values ​​of the words, the keywords in Table 1 are obtained.

[0152] In existing technologies, recipe source data is typically directly input into a trained network model to obtain the recipe title. Furthermore, the network model can be trained using sample recipe source data with good recipe titles.

[0153] The network model can use a Seq2Seq model, the main idea of ​​which is to use a deep learning network (usually an RNN recurrent neural network) to process the input sequence: Mapped to a sequence as output: The entire process is divided into two stages: encoding and decoding.

[0154] An encoder, taking LSTM (Long Short-Term Memory) as an example: the encoding process converts various input sequences... The context vector c is obtained after passing through LSTM. Vector c is usually the last hidden vector of LSTM. It can be either a weighted sum of multiple hidden vectors (attention mechanism).

[0155]

[0156] Decoder: After encoding, the context vector c can be used as the initial state of another LSTM. The current LSTM is responsible for decoding, using the previous state it has retained. And input the previous word (During training, the word is the previous word in the training data; during testing, the word is the word predicted in the previous step) to obtain the current state. This allows us to predict the word with the highest probability. In testing, Beam Search is typically used to obtain better results.

[0157] The network model described can use pointer networks, a variant of the seq2seq model. This model addresses the issue of a variable-size output dictionary using an attention mechanism. It does not rely on the decoding state to obtain decoding information, but instead directly relies on the attention matrix to select appropriate words from the input sequence as output. This characteristic makes it well-suited for solving extractive text summarization tasks.

[0158] The network model can be used as follows: Figure 3 The Pointer-Generator Network (PGN) model shown combines the advantages of seq2seq+attention and Pointer Networks models. Compared to a standard seq2seq+attention model, this hybrid model can directly copy words from the original text, thus improving the accuracy of summarization and handling out-of-vocabulary (OOV) words, while retaining the ability to generate new words. Figure 3The paper describes the process by which a pointer generator network model obtains a summary from the input data.

[0159] Although the pointer generator network model represents a significant improvement over the seq2seq network model, problems still exist in recipe title generation, such as excessively long training and decoding times and a large amount of input information in the training corpus, leading to a decline in the model's learning ability. The method provided in this embodiment extracts information from the source recipe data to obtain keywords, and uses these keywords as input to various network models, thereby solving or partially solving the aforementioned problems.

[0160] Keywords, used as input to various network models, effectively address the issue of excessively long training and decoding times. The length of the input sequence can be shortened from hundreds to Topk (e.g., in Table 1, with 20 keywords, Topk is 20), significantly accelerating the network's computation. Furthermore, since temporal networks have limited memory capacity, inputting hundreds of words simultaneously to the source leads to information loss from some crucial initial words. After keyword extraction, the input words only require a maximum of Topk steps to reach the end, effectively mitigating information loss. Finally, this lays the foundation for subsequent data augmentation.

[0161] Step S202: Adjust the order of the keywords according to the specified arrangement rules to obtain a keyword sequence.

[0162] This step is used to adjust the order of the keywords according to the specified arrangement rules to obtain a keyword sequence.

[0163] The step of adjusting the order of the keywords according to a specified arrangement rule to obtain a keyword sequence includes:

[0164] Based on the frequency values ​​of the keywords in the recipe source data, the keywords are sorted to obtain a keyword sequence; or...

[0165] Perform random permutation and combination operations on the keywords to obtain a keyword sequence; or,

[0166] Randomly discard at least one of the keywords to obtain a keyword sequence.

[0167] In step S201, the training data has been extracted into keywords. For PGN networks, the position of words has a significant impact on the generated results. Theoretically, PGN networks can learn positional information. However, models trained on the same set of training data are prone to overfitting, or the words in the training data may not have a clear positional relationship, causing the model to fail to learn the corresponding information. Furthermore, due to the black-box nature of deep learning, it is difficult to determine what kind of ranking information is most effective as input to the network. For example, in the current scenario, there is no clear positional relationship between the extracted keywords, which may lead to some information not being recognized by the model, resulting in the missing key information in the generated results. Titles lacking key information are thus filtered out. There are two possible approaches to address this problem.

[0168] The first method is simple data sample augmentation. This involves rearranging and combining the input keywords using various approaches to enrich the corpus. Several feasible methods include:

[0169] S202-1: Sort the recipe source data from largest to smallest based on keywords in the original title and content information, including word frequency and TF-IDF.

[0170] S202-2: Sort the recipe source data from smallest to largest based on keywords in the original title and content information, including word frequency and TF-IDF.

[0171] S202-3: Randomly shuffle the source keywords in the training or testing corpus. Each shuffling is equivalent to creating a new corpus.

[0172] S202-4: Randomly discard some words from the keywords (similar to drop out in deep learning).

[0173] This merges all the newly sorted samples together. Then, a single model is trained on them. The result trained in this way will have better generalization performance.

[0174] Another approach is a multi-model parallel generation framework. Single-model generation still struggles to avoid information gaps. To better alleviate the low coverage caused by information gaps, we propose a multi-model parallel generation framework. The approach is similar to the data augmentation in the previous section. The input keyword sequences are sorted by indicator weights, randomly shuffled, and randomly discarded. The difference is that each set of data is trained with a separate model. During testing, multiple models are used to generate the same recipe title. In this parallel framework, each model undergoes PGN generation and title quality verification, and each uses its own GPU without interfering with the others. In the framework diagram, the data composed of PT1~PT4 in four different ways are processed by parallel computing units, producing results separately, which are then merged in subsequent processing.

[0175] Step S202 employs a multi-model parallel generation framework. Please refer to [link / reference]. Figure 4 This is a system diagram illustrating a method for generating recipe titles. Figure 4 In the 401 specification, four permutation rules (PT) are provided, PT1-PT4. Among them, PT1 can use S202-1, PT2 can use S202-2, PT3 can use S202-3, and PT4 can use S202-4. Figure 4 402 in the diagram represents a parallel processing unit. This parallel processing unit corresponds to PT1, PT2, PT3, and PT4. That is, each permutation rule corresponds to a parallel processing unit. These parallel processing units have the same network structure (e.g., they all include preprocessing, keyword extraction, etc.), but their network parameters are different.

[0176] Step S203: Based on the keyword sequence, use the network model corresponding to the arrangement rule to obtain the candidate titles of the recipe source data.

[0177] This step is used to obtain candidate titles for the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rules.

[0178] For example, in Figure 4 In the parallel processing unit 402 corresponding to PT1, after keyword extraction, a keyword sequence is obtained, and the keyword sequence is input into the PGN model for processing to obtain the candidate titles of the recipe source data.

[0179] The step of obtaining candidate titles for the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rule includes:

[0180] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0181] Named entity recognition is performed on the generated title and the original title of the recipe source data to obtain the first named entity of the generated title and the second named entity of the original title;

[0182] Perform a matching operation on the first named entity and the second named entity to obtain the matching degree between the first named entity and the second named entity;

[0183] Based on the matching degree, candidate titles of the recipe source data are obtained.

[0184] Taking the recipe source data in Table 1 as an example, firstly, the keyword sequences in Table 1 are transformed using a trained PGN network to obtain the generated titles of the recipe source data (e.g., "Learn how to cook white radish, adults and children alike will love it"). Then, to prevent the generated titles from lacking core recipe information, we perform checks according to certain rules after generation. For example, we perform Named Entity Recognition (NER) on both the generated title ("Learn how to cook white radish, adults and children alike will love it") and the original title ("How to make braised pork belly with radish"), followed by NER entity matching. If the NER entity of the generated title never appears in the entity or even content keyword list of the original title, it is considered that key information is missing, and the generated result is discarded.

[0185] The step of obtaining candidate titles for the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rule includes:

[0186] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0187] Based on the syntax and style of the generated titles, the generated titles are filtered to obtain candidate titles for the recipe source data.

[0188] The step of filtering the generated titles based on their syntax and style to obtain candidate titles for the recipe source data includes:

[0189] Obtain a classifier model for filtering the syntax and style of the generated titles;

[0190] The generated title is input into the classifier model to obtain candidate titles for the recipe source data.

[0191] The step of obtaining a classifier model for filtering the grammar and style of the generated titles includes:

[0192] Construct a classifier for filtering the syntax and style of the generated titles;

[0193] High-quality titles selected manually are used as positive samples for training the classifier.

[0194] For the positive samples, perform at least one of the following operations: randomly shuffle the order, randomly discard words, and randomly add words. Use the data after the operation as negative samples for training the classifier.

[0195] Using the positive and negative samples, the classifier is trained to obtain a classifier model for filtering the grammar and style of the generated titles.

[0196] For example, in Figure 4 In practice, generated titles using sequence network models sometimes produce incoherent sentences. These issues can be resolved by training an effective language model. Training samples can utilize a large number of high-quality titles from a content repository. The language model can be a traditional N-gram statistical grammar model or an RNN (recurrent neural network)-based model. Here, we employ a language model trained using BERT (BertSeq LM Score Model).

[0197] In addition to training a language model using BERT, a separate classifier model (Bert Classifier) ​​was trained to determine whether titles conform to standards. Because BERT is trained using a bidirectional random mask mechanism, it differs from traditional language models. However, it can be used to build a classifier to determine whether generated sentences conform to standards. This includes some linguistic information and can also determine whether the style of the generated sentences conforms to standards. For positive samples, carefully selected attractive and high-quality titles can be used. For negative samples, titles from the positive samples can be randomly shuffled, words can be randomly discarded, or words can be randomly added. These negative samples guide the model to learn grammatical information. Alternatively, a batch of titles with a very ordinary style (such as original recipe titles) can be prepared as negative samples. These negative samples guide the model to learn whether the style matches.

[0198] After the classifier is trained, the new titles generated by the model are processed by the classifier, and only the titles that the classifier considers to be of high quality are retained.

[0199] The step of obtaining candidate titles for the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rule includes:

[0200] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0201] The generated title is filtered for sensitive words to obtain candidate titles from the recipe source data.

[0202] In addition to the above-mentioned testing models, more filtering models can be specified. For example, a sensitive words filter is used to determine whether the generated title contains sensitive words; if so, the result is discarded. Other similar exception filtering models will be referred to by a unified name here (Exception RuleFilter).

[0203] Step S204: The candidate titles from the network model are fused to generate recipe titles.

[0204] This step is used to fuse the candidate titles from the network model to generate recipe titles.

[0205] The above process involves multiple rounds of model or rule-based detection, filtering out some poorly generated results. This raises the issue of effective coverage: given N statements, return K valid generated results. If the effective coverage is low, many recipe titles will not be improved.

[0206] To improve effective coverage, the following methods can be used:

[0207] The first method is to change the number of keywords in the test dataset. The keyword lengths of the original training data source and the test data source are both TopK, such as 20 in the example.

[0208] Increasing the number of keywords extracted from the test data source can improve coverage to some extent. Under the same conditions, coverage increases with increasing length, leading to higher output coverage. This is because increasing the number of keywords allows for the inclusion of more relevant information. However, coverage peaks after the number of keywords reaches a certain value and then declines as the number of keywords increases further. This is because more keywords mean less attention is paid to core vocabulary information by the model, thus leading to performance degradation. Therefore, selecting an appropriate keyword length can effectively improve coverage.

[0209] The second method is to adopt, as follows Figure 4 The multi-model parallel generation framework is shown. This framework has already been explained in the previous steps and will not be repeated here.

[0210] The step of fusing candidate titles from the network model to generate recipe titles includes:

[0211] Obtain the first candidate title from the first network model;

[0212] Obtain the second candidate title from the second network model;

[0213] According to the specified scoring rules, the first candidate title and the second candidate title are scored to obtain the score of the first candidate title and the score of the second candidate title;

[0214] The recipe title is generated based on the scores of the first candidate title and the second candidate title.

[0215] The results generated by different models are merged. For the fused output, multiple models may produce different outputs for the same recipe source data. Some semi-empirical rule-based scoring models are developed to output the highest-scoring result, and the most suitable title is selected for each recipe source data.

[0216] After fusion processing, a unified title quality control classifier is used to ensure the quality of the final titles.

[0217] By applying different processing methods to the same set of recipe source data and running three models in parallel, the coverage rate can be effectively improved. Under the same accuracy conditions, the coverage rate is increased by more than 140% (taking a keyword count len=30 as an example, with 2000 recipe source data points, the original maximum output of a single model was 1030 entries, now it outputs 1489 entries). Please refer to Table 2 below.

[0218]

[0219] Table 2

[0220] The method for generating the recipe title also includes:

[0221] Based on the degree of matching between the title of the recipe source data and the recipe source data, the title of the recipe source data is filtered to obtain an optimized title for the recipe source data.

[0222] The step of filtering the titles of the recipe source data based on the degree of matching between the titles and the recipe source data, to obtain optimized titles for the recipe source data, includes:

[0223] Construct a quality feature classifier;

[0224] Train the quality feature classifier to obtain the quality feature classifier model;

[0225] The recipe source data is input into the quality feature classifier model to obtain the optimized title of the recipe source data.

[0226] Training the quality feature classifier to obtain the quality feature classifier model includes:

[0227] The first title and the first recipe source data that were filtered out during the processing of the network model are used as negative samples for the quality feature classifier.

[0228] The second title of the second recipe source data generated by the network model and the second recipe source data are used as positive samples for the quality feature classifier.

[0229] The quality feature classifier is trained based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model.

[0230] The step of training the quality feature classifier based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model includes:

[0231] K-fold cross-validation is performed on the negative samples and positive samples of the quality feature classifier to obtain the training samples of the quality feature classifier.

[0232] The quality feature classifier is trained using the training samples of the quality feature classifier to obtain a quality feature classifier model.

[0233] After the above steps of fusion processing, most titles are already quite good. However, to further improve the quality of the titles, some additional standards can be set. These could include features such as word repetition, TFIDF score, abnormal pattern occurrence rate, the matching degree between the generated title and the original title (including the matching degree of single-word phrases and multi-word phrases), and the matching degree between the generated title and the content keywords (including the matching degree of single-word phrases and multi-word phrases). These manually calculated features cannot be learned by the grammar and style classifiers mentioned above. While the grammar and style classifiers only rely on the generated title results, the quality control feature classifier not only analyzes the quality of the generated titles but also compares the degree of matching between the generated results and the original input information.

[0234] These features can be scored using rules, filtering out titles with low scores. This can improve accuracy to some extent. However, rule-based scoring models rely heavily on experience and may change over time. Therefore, a classifier was developed. Compared to rule-based scoring models, classifiers can enhance the non-linear learning ability of data and have better generalization performance.

[0235] The biggest challenges in building a classifier are defining features and lacking high-quality labeled data. Since the training data consists of tens of thousands of records, manually reviewing them all is extremely laborious.

[0236] This embodiment provides a data annotation and processing method for this type of problem.

[0237] First, data filtered out earlier by anomaly rules and fluency models are considered negative samples. The remaining data are considered positive samples. After merging and shuffling, K-fold cross-validation is performed, retaining data whose validation results match the labels. This aims to preserve as many accurately labeled samples as possible. Finally, all retained data are used as training samples to train the model. Common classifier models such as GBDT (Gradient Boosting Decision Tree) can be used. After training the classifier, the generated titles are inspected, retaining only those considered high-quality by the classifier. Finally, after verification by a title quality control feature inspection model, the retained titles are the final results.

[0238] The method for generating the recipe title also includes:

[0239] Obtain the network model corresponding to the arrangement rule.

[0240] The step of obtaining the network model corresponding to the permutation rule includes:

[0241] Construct a pointer generator network;

[0242] The pointer generator network is trained using the keyword sequence to obtain the network model corresponding to the permutation rule.

[0243] The pointer generator network can be referenced. Figure 3 The backend content library already contains high-quality data, such as food diaries written by experts, with attractive titles. Using the recipe source data from these food diaries, along with their titles, the pointer generator network is trained to obtain the network model corresponding to the permutation rules.

[0244] In the above embodiments, a method for generating a recipe title is provided. Correspondingly, this application also provides a device for generating a recipe title. Please refer to... Figure 5 This is a schematic diagram of an embodiment of a recipe title generation device according to this application. Since this embodiment, namely the second embodiment, is basically similar to the method embodiment, it is described simply; relevant details can be found in the description of the method embodiment. The device embodiment described below is merely illustrative.

[0245] This embodiment provides a recipe title generation device, comprising:

[0246] Extraction unit 501 is used to extract information from the recipe source data to be processed and obtain keywords in the recipe source data;

[0247] The adjustment unit 502 is used to adjust the arrangement order of the keywords according to the specified arrangement rules to obtain a keyword sequence;

[0248] The obtaining unit 503 is used to obtain candidate titles of the recipe source data based on the keyword sequence and using a network model corresponding to the arrangement rule;

[0249] The generation unit 504 is used to fuse the candidate titles from the network model to generate recipe titles.

[0250] In this embodiment, the extraction unit is specifically used for:

[0251] Perform at least one preprocessing operation, including word segmentation and stop word removal, on the recipe source data to be processed to obtain the words in the recipe source data;

[0252] The words in the recipe source data are statistically analyzed to obtain the inverse text frequency values ​​of the words;

[0253] Keywords in the recipe source data are obtained based on the word frequency inverse text frequency value of the words.

[0254] In this embodiment, the adjustment unit is specifically used for:

[0255] Based on the frequency values ​​of the keywords in the recipe source data, the keywords are sorted to obtain a keyword sequence; or...

[0256] Perform random permutation and combination operations on the keywords to obtain a keyword sequence; or,

[0257] Randomly discard at least one of the keywords to obtain a keyword sequence.

[0258] In this embodiment, the obtaining unit is specifically used for:

[0259] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0260] Named entity recognition is performed on the generated title and the original title of the recipe source data to obtain the first named entity of the generated title and the second named entity of the original title;

[0261] Perform a matching operation on the first named entity and the second named entity to obtain the matching degree between the first named entity and the second named entity;

[0262] Based on the matching degree, candidate titles of the recipe source data are obtained.

[0263] In this embodiment, the obtaining unit is further configured to:

[0264] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0265] Based on the syntax and style of the generated titles, the generated titles are filtered to obtain candidate titles for the recipe source data.

[0266] In this embodiment, the obtaining unit is further configured to:

[0267] Obtain a classifier model for filtering the syntax and style of the generated titles;

[0268] The generated title is input into the classifier model to obtain candidate titles for the recipe source data.

[0269] In this embodiment, the obtaining unit is further configured to:

[0270] Construct a classifier for filtering the syntax and style of the generated titles;

[0271] High-quality titles selected manually are used as positive samples for training the classifier.

[0272] For the positive samples, perform at least one of the following operations: randomly shuffle the order, randomly discard words, and randomly add words. Use the data after the operation as negative samples for training the classifier.

[0273] Using the positive and negative samples, the classifier is trained to obtain a classifier model for filtering the grammar and style of the generated titles.

[0274] In this embodiment, the obtaining unit is further configured to:

[0275] The keyword sequence is transformed to obtain the generated title of the recipe source data;

[0276] The generated title is filtered for sensitive words to obtain candidate titles from the recipe source data.

[0277] In this embodiment, the generating unit is specifically used for:

[0278] Obtain the first candidate title from the first network model;

[0279] Obtain the second candidate title from the second network model;

[0280] According to the specified scoring rules, the first candidate title and the second candidate title are scored to obtain the score of the first candidate title and the score of the second candidate title;

[0281] The recipe title is generated based on the scores of the first candidate title and the second candidate title.

[0282] In this embodiment, the recipe title generation device further includes a filtering unit, which is used for:

[0283] Based on the degree of matching between the title of the recipe source data and the recipe source data, the title of the recipe source data is filtered to obtain an optimized title for the recipe source data.

[0284] In this embodiment, the filtering unit is specifically used for:

[0285] Construct a quality feature classifier;

[0286] Train the quality feature classifier to obtain the quality feature classifier model;

[0287] The recipe source data is input into the quality feature classifier model to obtain the optimized title of the recipe source data.

[0288] In this embodiment, the filtering unit is further used for:

[0289] The first title and the first recipe source data that were filtered out during the processing of the network model are used as negative samples for the quality feature classifier.

[0290] The second title of the second recipe source data generated by the network model and the second recipe source data are used as positive samples for the quality feature classifier.

[0291] The quality feature classifier is trained based on the negative samples and positive samples of the quality feature classifier to obtain the quality feature classifier model.

[0292] In this embodiment, the filtering unit is further used for:

[0293] K-fold cross-validation is performed on the negative samples and positive samples of the quality feature classifier to obtain the training samples of the quality feature classifier.

[0294] The quality feature classifier is trained using the training samples of the quality feature classifier to obtain a quality feature classifier model.

[0295] In this embodiment, the recipe title generation device further includes a network model acquisition unit, which is used for:

[0296] Obtain the network model corresponding to the arrangement rule.

[0297] In this embodiment, the network model acquisition unit is specifically used for:

[0298] Construct a pointer generator network;

[0299] The pointer generator network is trained using the keyword sequence to obtain the network model corresponding to the permutation rule.

[0300] The third embodiment of this application provides a method for generating a title. Please refer to [reference needed]. Figure 6 This is a flowchart of a title generation method. Compared with the first embodiment, the text data to be processed in this embodiment can be recipe source data or other text information. Since it is similar to the first embodiment, only a brief description is given here. The generation method includes:

[0301] Step S601: Extract information from the text data to be processed to obtain keywords in the text data.

[0302] Step S602: Obtain the title of the text data based on the keywords.

[0303] In this embodiment, obtaining the title of the text data based on the keywords includes:

[0304] According to the specified arrangement rules, the order of the keywords is adjusted to obtain a keyword sequence;

[0305] The title of the text data is obtained based on the keyword sequence.

[0306] In this embodiment, obtaining the title of the text data based on the keyword sequence includes:

[0307] Based on the keyword sequence, candidate titles for the text data are obtained using a network model corresponding to the arrangement rule;

[0308] The candidate titles from the network model are fused to generate the title of the text data.

[0309] The fourth embodiment of this application provides an electronic device, including:

[0310] processor;

[0311] as well as,

[0312] The memory is used to store computer programs, which, after being run by the processor, execute any of the methods provided in the first and third embodiments of this application.

[0313] The fifth embodiment of this application provides a computer storage medium storing a computer program that is executed by a processor to perform any of the methods provided in the first and third embodiments of this application.

[0314] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

[0315] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0316] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0317] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0318] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

Claims

1. A method of generating a recipe title, characterized by, The method comprises the following steps: information extraction is performed on the to-be-processed recipe source data to obtain keywords in the recipe source data; an arrangement order between the keywords is adjusted according to a specified arrangement rule to obtain a keyword sequence, wherein the arrangement rule is determined by a term frequency value of the keywords in the recipe source data or the keywords; a candidate title of the recipe source data is obtained by using a network model corresponding to the arrangement rule according to the keyword sequence; the candidate title from the network model is fused to generate a recipe title, wherein the candidate title comprises a first candidate title from a first network model in the network model and a second candidate title from a second network model in the network model, and the recipe title is determined by a score of the first candidate title and a score of the second candidate title; wherein, the candidate title of the recipe source data is obtained by using the network model corresponding to the arrangement rule according to the keyword sequence, comprising: sequence conversion is performed on the keyword sequence to obtain a generated title of the recipe source data; and a classifier model in the network model is used to perform discrimination processing on the generated title to obtain the candidate title of the recipe source data, wherein the classifier model is used to discriminate whether the generated title meets a preset standard.

2. The method of generating a recipe title according to claim 1, wherein The information extraction is performed on the to-be-processed recipe source data to obtain the keywords in the recipe source data, comprising: at least one preprocessing operation of word segmentation and stop word removal is performed on the to-be-processed recipe source data to obtain words of the recipe source data; statistics are performed on the words of the recipe source data to obtain a term frequency-inverse document frequency value of the words; the keywords in the recipe source data are obtained according to the term frequency-inverse document frequency value of the words.

3. The method of claim 1, wherein the recipe title is generated by: The arrangement order between the keywords is adjusted according to the specified arrangement rule to obtain the keyword sequence, comprising: the keywords are sorted according to the size of the term frequency value of the keywords in the recipe source data to obtain the keyword sequence; or random arrangement combination operation is performed on the keywords to obtain the keyword sequence; or at least one keyword in the keywords is randomly discarded to obtain the keyword sequence.

4. The method of claim 1, wherein, The candidate title of the recipe source data is obtained by using the network model corresponding to the arrangement rule according to the keyword sequence, comprising: sequence conversion is performed on the keyword sequence to obtain a generated title of the recipe source data; named entity recognition is performed on the generated title and an original title of the recipe source data to obtain a first named entity of the generated title and a second named entity of the original title; matching operation is performed on the first named entity and the second named entity to obtain a matching degree of the first named entity and the second named entity; the candidate title of the recipe source data is obtained according to the matching degree.

5. The method of claim 1, wherein the recipe title is generated by: The candidate title of the recipe source data is obtained by using the network model corresponding to the arrangement rule according to the keyword sequence, comprising: sequence conversion is performed on the keyword sequence to obtain a generated title of the recipe source data; the generated title is screened according to the syntax of the generated title and the style of the generated title to obtain a candidate title of the recipe source data.

6. The method of generating a recipe title according to claim 5, wherein The screening of the generated title according to the syntax of the generated title and the style of the generated title to obtain the candidate title of the recipe source data comprises: obtaining a classifier model for screening the syntax of the generated title and the style of the generated title; inputting the generated title into the classifier model to obtain the candidate title of the recipe source data.

7. The recipe title generation method according to claim 6, wherein The classifier model for screening the syntax of the generated title and the style of the generated title comprises: constructing a classifier for screening the syntax of the generated title and the style of the generated title; selecting high-quality titles manually as positive samples for training the classifier; performing at least one of random order shuffling, random word dropping and random word adding on the positive samples to obtain data after the operation as negative samples for training the classifier; training the classifier using the positive samples and the negative samples to obtain the classifier model for screening the syntax of the generated title and the style of the generated title.

8. The recipe title generation method of claim 1, wherein, The candidate title of the recipe source data is obtained from the keyword sequence using a network model corresponding to the arrangement rule, comprising: sequence conversion is performed on the keyword sequence to obtain a generated title of the recipe source data; sensitive word filtering is performed on the generated title to obtain a candidate title of the recipe source data.

9. The method of claim 1, wherein, The fusion processing of the candidate title from the network model to generate a recipe title comprises: scoring the first candidate title and the second candidate title according to a specified scoring rule to obtain a score of the first candidate title and a score of the second candidate title; generating a recipe title according to the score of the first candidate title and the score of the second candidate title.

10. The method of claim 1, wherein, Further comprising: screening the title of the recipe source data according to the matching degree between the title of the recipe source data and the recipe source data to obtain an optimized title of the recipe source data.

11. The method of claim 10, wherein the recipe title is generated by: The screening of the title of the recipe source data according to the matching degree between the title of the recipe source data and the recipe source data to obtain the optimized title of the recipe source data comprises: constructing a quality feature classifier; training the quality feature classifier to obtain a quality feature classifier model; inputting the recipe source data into the quality feature classifier model to obtain the optimized title of the recipe source data.

12. The method of claim 11, wherein, The training of the quality feature classifier to obtain a quality feature classifier model comprises: filtering out a first title of first recipe source data in the processing of the network model and the first recipe source data as negative samples of the quality feature classifier; generating a second title of second recipe source data by the network model and the second recipe source data as positive samples of the quality feature classifier; The quality feature classifier is trained according to the negative samples of the quality feature classifier and the positive samples of the quality feature classifier, and a quality feature classifier model is obtained.

13. The method of claim 12, wherein the recipe title is generated by: The quality feature classifier is trained according to the negative samples of the quality feature classifier and the positive samples of the quality feature classifier, and a quality feature classifier model is obtained. The negative samples of the quality feature classifier and the positive samples of the quality feature classifier are subjected to K-fold cross-validation, and training samples of the quality feature classifier are obtained. The quality feature classifier is trained by using the training samples of the quality feature classifier, and a quality feature classifier model is obtained.

14. The method of claim 1, wherein, Further comprising: Obtaining a network model corresponding to the arrangement rule.

15. The method of claim 14, wherein The network model corresponding to the arrangement rule is obtained. A pointer generator network is constructed. The keyword sequence is used to train the pointer generator network, and the network model corresponding to the arrangement rule is obtained.

16. A recipe title generation apparatus characterized by comprising: Comprising: An extraction unit is configured to extract information from to-be-processed recipe source data, and obtain keywords in the recipe source data; An adjustment unit is configured to adjust arrangement orders between the keywords according to a specified arrangement rule, and obtain a keyword sequence, wherein the arrangement rule is determined by word frequency values of the keywords in the recipe source data or the keywords; An obtaining unit is configured to obtain candidate titles of the recipe source data by using a network model corresponding to the arrangement rule according to the keyword sequence; A generating unit is configured to fuse the candidate titles from the network model to generate a recipe title, wherein the candidate titles include a first candidate title from a first network model in the network model and a second candidate title from a second network model in the network model, and the recipe title is determined by scores of the first candidate title and the second candidate title; The network model corresponding to the arrangement rule is obtained according to the keyword sequence, and the candidate titles of the recipe source data are obtained, including: sequence conversion is performed on the keyword sequence to obtain generated titles of the recipe source data; and a classifier model in the network model is used to perform discrimination processing on the generated titles to obtain the candidate titles of the recipe source data, wherein the classifier model is used to discriminate whether the generated titles meet a preset standard.

17. A method of generating a title, characterized by, Comprising: Information is extracted from to-be-processed text data, and keywords in the text data are obtained; Arrangement orders between the keywords are adjusted according to a specified arrangement rule, and a keyword sequence is obtained, wherein the arrangement rule is determined by word frequency values of the keywords in the text data or the keywords; A title of the text data is obtained according to the keyword sequence. The obtaining of the title of the text data according to the keyword sequence comprises: obtaining a candidate title of the text data by using a network model corresponding to the arrangement rule according to the keyword sequence; and performing fusion processing on the candidate title from the network model to generate the title of the text data, wherein the candidate title comprises a first candidate title from a first network model in the network model and a second candidate title from a second network model in the network model, and the title of the text data is determined by scores of the first candidate title and the second candidate title. The obtaining of the candidate title of the text data by using the network model corresponding to the arrangement rule according to the keyword sequence comprises: performing sequence conversion on the keyword sequence to obtain a generated title of the text data; and performing discrimination processing on the generated title by using a classifier model in the network model to obtain the candidate title of the text data, wherein the classifier model is used to discriminate whether the generated title meets a preset standard.

18. An electronic device, comprising: The method comprises: a processor; and a memory for storing a computer program, wherein the device executes the method according to any one of claims 1-15 and 17 by running the computer program through the processor.

19. A computer storage medium, comprising, The computer storage medium stores a computer program, and the program is executed by the processor to execute the method according to any one of claims 1-15 and 17.

Citation Information

Patent Citations

  • Paper title generation method capable of utilizing distributed semantic information

    CN106383817A

  • Method and device for generating information.

    CN107944032A

  • Text label extraction method and device

    CN109992646A