A text summary optimization method, device, equipment and medium

By calculating the complete value, correct value, and simple value of the text summary, and using dynamic weights to optimize the iterative weight, solve the problem of low quality in the existing text summary optimization method, realize more comprehensive evaluation and dynamic adjustment, improve text summary Quality.

CN119128138BActive Publication Date: 2025-01-24XIANGJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411608912.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-01-24
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing text summary optimization methods have the problem of low quality of text summary. Traditional evaluation methods such as ROUGE-L and BLEU mainly focus on word sequence matching, ignore semantic information, and lack diversity control, resulting in the generated summary tending to be similar. , fall into the local optimal solution.

Method used

By obtaining multiple prompts of the target text, generate corresponding text summary, and calculate the complete value, correct value and simple value of each abstract. Calculate the dynamic weight according to the total number of iterations, and use these weights to optimize iterative, until it reaches the total number of iterations, obtain multiple optimized text abstracts and its corresponding optimized dynamic weight comprehensive evaluation value, and finally determines the final text summary of the target text.

Benefits of technology

In the three aspects of integrity, correctness, and simplicity, the text summary is comprehensively evaluated. The dynamic weight adjustment is optimized in different stages through dynamic weight adjustment to effectively improve the quality of text summary and avoid local optimal solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119128138B_ABST
    Figure CN119128138B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of text summarization, and provides a text summary optimization method, device, equipment and medium. The method includes: generating a text summary according to a prompt word; calculating the complete value, correct value and concise value of the text summary; calculating the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight based on the total number of iterations; calculating the dynamic weight comprehensive evaluation value according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary; iteratively optimizing all text summaries using the dynamic weight comprehensive evaluation value until the number of iterations of the iterative optimization is equal to the total number of iterations, and obtaining multiple optimized text summaries and optimized dynamic weight comprehensive evaluation values; determining the final text summary of the target text from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values. The method of the present application can improve the quality of text summaries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of text summarization, and in particular to a text summarization optimization method, device, equipment and medium. Background Art

[0002] Text summarization technology aims to generate short and meaningful summaries by extracting important content from the original text so that users can quickly obtain the required information. At present, large language models are widely used in text summarization tasks, especially the method of combining evolutionary algorithms with large language models to optimize text summarization tasks is becoming more and more popular. Traditional text summary evaluation methods, such as ROUGE-L (ROUGE-L is a method for evaluating the quality of text generation or machine translation by calculating the length of the longest common subsequence between candidate translations and reference translations) and Bilingual Evaluation Understudy (BLEU), mainly focus on the matching of word sequences, ignore semantic information, are very sensitive to word order, and are difficult to fully reflect the quality of summaries. In addition, although the similarity metric (BertScore) based on the bidirectional encoder introduces semantic similarity calculation, these semantic indicators also have some problems, such as the lack of specific evaluation goals, the inability to provide clear feedback to guide the summary optimization process, and the lack of diversity control, which may cause the generated summaries to tend to be similar and fall into local optimal solutions. It can be seen that the existing text summary optimization methods have the problem of low text summary quality. Summary of the invention

[0003] The present application provides a text summary optimization method, device, equipment and medium, which can solve the problem of low quality of text summaries.

[0004] In a first aspect, an embodiment of the present application provides a text summary optimization method, the text summary optimization method comprising:

[0005] Obtain multiple prompt words of the target text, and generate a text summary of the target text according to each prompt word;

[0006] Calculate the completeness, correctness, and conciseness values ​​for each text summary;

[0007] Obtain the total number of iterations for optimizing all text summaries, and calculate the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations;

[0008] For each text summary, calculate the dynamic weight comprehensive evaluation value of the text summary according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary;

[0009] Iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, thereby obtaining multiple optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary;

[0010] The final text summary of the target text is determined from all optimized text summaries according to the comprehensive evaluation values ​​of all optimized dynamic weights.

[0011] Optionally, calculate the complete value, correct value, and concise value of each text summary, including:

[0012] By formula:

[0013]

[0014] Calculate the The complete value of the text summary ;

[0015] in, Indicates The first similarity between the text summary and the reference summary, Indicates The second similarity between the text summary and the reference summary, , Indicates the number of text summaries;

[0016] By formula:

