A method, device and storage medium for generating information

By introducing creativity prediction model and creativity weight into the product summary generation model, the problem of insufficient accuracy of product summary in the prior art is solved, and a more creative and accurate summary generation is achieved.

CN112348273BActive Publication Date: 2025-03-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011272860.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2025-03-21
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

The prior art lacks accuracy when generating product summary, resulting in the generated summary being too bland and lacks highlights.

Method used

By obtaining the item description text sample and summary information sample, input the pre-trained creativity prediction model to generate the creativity score, and based on this training item summary information generates the model, optimize the model to output the creative summary information with high creativity.

Benefits of technology

Improves the accuracy and creativity of product summary, making the generated summary more highlighted and attractive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112348273B_ABST
    Figure CN112348273B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for information generation, specifically, first obtaining an item description text sample and a summary information sample, and generating a creativity score of the summary information sample by inputting a pre-trained creativity prediction model, training an item summary information generation model based on the summary information sample and the corresponding creativity score, and calculating a first loss function in the item summary information generation model based on the creativity weight contained in the creativity score corresponding to the summary information sample during training, optimizing the item summary information generation model, obtaining the item description text to be processed and inputting it into the item summary information generation model, and generating summary information corresponding to the item description text to be processed. The embodiment of the present application weights the training samples by using the creativity score of the item description text sample, and the higher the creativity score, the higher the creativity weight, so that the item summary information generation model to be trained outputs summary information with higher creativity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device and storage medium for generating information. Background Art

[0002] Product summaries, as content that can clearly and concisely highlight the nature and value of products, have been widely used in the field of e-commerce. Generally, natural language generation technology is used to automatically generate product summaries based on the detailed text introduction of the product. However, the generated product summaries do not restrict the selling points of the product and are only general texts, making the generated product summaries too bland, lacking highlights, and not very accurate. Summary of the invention

[0003] The embodiment of the present application provides a method for generating information, which overcomes the problem of insufficient accuracy when generating product summaries.

[0004] The method includes:

[0005] Get sample item description text and summary information;

[0006] Inputting the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score for the summary information sample;

[0007] Based on the summary information samples and the corresponding creativity scores, a model for generating item summary information is trained, and during the training, a first loss function in the model for generating item summary information is calculated based on the creativity weight included in the creativity score corresponding to the summary information samples, and the model for generating item summary information is optimized based on the first loss function;

[0008] A description text of the item to be processed is obtained, and the description text of the item to be processed is input into the item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

[0009] Optionally, calculating a creativity probability of at least one sample word included in the summary information sample, the creativity probability being used to indicate a probability of the sample word or the summary information sample having creativity;

[0010] Calculating the inverse text frequency index of each of the sample words contained in the training set composed of the item description text samples, and calculating the mean of the inverse text frequency index of each of the sample words, and taking the ratio of the inverse text frequency index of each of the sample words to the mean as the universality score of the sample word, wherein the universality score is used to indicate the usage frequency of the sample word or the summary information sample as the summary information sample;

[0011] The average value of the creativity probability of each of the sample words included in the summary information sample is used as the creativity probability of the summary information sample, and the average value of the universality score of each of the sample words included in the summary information sample is used as the universality score of the summary information sample, and corresponding creativity weights are assigned to the creativity probabilities and the universality scores based on a preset weight coefficient and are summed to generate the creativity score of the summary information sample.

[0012] Optionally, the summary information sample is input into a creativity probability classifier in the creativity prediction model to generate a creativity probability of at least one sample word included in the summary information sample, wherein the training process of the creativity probability classifier is:

[0013] When the sample word contains creative word information, the predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the predetermined actual creativity probability of the sample word, the second loss function of the predicted creativity probability classifier is determined, and iterative training is performed to determine the predicted creativity probability classifier.

[0014] Optionally, based on at least one sample word included in the summary information sample, generating a probability that the sample word is used as the summary information sample;

