Information generation method, device, electronic device and storage medium

By extracting and analyzing the hierarchical structure and key information of official documents, identifying content holes and supplementing information, the problem of incomplete abstracts of official documents in traditional methods is solved and more comprehensive summary information is generated.

CN112231468BActive Publication Date: 2024-09-06PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011105926.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-15
Publication Date
2024-09-06
Estimated Expiration
2040-10-15

AI Technical Summary

Technical Problem

In government affairs scenarios, official documents have a hierarchical structure, and traditional unsupervised summary extraction methods such as text ranking algorithms are difficult to generate comprehensive summary information.

Method used

By obtaining the hierarchical structure of the target article, extracting hierarchical titles and key information, determining the empty content titles, obtaining supplementary information based on the titles to be supplemented, and generating comprehensive summary information. Specific steps include determining the word count of the title, analyzing part of speech through word segmentation, sorting queue elements, and applying similarity algorithms and text ranking algorithms to determine supplementary information.

Benefits of technology

The generated summary information is more comprehensive, can effectively deal with content holes in hierarchical articles, and improves the completeness and accuracy of the summary.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112231468B
    Figure CN112231468B
Patent Text Reader

Abstract

The present application relates to the field of data processing technology and is applied to smart government scenarios, thereby promoting the construction of smart cities. The present application provides an information generation method, device, electronic device and storage medium, the method comprising: obtaining a target article; determining that the target article has a hierarchical structure, extracting the hierarchical title and key information of the target article; determining the target title from the hierarchical title and the target information from the key information according to a preset weight and a first preset word count threshold; determining a content-empty title from the target title; determining a content title to be supplemented from the content-empty title; determining supplementary information based on the content title to be supplemented; generating summary information of the target article based on the target title, the target information and the supplementary information. The present invention can generate comprehensive summary information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an information generating method, device, electronic device and storage medium. Background Art

[0002] At present, it is possible to automatically generate article summaries through computer technology. However, in practice, it is found that in government scenarios, official documents generally have a hierarchical structure, that is, they are characterized by point-by-point elaboration. Using traditional unsupervised summary extraction methods, such as the text ranking algorithm, the extracted official document summaries have the problem of incomplete content.

[0003] Therefore, how to generate comprehensive summary information is a technical problem that needs to be solved. Summary of the invention

[0004] In view of the above, it is necessary to provide an information generation method, device, electronic device and storage medium that can generate comprehensive summary information.

[0005] A first aspect of the present invention provides an information generation method, the information generation method comprising:

[0006] Get the target article;

[0007] Determining that the target article has a hierarchical structure, and extracting hierarchical titles and key information of the target article;

[0008] Determine a target title from the hierarchical titles and determine target information from the key information according to a preset weight and a first preset word count threshold;

[0009] Determining content-empty titles from the target titles;

[0010] Determine the content title to be supplemented from the empty content titles;

[0011] Determine supplementary information according to the title of the content to be supplemented;

[0012] The summary information of the target article is generated according to the target title, the target information and the supplementary information.

[0013] In a possible implementation manner, determining the content-empty title from the target title includes:

[0014] For each of the target titles, determining whether the number of words in the target title is less than a second preset word count threshold;

[0015] If the word count of the target title is less than a second preset word count threshold, it is determined that the target title is a content-empty title.

[0016] In a possible implementation, after determining, for each target title, whether the number of words in the target title is less than a second preset word count threshold, the information generation method further includes:

[0017] If the number of words in the target title is greater than or equal to a second preset word count threshold, segmenting the target title to obtain a plurality of target words;

[0018] Determining whether the parts of speech of the plurality of target words are all nouns;

[0019] If the parts of speech of the plurality of target words are all nouns, it is determined that the target title is a title with empty content.

[0020] In a possible implementation, determining the title of the content to be supplemented from the content hole title includes:

[0021] According to the position of the target title in the target article and the position of the target information in the target article, the target title and the target information are sorted to obtain a target queue;

[0022] For each of the content hole titles, determining whether the queue element at the next position adjacent to the content hole title in the target queue is a first title of the same level, wherein the first title of the same level is a title having the same preset weight as the content hole title, and the preset weight is a numerical value indicating the importance pre-set for different types of titles;

[0023] If the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, the content hole title is determined to be a title of content to be supplemented.

[0024] In a possible implementation, determining the supplementary information according to the title of the content to be supplemented includes:

[0025] Determine a second title of the same level corresponding to the title of the content to be supplemented from the target title, wherein the second title of the same level is the first title that has the same weight as the title of the content to be supplemented and is located after the position of the title of the content to be supplemented in the target article;