[0017]

[0018] Calculate the The correct value of the text summary ;

[0019] in, represents the correctness score of the text summary, ;

[0020] By formula:

[0021]

[0022]

[0023]

[0024] Calculate the The conciseness value of the text summary ;

[0025] in, and Both represent weights, Indicated in The set of all words that appear more than 1 times in the text summary, the word frequency Representing words In the The number of occurrences in the text summary.

[0026] Optionally, the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight are calculated based on the total number of iterations, including:

[0027] By formula:

[0028]

[0029] Calculating dynamic weights ;

[0030] in, represents the basic weight, represents the initial dynamic weight, ,when hour, represents the complete value dynamic weight, represents the complete value base weight, Indicates the initial dynamic weight of the complete value, when hour, Indicates the correct value dynamic weight, represents the correct value base weight, Indicates the correct initial dynamic weight, when hour, Indicates the dynamic weight of the concise value, Indicates the basic weight of the concise value, Indicates the initial dynamic weight of the concise value:

[0031]

[0032]

[0033]

[0034] in, , Indicates the total number of iterations.

[0035] Optionally, according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight, and concise value dynamic weight corresponding to the text summary, a dynamic weight comprehensive evaluation value of the text summary is calculated, including:

[0036] By formula:

[0037]

[0038] Calculate the Dynamic weight comprehensive evaluation value of text summaries ;

[0039] in, Indicates The complete value of the text summary, Indicates The correct value of the text summary, Indicates The conciseness value of the text summary, , Indicates the number of text summaries.

[0040] Optionally, all text summaries are iteratively optimized using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, and multiple optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary are obtained, including:

[0041] All dynamic weighted comprehensive evaluation values ​​are sorted from large to small, and the first multiple dynamic weighted comprehensive evaluation values ​​in the sorting result are all taken as the first dynamic weighted comprehensive evaluation value;

[0042] The text summary corresponding to each first dynamic weight comprehensive evaluation value is used as the first text summary, and the corresponding prompt word is used as the first prompt word;

[0043] Acquire multiple keyword information of each first text summary, and regard the multiple keyword information of each first text summary as an information group, and regard the keyword information existing in the multiple information groups as the first keyword information;

[0044] Generate multiple new prompt words based on all the first prompt words;

[0045] For each first prompt word, combine the first prompt word with all the first keyword information to obtain a second prompt word;

[0046] For each new prompt word, combine the new prompt word with all the first keyword information to obtain a second prompt word;

[0047] According to each second prompt word, generate a second text summary corresponding to each second prompt word, and calculate a second dynamic weight comprehensive evaluation value of each second text summary;

[0048] All dynamic weight comprehensive evaluation values ​​and all second dynamic weight comprehensive evaluation values ​​are taken as a target dynamic weight comprehensive evaluation value, and the text summaries corresponding to all dynamic weight comprehensive evaluation values ​​and the second text summaries corresponding to all second dynamic weight comprehensive evaluation values ​​are taken as a target text summary;

[0049] All target dynamic weight comprehensive evaluation values ​​are sorted from large to small, and the first multiple target dynamic weight comprehensive evaluation values ​​in the sorting result are all used as the third dynamic weight comprehensive evaluation value, and the target text summary corresponding to each third dynamic weight comprehensive evaluation value is used as the third text summary; the number of third text summaries is the same as the number of text summaries;

[0050] Determine whether the number of iterations is equal to the total number of iterations;

[0051] If yes, each third text summary is used as an optimized text summary, and each third dynamic weighted comprehensive evaluation value is used as an optimized dynamic weighted comprehensive evaluation value;

[0052] Otherwise, the number of iterations is increased by 1, and each third text summary is taken as a text summary, and each third dynamic weight comprehensive evaluation value is taken as a dynamic weight comprehensive evaluation value. The step of sorting all dynamic weight comprehensive evaluation values ​​from large to small is returned, and the first multiple dynamic weight comprehensive evaluation values ​​in the sorting result are taken as the first dynamic weight comprehensive evaluation value.

[0053] Optionally, a final text summary of the target text is determined from all optimized text summaries according to the comprehensive evaluation values ​​of all optimized dynamic weights, including:

[0054] The largest optimized dynamic weight comprehensive evaluation value among all optimized dynamic weight comprehensive evaluation values ​​is taken as the final dynamic weight comprehensive evaluation value, and the optimized text summary corresponding to the final dynamic weight comprehensive evaluation value is taken as the final text summary of the target text.

[0055] In a second aspect, an embodiment of the present application provides a text summary optimization device, comprising:

[0056] A generation module, used for obtaining multiple prompt words of the target text, and generating a text summary of the target text according to each prompt word;

[0057] A first calculation module, used to calculate the complete value, correct value and concise value of each text summary;

[0058] An acquisition module, used to acquire the total number of iterations for optimizing all text summaries, and calculate the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations;

[0059] The second calculation module is used to calculate the dynamic weight comprehensive evaluation value of the text summary for each text summary according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary;

[0060] An iterative optimization module is used to iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, thereby obtaining multiple optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary;

[0061] The determination module is used to determine the final text summary of the target text from all optimized text summaries according to the comprehensive evaluation values ​​of all optimized dynamic weights.

[0062] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned text summary optimization method when executing the above-mentioned computer program.

[0063] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned text summary optimization method is implemented.

[0064] The above solution of the present application has the following beneficial effects:

[0065] In an embodiment of the present application, a plurality of prompt words of a target text are obtained, a text summary of the target text is generated according to each prompt word, and then the complete value, correct value and concise value of each text summary are calculated, and then the total number of iterations for optimizing all text summaries is obtained, and the complete value dynamic weight, the correct value dynamic weight and the concise value dynamic weight are calculated based on the total number of iterations, and then for each text summary, according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary, the dynamic weight comprehensive evaluation value of the text summary is calculated, and then all text summaries are iteratively optimized using all dynamic weight comprehensive evaluation values ​​until the number of iterations of iterative optimization is equal to the total number of iterations, and multiple optimized text summaries and the optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary are obtained, and finally the final text summary of the target text is determined from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values. Among them, the completeness value, correctness value and conciseness value of the text summary are calculated, which can evaluate the text summary in terms of completeness, correctness and conciseness, improve the comprehensiveness of the evaluation of the text summary, calculate the dynamic weight according to the total number of iterations, and calculate the dynamic weight comprehensive evaluation value according to the dynamic weight and the comprehensive evaluation of the three aspects. In the process of iterative optimization of the text summary, dynamic adjustments can be made to the optimization of different aspects of the text summary in different stages of iteration, effectively improving the quality of the text summary.

[0066] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0068] Figure 1 A flowchart of a text summary optimization method provided in an embodiment of the present application;

[0069] Figure 2 A dynamic weight change curve diagram provided in an embodiment of the present application;

[0070] Figure 3 A schematic diagram of the structure of a text summary optimization device provided in one embodiment of the present application;

[0071] Figure 4 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0072] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0073] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0074] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0075] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0076] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0077] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0078] In view of the problem of low quality of existing text summaries, an embodiment of the present application provides a text summary optimization method. The text summary optimization method obtains multiple prompt words of the target text, generates a text summary of the target text according to each prompt word, and then calculates the complete value, correct value and concise value of each text summary, and then obtains the total number of iterations for optimizing all text summaries, and calculates the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight based on the total number of iterations, and then respectively for each text summary, according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary, calculate the dynamic weight comprehensive evaluation value of the text summary, and then use all dynamic weight comprehensive evaluation values ​​to iteratively optimize all text summaries until the number of iterations of iterative optimization is equal to the total number of iterations, and obtains multiple optimized text summaries and the optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary, and finally determines the final text summary of the target text from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values. Among them, the completeness value, correctness value and conciseness value of the text summary are calculated, which can evaluate the text summary in terms of completeness, correctness and conciseness, improve the comprehensiveness of the evaluation of the text summary, calculate the dynamic weight according to the total number of iterations, and calculate the dynamic weight comprehensive evaluation value according to the dynamic weight and the comprehensive evaluation of the three aspects. In the process of iterative optimization of the text summary, dynamic adjustments can be made to the optimization of different aspects of the text summary in different stages of iteration, effectively improving the quality of the text summary.

[0079] Next, the text summarization optimization method provided in this application is exemplified.

[0080] like Figure 1 As shown, the text summary optimization method provided by this application includes the following steps:

[0081] Step 11, obtaining multiple prompt words of the target text, and generating a text summary of the target text according to each prompt word.

[0082] It should be noted that the target text is the text for which a text summary needs to be generated. The prompt words are used to describe the semantic information in the target text, such as "biology", "living environment", "rainforest, humid" and so on.

[0083] In some embodiments of the present application, multiple prompt words of the target text can be obtained manually, and each prompt word can be input into a large language model to generate a text summary to obtain a text summary corresponding to each prompt word.

[0084] Step 12, calculating the complete value, correct value and concise value of each text summary.

[0085] The above-mentioned complete value is used to describe the completeness of the text summary. The larger the complete value is, the higher the completeness of the text summary is. The correct value is used to describe the correctness of the text summary. The larger the correct value is, the higher the correctness of the text summary is. The concise value is used to describe the conciseness of the text summary. The larger the concise value is, the higher the conciseness of the text summary is.

[0086] In some embodiments of the present application, the steps of calculating the complete value, correct value, and concise value of each text summary include:

[0087] Specifically, through the formula:

[0088]

[0089] Calculate the The complete value of the text summary .

[0090] in, Indicates The first similarity between the text summary and the reference summary, Indicates The second similarity between the text summary and the reference summary, , Indicates the number of text summaries.

[0091] By formula:

[0092]

[0093] Calculate the The correct value of the text summary .

[0094] in, represents the correctness score of the text summary, .

[0095] By formula:

[0096]

[0097]

[0098]

[0099] Calculate the The conciseness value of the text summary .

[0100] in, and Both represent weights, Indicated in The set of all words that appear more than 1 times in the text summary, the word frequency Representing words In the The number of occurrences in the text summary.

[0101] It should be noted that the above reference summary is a standard summary of the target text and can be obtained manually. The above first similarity can be obtained by the calculation formula of the indicator ROUGE-L, the above second similarity can be obtained by the calculation formula of the indicator BLEU, and the above correctness score can be obtained by the calculation formula of the indicator BertScore. The indicators ROUGE-L and BLEU evaluate the quality by calculating the overlap between the generated text summary and the reference summary, so they are very effective in evaluating the completeness of the summary. Therefore, the completeness is jointly evaluated by the indicators ROUGE-L and BLEU. Since evaluating correctness requires more complex semantic understanding capabilities, which ROUGE-L and BLEU do not have, BertScore is used to evaluate correctness.

[0102] Exemplarily, the above calculation formula can be run using computer software such as MATLAB to obtain the complete value, correct value, and concise value of each text summary.

[0103] It is worth mentioning that calculating the completeness value, correctness value and conciseness value of the text summary can evaluate the text summary in terms of completeness, correctness and conciseness, and improve the comprehensiveness of the evaluation of the text summary.

[0104] Step 13, obtaining the total number of iterations for optimizing all text summaries, and calculating the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations.

[0105] The above total number of iterations is preset.

[0106] Specifically, through the formula:

[0107]

[0108] Calculating dynamic weights .

[0109] in, represents the basic weight, represents the initial dynamic weight, ,when hour, represents the complete value dynamic weight, represents the complete value base weight, Indicates the initial dynamic weight of the complete value, when hour, Indicates the correct value dynamic weight, represents the correct value base weight, Indicates the correct initial dynamic weight, when hour, Indicates the dynamic weight of the concise value, Indicates the basic weight of the concise value, Indicates the initial dynamic weight of the concise value:

[0110]

[0111]

[0112]

[0113] in, , Indicates the total number of iterations.

[0114] It should be noted that the function in the above formula To guarantee ,and , , when calculating the initial dynamic weights above, the optimization iteration is divided into three stages, namely the early stage ( )、Medium term( ) and later ( ). For example, when the total number of iterations is 20, the early stage is from the 1st iteration to the 8th iteration, the middle stage is from the 9th iteration to the 16th iteration, and the late stage is from the 17th iteration to the 20th iteration. In the process of optimizing the text summary, the early stage focuses more on the completeness of the text summary to obtain various key information in the original text; on the basis of the early stage, the middle stage focuses more on the correctness to ensure that the text summary and the original text have the same semantic information; and the late stage focuses more on conciseness to obtain a concise text summary.