[0015] The first loss function of the item summary information generation model to be trained is generated according to the probability that the sample word can be used as the summary information sample and the probability of the creativity of the sample word, and the second loss function, and the item summary information generation model to be trained is trained based on the first loss function to determine the item summary information generation model.

[0016] In another embodiment of the present invention, a device for generating information is provided, the device comprising:

[0017] An acquisition module, used to acquire item description text samples and summary information samples;

[0018] A first generating module, configured to input the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score for the summary information sample;

[0019] a training module, configured to train an item summary information generation model based on the summary information samples and the corresponding creativity scores, calculate a first loss function in the item summary information generation model based on the creativity weight included in the creativity scores corresponding to the summary information samples during training, and optimize the item summary information generation model based on the first loss function;

[0020] The second generation module is used to obtain a description text of the item to be processed, and input the description text of the item to be processed into the item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

[0021] Optionally, the first generating module includes:

[0022] A first calculation unit, configured to calculate a creativity probability of at least one sample word included in the summary information sample, wherein the creativity probability is used to indicate a probability of the sample word or the summary information sample having creativity;

[0023] A second calculation unit is used to calculate the inverse text frequency index of each of the sample words contained in the training set composed of the item description text samples, and calculate the mean of the inverse text frequency index of each of the sample words, and use the ratio of the inverse text frequency index of each of the sample words to the mean as the universality score of the sample word, wherein the universality score is used to indicate the usage frequency of the sample word or the summary information sample as the summary information sample;

[0024] a third calculating unit, configured to use an average of the creativity probabilities of each of the sample words included in the summary information sample as the creativity probability of the summary information sample, and use an average of the universality scores of each of the sample words included in the summary information sample as the universality score of the summary information sample, and assign corresponding creativity weights to the creativity probabilities and the universality scores based on a preset weight coefficient and sum them up to generate the creativity score of the summary information sample.

[0025] Optionally, the first computing unit is further configured to:

[0026] The summary information sample is input into the creativity probability classifier in the creativity prediction model to generate the creativity probability of at least one sample word contained in the summary information sample, wherein the training process of the creativity probability classifier is:

[0027] When the sample word contains creative word information, the predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the predetermined actual creativity probability of the sample word, the second loss function of the predicted creativity probability classifier is determined, and iterative training is performed to determine the predicted creativity probability classifier.

[0028] Optionally, the training module includes:

[0029] a generating unit, configured to generate, based on at least one sample word included in the summary information sample, a probability that the sample word is used as the summary information sample;

[0030] a determining unit, configured to generate the first loss function of the item summary information generation model to be trained according to the loss function generated by the probability that the sample word can be used as the summary information sample and the creativity probability of the sample word, and the second loss function, and train the item summary information generation model to be trained based on the first loss function to determine the item summary information generation model.

[0031] In another embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores instructions, which, when executed by a processor, cause the processor to perform the steps in the above-mentioned information generation method.

[0032] In another embodiment of the present invention, a terminal device is provided, including a processor, wherein the processor is configured to execute each step in the above-mentioned information generating method.

[0033] Based on the above embodiment, firstly, an item description text sample and a summary information sample are obtained. Secondly, the item description text sample and the summary information sample are input into a pre-trained creativity prediction model to generate a creativity score for the summary information sample. Further, based on the summary information sample and the corresponding creativity score, an item summary information generation model is trained, and during training, the first loss function in the item summary information generation model is calculated based on the creativity weight contained in the creativity score corresponding to the summary information sample, and the item summary information generation model is optimized based on the first loss function. Finally, the item description text to be processed is obtained, and the item description text to be processed is input into the item summary information generation model to generate summary information corresponding to the item description text to be processed. The embodiment of the present application weights the training samples by using the creativity score of the item description text sample. The higher the creativity score, the higher the creativity weight, so that the item summary information generation model to be trained outputs summary information with higher creativity. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic flow chart of a method for generating information provided in Embodiment 100 of the present application is shown;

[0036] Figure 2 A schematic diagram showing a specific process of a method for generating information provided by embodiment 200 of the present application;