[0026] Determine the sentence between the title of the content to be supplemented and the second title of the same level in the target article as the sentence to be selected;

[0027] Determine a preset sentence selection strategy according to the article type of the target article, wherein the sentence selection strategy is a text ranking algorithm strategy based on the full text or a text ranking algorithm strategy or a similarity algorithm strategy based on the sentences to be selected;

[0028] Determining a target sentence from the sentences to be selected according to the sentence selection strategy;

[0029] The target sentence is determined as the supplementary information.

[0030] In a possible implementation, the sentence selection strategy is a similarity algorithm, and determining the target sentence from the sentences to be selected according to the sentence selection strategy includes:

[0031] Segmenting the title of the content to be supplemented to obtain a first word, and segmenting the sentence to be selected to obtain a second word;

[0032] Generate a first word vector according to the first word, and generate a second word vector according to the second word;

[0033] Determine, based on the first word vector, a title vector corresponding to the title of the content to be supplemented, and determine, based on the second word vector, a sentence vector corresponding to the sentence to be selected;

[0034] Determine the similarity between each of the sentence vectors and the title vector according to the similarity algorithm strategy;

[0035] The sentence to be selected corresponding to the sentence vector having the greatest similarity to the title vector is determined as the target sentence.

[0036] In a possible implementation, after obtaining the target article, the information generation method further includes:

[0037] Determining that the target article does not have a hierarchical structure, scoring all sentences of the target article by a text ranking algorithm to obtain a first score, and scoring all sentences of the target article by a maximum boundary correlation algorithm to obtain a second score;

[0038] Determining a summary sentence from the target article according to the first score and the second score;

[0039] Generate summary information of the target article according to the summary sentence.

[0040] A second aspect of the present invention provides an information generating device, the information generating device comprising:

[0041] Acquisition module, used to acquire target articles;

[0042] An extraction module, used to determine that the target article has a hierarchical structure, and extract the hierarchical title and key information of the target article;

[0043] A determination module, configured to determine a target title from the hierarchical titles and determine target information from the key information according to a preset weight and a first preset word count threshold;

[0044] The determination module is further used to determine the content-empty titles from the target titles;

[0045] The determination module is further used to determine the content title to be supplemented from the content hole title;

[0046] The determination module is further used to determine the supplementary information according to the title of the content to be supplemented;

[0047] A generating module is used to generate summary information of the target article according to the target title, the target information and the supplementary information.

[0048] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the information generating method when executing a computer program stored in the memory.

[0049] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the information generating method when executed by a processor.

[0050] It can be seen from the above technical scheme that the present invention can extract titles and key information of articles with a hierarchical structure, and determine content-empty titles from the extracted titles, and then determine content titles to be supplemented from the content-empty titles, and then determine supplementary information based on the content titles to be supplemented, so that the finally generated summary information is more comprehensive. The present invention can generate comprehensive summary information. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a flow chart of an embodiment of an information generating method disclosed in the present invention.

[0052] Figure 2 It is a flow chart of another embodiment of an information generating method disclosed in the present invention.

[0053] Figure 3 It is a functional module diagram of an embodiment of an information generating device disclosed in the present invention.

[0054] Figure 4 It is a schematic diagram of the structure of an electronic device for implementing an embodiment of the information generating method of the present invention. DETAILED DESCRIPTION

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

[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0057] The information generation method of the embodiment of the present invention is applied in an electronic device, and can also be applied in a hardware environment consisting of an electronic device and a server connected to the electronic device via a network, and is jointly executed by the server and the electronic device. The network includes but is not limited to: a wide area network, a metropolitan area network or a local area network.

[0058] Among them, a server can refer to a computer system that can provide services to other devices (such as electronic devices) in the network. If a personal computer can provide File Transfer Protocol (FTP) services to the outside world, it can also be called a server. In a narrow sense, a server refers specifically to certain high-performance computers that can provide services to the outside world through the network. Compared with ordinary personal computers, it has higher requirements in terms of stability, security, and performance. Therefore, it is different from ordinary personal computers in terms of hardware such as CPU, chipset, memory, disk system, network, etc.

[0059] The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc. The electronic device may also include network devices and / or user devices. Among them, the network device includes but is not limited to a single network device, a server group composed of multiple network devices, or a cloud composed of a large number of hosts or network devices based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computers. The user device includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touchpad or voice control device, such as a personal computer, tablet computer, smart phone, personal digital assistant PDA, etc.

[0060] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of an information generation method disclosed by the present invention. Among them, according to different requirements, the order of steps in this flowchart can be changed, and some steps can be omitted. Among them, the execution subject of the information generation method can be an electronic device.

[0061] S11. Obtain a target article.

[0062] Among them, the target article can be an official document in a government affairs scenario.