[0115] Exemplarily, the above calculation formula can be run using computer software such as matlab and python to obtain the complete value dynamic weight, the correct value dynamic weight and the concise value dynamic weight.

[0116] It is worth mentioning that dynamic weights are designed for different stages of iterative optimization, so that the weights of the complete value, correct value and concise value of the text summary can be dynamically adjusted at different stages of iterative optimization to improve the rationality of the weights.

[0117] The above dynamic weight is exemplified below with reference to a specific example.

[0118] When the total number of iterations is 20, the dynamic weight change curve is as follows: Figure 2 As shown, Figure 2 The horizontal axis represents the number of iterations, the vertical axis represents the weight, and the solid line represents The dotted line represents the change curve of The dotted line represents the change curve of The change curve.

[0119] Step 14, for each text summary, calculate the dynamic weight comprehensive evaluation value of the text summary according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary.

[0120] Specifically, through the formula:

[0121]

[0122] Calculate the Dynamic weight comprehensive evaluation value of text summaries .

[0123] in, Indicates The complete value of the text summary, Indicates The correct value of the text summary, Indicates The conciseness value of the text summary, , Indicates the number of text summaries.

[0124] Exemplarily, the above formula can be run using computer software such as matlab and python to obtain a dynamic weight comprehensive evaluation value of the text summary.

[0125] It is worth mentioning that the dynamic weight comprehensive evaluation value calculated based on the dynamic weight and the completeness value, correctness value, and conciseness value of the text summary not only improves the comprehensiveness of the evaluation of the text summary, but also can adjust the proportion of each item in the dynamic weight comprehensive evaluation value for different iterative optimization stages.

[0126] Step 15, iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, and obtain multiple optimized text summaries and the optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary.

[0127] In some embodiments of the present application, the above-mentioned step of iteratively optimizing all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, and obtaining multiple optimized text summaries and the optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary includes:

[0128] In the first step, all dynamic weight comprehensive evaluation values ​​are sorted from large to small, and the first multiple dynamic weight comprehensive evaluation values ​​in the sorting result are taken as the first dynamic weight comprehensive evaluation value.

[0129] In the second step, the text summary corresponding to each first dynamic weight comprehensive evaluation value is used as the first text summary, and the corresponding prompt word is used as the first prompt word.

[0130] In the third step, multiple keyword information of each first text summary is obtained, and the multiple keyword information of each first text summary is taken as an information group, and the keyword information existing in multiple information groups is taken as the first keyword information.

[0131] The above keyword information is used to describe the key information of the text summary.

[0132] Exemplarily, each first text summary may be input into a large language model to generate keyword information, thereby obtaining a plurality of keyword information of each first text summary.

[0133] The fourth step is to generate multiple new prompt words based on all the first prompt words.

[0134] Exemplarily, all first prompt words may be input into a large language model to generate prompt words, thereby obtaining a plurality of new prompt words.

[0135] In the fifth step, for each first prompt word, the first prompt word is combined with all the first keyword information to obtain a second prompt word.

[0136] Exemplarily, the first prompt word is "organism", and all the first keyword information includes "habitat", "humid", "rainforest", and "heavy rainfall", then the combined second prompt word is "organism, habitat, moist, rainforest, heavy rainfall".

[0137] In the sixth step, for each new prompt word, the new prompt word is combined with all the first keyword information to obtain a second prompt word.

[0138] Exemplarily, the new prompt word is "animal habits", and all the first keyword information includes "habitat", "humid", "rainforest", and "heavy rainfall", then the combined second prompt word is "animal habits, habitat, moist, rainforest, heavy rainfall".

[0139] In the seventh step, according to each second prompt word, a second text summary corresponding to each second prompt word is generated, and a second dynamic weighted comprehensive evaluation value of each second text summary is calculated.

[0140] Exemplarily, each second prompt word may be input into a large language model to generate a summary, thereby obtaining a second text summary corresponding to each second prompt word.

[0141] It should be noted that the process of calculating the second dynamic weighted comprehensive evaluation value is the same as the process of calculating the dynamic weighted comprehensive evaluation value.