[0037] Figure 3 A schematic diagram showing a device for generating information is also provided in the embodiment 300 of the present application;

[0038] Figure 4 A schematic diagram of a terminal device provided in embodiment 400 of the present application is shown. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the implementation of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] Based on the problems in the prior art, the embodiments of the present application provide a method for generating information, which is mainly applicable to the field of computer technology. When training the item summary information generation model, the sample is weighted using the creativity score of the obtained sample. The higher the creativity score, the greater the weight, which encourages the item summary information generation model to output more creative summary information, so as to realize a method for generating information. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. Figure 1 FIG. 1 is a flow chart of a method for generating information provided by embodiment 100 of the present application. The detailed steps are as follows:

[0042] Step S11, obtaining item description text samples and summary information samples.

[0043] In this step, the sample of the item description text is mainly a detailed description text of the item, which may include comprehensive copywriting information that highlights the advantages of the item. The sample of the item description text generally includes the name of the item, specifications, main technical parameters, structure and appearance of the item, instructions for use and usage effects, etc. In addition, the summary information sample is a creative text corresponding to the sample of the item description text, and the summary information sample contains at least one sample word.

[0044] Step S12: input the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score for the summary information sample.

[0045] In this step, the creativity prediction model is used to calculate the creativity scores of the abstract information samples corresponding to the obtained item description text samples. The creativity prediction model calculates the creativity probability and universal probability of each sample word contained in the abstract information sample, and calculates the creativity probability and universal probability of each abstract information sample based on the creativity probability and universal probability of each sample word. Further, based on the creativity probability and universal probability of the abstract information sample, the creativity score of the item description text sample is generated.

[0046] Step S13: Based on the summary information samples and the corresponding creativity scores, a model for generating item summary information is trained, and during the training, a first loss function in the model for generating item summary information is calculated based on the creativity weights included in the creativity scores corresponding to the summary information samples, and the model for generating item summary information is optimized based on the first loss function.

[0047] In this step, based on the summary information samples and the corresponding creativity scores, the item summary information generation model is trained based on the maximum likelihood method, and in the generated first loss function, based on the creativity weight contained in the creativity score of the summary information sample, through iterative training, the output probability of the summary information sample with a higher creativity score is increased, and the final item summary information generation model is determined.

[0048] Step S14, obtaining a description text of the item to be processed, and inputting the description text of the item to be processed into an item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

[0049] In this step, the item description text to be processed is similar to the item description text sample used above, and is a detailed description text of the item. Further, after the item description text to be processed is input into the item summary information generation model, summary information corresponding to the item description text to be processed with a high degree of creativity is generated.

[0050] As described above, based on the above embodiment, specifically, firstly, an item description text sample and a summary information sample are obtained, and secondly, the item description text sample and the summary information sample are input into a pre-trained creativity prediction model to generate a creativity score of the summary information sample, and further, based on the summary information sample and the corresponding creativity score, an item summary information generation model is trained, and during training, based on the creativity weight contained in the creativity score corresponding to the summary information sample, the first loss function in the item summary information generation model is calculated, and the item summary information generation model is optimized based on the first loss function, and finally, the item description text to be processed is obtained, and the item description text to be processed is input into the item summary information generation model to generate summary information corresponding to the item description text to be processed. The embodiment of the present application weights the training samples by using the creativity score of the item description text sample, and the higher the creativity score, the higher the creativity weight, so that the item summary information generation model to be trained outputs summary information with higher creativity.

[0051] like Figure 2 As shown, it is a schematic diagram of a specific process of a method for generating information provided by embodiment 200 of the present application. The detailed process of the specific process is as follows:

[0052] S201, obtaining an item description text sample and a summary information sample.

[0053] S202: Encode the acquired item description text sample.