[0063] S12. Determine that the target article has a hierarchical structure, and extract the hierarchical titles and key information of the target article.

[0064] Among them, the hierarchical structure can refer to that there are multiple titles in the target article.

[0065] In an embodiment of the present invention, regular matching can be used to extract the hierarchical titles and key information of the target article. Sentences of first-level titles starting with Chinese numerals can be extracted, such as "One, ***" or "One ***", etc. Then, sentences of second-level titles identified by brackets can be extracted, such as "(One), ***" or "(One) ***", etc. Finally, sentences of third-level titles starting with Arabic numerals, such as "1, ***", "1. ***" or sentences containing words such as "One is", "Two is" in the text are extracted to obtain the hierarchical titles. At the same time, regular matching can be used to extract sentences that the official document focuses on and contains key information, that is, the key information, such as bold sentences, the last sentence containing an amount in the article, the last sentence proposing a suggestion, a sentence containing a time requirement, such as "before ** day / month", etc. Among them, the regular matching can refer to using a regular expression (Regular Expression, RE) to match a string containing a certain substring, and content that meets the preset matching rules can be filtered out.

[0066] S13. Determine a target title from the hierarchical titles and a target information from the key information according to a preset weight and a first preset word count threshold.

[0067] In the embodiment of the present invention, a numerical value indicating the degree of importance, i.e., a weight, can be set in advance for different types of titles in the target article. The hierarchical titles and the key information can be regarded as sentences. Different hierarchical titles and the key information are set with different weights, wherein the weight of a hierarchical title with a higher level is greater than that of a hierarchical title with a lower level. For example, the weight of a hierarchical title containing Chinese numerals "one", "two", etc. is 0.5, the weight of a hierarchical title containing Arabic numerals "1", "2", etc. is 0.3, and the weight of the sentence of the key information is 0.2. Within the first preset word count threshold, hierarchical titles are selected as target titles and key information is selected as target information in descending order of weight, for example: hierarchical titles are "One, the role of economic development", "Two, how to develop the economy", and the key information is "economic development is the center" and "attracting foreign investment is the focus". The weights of hierarchical titles are all 0.5, and the weights of sentences of key information are all 0.2. If the first preset word count threshold is 30, then "1. The role of economic development" and "2. How to develop the economy" are obtained in order from high to low weights as the target titles, and "Economic development is the center" is obtained as the target information. The current word count is 24. If "Attracting foreign investment is the focus" is continued to be obtained, it will exceed the first preset word count threshold. The target titles finally obtained are "1. The role of economic development" and "2. How to develop the economy", and the target information finally obtained is "Economic development is the center".

[0068] S14, determining a title with empty content from the target titles.

[0069] The empty content title may refer to a target title with less content or lacking words such as execution actions.

[0070] Specifically, determining the empty content title from the target title includes:

[0071] For each of the target titles, determining whether the number of words in the target title is less than a second preset word count threshold;

[0072] If the word count of the target title is less than a second preset word count threshold, it is determined that the target title is a content-empty title.

[0073] In this optional implementation, the empty content title can be determined from the target title according to the number of words in the title, and a second preset word count threshold can be set, and the second preset word count threshold is used as a comparison parameter with the number of words in the target title, and whether the target title is an empty content title is determined according to the comparison result between the number of words in the target title and the second preset word count threshold; in this embodiment, if the number of words in the target title is less than the second preset word count threshold, the target title is determined to be the empty content title. For example, if the second preset word count threshold is 6, the target title with less than 6 words is determined to be the empty content title.

[0074] As an optional implementation manner, after determining for each target title whether the number of words in the target title is less than a second preset word count threshold, the method further includes:

[0075] If the number of words in the target title is greater than or equal to a second preset word count threshold, segmenting the target title to obtain a plurality of target words;

[0076] Determining whether the parts of speech of the plurality of target words are all nouns;

[0077] If the parts of speech of the plurality of target words are all nouns, it is determined that the target title is a title with empty content.

[0078] In this optional implementation, the target title can be segmented to obtain multiple target words. For example, by segmenting "1. The role of economic development", the target words that can be obtained are "1", "economy", "development", "of", and "role".

[0079] S15, determining the content title to be supplemented from the empty content titles;

[0080] The title of the content to be supplemented may refer to a title that needs to have a sentence added after it as a supplement.

[0081] Specifically, determining the title of the content to be supplemented from the empty title of the content includes:

[0082] According to the position of the target title in the target article and the position of the target information in the target article, the target title and the target information are sorted to obtain a target queue;

