A method for automatically generating a first draft of a situation briefing
By combining BertSum, K-means, and T5 models, the system automatically generates initial drafts of situation reports, solving the problem of low efficiency in traditional manual drafting and achieving efficient, realistic, and diverse report generation.
Patent Information
- Application Number
- CN202210671089.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-06-15
Smart Images

Figure CN115905461B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of text processing and analysis, in particular to a situation report draft automatic generation method. BACKGROUND
[0002] A report is a short internal newspaper that conveys information on a certain aspect. A situation report is a kind of report. A situation report is a brief report or brief report on events occurring within a period of time, which reflects the issues of concern and is for reference. Traditional situation report writing requires the writer to read a large amount of news materials and summarize the content of the materials, and finally organize the materials to form the final draft. Due to the long content and large quantity of materials, the situation report writing method highly dependent on manual work greatly consumes the energy of the writer, reduces the efficiency of the writer, and affects the quality of the situation report. SUMMARY
[0003] In view of the above problems in the prior art, the situation report draft automatic generation method provided by the present application solves the problems of low efficiency and quality of manual situation report writing.
[0004] In order to achieve the above-mentioned purpose of the application, the technical scheme adopted by the present application is as follows: a situation report draft automatic generation method, comprising the following steps:
[0005] S1, abstract extraction: using a BertSum method based on a Bert model to extract one or more sentences from each news material as an abstract;
[0006] S2, text clustering: using a Kmeans algorithm to perform text clustering on the abstracts extracted from each news material;
[0007] S3, abstract generation: using an abstract generation method based on a T5 model to generate an abstract for the abstracts extracted from each category of news material as a subheading in the situation report;
[0008] S4, draft generation: sorting and combining the results of abstract extraction, text clustering and abstract generation according to the clustering categories to form a situation report draft.
[0009] Further, n news materials are used for situation report writing, and the material set is represented as Each material is composed of m sentences, i=1,2,3…n, i is the serial number of the material, and m is the serial number of the sentences in the material.
[0010] Further, the specific steps of step S1 are as follows:
[0011] S11, inputting the material to the BertSum model as input to obtain the importance score of each sentence in the document ; Score the importance of the m-th sentence;
[0012] S12. Sort each sentence according to its importance score to obtain the sorted sentence set D-Sorted;
[0013] S13. Select a maximum length for the extracted summary. l ;
[0014] S14. Add the sentences from the sorted sentence set D-Sorted to the summary candidate sentence set in turn. In the middle, the set of candidate sentences for the summary is satisfied. The total length of the sentences in the Chinese text does not exceed the maximum length. l If the length of the first sentence is greater than l If so, then keep the first sentence;
[0015] S15. Set the candidate sentences for the summary The sentences in the material are arranged according to their position in the source material. D i Sort the original order in the file to obtain the material. D i Extractive summary .
[0016] Further: The specific steps of step S2 are as follows:
[0017] S21. Set the value of k;
[0018] S22, Extracting the summary vector set Perform clustering for category k and calculate the silhouette coefficient. ;
[0019] S23, if k If k = k + 1, repeat step S22; otherwise, execute step S24.
[0020] S24. The number of clusters when the silhouette coefficient is maximized. ;
[0021] S25, Order K = The output clustering results are K when the number of categories is K, and all extracted summaries are divided into K categories.
[0022] Furthermore, the value of k is set to 2.
[0023] Furthermore: the extracted summary vector set The generation method is as follows: for the materials D i Extractive summary , the Tf-idf method is used to convert it into a vector representation , the set of all abstract vectors is .
[0024] Further: the specific of the step S3 is: using the abstract generation method based on the T5 pre-training model, for each category of extracted abstract set , generate an abstract .
[0025] Further: the specific steps of the step S4 are:
[0026] S41, the generated abstract set is numbered with Chinese numerals "one", "two", "three"… ;
[0027] S42, for each category of extracted abstract, obtain its corresponding original news material publishing time, and add it to the beginning of the extracted abstract;
[0028] S43, add each extracted abstract with time to the corresponding numbered generated abstract;
[0029] S44, for each category, arrange the extracted abstracts from front to back according to the publishing time, and finally number them with "1", "2", "3"…
[0030] The beneficial effects of the present application are: the present application automatically generates a situation report, reduces the work burden of the author; the extracted abstract is used as the main content of the report, which ensures the authenticity of the report content; the material clustering method is used to distinguish the materials describing different aspects, which increases the hierarchy of the report; the abstract generation technology is used to generate a subheading for each category of material, which improves the diversity and flexibility of the report content. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is the overall technical roadmap of the present application;
[0032] Figure 2 is the specific embodiment diagram of the present application. DETAILED DESCRIPTION
[0033] The specific embodiments of the present application will be described below to facilitate understanding by those skilled in the art, but it should be clear that the present application is not limited to the scope of the specific embodiments, and for those skilled in the art, it is obvious that various changes are within the spirit and scope of the present application defined and determined by the appended claims, and all inventions utilizing the concept of the present application are within the scope of protection.
[0034] As Figure 1As shown, a situation brief draft automatic generation method includes the following steps:
[0035] S1, abstract extraction: a BertSum method based on a Bert model is used to extract one or more sentences from each news material as an abstract; abstract extraction refers to extracting one or more sentences from an input chapter as an abstract of the chapter. The abstract sentence can summarize the main content of the chapter, and is an important part of the automatically generated situation brief draft. The present application uses the BertSum method based on the Bert model for abstract extraction, which converts the abstract extraction task into a sentence sorting task. Compared with traditional abstract extraction methods such as Lead-3 and TextRank, BertSum can better understand the semantic information contained in the sentence and improve the accuracy of abstract extraction. Because the present application extracts sentences from the material as an abstract, the authenticity of the automatically generated situation brief draft can be ensured to some extent.
[0036] Hypothesis n The news material is used to write a situation report, and the material set is represented as Each material is composed of m sentences. The process of obtaining an extracted abstract of a material is as follows:
[0037] Step 11: input the material into the BertSum model to obtain the importance score of each sentence in the document .
[0038] Step 12: sort each sentence according to the importance score to obtain a sorted sentence set D- Sorted .
[0039] Step 13: select an extracted abstract maximum length l .
[0040] Step 14: add the sentences in the sorted sentence set D-Sorted to the abstract candidate sentence set one by one, and the total length of the sentences in the abstract candidate sentence set does not exceed l . If the length of the first sentence is greater than l , the first sentence is retained;
[0041] Step 15: sort the sentences in the abstract candidate sentence set according to their original order in the material to obtain the extracted abstract of the material .
[0042] S2, text clustering: adopt Kmeans algorithm to extract the summary of each news material for text clustering;
[0043] Text clustering refers to aggregating texts describing the same theme or similar content together. The vector representation of a sentence or chapter is calculated based on Tf-idf, and K-means method is used for clustering all sentences or chapters. When clustering, the number of categories is adjusted dynamically according to the silhouette coefficient after clustering.
[0044] For the extracted summary of each material , the Tf-idf method is used to convert it into a vector representation , and the collection of all summary vectors is . The present application adopts K-means algorithm to cluster sentences. Since K-means is an unsupervised model, it is necessary to select K value, that is, to cluster all sentences into K categories. However, when generating the initial draft of the situation report, it is impossible to know the total number of categories of materials used to write the report in advance. Therefore, the value of K is automatically adjusted according to the silhouette coefficient. The clustering process is as follows:
[0045] Step 21: set k value to 2;
[0046] Step 22: cluster the extracted summary vector set with k categories, and calculate the silhouette coefficient ;
[0047] Step 23: if k , k=k+1, repeat step 2. If k> , execute step 4;
[0048] Step 24: take the number of categories clustered when the silhouette coefficient is maximum ;
[0049] Step 25: K = , return the clustering result when the number of categories is K .
[0050] After the above steps, all extracted summaries are divided into K categories.
[0051] S3, summary generation: adopt the summary generation method based on T5 model to generate a summary for the extracted summary of each category of news material as a subheading in the situation report;
[0052] Different from the abstract extraction, which selects sentences from the input chapter as the abstract, the abstract generation adopts a complete generation method to obtain the chapter abstract. Compared with the extraction type abstract, which must find sentences from the chapter as the abstract, the generated abstract can appear new words, and the flexibility is higher. The abstract generation method based on the T5 model is adopted for abstract generation in the present application.
[0053] In order to generate an abstract for each type of extraction abstract as the small title of the category, all the extraction abstracts under each category are combined and input into a generated abstract model to obtain the generated abstract of the category. The abstract generation method based on the T5 (Transfer Text-to-Text Transformer) pre-training model is adopted in the present application. For each set of extraction abstracts , an abstract is generated.
[0054] S4, initial draft generation: the results of abstract extraction, text clustering and abstract generation are sorted and combined according to the clustering categories to form an initial draft of the situation report.
[0055] The main purpose of the initial draft generation is to combine the above-mentioned extraction type abstract and generated abstract obtained by the model to obtain a complete initial draft of the situation report, and the steps are as follows:
[0056] Step 41: the generated abstract set is numbered with Chinese numerals "one", "two", …, "nine";
[0057] Step 42: for each category of extraction abstract, the corresponding original news material publication time is obtained and added to the beginning of the extraction abstract;
[0058] Step 43: each extraction abstract with time added is added to the corresponding numbered generated abstract;
[0059] Step 44: for each category, the extraction abstracts are arranged from front to back according to the publication time, and finally numbered with numbers "1", "2", "3"…
[0060] The specific embodiments of the present application, as shown in Figure 2 , the writing material set is:
[0061] 1. During this year's National Day holiday, short- and medium-distance travel within the province accounted for a large proportion, while long-distance inter-provincial travel decreased compared to previous years. Self-driving tours and short-distance trips were relatively common, leading to localized congestion on highways around major and medium-sized cities during peak hours, resulting in significant traffic pressure. According to the "2022 National Day Holiday Tourism Summary Report" released by Ctrip on October 7th, local, short-distance, and surrounding area travel dominated the National Day holiday tourism market this year. Data shows that during the seven-day National Day holiday, local and surrounding area travel orders accounted for 65%, and per capita spending on local and surrounding area travel increased by nearly 30% compared to last year's National Day holiday.
[0062] 2. Celebrate National Day with Camping Fun. This year, mountain camping has become a popular choice for many citizens during the National Day holiday, becoming a highlight of the long weekend. On the unique large lawns, people can get close to nature and experience the unique charm of camping. Every evening at 7 pm, lights begin to twinkle at the Fengqi Yunjing·Banye Xingchen Camping Base in Shanhou Village, Hongxing Street, Jingning County. Under the canopy, tourists unfold folding tables and chairs, set out food, and children frolic on the lawn, playing on swings and slides with their friends. Adults chat with family and friends about life's fun and take photos.
[0063] 3. Shen Jiani, a senior researcher at Trip.com Research Institute, believes that during this year's National Day holiday, tourists focused more on local and surrounding areas, which will unlock the potential and depth of the local and surrounding tourism market. For scenic spots, hotels, and other tourism businesses, this long holiday will be an arena to showcase their professional capabilities and service levels. How to attract local customers to return with new highlights, or how to consolidate customer base with high-quality service, will all be tested by the market after the holiday.
[0064] 4. The crisp autumn weather fueled a continued surge in outdoor tourism, with camping once again dominating social media feeds. According to Ctrip's "2022 National Day Holiday Tourism Summary Report," camping bookings increased more than tenfold during the National Day holiday, with local bookings accounting for nearly 80% and bookings from surrounding areas outside the city accounting for 15%. The average cost per person for camping was around 650 yuan, about 30% higher than the average cost for camping during the Mid-Autumn Festival. On the Fliggy platform, National Day camping bookings increased 1.3 times compared to before the holiday, with personalized options such as "camping + frisbee," "camping + cycling," "camping + barbecue," "camping + nature sketching," and "camping + insect exploration" being particularly popular. "We didn't expect camping to become so popular!" Ms. Li, who invested in a high-end campsite in Lin'an, told reporters. "Around September 20th, all ten overnight tents at our campsite were booked for the National Day holiday, but we still have many customers inquiring about camping packages that don't require overnight stays."
[0065] 5. As the "top trend" in this year's tourism market, camping's popularity has continued from the "March 3rd" and "May Day" holidays to the Mid-Autumn Festival and National Day holidays. The camping craze has continued to heat up, with "tent landscapes" flooding social media, and some campsites experiencing a shortage of available spots. This continued popularity has spurred the emergence of new forms of "camping economy" and "camping+", attracting more and more "camping novices." However, behind this camping boom, a sobering reflection is needed: a "safety lock" must be added to camping.
[0066] The extracted summary set is as follows:
[0067] 1. During this year's National Day holiday, short- and medium-distance travel within the province accounted for a large proportion, with a relatively high proportion of self-driving tours and short-distance trips.
[0068] 2. During this year's National Day holiday, mountain camping became a popular activity among citizens, becoming a highlight of the holiday. On the unique large lawn, people could get close to nature and experience the unique charm of camping.
[0069] 3. Ctrip researchers believe that during this year's National Day holiday, tourists focused more on local and surrounding areas.
[0070] 4. According to the "2022 National Day Holiday Tourism Summary Report" released by Ctrip, during the National Day holiday, the number of camping tourism orders increased by more than 10 times year-on-year, with local orders accounting for nearly 80% and orders from surrounding areas outside the city accounting for 15%.
[0071] 5. As the "top trend" in this year's tourism market, camping has been popular from the "March 3rd" and "May Day" holidays all the way to the Mid-Autumn Festival and National Day holidays. The camping craze continues to heat up, with "tent landscapes" flooding social media, and some campsites experiencing a "sold-out" situation.
[0072] Abstract extraction category 1 is:
[0073] 1. During this year's National Day holiday, short- and medium-distance travel within the province accounted for a large proportion, with a relatively high proportion of self-driving tours and short-distance trips.
[0074] 2. Ctrip researchers believe that during this year's National Day holiday, tourists focused more on local and surrounding areas.
[0075] Abstract extraction category 2 is:
[0076] 1. During this year's National Day holiday, mountain camping became a popular activity among citizens, becoming a highlight of the holiday. On the unique large lawn, people could get close to nature and experience the unique charm of camping.
[0077] 2. According to the "2022 National Day Holiday Tourism Summary Report" released by Ctrip, during the National Day holiday, the number of camping tourism orders increased by more than 10 times year-on-year, with local orders accounting for nearly 80% and orders from surrounding areas outside the city accounting for 15%.
[0078] 3、As the "top flow" of the tourism market this year, camping has been popular from "March 3" and "May Day" holiday to the Mid-Autumn Festival and National Day holiday. The popularity of camping continues to rise, and "tent scenic spots" have swept through friends' circles. Some campsites have experienced "difficult to find a place."
[0079] The generated abstract 1 is:
[0080] The National Day holiday is very popular.
[0081] The generated abstract 2 is:
[0082] Camping tourism is popular during the National Day holiday.
[0083] The initial draft of the situation report is:
[0084] I. The National Day holiday is very popular.
[0085] 1. On October 6, 2022, the proportion of short-distance travel within the province during the National Day holiday was relatively high, and the proportion of small car self-driving tours and nearby tours was relatively high.
[0086] 2. On October 7, 2022, Ctrip researchers believe that during the National Day holiday this year, tourists will focus more on local and nearby areas.
[0087] II. Camping tourism is popular during the National Day holiday.
[0088] 1. On October 6, 2022, during the National Day holiday this year, mountain camping was popular among many citizens and became a highlight of the mini-vacation. In a unique grassy field, people can get close to nature and experience the unique charm of camping.
[0089] 2. On October 8, 2022, the "2022 National Day Holiday Tourism Summary Report" released by Ctrip showed that during the National Day holiday, camping tourism orders increased by more than 10 times compared with the previous year, with nearly 80% of local orders and 15% of orders from nearby areas.
[0090] 3. On October 8, 2022, as the "top flow" of the tourism market this year, camping has been popular from "March 3" and "May Day" holiday to the Mid-Autumn Festival and National Day holiday. The popularity of camping continues to rise, and "tent scenic spots" have swept through friends' circles. Some campsites have experienced "difficult to find a place."
Claims
1. A method for automatically generating a first draft of a situation brief, characterized by, The method comprises the following steps: S1, abstract extraction: a BertSum method based on a Bert model is used to extract one or more sentences from each news material as an abstract; S2, text clustering: a Kmeans algorithm is used to perform text clustering on the abstract extracted from each news material; S3, abstract generation: a summary generation method based on a T5 model is used to generate an abstract for the abstract extracted from each category of news material as a subheading in the situation report; S4, initial draft generation: the results of abstract extraction, text clustering and abstract generation are sorted and combined according to the clustering category to form an initial draft of the situation report; The specific steps of step S2 are: S21, set the value of k; S22, to the set of extracted summary vectors perform clustering of class k and compute silhouette coefficient ; S23, if k , k = k + 1, repeat step S22, otherwise perform step S24; S24, the number of categories clustered when the profile coefficient is maximum ; S25, let K = The clustering result when the output category number is K, and all extracted summaries are divided into K categories.
2. The method of claim 1, wherein, The n news materials are used to write a situation report, and the material set is represented as Each material is composed of m sentences, i=1, 2, 3…n, i is the serial number of the material, and m is the serial number of the sentences in the material.
3. The method of claim 2, wherein the method further comprises: The specific steps of step S1 are: S11, Prepare materials As input to the BertSum model, the importance score of each sentence in the document is obtained. ; Score the importance of the m-th sentence; S12, sort each sentence according to the importance score to obtain a sorted sentence set D-Sorted; S13, select a maximum length l of the extracted abstract; S14, add the sentences in the sorted sentence set D-Sorted to the summary candidate sentence set one by one In the summary candidate sentence set The total length of the sentences in the summary candidate sentence set does not exceed the maximum length l; if the length of the first sentence is greater than l, the first sentence is retained; S15, rank the sentence set in the summary candidate sentence set in the original order of the material Di, to obtain the extractive summary of the material Di .
4. The method of claim 1, wherein, The value of k is set to 2.
5. The method of claim 1, wherein, The set of extracted summary vectors The generation method is: for the material Di extraction summary , using the method of Tf-idf into a vector representation , the collection of all summary vectors is .
6. The method of claim 1, wherein, The step S3 is specifically: using an abstract generation method based on a T5 pre-training model, for each type of abstract set , generate an abstract .
7. The method of claim 6, wherein the method further comprises: The specific steps of step S4 are: S41, using Chinese numerals "one", "two", "three" … to generate the summary set numbering; S42, for each category of extracted abstract, obtain the publication time of the corresponding original news material and add it to the beginning of the extracted abstract; S43, add each extracted abstract with time to the corresponding numbered generated abstract; S44, for each category, arrange the extracted abstracts from front to back according to the order of publication time, and finally number them with the numbers "1", "2", "3" and so on.
Citation Information
Patent Citations
Text generation method and server
CN107977196A
Polyseme recognition method based on neural network
CN110717015A