[0054] Here, a bidirectional long short-term memory artificial neural network (LSTM) encoder f is used. enc The detailed item description text sample {x1 ,x 2 ,…,x n} is encoded. Each x i represents a sample word. Further, after encoding, a hidden layer sequence is generated to represent the digital vector {h 1 ,h 2 ,…,h n}, the formula is h i =f enc (x i ,h i-1 ), where i is an integer greater than or equal to 1, representing the i-th object.

[0055] S203: training a creativity prediction model.

[0056] Here, the process of training the creativity prediction model mainly refers to the process of training the creativity probability classifier included therein. The creativity probability classifier is used to indicate the probability of creativity possessed by a sample word or abstract information sample.

[0057] The process of training the creativity probability classifier is as follows: when a sample word contains creative word information, a predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the actual creativity probability of the predetermined sample word, the second loss function of the predicted creativity probability classifier is determined, iterative training is performed, and the predicted creativity probability classifier is determined.

[0058] Specifically, based on the above h i {h 1 ,h 2 ,…,h n} and whether each sample word contains creative word information. For each sample word x i Classify, that is, input the creativity probability classifier l i =sigmoid(W h h i ). Among them, l i To predict the probability of creativity, that is, the probability of creativity of subsequent output, W h is a model matrix parameter. Creative word information is information that may be used as summary information and is set based on business needs.

[0059] Furthermore, when the sample word x i When creative word information is included, set l i Close to 1; on the contrary, when x i When creative word information is not included, set l i Close to 0. The second loss function of the predicted creativity probability classifier is determined as:

[0060] L p =p i ln(l i )+(1-p i )ln(1-l i )

[0061] Among them, p i is the actual creativity probability of the predetermined sample word. That is, when x i When creative word information is included, p i =1; otherwise p i = 0. During training, the non-stop words that overlap in the input and output are used as sample words. i and l i Generate cross entropy, train the creativity probability classifier based on the second loss function, and determine the final creativity probability classifier.

[0062] S204: Calculate the creativity probability of at least one sample word included in the summary information sample by using a creativity probability classifier included in the creativity prediction model.

[0063] S205: Calculate the universality score of at least one sample word included in the summary information sample by using a creativity prediction model.

[0064] Here, the inverse text frequency index of each sample word contained in the training set composed of summary information samples is calculated, and the mean of the inverse text frequency index of each sample word is calculated, and the ratio of the inverse text frequency index of each sample word to the mean is used as the universality score of the sample word. The universality score is used to represent the usage frequency of the sample word or the item description text sample as summary information.

[0065] Specifically, the universality score of each sample word is calculated. For example, high-frequency sample words tend to be common words, while low-frequency sample words may be some words with high creativity. Furthermore, the mean of the inverse document frequency index (IDF) of all sample words in the training set composed of summary information samples is calculated. For word x i And its IDF: Its universality score is:

[0066]

[0067] S206: Generate a creativity score for the item description text sample based on the creativity probability and the universality score.

[0068] Here, the mean value of the creativity probability of each sample word included in the summary information sample is taken as the creativity probability of the summary information sample, and the mean value of the universality score of each sample word included in the summary information sample is taken as the universality score of the summary information sample, and corresponding creativity weights are assigned to the creativity probability and the universality score based on a preset weight coefficient and summed up to generate the creativity score of the summary information sample.

[0069] Specifically, firstly, based on the creativity probability l of each sample word contained in the summary information sample i , find its mean as the probability of creativity of the summary information sample l y Similarly, the universality score of the sample words calculated by IDF is averaged as the universality score D of the summary information sample. y Among them, we can know that the probability of creativity is l y The universality score D is obtained based on the distribution of the sample itself. y Based on the entire training set, the final creativity score of the summary information sample can be obtained as r y =λ*l y +(1-λ)D y , wherein the preset creativity weight λ is preset based on business needs.

[0070] S207: Based on the summary information samples and the corresponding creativity scores, a summary information generation model for the item to be trained is trained.

[0071] In this step, based on at least one sample word included in the summary information sample, the probability that the sample word can be used as summary information is generated. Further, based on the loss function generated by the probability that the sample word can be used as summary information and the probability of the creativity of the sample word, and the second loss function, a first loss function of the item summary information generation model to be trained is generated, and the item summary information generation model to be trained is trained based on the first loss function to determine the item summary information generation model.