[0083] For each of the content hole titles, determining whether the queue element at the next position adjacent to the content hole title in the target queue is a first title of the same level, wherein the first title of the same level is a title having the same preset weight as the content hole title, and the preset weight is a numerical value indicating the importance pre-set for different types of titles;

[0084] If the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, the content hole title is determined to be a title of content to be supplemented.

[0085] In this optional implementation, if the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, it is determined that there is a lack of substantial content behind the target title, and it is necessary to add sentences for supplementary explanation; if the queue element at the next position adjacent to the target title in the target queue is not the first title of the same level, it is determined that there is a relevant sentence explanation behind the target title, and it is not necessary to add additional sentences for supplementary explanation.

[0086] S16: Determine supplementary information according to the title of the content to be supplemented.

[0087] The supplementary information may be a sentence added after the title of the content to be supplemented as a content description.

[0088] Specifically, determining the supplementary information according to the title of the content to be supplemented includes:

[0089] Determine a second title of the same level corresponding to the title of the content to be supplemented from the target title, wherein the second title of the same level is the first title that has the same weight as the title of the content to be supplemented and is located after the position of the title of the content to be supplemented in the target article;

[0090] Determine the sentence between the title of the content to be supplemented and the second title of the same level in the target article as the sentence to be selected;

[0091] Determine a preset sentence selection strategy according to the article type of the target article, wherein the sentence selection strategy is a text ranking algorithm strategy based on the full text or a text ranking algorithm strategy or a similarity algorithm strategy based on the sentences to be selected;

[0092] Determining a target sentence from the sentences to be selected according to the sentence selection strategy;

[0093] The target sentence is determined as the supplementary information.

[0094] In this optional implementation, multiple experimental attempts can be conducted to observe and compare the effects of selecting different sentence selection strategies for the same article type in a specific scenario to extract sentences, and ultimately determine the sentence selection strategy with the best effect for a certain article type.

[0095] Optionally, the full-text-based text ranking algorithm strategy refers to taking the full text of the target article as the analysis object, calculating the scores of all sentences in the full text of the target article using a text ranking algorithm, and then determining the sentence with the highest score from the sentences to be selected as the target sentence.

[0096] Optionally, the text ranking algorithm strategy of the sentences to be selected refers to using a text ranking algorithm to calculate the score of each sentence to be selected among all the sentences to be selected, and then determining the sentence to be selected with the highest score as the target sentence.

[0097] Specifically, the sentence selection strategy is a similarity algorithm strategy, and determining the target sentence from the sentences to be selected according to the sentence selection strategy includes:

[0098] Segmenting the title of the content to be supplemented to obtain a first word, and segmenting the sentence to be selected to obtain a second word;

[0099] Generate a first word vector according to the first word, and generate a second word vector according to the second word;

[0100] Determine, based on the first word vector, a title vector corresponding to the title of the content to be supplemented, and determine, based on the second word vector, a sentence vector corresponding to the sentence to be selected;

[0101] Determine the similarity between each of the sentence vectors and the title vector according to the similarity algorithm strategy;

[0102] The sentence to be selected corresponding to the sentence vector having the greatest similarity to the title vector is determined as the target sentence.

[0103] In this optional implementation, the word vectors can be obtained using an open source Chinese word vector matrix or a word vector model, and then the word vectors of the words in each sentence are averaged to obtain the title vector and the sentence vector. The cosine distance between each sentence vector and the title vector can be calculated as the similarity.

[0104] S17: Generate summary information of the target article according to the target title, the target information and the supplementary information.

[0105] In the embodiment of the present invention, the target title, the target information and the supplementary information may be concatenated according to the order of their respective positions in the target article to generate summary information of the target article.

[0106] exist Figure 1In the described method flow, the title and key information of the article with a hierarchical structure can be extracted, and the content-empty titles can be determined from the extracted titles, and then the titles of the content to be supplemented can be determined from the content-empty titles, and then the supplementary information can be determined based on the titles of the content to be supplemented, so that the finally generated summary information is more comprehensive. The present invention can generate comprehensive summary information.

[0107] See also Figure 2 , Figure 2 This is a flowchart of another embodiment of an information generation method disclosed in the present invention. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. The execution subject of the information generation method can be an electronic device.

[0108] S21. Obtain target article.

[0109] S22, determining that the target article does not have a hierarchical structure, scoring all sentences of the target article by a text ranking algorithm to obtain a first score, and scoring all sentences of the target article by a maximum boundary correlation algorithm to obtain a second score.

[0110] Among them, the text ranking algorithm is a graph-based sorting algorithm for text, based on Google's PageRank algorithm. It divides the text into several components (such as words, sentences), uses a voting mechanism to sort the important components in the text, and realizes keyword extraction and abstract generation.