[0142] In the eighth step, all dynamic weight comprehensive evaluation values ​​and all second dynamic weight comprehensive evaluation values ​​are taken as a target dynamic weight comprehensive evaluation value, and the text summaries corresponding to all dynamic weight comprehensive evaluation values ​​and all second text summaries corresponding to the second dynamic weight comprehensive evaluation values ​​are taken as a target text summary.

[0143] In the ninth step, all target dynamic weight comprehensive evaluation values ​​are sorted from large to small, and the first multiple target dynamic weight comprehensive evaluation values ​​in the sorting result are used as the third dynamic weight comprehensive evaluation value, and the target text summary corresponding to each third dynamic weight comprehensive evaluation value is used as the third text summary.

[0144] The number of the third text abstracts is the same as the number of the text abstracts.

[0145] Step 10: Determine whether the number of iterations is equal to the total number of iterations.

[0146] If so, each third text summary is used as an optimized text summary, and each third dynamic weighted comprehensive evaluation value is used as an optimized dynamic weighted comprehensive evaluation value.

[0147] Otherwise, the number of iterations is increased by 1, and each third text summary is taken as a text summary, and each third dynamic weight comprehensive evaluation value is taken as a dynamic weight comprehensive evaluation value. The step of sorting all dynamic weight comprehensive evaluation values ​​from large to small is returned, and the first multiple dynamic weight comprehensive evaluation values ​​in the sorting result are taken as the first dynamic weight comprehensive evaluation value.

[0148] It should be noted that the initial value of the number of iterations is 1.

[0149] It is worth mentioning that the text summary is optimized based on the comprehensive and dynamically adjusted dynamic weight comprehensive evaluation value, so that in the process of iterative optimization of the text summary, the optimization of the text summary in different aspects can be dynamically adjusted in the iterations at different stages, effectively improving the quality of the text summary.

[0150] Step 16, determining a final text summary of the target text from all optimized text summaries according to the comprehensive evaluation values ​​of all optimized dynamic weights.

[0151] Specifically, the largest optimized dynamic weight comprehensive evaluation value among all optimized dynamic weight comprehensive evaluation values ​​is used as the final dynamic weight comprehensive evaluation value, and the optimized text summary corresponding to the final dynamic weight comprehensive evaluation value is used as the final text summary of the target text.

[0152] For example, if all optimized dynamic weight comprehensive evaluation values ​​are 2.1, 3.1, and 2.6, 3.1 is used as the final dynamic weight comprehensive evaluation value, and the optimized text summary corresponding to 3.1 is used as the final text summary of the target text.

[0153] It is worth mentioning that calculating the completeness value, correctness value and conciseness value of the text summary can evaluate the text summary in terms of completeness, correctness and conciseness, thereby improving the comprehensiveness of the evaluation of the text summary. The dynamic weight is calculated according to the total number of iterations, and the dynamic weight comprehensive evaluation value is calculated based on the dynamic weight and the comprehensive evaluation of the three aspects. In the process of iterative optimization of the text summary, dynamic adjustments can be made to the optimization of different aspects of the text summary in different stages of iteration, thereby effectively improving the quality of the text summary.

[0154] The text summary optimization device provided in this application is exemplarily described below.

[0155] like Figure 3 As shown, the embodiment of the present application provides a text summary optimization device, and the text summary optimization device 300 includes:

[0156] A generating module 301 is used to obtain multiple prompt words of the target text and generate a text summary of the target text according to each prompt word;

[0157] A first calculation module 302, used to calculate the completeness value, correctness value and conciseness value of each text summary;

[0158] An acquisition module 303 is used to acquire the total number of iterations for optimizing all text summaries, and calculate the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations;

[0159] The second calculation module 304 is used to calculate the dynamic weight comprehensive evaluation value of the text summary for each text summary according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary;

[0160] Iterative optimization module 305, used to iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, thereby obtaining multiple optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary;

[0161] The determination module 306 is used to determine the final text summary of the target text from all the optimized text summaries according to all the optimized dynamic weight comprehensive evaluation values.

[0162] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0163] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0164] like Figure 4 As shown, an embodiment of the present application provides a terminal device. The terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 4 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.