[0072] Specifically, the unidirectional LSTM decoder f dec Using the encoder hidden sequence h i , generate the decoder hidden layer sequence s t The attention mechanism is used to generate summary information word by word. The decoder hidden sequence s t The formula is s t =f dec (s t-1 ,y t-1 ,c t ), where c t is the context vector at time t. t Generated by attention mechanism:

[0073]

[0074]

[0075]

[0076] Among them, u a , W a 、V a is the model parameter matrix. The final decoder uses the decoder hidden state and context vector to generate the probability that the sample word can be used as the summary information w, that is, the item summary information generation model P(w) = softmax(W c s t +V c c t ), where W c and V c is the model parameter matrix. The item summary information generation model is trained based on maximum likelihood to generate a loss function Where T represents the number of sample words contained in the item description text sample. Further, based on the second loss function Lp, the first loss function Lp of the item summary information generation model is generated. final =L p +L. Among them, as the creativity score r y When calculating the first loss function in the item summary information generation model, based on r y The increase of the creativity weight λ in the output probability of the summary information sample corresponding to the creativity score increases, thereby encouraging the decoder to output summary information with higher creativity.

[0077] S208, obtaining description text of the item to be processed.

[0078] S209: Input the description text of the item to be processed into the item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

[0079] The present application implements the above-mentioned method of information generation based on the above-mentioned steps. In order to enable the model to generate more creative summary information, the training samples are weighted during the model training process, and the higher the creativity, the greater the weight. Specifically, for a certain item description text sample, the creativity probability and universality score of the item description text sample of the sample are first identified, and the creativity probability and universality score are weighted as the creativity score; in order to make the summary information generated by the model more accurate, the training samples are weighted using the creativity score, and the higher the creativity score, the greater the weight, thereby encouraging the model to output more accurate summary information during the decoding process.

[0080] Based on the same inventive concept, the embodiment 300 of the present application also provides a device for generating information, wherein, Figure 3 As shown, the device comprises:

[0081] An acquisition module 31 is used to acquire an item description text sample and a summary information sample;

[0082] A first generating module 32, for inputting the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score of the summary information sample;

[0083] A training module 33 is used to train an item summary information generation model based on the summary information samples and the corresponding creativity scores, and calculate a first loss function in the item summary information generation model based on the creativity weights included in the creativity scores corresponding to the summary information samples during training, and optimize the item summary information generation model based on the first loss function;

[0084] The second generating module 34 is used to obtain the description text of the item to be processed, and input the description text of the item to be processed into the item summary information generating model to generate summary information corresponding to the description text of the item to be processed.

[0085] In this embodiment, the specific functions and interaction methods of the acquisition module 31, the first generation module 32, the training module 33 and the second generation module 34 can be found in Figure 1 The description of the corresponding embodiments will not be repeated here.

[0086] Optionally, the first generating module 32 includes:

[0087] A first calculation unit is used to calculate the creativity probability of at least one sample word included in the summary information sample, where the creativity probability is used to indicate the probability of the sample word or the summary information sample having creativity;

[0088] A second calculation unit is used to calculate the inverse text frequency index of each sample word contained in the training set composed of the item description text samples, and calculate the mean of the inverse text frequency index of each sample word, and use the ratio of the inverse text frequency index of each sample word to the mean as the universality score of the sample word, the universality score is used to represent the usage frequency of the sample word or the summary information sample as the summary information sample;

[0089] a third calculation unit, configured to use the average of the creativity probabilities of each sample word included in the summary information sample as the creativity probability of the summary information sample, and use the average of the universal scores of each sample word included in the summary information sample as the universal score of the summary information sample, and assign corresponding creativity weights to the creativity probabilities and the universal scores based on a preset weight coefficient and sum them up to generate the creativity score of the summary information sample.

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