[0111] The Maximum Marginal Relevance (MMR) algorithm is an algorithm for calculating the similarity or importance of a sentence in the full text.

[0112] S23. Determine a summary sentence from the target article according to the first score and the second score.

[0113] In an embodiment of the present invention, after calculating the first score and the second score of each sentence, the sentences can be sorted according to the average score of the first score and the second score, so as to obtain the ranking of each sentence in the entire article. For example, the first score of the first sentence obtained by the text ranking algorithm is 20 points, and the second score of the first sentence obtained by the maximum boundary correlation algorithm is 30 points. Then, the average score of the first score and the second score of the sentence is 25 points. According to the order of the average scores of the sentences from high to low, the sentences in the front are determined as summary sentences in turn, and the total number of words of all summary sentences cannot exceed the specified number of words.

[0114] S24: Generate summary information of the target article according to the summary sentence.

[0115] In the embodiment of the present invention, the summary sentences are spliced ​​according to their positions in the target article to generate summary information of the target article.

[0116] Figure 3 It is a functional module diagram of an embodiment of an information generating device disclosed in the present invention.

[0117] See also Figure 3 The information generating device 20 may be operated in an electronic device. The information generating device 20 may include a plurality of functional modules composed of program code segments. The program code of each program segment in the information generating device 20 may be stored in a memory and executed by at least one processor to execute Figure 1 and / or Figure 2 Some or all of the steps in the described information generation method.

[0118] In this embodiment, the information generating device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an acquisition module 201, an extraction module 202, a determination module 203, and a generation module 204. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.

[0119] The acquisition module 201 is used to acquire the target article.

[0120] The target article may be an official document in a government affairs scenario.

[0121] The extraction module 202 is used to determine that the target article has a hierarchical structure, and extract the hierarchical title and key information of the target article.

[0122] The hierarchical structure may refer to the target article having multiple titles.

[0123] In the embodiments of the present invention, regular matching can be used to extract the hierarchical headings and key information of the target article. Sentences of the first-level headings starting with Chinese numerals can be extracted, such as "I. ***" or "I ***", etc. Then, sentences of the second-level headings marked with brackets can be extracted, such as "(I). ***" or "(I) ***", etc. Finally, sentences of the third-level headings starting with Arabic numerals, such as "1. ***", "1. ***", or sentences containing words such as "firstly" or "secondly" in the text are extracted to obtain the hierarchical headings. At the same time, regular matching can be used to extract sentences that the official document focuses on and contains key information, that is, the key information, such as bold sentences, the last sentence in the article containing an amount, the last sentence proposing a suggestion, and a sentence containing a time requirement, such as "before ** day / month", etc. Among them, the regular matching may refer to using a regular expression (Regular Expression, RE) to match a string containing a certain substring, and content that meets the preset matching rules can be filtered out.

[0124] A determination module 203 is configured to determine a target heading from the hierarchical headings and determine target information from the key information according to a preset weight and a first preset word count threshold.

[0125] In the embodiments of the present invention, values representing the importance level, that is, weights, can be set in advance for different types of headings in the target article. Both the hierarchical headings and the key information can be regarded as sentences, and different hierarchical headings and the key information are set with different weights. Among them, the weight of a hierarchical heading with a higher level is greater than that of a hierarchical heading with a lower level. For example, the weight of a hierarchical heading containing Chinese numerals "one", "two", etc. is 0.5, the weight of a hierarchical heading containing Arabic numerals "1", "2", etc. is 0.3, and the weight of a sentence of the key information is 0.2. Within the first preset word count threshold, the hierarchical headings are sequentially selected as the target headings and the key information is selected as the target information in descending order of weight. For example: the hierarchical headings are "I. The role of economic development" and "II. How to develop the economy", and the key information is "Economic development is the center" and "Attracting foreign investment is the key point". The weights of the hierarchical headings are both 0.5, and the weights of the sentences of the key information are both 0.2. If the first preset word count threshold is 30, then "I. The role of economic development" and "II. How to develop the economy" are obtained as the target headings in descending order of weight, and "Economic development is the center" is obtained as the target information. The current word count is 24. If "Attracting foreign investment is the key point" is continued to be obtained, it will exceed the first preset word count threshold. Finally, the obtained target headings are "I. The role of economic development" and "II. How to develop the economy", and the finally obtained target information is "Economic development is the center".

[0126] The determining module 203 is further configured to determine a content-empty title from the target title.

[0127] The empty content title may refer to a target title with less content or lacking words such as execution actions.

[0128] The determining module 203 is further configured to determine the content title to be supplemented from the content hole titles.

[0129] The title of the content to be supplemented may refer to a title that needs to have a sentence added after it as a supplement.