[0165] Specifically, when the processor D100 executes the computer program D102, it obtains multiple prompt words of the target text, generates a text summary of the target text according to each prompt word, then calculates the complete value, correct value and concise value of each text summary, and then obtains the total number of iterations for optimizing all text summaries, and calculates the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight based on the total number of iterations, and then respectively for each text summary, according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary, calculate the dynamic weight comprehensive evaluation value of the text summary, and then use all the dynamic weight comprehensive evaluation values ​​to iteratively optimize all text summaries until the number of iterations of iterative optimization is equal to the total number of iterations, and obtains multiple optimized text summaries and the optimized dynamic weight comprehensive evaluation value corresponding to each optimized text summary, and finally determines the final text summary of the target text from all optimized text summaries according to all the optimized dynamic weight comprehensive evaluation values. Among them, the completeness value, correctness value and conciseness value of the text summary are calculated, which can evaluate the text summary in terms of completeness, correctness and conciseness, improve the comprehensiveness of the evaluation of the text summary, calculate the dynamic weight according to the total number of iterations, and calculate the dynamic weight comprehensive evaluation value according to the dynamic weight and the comprehensive evaluation of the three aspects. In the process of iterative optimization of the text summary, dynamic adjustments can be made to the optimization of different aspects of the text summary in different stages of iteration, effectively improving the quality of the text summary.

[0166] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0167] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.

[0168] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0169] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the text summary optimization method device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0171] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0172] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0173] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A text summarization optimization method, characterized in that: include: Acquire multiple prompt words of the target text, and generate a text summary of the target text according to each of the prompt words; Calculate the completeness value, correctness value and conciseness value of each of the text summaries; Obtaining the total number of iterations for optimizing all text summaries, and calculating the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations; For each of the text summaries, respectively, calculate the dynamic weight comprehensive evaluation value of the text summaries according to the complete value, correct value, concise value, and the complete value dynamic weight, correct value dynamic weight, and concise value dynamic weight corresponding to the text summaries; Iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, thereby obtaining a plurality of optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each of the optimized text summaries; Determining a final text summary of the target text from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values; The step of calculating the complete value, correct value and concise value of each text summary comprises: By formula: ; Calculate the The complete value of the text summary ; in, Indicates the The first similarity between the text summary and the reference summary, Indicates the The second similarity between the text summary and the reference summary, , Indicates the number of text summaries; By formula: Calculate the The correct value of the text summary ; in, represents the correctness score of the text summary, ; By formula: Calculate the The conciseness value of the text summary ; in, and Both represent weights, Indicated in the The set of all words that appear more than 1 times in the text summary, the word frequency Representing words In the said The number of occurrences in the text summary.

2. The text summarization optimization method according to claim 1, characterized in that: The calculating of the complete value dynamic weight, the correct value dynamic weight and the concise value dynamic weight based on the total number of iterations includes: By formula: Calculating dynamic weights ; in, represents the basic weight, represents the initial dynamic weight, ,when hour, represents the complete value dynamic weight, represents the complete value base weight, Indicates the initial dynamic weight of the complete value, when hour, Indicates the correct value dynamic weight, represents the correct value base weight, Indicates the correct initial dynamic weight, when hour, Indicates the dynamic weight of the concise value, Indicates the basic weight of the concise value, Indicates the initial dynamic weight of the concise value: in, , Indicates the total number of iterations.

3. The text summarization optimization method according to claim 2, characterized in that: The step of calculating the dynamic weight comprehensive evaluation value of the text summary according to the complete value, correct value, concise value, and the complete value dynamic weight, correct value dynamic weight, and concise value dynamic weight corresponding to the text summary includes: By formula: Calculate the Dynamic weight comprehensive evaluation value of text summaries ; in, Indicates the The complete value of the text summary, Indicates the The correct value of the text summary, Indicates the The conciseness value of the text summary, , Indicates the number of text summaries.