[0091] The summary information sample is input into the creativity probability classifier in the creativity prediction model to generate the creativity probability of at least one sample word included in the summary information sample, wherein the training process of the creativity probability classifier is:

[0092] When the sample word contains creative word information, the predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the actual creativity probability of the predetermined sample word, the second loss function of the predicted creativity probability classifier is determined, and iterative training is performed to determine the predicted creativity probability classifier.

[0093] Optionally, the training module 33 includes:

[0094] a generating unit, configured to generate a probability that the sample word is used as the summary information sample based on at least one sample word included in the summary information sample;

[0095] The determination unit is used to generate a first loss function of the item summary information generation model to be trained according to the loss function generated by the probability that the sample word can be used as the summary information sample and the probability of the creativity of the sample word, and the second loss function, and train the item summary information generation model to be trained based on the first loss function to determine the item summary information generation model.

[0096] like Figure 4 As shown, another embodiment 400 of the present application further provides a terminal device, including a processor 401, wherein the processor 401 is used to execute the steps of the above-mentioned information generation method. Figure 4 It can also be seen that the terminal device provided in the above embodiment also includes a non-transitory computer-readable storage medium 402, on which a computer program is stored, and when the computer program is run by the processor 401, the steps of the above-mentioned information generation method are executed. In practical applications, the terminal device can be one or more computers, as long as it includes the above-mentioned computer-readable medium and processor.

[0097] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and FLASH, etc. When the computer program on the storage medium is run, each step in the above-mentioned method of generating information can be executed. In practical applications, the computer-readable medium can be included in the device / apparatus / system described in the above-mentioned embodiments, or it can exist independently without being assembled into the device / apparatus / system. The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed, each step in the above-mentioned method of generating information can be executed.

[0098] According to the embodiments disclosed in the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof, but it is not used to limit the scope of protection of the present application. In the embodiments disclosed in the present application, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0099] The flow chart and block diagram in the accompanying drawings of the present application show the possible architecture, function and operation of the system, method and computer program product according to the various embodiments disclosed in the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in the order marked in different drawings. For example, the boxes represented by two connections can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0100] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments and / or claims of the present application may be combined and / or combined in a variety of ways, and all of these combinations and / or combinations fall within the scope disclosed in the present application.

[0101] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still change the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these changes, modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for generating information, characterized in that: include: Get sample item description text and sample summary information; Inputting the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score for the summary information sample; wherein the creativity prediction model is a prediction model obtained by training a creativity probability classifier, and the creativity probability classifier is used to represent the probability of creativity possessed by a sample word or summary information sample; Based on the summary information samples and the corresponding creativity scores, a model for generating item summary information is trained, and during the training, a first loss function in the model for generating item summary information is calculated based on the creativity weight included in the creativity score corresponding to the summary information samples, and the model for generating item summary information is optimized based on the first loss function; A description text of the item to be processed is obtained, and the description text of the item to be processed is input into the item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

2. The method according to claim 1, characterized in that The step of generating the creativity score of the summary information sample comprises: Calculating the creativity probability of at least one sample word included in the summary information sample, where the creativity probability is used to indicate the probability that the sample word or the summary information sample has creativity; Calculating the inverse text frequency index of each of the sample words contained in the training set composed of the item description text samples, and calculating the mean of the inverse text frequency index of each of the sample words, and taking the ratio of the inverse text frequency index of each of the sample words to the mean as the universality score of the sample word, wherein the universality score is used to indicate the usage frequency of the sample word or the summary information sample as the summary information sample; The average value of the creativity probability of each of the sample words included in the summary information sample is used as the creativity probability of the summary information sample, and the average value of the universality score of each of the sample words included in the summary information sample is used as the universality score of the summary information sample, and corresponding creativity weights are assigned to the creativity probabilities and the universality scores based on a preset weight coefficient and are summed to generate the creativity score of the summary information sample.