[0130] The determining module 203 is further configured to determine supplementary information according to the title of the content to be supplemented.

[0131] The supplementary information may be a sentence added after the title of the content to be supplemented as a content description.

[0132] The generating module 204 is used to generate summary information of the target article according to the target title, the target information and the supplementary information.

[0133] In the embodiment of the present invention, the target title, the target information and the supplementary information may be concatenated according to the order of their respective positions in the target article to generate summary information of the target article.

[0134] As an optional implementation manner, the determination module 203 determines the empty content title from the target title in the following specific manner:

[0135] For each of the target titles, determining whether the number of words in the target title is less than a second preset word count threshold;

[0136] If the word count of the target title is less than a second preset word count threshold, it is determined that the target title is a content-empty title.

[0137] In this optional implementation, the content-empty title may be determined from the target title based on the number of words in the title, for example, a target title with less than 6 words may be determined as the content-empty title.

[0138] As an optional implementation manner, the information generating device 20 further includes:

[0139] A word segmentation module, used for the determination module 203 to determine whether the number of words in each target title is less than a second preset word count threshold for each target title, and if the number of words in the target title is greater than or equal to the second preset word count threshold, to segment the target title to obtain a plurality of target words;

[0140] A judgment module, used to judge whether the parts of speech of the plurality of target words are all nouns;

[0141] The determination module 203 is further configured to determine that the target title is a content-empty title if the parts of speech of the multiple target words are all nouns.

[0142] In this optional implementation, the target title can be segmented to obtain multiple target words. For example, by segmenting "1. The role of economic development", the target words that can be obtained are "1", "economy", "development", "of", and "role".

[0143] As an optional implementation manner, the determination module 203 determines the title of the content to be supplemented from the content hole title in the following specific manner:

[0144] According to the position of the target title in the target article and the position of the target information in the target article, the target title and the target information are sorted to obtain a target queue;

[0145] For each of the content hole titles, determining whether the queue element at the next position adjacent to the content hole title in the target queue is a first title of the same level, wherein the first title of the same level is a title having the same weight as the content hole title, and the preset weight is a numerical value indicating the importance pre-set for different types of titles;

[0146] If the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, the content hole title is determined to be a title of content to be supplemented.

[0147] In this optional implementation, if the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, it is determined that there is a lack of substantial content behind the target title, and it is necessary to add sentences for supplementary explanation; if the queue element at the next position adjacent to the target title in the target queue is not the first title of the same level, it is determined that there is a relevant sentence explanation behind the target title, and it is not necessary to add additional sentences for supplementary explanation.

[0148] As an optional implementation manner, the determination module 203 determines the supplementary information according to the title of the content to be supplemented in the following manner:

[0149] Determine a second title of the same level corresponding to the title of the content to be supplemented from the target title, wherein the second title of the same level is the first title that has the same weight as the title of the content to be supplemented and is located after the position of the title of the content to be supplemented in the target article;

[0150] Determine the sentence between the title of the content to be supplemented and the second title of the same level in the target article as the sentence to be selected;

[0151] Determine a preset sentence selection strategy according to the article type of the target article, wherein the sentence selection strategy is a text ranking algorithm strategy based on the full text or a text ranking algorithm strategy or a similarity algorithm strategy based on the sentences to be selected;

[0152] Determining a target sentence from the sentences to be selected according to the sentence selection strategy;

[0153] The target sentence is determined as the supplementary information.

[0154] In this optional implementation, multiple experimental attempts can be conducted to observe and compare the effects of selecting different sentence selection strategies for the same article type in a specific scenario to extract sentences, and ultimately determine the sentence selection strategy with the best effect for a certain article type.

[0155] Optionally, the full-text-based text ranking algorithm strategy refers to taking the full text of the target article as the analysis object, calculating the scores of all sentences in the full text of the target article using a text ranking algorithm, and then determining the sentence with the highest score from the sentences to be selected as the target sentence.

[0156] Optionally, the text ranking algorithm strategy of the sentences to be selected refers to using a text ranking algorithm to calculate the score of each sentence to be selected among all the sentences to be selected, and then determining the sentence to be selected with the highest score as the target sentence.

[0157] As an optional implementation, the sentence selection strategy is a similarity algorithm, and the determination module 203 determines the target sentence from the sentences to be selected according to the sentence selection strategy in the following manner:

[0158] Segmenting the title of the content to be supplemented to obtain a first word, and segmenting the sentence to be selected to obtain a second word;

[0159] Generate a first word vector according to the first word, and generate a second word vector according to the second word;

[0160] Determine, based on the first word vector, a title vector corresponding to the title of the content to be supplemented, and determine, based on the second word vector, a sentence vector corresponding to the sentence to be selected;