4. The text summarization optimization method according to claim 3, characterized in that: The iterative optimization of all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, and a plurality of optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each of the optimized text summaries are obtained, including: All dynamic weighted comprehensive evaluation values ​​are sorted from large to small, and the first multiple dynamic weighted comprehensive evaluation values ​​in the sorting result are all taken as the first dynamic weighted comprehensive evaluation value; Using the text summary corresponding to each of the first dynamic weight comprehensive evaluation values ​​as the first text summary, and the corresponding prompt word as the first prompt word; Acquire multiple keyword information of each of the first text summaries, and regard the multiple keyword information of each of the first text summaries as an information group, and regard the keyword information existing in the multiple information groups as the first keyword information; Generate multiple new prompt words based on all the first prompt words; For each of the first prompt words, combine the first prompt word with all the first keyword information to obtain a second prompt word; For each of the new prompt words, combine the new prompt word with all the first keyword information to obtain a second prompt word; According to each of the second prompt words, a second text summary corresponding to each of the second prompt words is generated, and a second dynamic weighted comprehensive evaluation value of each of the second text summaries is calculated; All dynamic weight comprehensive evaluation values ​​and all second dynamic weight comprehensive evaluation values ​​are taken as a target dynamic weight comprehensive evaluation value, and the text summaries corresponding to all dynamic weight comprehensive evaluation values ​​and the second text summaries corresponding to all second dynamic weight comprehensive evaluation values ​​are taken as a target text summary; All target dynamic weight comprehensive evaluation values ​​are sorted from large to small, and the first multiple target dynamic weight comprehensive evaluation values ​​in the sorting result are all used as third dynamic weight comprehensive evaluation values, and the target text summary corresponding to each third dynamic weight comprehensive evaluation value is used as the third text summary; the number of the third text summaries is the same as the number of the text summaries; Determine whether the number of iterations is equal to the total number of iterations; If yes, each of the third text summaries is used as an optimized text summary, and each of the third dynamic weighted comprehensive evaluation values ​​is used as an optimized dynamic weighted comprehensive evaluation value; Otherwise, the number of iterations is increased by 1, and each of the third text summaries is taken as a text summary, and each of the third dynamic weight comprehensive evaluation values ​​is taken as a dynamic weight comprehensive evaluation value. The step of sorting all the dynamic weight comprehensive evaluation values ​​from large to small and taking the first multiple dynamic weight comprehensive evaluation values ​​in the sorting result as the first dynamic weight comprehensive evaluation value is returned.

5. The text summarization optimization method according to claim 4, characterized in that: Determining the final text summary of the target text from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values ​​includes: The largest optimized dynamic weight comprehensive evaluation value among all optimized dynamic weight comprehensive evaluation values ​​is used as the final dynamic weight comprehensive evaluation value, and the optimized text summary corresponding to the final dynamic weight comprehensive evaluation value is used as the final text summary of the target text.

6. A text summary optimization device, characterized in that: include: A generating module, used for acquiring a plurality of prompt words of a target text, and generating a text summary of the target text according to each of the prompt words; A first calculation module, used for calculating the complete value, correct value and concise value of each of the text summaries; An acquisition module, used to acquire the total number of iterations for optimizing all text summaries, and calculate the complete value dynamic weight, the correct value dynamic weight, and the concise value dynamic weight based on the total number of iterations; A second calculation module is used to calculate the dynamic weight comprehensive evaluation value of the text summary for each of the text summaries according to the complete value, correct value, concise value and the complete value dynamic weight, correct value dynamic weight and concise value dynamic weight corresponding to the text summary; An iterative optimization module, used to iteratively optimize all text summaries using all dynamic weight comprehensive evaluation values ​​until the number of iterations of the iterative optimization is equal to the total number of iterations, thereby obtaining a plurality of optimized text summaries and an optimized dynamic weight comprehensive evaluation value corresponding to each of the optimized text summaries; A determination module, used to determine a final text summary of the target text from all optimized text summaries according to all optimized dynamic weight comprehensive evaluation values; The first calculation module is specifically used to implement: By formula: ; Calculate the The complete value of the text summary ; in, Indicates the The first similarity between the text summary and the reference summary, Indicates the The second similarity between the text summary and the reference summary, , Indicates the number of text summaries; By formula: Calculate the The correct value of the text summary ; in, represents the correctness score of the text summary, ; By formula: Calculate the The conciseness value of the text summary ; in, and Both represent weights, Indicated in the The set of all words that appear more than 1 times in the text summary, the word frequency Representing words In the said The number of occurrences in the text summary.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the text summarization optimization method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the text summarization optimization method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Text abstract generation method and device, electronic equipment and medium

    CN117951286A

  • Method and apparatus for generating text summary, computer device and storage medium

    WO2020107878A1