3. The method according to claim 2, characterized in that The step of calculating the creativity probability of at least one sample word included in the summary information sample comprises: The summary information sample is input into the creativity probability classifier in the creativity prediction model to generate the creativity probability of at least one sample word contained in the summary information sample, wherein the training process of the creativity probability classifier is: When the sample word contains creative word information, the predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the predetermined actual creativity probability of the sample word, the second loss function of the predicted creativity probability classifier is determined, and iterative training is performed to determine the predicted creativity probability classifier.

4. The method according to claim 1, characterized in that: The steps for training the item summary information generation model to be trained include: Based on at least one sample word included in the summary information sample, generating a probability that the sample word is used as the summary information sample; The first loss function of the item summary information generation model to be trained is generated according to the probability that the sample word can be used as the summary information sample and the probability of the creativity of the sample word, and the second loss function, and the item summary information generation model to be trained is trained based on the first loss function to determine the item summary information generation model.

5. A device for generating information, characterized in that: include: An acquisition module, used to acquire item description text samples and summary information samples; A first generating module is used to input the item description text sample and the summary information sample into a pre-trained creativity prediction model to generate a creativity score of the summary information sample; wherein the creativity prediction model is a prediction model obtained by training a creativity probability classifier, and the creativity probability classifier is used to represent the probability of creativity possessed by a sample word or a summary information sample; a training module, configured to train an item summary information generation model based on the summary information samples and the corresponding creativity scores, calculate a first loss function in the item summary information generation model based on the creativity weight included in the creativity scores corresponding to the summary information samples during training, and optimize the item summary information generation model based on the first loss function; The second generation module is used to obtain a description text of the item to be processed, and input the description text of the item to be processed into the item summary information generation model to generate summary information corresponding to the description text of the item to be processed.

6. The device according to claim 5, characterized in that The first generation module comprises: A first calculation unit, configured to calculate a creativity probability of at least one sample word included in the summary information sample, wherein the creativity probability is used to indicate a probability of the sample word or the summary information sample having creativity; A second calculation unit is used to calculate the inverse text frequency index of each of the sample words contained in the training set composed of the item description text samples, and calculate the mean of the inverse text frequency index of each of the sample words, and use the ratio of the inverse text frequency index of each of the sample words to the mean as the universality score of the sample word, wherein the universality score is used to indicate the usage frequency of the sample word or the summary information sample as the summary information sample; a third calculating unit, configured to use an average of the creativity probabilities of each of the sample words included in the summary information sample as the creativity probability of the summary information sample, and use an average of the universality scores of each of the sample words included in the summary information sample as the universality score of the summary information sample, and assign corresponding creativity weights to the creativity probabilities and the universality scores based on a preset weight coefficient and sum them up to generate the creativity score of the summary information sample.

7. The device according to claim 6, characterized in that The first computing unit is further configured to: The summary information sample is input into the creativity probability classifier in the creativity prediction model to generate the creativity probability of at least one sample word contained in the summary information sample, wherein the training process of the creativity probability classifier is: When the sample word contains creative word information, the predicted creativity probability of the sample word is generated by the creativity probability classifier to be trained, the cross entropy is calculated by the predicted creativity probability and the predetermined actual creativity probability of the sample word, the second loss function of the predicted creativity probability classifier is determined, and iterative training is performed to determine the predicted creativity probability classifier.

8. The device according to claim 5, characterized in that The training module includes: a generating unit, configured to generate, based on at least one sample word included in the summary information sample, a probability that the sample word is used as the summary information sample; A determination unit is used to generate the first loss function of the item summary information generation model to be trained according to the loss function generated by the probability that the sample word can be used as the summary information sample and the creativity probability of the sample word, and the second loss function, and train the item summary information generation model to be trained based on the first loss function to determine the item summary information generation model.

9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores instructions, which, when executed by a processor, cause the processor to perform the steps of the information generation method according to any one of claims 1 to 4.

10. A terminal device, characterized in that: The method comprises a processor, wherein the processor is used to execute each step in the information generating method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Long text abstract generation method and system adaptive to creation style

    CN117874216A