[0161] Determine the similarity between each of the sentence vectors and the title vector according to the similarity algorithm strategy;

[0162] The sentence to be selected corresponding to the sentence vector having the greatest similarity to the title vector is determined as the target sentence.

[0163] In this optional implementation, the word vectors can be obtained using an open source Chinese word vector matrix or a word vector model, and then the word vectors of the words in each sentence are averaged to obtain the title vector and the sentence vector. The cosine distance between each sentence vector and the title vector can be calculated as the similarity.

[0164] As an optional implementation manner, the information generating device 20 further includes:

[0165] A scoring module, which is used for, after the acquisition module 201 acquires the target article, determining that the target article does not have a hierarchical structure, scoring all sentences of the target article by a text ranking algorithm to obtain a first score, and scoring all sentences of the target article by a maximum boundary correlation algorithm to obtain a second score;

[0166] The determination module 203 is further configured to determine a summary sentence from the target article according to the first score and the second score;

[0167] The generating module 204 is further configured to generate summary information of the target article according to the summary sentence.

[0168] Among them, the text ranking algorithm is a graph-based sorting algorithm for text, based on Google's PageRank algorithm. It divides the text into several components (such as words and sentences) and uses a voting mechanism to sort the important components in the text to achieve keyword extraction and abstract generation.

[0169] The Maximum Marginal Relevance (MMR) algorithm is an algorithm for calculating the similarity or importance of a sentence in the full text.

[0170] In this optional implementation, it is determined that the target article does not have a hierarchical structure, all sentences of the target article are scored using a text ranking algorithm to obtain a first score, and all sentences of the target article are scored using a maximum boundary correlation algorithm to obtain a second score. A summary sentence is determined from the target article based on the first score and the second score, and summary information of the target article is generated based on the summary sentence. After calculating the score of each sentence, the sentences can be sorted according to the score to obtain the ranking of each sentence in the entire article. For example, if the first sentence is ranked 5th using the text ranking algorithm and ranked 3rd using the maximum boundary correlation algorithm, the final ranking of the sentence is the average of the two rankings, i.e., 4th. Within a preset word count range, the sentences can be sequentially organized into the summary information of the target article according to the sentence ranking from high to low or according to the average score of the first score and the second score of the sentence from high to low.

[0171] exist Figure 3 In the described information generating device 20, it is possible to extract titles and key information of articles with a hierarchical structure, determine content-gap titles from the extracted titles, and then determine content titles to be supplemented from the content-gap titles, and then determine supplementary information based on the content titles to be supplemented, so that the finally generated summary information is more comprehensive. The present invention can generate comprehensive summary information.

[0172] like Figure 4 As shown, Figure 4 The electronic device 3 includes a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.

[0173] Those skilled in the art will understand that Figure 4 The schematic diagram shown is merely an example of the electronic device 3 and does not constitute a limitation on the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 3 may also include input and output devices, network access devices, etc.

[0174] The electronic device 3 also includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touch pad or voice control device, such as a personal computer, tablet computer, smart phone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc. The network where the electronic device 3 is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.

[0175] The at least one processor 32 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, transistor logic devices, discrete hardware components, etc. The processor 32 may be a microprocessor or any conventional processor, etc. The processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect various parts of the entire electronic device 3.

[0176] The memory 31 can be used to store the computer program 33 and / or modules / units. The processor 32 implements various functions of the electronic device 3 by running or executing the computer program and / or modules / units stored in the memory 31 and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 3, etc. In addition, the memory 31 can include volatile and non-volatile memories, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, etc.

[0177] Combination Figure 1, the memory 31 in the electronic device 3 stores a plurality of instructions to implement an information generation method, and the processor 32 can execute the plurality of instructions to implement:

[0178] Get the target article;

[0179] Determining that the target article has a hierarchical structure, and extracting hierarchical titles and key information of the target article;

[0180] Determine a target title from the hierarchical titles and determine target information from the key information according to a preset weight and a first preset word count threshold;

[0181] Determining content-empty titles from the target titles;

[0182] Determine the content title to be supplemented from the empty content titles;

[0183] Determine supplementary information according to the title of the content to be supplemented;

[0184] The summary information of the target article is generated according to the target title, the target information and the supplementary information.

[0185] Specifically, the specific implementation method of the processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0186] exist Figure 4 In the described electronic device 3, it is possible to extract titles and key information of articles with a hierarchical structure, determine content-gap titles from the extracted titles, and then determine content titles to be supplemented from the content-gap titles, and then determine supplementary information based on the content titles to be supplemented, so that the finally generated summary information is more comprehensive. The present invention can generate comprehensive summary information.

[0187] If the module / unit integrated in the electronic device 3 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 invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), etc.

[0188] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0189] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0190] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0191] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any accompanying figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim may also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, and do not indicate any particular order.

[0192] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for generating information, It is characterized in that The information generation method comprises: Get the target article; Determining that the target article has a hierarchical structure, and extracting hierarchical titles and key information of the target article; Determine a target title from the hierarchical titles and determine target information from the key information according to a preset weight and a first preset word count threshold; Determining content-empty titles from the target titles; Determining the content title to be supplemented from the content hole title, including sorting the target title and the target information according to the position of the target title in the target article and the position of the target information in the target article to obtain a target queue; for each of the content hole titles, judging whether the queue element at the next position adjacent to the content hole title in the target queue is a first title of the same level, wherein the first title of the same level is a title having the same preset weight as the content hole title, and the preset weight is a numerical value indicating the importance pre-set for different types of titles; if the queue element at the next position adjacent to the target title in the target queue is the first title of the same level, determining the content hole title as the content title to be supplemented; Determine the supplementary information according to the title of the content to be supplemented, including determining a second title of the same level corresponding to the title of the content to be supplemented from the target title, wherein the second title of the same level is the first target title that has the same weight as the title of the content to be supplemented and follows the position of the title of the content to be supplemented in the target article; determine the sentence between the title of the content to be supplemented and the second title of the same level in the target article as the sentence to be selected; determine a preset sentence selection strategy according to the article type of the target article; determine a target sentence from the sentences to be selected according to the sentence selection strategy; and determine the target sentence as the supplementary information; The summary information of the target article is generated according to the target title, the target information and the supplementary information.

2. The information generating method according to claim 1, It is characterized in that Determining a content-empty title from the target title includes: For each of the target titles, determining whether the number of words in the target title is less than a second preset word count threshold; If the word count of the target title is less than a second preset word count threshold, it is determined that the target title is a content-empty title.

3. The information generating method according to claim 2, It is characterized in that After determining for each target title whether the number of words in the target title is less than a second preset word count threshold, the information generation method further includes: If the number of words in the target title is greater than or equal to a second preset word count threshold, segmenting the target title to obtain a plurality of target words; Determining whether the parts of speech of the plurality of target words are all nouns; If the parts of speech of the plurality of target words are all nouns, it is determined that the target title is a title with empty content.

4. The information generating method according to claim 1, It is characterized in that The sentence selection strategy is a text ranking algorithm strategy based on the full text or a text ranking algorithm strategy or a similarity algorithm strategy based on the sentence to be selected.

5. The information generating method according to claim 4, It is characterized in that The sentence selection strategy is a similarity algorithm, and determining a target sentence from the sentences to be selected according to the sentence selection strategy includes: Segmenting the title of the content to be supplemented to obtain a first word, and segmenting the sentence to be selected to obtain a second word; Generate a first word vector according to the first word, and generate a second word vector according to the second word; Determine, based on the first word vector, a title vector corresponding to the title of the content to be supplemented, and determine, based on the second word vector, a sentence vector corresponding to the sentence to be selected; Determine the similarity between each of the sentence vectors and the title vector according to the similarity algorithm strategy; The sentence to be selected corresponding to the sentence vector having the greatest similarity to the title vector is determined as the target sentence.

6. The information generating method according to any one of claims 1 to 3, It is characterized in that After obtaining the target article, the information generation method further includes: Determining that the target article does not have a hierarchical structure, scoring all sentences of the target article by a text ranking algorithm to obtain a first score, and scoring all sentences of the target article by a maximum boundary correlation algorithm to obtain a second score; Determining a summary sentence from the target article according to the first score and the second score; Generate summary information of the target article according to the summary sentence.

7. An information generating device, used to implement the information generating method according to any one of claims 1 to 6, It is characterized in that The information generating device comprises: Acquisition module, used to acquire target articles; An extraction module, used to determine that the target article has a hierarchical structure, and extract the hierarchical title and key information of the target article; A determination module, configured to determine a target title from the hierarchical titles and determine target information from the key information according to a preset weight and a first preset word count threshold; The determination module is further used to determine the content-empty titles from the target titles; The determination module is further used to determine the content title to be supplemented from the content hole title; The determination module is further used to determine the supplementary information according to the title of the content to be supplemented; A generating module is used to generate summary information of the target article according to the target title, the target information and the supplementary information.

8. An electronic device, It is characterized in that The electronic device comprises a processor and a memory, wherein the processor is configured to execute a computer program stored in the memory to implement the information generating method according to any one of claims 1 to 6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the information generating method according to any one of claims 1 to 6 is implemented.