A keyword extraction method and device

By calculating keyword frequency information of text units and text sets, combined with topic-related information and word length, the problem of inaccurate keyword extraction in the existing technology is solved and the efficiency of information acquisition is improved.

CN110321561BActive Publication Date: 2024-09-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910570592.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-27
Publication Date
2024-09-27
Estimated Expiration
2039-06-27

AI Technical Summary

Technical Problem

Existing methods for extracting keywords from book texts are not accurate enough, making it difficult for users to effectively obtain information.

Method used

By obtaining multiple text units in the text set, the keyword frequency information of each text unit and text set is calculated, combined with topic-related information and word length, and multiple measurement parameters are integrated to extract keywords.

Benefits of technology

The accuracy of keyword extraction is improved, allowing users to obtain the topic information of the text more effectively and improving the efficiency of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110321561B
    Figure CN110321561B
Patent Text Reader

Abstract

The embodiment of the present application discloses a keyword extraction method and device, the method comprising: obtaining a text set, extracting keywords from the text content of each text unit, obtaining candidate keywords corresponding to each text unit, obtaining unit frequency information of the candidate keywords for the text unit according to the text unit measurement parameters of the candidate keywords' importance to the text unit, selecting unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit according to the unit frequency information, obtaining text frequency information of the unit keywords for the text set according to the text set measurement parameters of the unit keywords' importance to the text set, and extracting keywords from multiple unit keywords in the text set according to the text frequency information. This scheme can improve the accuracy of keyword extraction in a text set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a keyword extraction method and device. Background Art

[0002] Keywords are words that can reflect the theme or main content of a text. For example, when a user searches for a book text, he or she can understand the theme of the book text or the main content of the book text through the keywords corresponding to the book text, and then determine whether the book text is the book text the user needs. Therefore, for text, accurate keyword extraction can improve the efficiency of users in obtaining targeted information. However, the current method for extracting keywords from book texts is not accurate enough. Summary of the invention

[0003] The embodiments of the present application provide a keyword extraction method and device, which can extract keywords in a text set based on unit frequency information of the keywords for text units and text frequency information of the keywords for the text set, thereby improving the accuracy of keyword extraction in the text set.

[0004] The present application embodiment provides a keyword extraction method, including:

[0005] Acquire a text set, wherein the text set includes a plurality of text units in a certain order relationship;

[0006] Perform keyword extraction on the text content of each text unit to obtain candidate keywords corresponding to each text unit;

[0007] Acquiring unit frequency information of the candidate keyword for the text unit according to a text unit measurement parameter of the importance of the candidate keyword to the text unit;

[0008] Selecting a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information;

[0009] Obtaining text frequency information of the unit keyword for the text set according to a text set measurement parameter of the importance of the unit keyword to the text set;

[0010] Keywords are extracted from a plurality of unit keywords in the text set according to the text frequency information.

[0011] Accordingly, the embodiment of the present application further provides a keyword extraction device, including:

[0012] A text set acquisition module, used to acquire a text set, wherein the text set includes a plurality of text units in a certain order relationship;

[0013] A first extraction module is used to extract keywords from the text content of each text unit to obtain candidate keywords corresponding to each text unit;

[0014] A first information acquisition module, configured to acquire unit frequency information of the candidate keyword for the text unit according to a text unit measurement parameter of the importance of the candidate keyword to the text unit;

[0015] A selection module, configured to select a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information;

[0016] A second information acquisition module is used to acquire text frequency information of the unit keyword for the text set according to a text set measurement parameter of the importance of the unit keyword to the text set;

[0017] The second extraction module is used to extract keywords from the multiple unit keywords in the text set according to the text frequency information.

[0018] Optionally, in some embodiments, the first information acquisition module may include a unit topic probability acquisition submodule, a related information acquisition submodule, a unit frequency sub-information acquisition submodule, a word length information acquisition submodule and a unit frequency information acquisition submodule, as follows:

[0019] The unit topic probability acquisition submodule can be used to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic;

[0020] The related information acquisition submodule may be used to acquire the topic related information between the candidate keyword and the text unit according to the keyword topic probability corresponding to the candidate keyword and the unit topic probability corresponding to the text unit where the candidate keyword is located;

[0021] The unit frequency sub-information acquisition submodule may be used to acquire the unit frequency sub-information of the candidate keyword for the text unit according to the frequency of occurrence of the candidate keyword in the corresponding text unit;

[0022] The word length information acquisition submodule may be used to acquire the word length information corresponding to the candidate keyword based on the word length of the candidate keyword;

[0023] The unit frequency information acquisition submodule may be used to fuse topic-related information, unit frequency sub-information, and word length information to obtain the unit frequency information of the candidate keyword for the text unit.

[0024] The unit frequency sub-information acquisition submodule can be used to: obtain the unit word proportion sub-information of the frequency of occurrence of the candidate keyword in the text unit to the total number of candidate keywords in the text unit, select a candidate target text unit including the candidate keyword from multiple text units in the text set, obtain the text unit proportion sub-information of the number of candidate target text units to the total number of text units in the text set, and obtain the unit frequency sub-information of the candidate keyword for the text unit based on the unit word proportion sub-information and the text unit proportion sub-information.

[0025] The unit topic probability acquisition submodule can be used to: determine the initial keyword topic probability of each candidate keyword corresponding to the preset topic, and the initial unit topic probability of each text unit corresponding to the preset topic; based on the initial keyword topic probability and the initial unit topic probability, sample the topic probability distribution through a preset sampling algorithm to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic; when the keyword topic probability and the unit topic probability meet the probability adjustment condition, adjust the initial keyword topic probability to the keyword topic probability, and adjust the initial unit topic probability to the unit topic probability; return to execute the step of sampling the topic probability distribution based on the initial keyword topic probability and the initial unit topic probability through a preset sampling algorithm to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic; when the keyword topic probability and the unit topic probability do not meet the probability adjustment condition, obtain the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic.

[0026] Optionally, in some embodiments, the second information acquisition module may include a first text frequency sub-information acquisition sub-module, a second text frequency sub-information acquisition sub-module and a text frequency information acquisition sub-module, as follows:

[0027] The first text frequency sub-information acquisition submodule may be used to acquire the first text frequency sub-information corresponding to the unit keyword according to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set;

[0028] The second text frequency sub-information acquisition submodule may be used to acquire the second text frequency sub-information corresponding to the unit keyword according to the unit frequency information corresponding to the unit keyword in the text unit of the text set;

[0029] The text frequency information acquisition submodule may be used to merge the first text frequency sub-information and the second text frequency sub-information to obtain the text frequency information of the unit keyword for the text set.

[0030] The first text frequency sub-information acquisition submodule can be used to: fuse the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set to obtain the fused frequency sub-information of the unit keyword in the text set; based on the unit frequency information of each unit keyword in the text set, obtain the cumulative frequency sub-information of all unit keywords in the text set; and based on the ratio of the fused frequency sub-information to the cumulative frequency sub-information, obtain the first text frequency sub-information corresponding to the unit keyword.

[0031] The second text frequency sub-information acquisition submodule can be used to: obtain the maximum frequency keyword with the largest unit frequency information value in each text unit of the text set, accumulate the unit frequency information corresponding to all the maximum frequency keywords in the text set to obtain comprehensive cumulative frequency sub-information, select a target text unit including the unit keyword from multiple text units in the text set, obtain the unit frequency information with the largest corresponding value of the unit keyword in each target text unit, accumulate the unit frequency information with the largest corresponding value of the unit keyword in all target text units to obtain designated cumulative frequency sub-information, and obtain the second text frequency sub-information corresponding to the unit keyword based on the comprehensive cumulative frequency sub-information and the designated cumulative frequency sub-information.

[0032] Optionally, in some embodiments, the first extraction module may include an original keyword acquisition submodule and a candidate keyword acquisition submodule, as follows:

[0033] The original keyword acquisition submodule can be used to perform text segmentation processing on the text content of each text unit, and divide the text content of the text unit into multiple original keywords;

[0034] The candidate keyword acquisition submodule can be used to merge the original keywords according to a preset word merging rule to obtain the candidate keywords corresponding to each text unit.

[0035] The candidate keyword acquisition submodule can be used to: merge the original keywords according to a preset word merging rule to obtain the original candidate keywords corresponding to each text unit; when the original candidate keywords meet the preset splitting conditions, split the original candidate keywords into at least one candidate keyword; when the original candidate keywords do not meet the preset splitting conditions, determine the original candidate keywords as candidate keywords.

[0036] Optionally, in some embodiments, the keyword extraction device may further include a marking module and a keyword extraction module, as follows:

[0037] The marking module may be used to mark the original keywords in the text content according to the word features of each original keyword;

[0038] The keyword extraction module can be used to extract candidate keywords from the original keywords in the text content according to the annotations of the original keywords.

[0039] In addition, an embodiment of the present application further provides a storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in any one of the keyword extraction methods provided in the embodiment of the present application.

[0040] The embodiment of the present application can obtain a text set, which includes multiple text units in a certain ordering relationship, perform keyword extraction on the text content of each text unit, obtain candidate keywords corresponding to each text unit, obtain unit frequency information of the candidate keywords for the text unit according to the text unit measurement parameters of the candidate keywords' importance to the text unit, select the unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit according to the unit frequency information, obtain the text frequency information of the unit keywords for the text set according to the text set measurement parameters of the unit keywords' importance to the text set, and extract keywords from multiple unit keywords of the text set according to the text frequency information. This solution can extract keywords in the text set according to the unit frequency information of the keywords for the text units and the text frequency information of the keywords for the text set, thereby improving the accuracy of keyword extraction in the text set. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 is a scenario diagram of a keyword extraction system provided in an embodiment of the present application;

[0043] Figure 2 is a first flow chart of the keyword extraction method provided in the embodiment of the present application;

[0044] Figure 3 is a second flow chart of the keyword extraction method provided in an embodiment of the present application;

[0045] Figure 4 is a third flow chart of the keyword extraction method provided in the embodiment of the present application;

[0046] Figure 5 This is a schematic diagram of the main interface of the text reading application provided in the embodiment of the present application;

[0047] Figure 6 This is a first schematic diagram of a book recommendation by a text reading application provided in an embodiment of the present application;

[0048] Figure 7 is a second schematic diagram of a book recommendation by a text reading application provided in an embodiment of the present application;

[0049] Figure 8 is a schematic diagram of the structure of a keyword extraction device provided in an embodiment of the present application;

[0050] Fig. 9 It is a structural diagram of the network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] Please refer to the drawings, where the same component symbols represent the same components, and the principles of the present application are illustrated by implementing them in an appropriate computing environment. The following description is based on the illustrated specific embodiments of the present application, which should not be considered as limiting other specific embodiments of the present application that are not described in detail herein.

[0052] In the following description, the specific embodiments of the present application will be described with reference to the steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be mentioned several times as being performed by a computer, and the computer execution referred to herein includes the operation of a computer processing unit by an electronic signal representing data in a structured form. This operation converts the data or maintains it at a location in the memory system of the computer, which can be reconfigured or otherwise change the operation of the computer in a manner familiar to testers in the field. The data structure maintained by the data is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation, and testers in the field will understand that the various steps and operations described below can also be implemented in hardware.

[0053] The term "module" used herein can be regarded as a software object executed on the computing system. The different components, modules, engines and services described herein can be regarded as implementation objects on the computing system. The apparatus and method described herein can be implemented in software, and of course can also be implemented in hardware, all within the scope of protection of this application.

[0054] The terms "first", "second", and "third" in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but some embodiments also include steps or modules that are not listed, or some embodiments also include other steps or modules inherent to these processes, methods, products, or devices.

[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0056] The embodiment of the present application provides a keyword extraction method, and the execution subject of the keyword extraction method can be the keyword extraction device provided in the embodiment of the present application, or a network device integrated with the keyword extraction device, wherein the keyword extraction device can be implemented in hardware or software. Among them, the network device can be a smart phone, a tablet computer, a handheld computer, a laptop computer, or a desktop computer. The network device includes but is not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud composed of multiple servers.

[0057] See also Figure 1 , Figure 1 A schematic diagram of an application scenario of the keyword extraction method provided in an embodiment of the present application, taking the keyword extraction device integrated in a network device as an example, the network device can obtain a text set, the text set including multiple text units in a certain sorting relationship, perform keyword extraction on the text content of each text unit, obtain candidate keywords corresponding to each text unit, obtain unit frequency information of the candidate keywords for the text unit based on text unit measurement parameters of the candidate keywords' importance to the text unit, select unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit based on the unit frequency information, obtain text frequency information of the unit keywords for the text set based on the text set measurement parameters of the unit keywords' importance to the text set, and extract keywords from multiple unit keywords of the text set based on the text frequency information.

[0058] Specifically, for example, the text set may be a book text, which may include multiple chapters. After extracting keywords from the book text, the user can learn about the content, theme, and other information of the book text based on the extracted keywords to determine whether the book text is a book that the user wants to read. The text reading application can also search for books with similar subject content to the book text based on the extracted keywords, and then recommend them to the user based on the user's reading history, thereby recommending books based on the user's preferences.

[0059] See also Figure 2 , Figure 2 The following is a flow chart of the keyword extraction method provided in the embodiment of the present application. The specific flow of the keyword extraction method provided in the embodiment of the present application can be as follows:

[0060] 201. Obtain a text set.

[0061] Among them, the text can be a combination of several sentences with complete and systematic meanings. A text can be a sentence, a paragraph or a chapter, etc.

[0062] Among them, the text set can be a collection composed of several texts. For example, the text set can include multiple text units in a certain ordering relationship. For example, the text set can be a book, and the book can include multiple chapters arranged in sequence, such as the book can include the first chapter, the second chapter, etc.

[0063] Among them, the text unit can be a component of a text collection. For example, when the text collection is a book, the text units can be multiple chapters in the book. Each chapter can be used as a text unit. The multiple text units in the text collection can be arranged in a certain order, such as in the order of the first chapter and the second chapter.

[0064] In practical applications, a text set can be obtained, which may include multiple text units in a certain ordering relationship. For example, a book can be obtained as a text set, which may include multiple chapters. The text set can be represented by Book, and the text unit can be represented by Chap. The relationship between the text set and the text unit can be represented as Book = {Chap1, Chap2, ..., Chap n}, where Chap n It can represent the Nth chapter in a book.

[0065] In one embodiment, there are multiple methods for acquiring the text set. For example, the text set can be acquired from a local text database. For example, when a user opens a text reading application, the local text database can be called through the text reading application to acquire the required text set from the local text database. For another example, the text set can be acquired through an external storage unit, for example, the text set can be acquired through a network side device, and so on.

[0066] 202. Perform keyword extraction on the text content of each text unit to obtain candidate keywords corresponding to each text unit.

[0067] In practical applications, keyword extraction can be performed on the text content of each text unit to obtain candidate keywords corresponding to each text unit. For example, keyword extraction can be performed on each chapter of a book, such as using words that can express the content of the chapter as candidate keywords.

[0068] In one embodiment, since there are no word boundaries in Chinese sentences, when language processing is performed on Chinese, the text may be first segmented, and then the words in the text units may be merged according to a preset word merging rule, so as to obtain accurate candidate keywords. Specifically, the step of "extracting keywords from the text content of each text unit to obtain candidate keywords corresponding to each text unit" may include:

[0069] Performing text segmentation processing on the text content of each text unit, dividing the text content of the text unit into a plurality of original keywords;

[0070] The original keywords are merged according to a preset word merging rule to obtain candidate keywords corresponding to each text unit.

[0071] In practical applications, the text content of each text unit can be segmented to divide the text content of the text unit into multiple original keywords. For example, the text content in each chapter can be segmented by a word segmentation algorithm to divide each chapter of the book into a combination of multiple original keywords. seg Represents the book text after word segmentation, through Chap n seg It represents the Nth chapter in the book after word segmentation. The relationship between the book text and chapters after word segmentation can be expressed as Book seg = {Chap1 seg ,Chap2 seg ,...,Chap n seg}.

[0072] For example, a certain chapter in the book may be "Sometimes it is Jiaxuan, but my favorite word is clear, it should be Jiang Jie's "Yu Meiren·Listening to the Rain"". After word segmentation processing of this part of the chapter, this part of the chapter can be processed as "Sometimes:d time:v is:v Jiaxuan:n,:w but:c:r:r:r:d:v:d:v:u:d:u:u:d:u:w:w:r::r::r::v::r ...

[0073] In one embodiment, there may be multiple word segmentation algorithms, such as a word segmentation method based on string matching, a word segmentation method based on understanding, a word segmentation method based on statistics, and the like. Among them, the word segmentation method based on string matching is a method of matching the Chinese character string to be processed with the entries in the machine dictionary according to a certain strategy, and performing word segmentation processing. Among them, the word segmentation method based on understanding performs syntactic and semantic analysis while performing word segmentation processing, and uses syntactic information and semantic information to simulate people's understanding of sentences, thereby achieving the effect of word segmentation processing. Among them, the word segmentation method based on statistics can count the combination frequency of adjacent co-occurring characters in the corpus, and obtain their mutual occurrence information. The mutual occurrence information can characterize the closeness of the combination relationship between Chinese characters. When the closeness reaches a certain threshold, it can be considered that this character group constitutes a word, thereby achieving the effect of word segmentation processing.

[0074] The part of speech of each original keyword can also be marked by word segmentation. For example, the part of speech corresponding to the original keyword can be marked by a character after each original keyword. Among them, d can represent an adverb, v can represent a verb, n can represent a noun, w can represent a punctuation mark, c can represent a conjunction, r can represent a pronoun, a can represent an adjective, u can represent an auxiliary word, and so on. In this way, not only can continuous chapters be divided into multiple original keywords for keyword extraction, but also the part of speech of each original keyword can be marked to facilitate the merging of original keywords according to the part of speech, thereby improving the accuracy of keyword extraction.

[0075] In practical applications, after performing text tokenization on the text content of each text unit and dividing the text content of the text unit into multiple original keywords, the original keywords can be merged according to a preset word merging rule to obtain candidate keywords corresponding to each text unit. For example, after dividing each chapter into multiple scattered original keywords, the part-of-speech of each original keyword can be obtained, and at least one original keyword can be merged into a candidate keyword according to the preset word merging rule. For example, three original keywords "白净:a", "脸:n", and "儿:Ng" can be obtained. According to the preset word merging rule, the adjectives, nouns, and nominal morphemes arranged in sequence can be merged. Therefore, the three original keywords can be merged into a candidate keyword "白净脸儿".

[0076] In one embodiment, there can be multiple preset word merging rules:

[0077] The adjectives, nouns, and nominal morphemes arranged in sequence can be merged. For example, "白净:a", "脸:n", and "儿:Ng" can be merged into "白净脸儿";

[0078] The adjectives, auxiliary words, and nominal morphemes arranged in sequence can be merged. For example, "明智:a", "之:u", and "举:Ng" can be merged into "明智之举";

[0079] The nominal verbs and nouns arranged in sequence can be merged. For example, "投资:vn" and "理念:n" can be merged into "投资理念";

[0080] The nouns, punctuation marks, and nouns arranged in sequence can be merged. For example, "纳西姆:n", "·:w", and "尼古拉斯:n" can be merged into "纳西姆·尼古拉斯";

[0081] The adjectives, nouns, and nouns arranged in sequence can be merged. For example, "高:a", "风险:n", and "贷款:n" can be merged into "高风险贷款";

[0082] The nouns, auxiliary words, and nouns arranged in sequence can be merged. For example, "国债:n", "的:u", and "利率:n" can be merged into "国债的利率";

[0083] The nouns and nominal verbs arranged in sequence can be merged. For example, "动量:n" and "投资:vn" can be merged into "动量投资";

[0084] The adjectives, nouns, and nominal verbs arranged in sequence can be merged. For example, "合理:a", "价格:n", and "增长:vn" can be merged into "合理价格增长";

[0085] Other proper names and nouns in sequence can be merged. For example, "Citigroup: nz" and "Bank: n" can be merged into "Citibank".

[0086] A nominal verb, a noun, and a noun in sequence can be merged. For example, "Predict: vn", "Key: n", and "Event: n" can be merged into "Predict key events".

[0087] A noun, a nominal verb, and a noun in sequence can be merged. For example, "Risk: n", "Adjust: vn", and "Concept: n" can be merged into "Risk-adjusted concept".

[0088] A noun and a following component in sequence can be merged. For example, "Fluctuation: n" and "Property: k" can be merged into "Volatility".

[0089] An adjective, an auxiliary word, and a noun in sequence can be merged. For example, "Excellent: a", "Of: u", and "Enemy: n" can be merged into "Excellent enemy".

[0090] A noun, an auxiliary word, a nominal verb, and a noun morpheme in sequence can be merged. For example, "Asset: n", "Of: u", "Related: vn", and "Property: Ng" can be merged into "Asset correlation".

[0091] A noun, an auxiliary word, a nominal verb, and a noun in sequence can be merged. For example, "Group: n", "Of: u", "Responsible: vn", and "Person: n" can be merged into "Person in charge of the group".

[0092] A noun and a verb morpheme in sequence can be merged. For example, "Ginger: n" and "Porcelain: Vg" can be merged into "Jiang Ci".

[0093] A numeral, a noun, and a noun morpheme in sequence can be merged. For example, "Five: m", "Star Dou: n", and "Emperor: Ng" can be merged into "Five-star Dou Emperor".

[0094] A numeral, an adjective, a noun morpheme, and a noun in sequence can be merged. For example, "Nine: m", "Mysterious: a", "Golden: Ng", and "Thunder Dragon: n" can be merged into "Nine Mysterious Golden Thunder Dragons", and so on.

[0095] In one embodiment, the preset word merging rule can also include merging multiple consecutive nominal original keywords into one candidate keyword. For example, two or three consecutive nouns can be merged into one candidate keyword.

[0096] In one embodiment, since in actual use, candidate keywords with too long word length are not suitable for the subsequent word topic acquisition step, it is necessary to split the original candidate keywords that are too long after merging again to make the length of the candidate keywords appropriate. Specifically, the step of "merging the original keywords according to the preset word merging rules to obtain the candidate keywords corresponding to each text unit" may include:

[0097] Merge the original keywords according to a preset word merging rule to obtain the original candidate keywords corresponding to each text unit;

[0098] When the original candidate keyword meets the preset splitting condition, splitting the original candidate keyword into at least one candidate keyword;

[0099] When the original candidate keyword does not meet the preset splitting condition, the original candidate keyword is determined as a candidate keyword.

[0100] In practical applications, the original keywords can be merged according to the preset word merging rules to obtain the original candidate keywords corresponding to each text unit. When the original candidate keywords meet the preset splitting conditions, the original candidate keywords are split into at least one candidate keyword. When the original candidate keywords do not meet the preset splitting conditions, the original candidate keywords are determined as candidate keywords. For example, multiple original keywords can be merged into original candidate keywords according to the preset word merging rules, and the word length of the original candidate keywords can be detected. When the word length of the original candidate keywords exceeds the preset word length threshold, it can be considered that the original candidate keywords meet the preset splitting conditions, and the original candidate keywords are split into at least one candidate keyword. The relationship between the original candidate keywords and the split candidate keywords can be expressed as word={word sub,0 ,word sub ,1,...}; When the word length of the original candidate keyword does not exceed the preset word length threshold, it can be considered that the original candidate keyword does not meet the preset splitting condition, and the original candidate keyword may not be split.

[0101] In one embodiment, it is also possible to determine whether the original candidate keywords meet the preset splitting conditions based on the number of original keywords included in the original candidate keywords. For example, when the number of original keywords included in the original candidate keywords exceeds the preset number of keywords, it can be considered that the original candidate keywords meet the preset splitting conditions, and the original candidate keywords are split into at least one candidate keyword; when the number of original keywords included in the original candidate keywords does not exceed the preset number of keywords, it can be considered that the original candidate keywords do not meet the preset splitting conditions, and the original candidate keywords may not be split.

[0102] For example, when the original candidate keywords include 5 original keywords, it can be considered that the original candidate keywords meet the preset splitting conditions, and the original candidate keywords are split into two candidate keywords. The two split candidate keywords can include 2 original keywords and 3 original keywords respectively.

[0103] In one embodiment, candidate keywords with too low frequency of occurrence are not suitable for subsequent word topic acquisition. Therefore, after acquiring the candidate keywords, the candidate keywords with too low frequency of occurrence can be screened and deleted to retain more accurate candidate keywords.

[0104] In one embodiment, since named entities such as names of people, organization names, and place names in the text are also keywords of the text, but named entities focus on characterizing the identification features of the text, it is also possible to identify the named entities in the text and obtain keywords composed of the named entities, so that users can obtain more accurate keywords from multiple angles. Specifically, after the step of "performing text segmentation processing on the text content of each text unit and dividing the text content of the text unit into multiple original keywords", it can also include:

[0105] Marking the original keywords in the text content according to the word features of each original keyword;

[0106] According to the annotation of the original keywords, candidate keywords are extracted from the original keywords of the text content.

[0107] Among them, the named entities can be entities with specific meanings in the text to be recognized, for example, the named entities can include names of people, names of organizations, names of places, proper nouns, time, date, quantity phrases, etc.

[0108] In practical applications, the original keywords in the text content can be annotated according to the word features of each original keyword, and then candidate keywords can be extracted from the original keywords in the text content according to the annotated original keywords. For example, after the text unit is divided into multiple original keywords through text segmentation, each original keyword can be annotated according to the word features of each original keyword through named entity recognition, that is, each original keyword is given a label, and candidate keywords are extracted from the original keywords according to the labels of the original keywords. ner Represents the book text after named entity recognition, through Chap n ner It represents the Nth chapter after named entity recognition. At this time, the relationship between the book text and the chapter text can be expressed as Book ner = {Chap1 ner ,Chap2ner ,...,Chap n ner}.

[0109] For example, after named entity recognition, named entities such as "Jiaxuan / PER", "Jiang Jie / PER", "Jiang Kuoyun / PER", "Tianming / LOC", and "United States / LOC" can be identified and used as candidate keywords. Among them, "PER" and "LOC" can be labels of named entities, "PER" indicates that the named entity is a person's name, and "LOC" indicates that the named entity is a place name, etc.

[0110] In one embodiment, named entities can be recognized through a network model, for example, a network model using CRF (conditional random field algorithm) as a reference model of NER (Named Entity Recognition) can be used to recognize named entities. Named entities can also be recognized through a deep learning network model or an entity model such as HMM (Hidden Markov Model).

[0111] 203. Obtain unit frequency information of the candidate keyword with respect to the text unit according to a text unit measurement parameter of the candidate keyword's importance to the text unit.

[0112] The text unit measurement parameter may be a parameter for measuring the importance of the candidate keyword relative to the text unit. The importance of the candidate keyword relative to the text unit may be known based on the text unit measurement parameter, thereby determining whether the candidate keyword is an accurate keyword for the text unit. The text unit measurement parameter may include multiple categories, for example, the text unit measurement parameter may include topic-related information, unit frequency sub-information, word length information, etc.

[0113] The unit frequency information may be a text unit measurement parameter obtained according to the frequency of occurrence of the candidate keyword in the text unit, and the unit frequency information may be information representing the importance of the keyword relative to the text unit. The larger the value of the unit frequency information, the more important the keyword is to the text unit, that is, for the text unit, the keyword with a larger unit frequency information value is a more accurate keyword. The unit frequency information may be represented by a keyword weight.

[0114] In practical applications, the unit frequency information of the candidate keyword for the text unit can be obtained based on the text unit measurement parameters of the candidate keyword's importance to the text unit. For example, the unit frequency information of the candidate keyword for the text unit in the form of weights can be obtained by calculating multiple text unit measurement parameters of the candidate keyword's importance to the text unit.

[0115] In one embodiment, since the importance of a keyword to a text unit is determined by multiple factors, the unit frequency information of the candidate keyword for the text unit can be obtained by specifically calculating the topic-related information, unit frequency sub-information and word length information corresponding to the candidate keyword, and then performing the keyword extraction step, thereby improving the accuracy of keyword extraction. Specifically, the step of "obtaining the unit frequency information of the candidate keyword for the text unit according to the text unit measurement parameter of the importance of the candidate keyword to the text unit" may include:

[0116] The subject-related information, the unit frequency sub-information and the word length information are integrated to obtain the unit frequency information of the candidate keyword for the text unit.

[0117] Since the importance of a keyword to a text unit increases in direct proportion to the frequency of the keyword appearing in the text unit, and decreases in inverse proportion to the frequency of the keyword appearing in the text unit in the corpus, the text unit measurement parameter may include unit frequency sub-information. At the same time, the closer the keyword is to the text unit theme, the more important the keyword is to the text unit, so the text unit measurement parameter may include unit frequency sub-information theme-related information. In practical applications, the word length of a keyword will also affect the importance of the keyword, so the text unit measurement parameter may also include word length information.

[0118] In practical applications, the subject-related information, unit frequency sub-information and word length information can be integrated to obtain the unit frequency information of the candidate keyword for the text unit. For example, the subject-related information, unit frequency sub-information and word length information corresponding to the candidate keyword can be obtained, and the above information can be integrated to use the integrated information as the unit frequency information of the candidate keyword for the text unit.

[0119] In one embodiment, specifically, the step of “merging the topic-related information, the unit frequency sub-information and the word length information to obtain the unit frequency information of the candidate keyword for the text unit” may include:

[0120] Obtaining a keyword topic probability of each candidate keyword corresponding to a preset topic, and a unit topic probability of each text unit corresponding to a preset topic;

[0121] Acquire topic-related information between the candidate keyword and the text unit according to the keyword topic probability corresponding to the candidate keyword and the unit topic probability corresponding to the text unit where the candidate keyword is located;

[0122] According to the frequency of occurrence of the candidate keyword in the corresponding text unit, obtaining unit frequency sub-information of the candidate keyword for the text unit;

[0123] Based on the word length of the candidate keyword, obtaining word length information corresponding to the candidate keyword;

[0124] The subject-related information, the unit frequency sub-information and the word length information are integrated to obtain the unit frequency information of the candidate keyword for the text unit.

[0125] In practical applications, for example, the keyword topic probability Topic of each candidate keyword corresponding to the preset topic can be obtained through LDA (document topic generation model, Latent Dirichlet Allocation) wordj =[v j,1 ,v j,2 ,...,v j,k ], and the unit topic probability Topic of each text unit corresponding to the preset topic chapi =[v i,1 ,v i,2 ,...,v i,k ], and according to the formula r i,j =cosine(Topic chapi ,Topic wordj ) Get the topic-related information between the candidate keywords and the text unit chap,word Then, according to the frequency of the candidate keyword appearing in the corresponding text unit, the unit frequency sub-information w of the candidate keyword for the text unit is obtained. chap,word Then, according to the word length of the candidate keyword, the word length information weight corresponding to the candidate keyword is obtained. len(word) . And according to the formula weight word =r chap,word × chap,word ×weight len(word) , the topic related information, unit frequency sub-information and word length information are integrated to obtain the unit frequency information weight of the candidate keyword for the text unit word .

[0126] In one embodiment, since in actual applications, the length of a word also affects the importance of the keyword to the text unit, the word length information weight of candidate keywords with different word lengths can be obtained by the following rules: len(word) :

[0127] weight length ={1:0.7,2:1.0,3:1.2,4:1.5,5:1.2}

[0128] Among them, the word length information of the candidate keyword composed of one character can be 0.7; the word length information of the candidate keyword composed of two characters can be 1.0; the word length information of the candidate keyword composed of three characters can be 1.2; the word length information of the candidate keyword composed of four characters can be 1.5; the word length information of the candidate keyword composed of five characters can be 1.2; the word length information of candidate keywords of other lengths can be 1.0.

[0129] In practical applications, in order to improve the accuracy of topic probability acquisition, topic probability can be acquired through LDA (document topic generation model, Latent Dirichlet Allocation). Specifically, the step of "obtaining the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic" may include:

[0130] Determine an initial keyword topic probability of each candidate keyword corresponding to a preset topic, and an initial unit topic probability of each text unit corresponding to the preset topic;

[0131] Based on the initial keyword topic probability and the initial unit topic probability, sampling the topic probability distribution by a preset sampling algorithm to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic;

[0132] When the keyword topic probability and the unit topic probability meet the probability adjustment condition, the initial keyword topic probability is adjusted to the keyword topic probability, and the initial unit topic probability is adjusted to the unit topic probability;

[0133] Return to the step of sampling the topic probability distribution by a preset sampling algorithm based on the initial keyword topic probability and the initial unit topic probability to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic;

[0134] When the keyword topic probability and the unit topic probability do not satisfy the probability adjustment condition, the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic are obtained.

[0135] Among them, LDA (Latent Dirichlet Allocation) can be a generation model including three layers of words, topics and text. The generation process of text can be considered as: selecting a specific topic from multiple preset topics with a certain probability, and selecting a word from this topic with a certain probability, and then the selected multiple words can generate a text. From text to topic, it follows a multinomial distribution, and from topic to word, it also follows a multinomial distribution.

[0136] In practical applications, each candidate keyword can first be assigned an initial keyword topic probability corresponding to a preset topic, and each text unit can be assigned an initial unit topic probability corresponding to the preset topic. Then, based on the initially assigned initial keyword topic probability and initial unit topic probability, the Gibbs sampling formula can be completed, and based on the complete Gibbs sampling formula, the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic can be obtained.

[0137] Compare the obtained keyword topic probability with the initial keyword topic probability, and the unit topic probability with the initial unit topic probability. When the comparison result shows that the Gibbs sampling formula has converged, that is, the keyword topic probability and the unit topic probability do not meet the probability adjustment conditions, the keyword topic probability and the unit topic probability can be directly obtained. When the comparison result shows that the Gibbs sampling formula has not converged, that is, the keyword topic probability and the unit topic probability meet the probability adjustment conditions, the initial keyword topic probability can be adjusted to the keyword topic probability, and the initial unit topic probability can be adjusted to the unit topic probability. Continue to obtain the topic probability according to the Gibbs sampling formula until the Gibbs sampling formula converges to obtain the keyword topic probability Topic wordj =[v j,1 ,v j,2 ,...,v j,k ] and unit topic probability Topic chapi =[v i,1 ,v i,2 ,...,v i,k ].

[0138] In one embodiment, for example, 10,000 books can be obtained to obtain the subject probability, and the 10,000 books may include 5,000,000 chapters and 3,000,000 non-repeating candidate keywords. Then the acquired data is subjected to the subject probability acquisition. However, due to the large amount of data, it is difficult for a stand-alone LDA to run, and it is very difficult to obtain a distributed LDA working cluster. Therefore, the data can be divided into several parts, and the scheme of LDA subject probability acquisition can be performed separately to solve the problem of excessive data volume. For example, 5,000,000 chapters and 3,000,000 non-repeating candidate keywords in 10,000 books can be divided into K parts, each of which is divided according to the chapter number, so that the data of each book is evenly distributed in each data. Among them, the value of K can be adjusted according to the actual situation, so that each data can be run in a stand-alone machine.

[0139] In one embodiment, since the importance of a keyword to a text unit increases in direct proportion to the frequency of the keyword appearing in the text unit, and decreases in inverse proportion to the frequency of the keyword appearing in the text unit in the corpus, the accuracy of determining the importance of the keyword can be improved by calculating the unit frequency sub-information. Specifically, the step of "obtaining the unit frequency sub-information of the candidate keyword for the text unit based on the frequency of the candidate keyword appearing in the corresponding text unit" may include:

[0140] Obtain unit word proportion sub-information of the frequency of occurrence of the candidate keyword in the text unit to the total number of candidate keywords in the text unit;

[0141] Selecting a candidate target text unit including the candidate keyword from a plurality of text units in the text set;

[0142] Obtaining text unit ratio sub-information of the number of candidate target text units to the number of all text units in the text set;

[0143] Based on the unit word proportion sub-information and the text unit proportion sub-information, the unit frequency sub-information of the candidate keyword with respect to the text unit is obtained.

[0144] In practical applications, the unit frequency sub-information corresponding to the candidate keyword can be calculated by TF-IDF (weighted technology for information retrieval and data mining, termfrequency-inverse document frequency); when calculating the unit frequency sub-information corresponding to the candidate keyword "I", the frequency of occurrence of the candidate keyword "I" in the text unit can be obtained. j ), and the number of all candidate keywords in the text unit #(word in chap), and according to the formula Calculate the unit word ratio information. Then select the candidate target text unit including the candidate keyword "I" from the text set, and obtain the number of candidate target text units #(chap has word j ), and the number of all text units in the text set #(chap), and then according to the formula Calculate the text unit ratio sub-information. Finally, calculate the formula based on the unit frequency sub-information The unit frequency sub-information of the candidate keyword "I" for the text unit is calculated.

[0145] Among them, TF-IDF (term frequency-inverse document frequency) can be a weighted technology used for information retrieval and data mining. The main idea of ​​TF-IDF is: if a word appears frequently in a text and rarely appears in other texts, then it can be considered that the word has good category distinction ability and is suitable for classification.

[0146] In one embodiment, there are multiple ways to calculate the unit frequency sub-information, as long as a unit frequency sub-information can be assigned to a candidate keyword in a statistical dimension. For example, the unit frequency sub-information corresponding to the candidate keyword can also be obtained through TextRank, where TextRank is a keyword extraction algorithm in the field of natural language processing, which can be used to extract keywords, phrases, and automatically generate text summaries. For another example, the unit frequency sub-information corresponding to the candidate keyword can also be obtained through TF, and so on.

[0147] 204. Select a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information.

[0148] In practical applications, the unit keyword corresponding to each text unit can be selected from the candidate keywords corresponding to each text unit according to the unit frequency information. For example, the unit frequency information weight of the candidate keyword for the chapter is obtained. word Afterwards, the candidate keywords in each chapter can be sorted from large to small according to the size of the unit frequency information value of the candidate keywords, and the first 20 candidate keywords with large unit frequency information values ​​are used as the unit keywords corresponding to each chapter.

[0149] 205. Obtain text frequency information of the unit keyword for the text set according to a text set measurement parameter of the importance of the unit keyword to the text set.

[0150] The text set measurement parameter may be a parameter for measuring the importance of the candidate keyword relative to the text set. The importance of the candidate keyword relative to the text set may be known based on the text set measurement parameter, thereby determining whether the candidate keyword is an accurate keyword for the text set. The text set measurement parameter may include multiple categories, for example, the text set measurement parameter may include first text frequency sub-information, second text frequency sub-information, etc.

[0151] The text frequency information may be information representing the importance of a keyword relative to a text set. The larger the value of the text frequency information, the more important the keyword is to the text set, that is, for a text set, a keyword with a larger value of the text frequency information is a more accurate keyword. The text frequency information may be represented by a keyword weight.

[0152] In practical applications, the text frequency information of the unit keyword for the text set can be obtained based on the text set measurement parameter of the unit keyword's importance to the text set. For example, the first text frequency sub-information KF of the unit keyword's importance to the text set can be calculated. weighted and the second text frequency sub-information By formula Get the text frequency information weight of the unit keyword in the form of weight for the text set word .

[0153] In one embodiment, since there may be multiple text set measurement parameters for measuring the importance of the unit keyword to the text set, in order to improve the accuracy of obtaining text frequency information, multiple text set measurement parameters may be calculated to obtain accurate text frequency information. Specifically, the step of "obtaining the text frequency information of the unit keyword for the text set according to the text set measurement parameters of the importance of the unit keyword to the text set" may include:

[0154] According to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set, obtaining first text frequency sub-information corresponding to the unit keyword;

[0155] According to the unit frequency information corresponding to the unit keyword in the text unit of the text set, obtaining the second text frequency sub-information corresponding to the unit keyword;

[0156] The first text frequency sub-information and the second text frequency sub-information are merged to obtain the text frequency information of the unit keyword for the text set.

[0157] In practical applications, for example, when obtaining the text frequency information corresponding to the unit keyword "I", the unit frequency information corresponding to the unit keyword "I" and the frequency of the unit keyword "I" appearing in the whole book can be obtained, and then the first text frequency sub-information KF corresponding to the unit keyword "I" can be calculated. weighted Then, according to the chapters in which the unit keyword "I" appears in the whole book and the unit frequency information corresponding to the unit keyword "I", the second text frequency sub-information corresponding to the unit keyword "I" is calculated. Then the obtained first text frequency sub-information and second text frequency sub-information are merged to obtain the text frequency information weight of the unit keyword "I" for the entire book. word .

[0158] In one embodiment, since there are multiple chapters in a book, and the unit keywords extracted from these chapters may be repeated, and these repeated keywords are more important to the whole book, the accuracy of keyword acquisition can be improved by calculating the first text frequency sub-information corresponding to the unit keyword. Specifically, the step of "obtaining the first text frequency sub-information corresponding to the unit keyword according to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set" may include:

[0159] The unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set are merged to obtain the fusion frequency sub-information of the unit keyword in the text set;

[0160] According to the unit frequency information of each unit keyword in the text set, the cumulative frequency sub-information of all unit keywords in the text set is obtained;

[0161] The first text frequency sub-information corresponding to the unit keyword is obtained according to the ratio of the fused frequency sub-information to the accumulated frequency sub-information.

[0162] In practical applications, for example, when calculating the first text frequency sub-information of the unit keyword "I", the unit frequency information weight corresponding to the unit keyword "I" can be obtained. wordi , and the frequency of the unit keyword "I" appearing in the whole book, and weight the unit frequency information according to the frequency of "I" appearing in the whole book wordi Accumulate and calculate the fusion frequency sub-information of the unit keyword "I" in the whole book∑ wordi weight wordi Then get the unit frequency information weight corresponding to each unit keyword in the whole book word, and accumulate the unit frequency information corresponding to all unit keywords to obtain the cumulative frequency sub-information ∑ of all unit keywords in the whole book words weight word Then we can calculate the ratio of the fused frequency sub-information to the cumulative frequency sub-information Get the first text frequency sub-information KF corresponding to the unit keyword "I" weighted .

[0163] In one embodiment, when calculating the frequency information of a keyword for a text unit, the weight corresponding to each keyword for the frequency information of the text unit is 1, but when calculating the frequency information of a keyword for a text set, the weight corresponding to the frequency information of the keyword for the text set may not be 1. Therefore, the accuracy of keyword acquisition can be improved by assigning the keyword with the second text frequency sub-information for the text set. Specifically, the step of "acquiring the second text frequency sub-information corresponding to the unit keyword according to the unit frequency information corresponding to the unit keyword in the text unit of the text set" may include:

[0164] Obtaining the maximum frequency keyword having the maximum unit frequency information value in each text unit of the text set;

[0165] Accumulating the unit frequency information corresponding to all the maximum frequency keywords in the text set to obtain comprehensive cumulative frequency sub-information;

[0166] Selecting a target text unit including the unit keyword from a plurality of text units in the text set;

[0167] Obtain unit frequency information of the unit keyword with the largest corresponding value in each target text unit;

[0168] Accumulate the unit frequency information with the largest corresponding value of the unit keyword in all target text units to obtain the specified cumulative frequency sub-information;

[0169] The second text frequency sub-information corresponding to the unit keyword is acquired according to the comprehensive cumulative frequency sub-information and the specified cumulative frequency sub-information.

[0170] In practical applications, for example, when calculating the second text frequency sub-information of the unit keyword "I", the maximum frequency keyword with the largest unit frequency information value in each chapter of the whole book and the unit frequency information value max(weight words ), and compare the unit frequency information value corresponding to the maximum frequency keyword with 1, and obtain the larger value of the unit frequency information value corresponding to the maximum frequency keyword and 1, max(1.0, max(weight words). And the larger value in all chapters of the text set is accumulated to obtain the comprehensive cumulative frequency sub-information ∑ docs max(1.0,max(weight words )). Then, the target text units including the unit keyword "I" can be selected from multiple chapters of the whole book, and the maximum unit frequency information max(weight wordi ), then accumulate the unit frequency information of the unit keyword "I" with the largest corresponding value in all target text units to obtain the specified cumulative frequency sub-information ∑ docs has wordi max(weight wordi ). Then according to the formula The second text frequency sub-information corresponding to the calculation unit keyword "I"

[0171] 206. Extract keywords from multiple unit keywords in the text set based on the text frequency information.

[0172] In practical applications, keywords can be extracted from multiple unit keywords in a text set according to text frequency information. For example, a preset number of unit keywords with larger text frequency information values ​​can be used as keywords for the entire book.

[0173] For example, the keywords corresponding to the entire book can be obtained as follows: Zhong Shi: 0.075168, SWAT team member: 0.059726, Dong: 0.046732, Frogman: 0.039869, Initiate: 0.037946, Reserve Forces: 0.035875, Tang: 0.033632, Binhai Police: 0.032783, Qin: 0.030709, Man with Sunglasses: 0.026317, Company Equity: 0.025288, Sniper Rifle: 0.024864, Tactical Backpack: 0.023070, Party A: 0 .022199, partnership: 0.021476, divorce lawyer: 0.020492, training team: 0.020036, exhibition: 0.020034, cobra: 0.020021, liability insurance: 0.019668, baseball cap man: 0.019668, reconnaissance equipment: 0.019124, photo company: 0.018494, power grid: 0.017971, manager: 0.017759, combat readiness: 0.017301, bayonet: 0.015978, questionnaire: 0.01541 5. Emergency room: 0.015231. Patrolman: 0.014060. Hound: 0.013307. Safe island: 0.012297. Emergency center: 0.012257. Hoarse throat: 0.011931. Violation: 0.011926. Conservatory of Music: 0.011926. Vulture: 0.011550. Employment: 0.011215. Labor Standards Law: 0.011134. Personal reasons: 0.010949. Masked man: 0.010912. Commission: 0.010890. Poverty: 0.01 0751, investor: 0.010691, 506: 0.010574, obligation: 0.010220, termination: 0.010217, flap: 0.009624, subordinate: 0.009364, eagle: 0.009084, telescope: 0.008983, 56: 0.008353, stock: 0.007776, unit: 0.007724, 0.001: 0.007514, member: 0.006807, freighter: 0.006679, patrol: 0.006429, etc. Among them, the text frequency information corresponding to each keyword can also be marked after the keyword.

[0174] In one embodiment, since candidate keywords can also be obtained by named entity recognition, keywords can also be extracted from the candidate keywords obtained after named entity recognition to obtain multiple keywords composed of named entities. For example, ner-Han Guang: 1.053325, ner-Ji Hui: 0.812526, ner-He Shichang: 0.651450, ner-Xiao Jun: 0.547707, ner-Cai Xiaochun: 0.371123, ner-Lin Rui: 0.201864, ner-Tang Xiaojun: 0.185442, ner-Yan Lin: 0.146594, ner-Hermann: 0.128432, ner-Zhao Baihe: 0.107168, ner- Wang Xin: 0.074263, ner-Zhong Shijia: 0.068198, ner-Feng Yunshan: 0.068186, ner-Qin Wei: 0.065761, ner-Tian Xiaoniu: 0.064950, ner-Fu Kang: 0.063059, ner-Black Panther: 0.048289, ner-Roy: 0.046849, ner-Xue Gang: 0.044375, ner-Huangmao: 0.042946, ner-Secretary Qin: 0.0347 75. ner-Dite: 0.034694, ner-Ge Tong: 0.034419, ner-Zhang Chao: 0.029652, ner-Tianyu: 0.026411, ner-Jiamei: 0.024464, ner-Madi: 0.023369, ner-Telephoto: 0.023190, ner-Mr. Zhong: 0.021387, ner-Lawyer Xu: 0.020115, ner-Wang Bin: 0.019930, ner-Term of office: 0 .018647, ner-lily: 0.017575, ner-Dr. Lin: 0.016030, ner-vacation: 0.014477, ner-diligence: 0.014009, ner-director: 0.013335, ner-mountain eagle: 0.012984, ner-criminal police: 0.011864, ner-captain: 0.011813, ner-key: 0.011650, ner-captain: 0.008063, etc. Among them, ner can indicate that the keyword is a named entity, and the text frequency information corresponding to the keyword can be annotated after the keyword.

[0175] As can be seen from the above, the embodiment of the present application can obtain a text set, which includes multiple text units in a certain sorting relationship, perform keyword extraction on the text content of each text unit, obtain candidate keywords corresponding to each text unit, obtain unit frequency information of the candidate keywords for the text unit according to the text unit measurement parameters of the candidate keywords' importance to the text unit, select the unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit according to the unit frequency information, obtain the text frequency information of the unit keywords for the text set according to the text set measurement parameters of the unit keywords' importance to the text set, and extract keywords from multiple unit keywords of the text set according to the text frequency information. This scheme can obtain the frequency information of keywords from two levels, first obtain the unit frequency information of the keywords for the text unit, and then obtain the text frequency information of the keywords for the text set according to the unit frequency information of the keywords, and use the text frequency information as the importance of the keywords for the entire text set, and obtain keywords from the text set according to the importance, thereby improving the accuracy of keyword extraction in the text set.

[0176] According to the method described in the previous embodiment, the keyword extraction device will be further described in detail below by taking the example of being specifically integrated into a network device.

[0177] refer to Figure 3 The specific process of the keyword extraction method of the embodiment of the present application can be as follows:

[0178] 301. The network device obtains the books to be processed.

[0179] In practical applications, for example, Figure 5 As shown, the network device can obtain a book as a to-be-processed book through a text reading application. The to-be-processed book may include multiple chapters. The to-be-processed book can be represented by Book, and the chapters can be represented by Chap. The relationship between the to-be-processed book and the chapters can be represented as Book = {Chap1, Chap2, ..., Chap n}, where Chap n It can represent the Nth chapter in the book to be processed.

[0180] 302. The network device extracts keywords from the text content of each chapter in the book to be processed, and obtains candidate keywords corresponding to each chapter.

[0181] In practical applications, for example, the network device can perform text segmentation on each chapter in the book to be processed, and perform word segmentation on "Sometimes it is Jiaxuan, but my favorite word is clear, it should be Jiang Jie's "Yu Meiren·Listening to the Rain"" to obtain "Sometimes:d It is:v Jiaxuan:n,:w But:c My:r most:d favorite:v The word:n is:d Clear:a:u,:w It:r is:v Jiang:n Jie:n's:u:w Yu:n Beauty:n·:w Listening to the Rain:n". Therefore, each chapter in the book to be processed can be divided into multiple original keywords, and the relationship between the book to be processed and the divided chapters can be expressed as Book seg = {Chap1 seg ,Chap2 seg ,...,Chap n seg}.

[0182] After the text segmentation is performed on each chapter, the multiple original keywords can be merged according to the preset word merging rules. For example, three original keywords "white: a", "face: n", and "child: Ng" can be obtained. According to the preset word merging rules, the adjectives, nouns, and noun morphemes arranged in order can be merged, so the three original keywords can be merged into one candidate keyword "white face". The preset word merging rules have been described above and will not be repeated here.

[0183] In actual use, candidate keywords with too long word length and too low frequency of occurrence are not suitable for the subsequent word topic acquisition step. Therefore, the candidate keywords with too long word length can be split, which can be expressed as word = {word sub,0 ,word sub ,1,...}, for example, when the original candidate keyword includes 5 original keywords, the original candidate keyword can be split into two candidate keywords, and the two split candidate keywords can include 2 original keywords and 3 original keywords respectively. If the candidate keyword is not suitable as a keyword due to its low frequency, the candidate keyword can be directly ignored.

[0184] 303. The network device obtains unit frequency information of the candidate keyword for the chapter according to the text unit measurement parameter of the candidate keyword's importance to the chapter.

[0185] In practical applications, for example, a network device can obtain 10,000 books for topic acquisition, and the 10,000 books can be divided into 5,000,000 chapters and 3,000,000 non-repeated candidate keywords. However, due to the large amount of data, a single machine cannot support the operation of LDA. Therefore, the acquired data can be divided into k parts, each of which is divided according to the chapter number, so that the data of each book is evenly distributed in each piece of data. Among them, the value of K can be adjusted according to the actual situation, so that each piece of data can be run on a single machine. Then, through LDA, the keyword topic probability Topic of each candidate keyword corresponding to the preset topic is obtained respectively. wordj =[v j,1 ,v j,2 ,...,v j,k ], and the unit topic probability Topic of each chapter corresponding to the preset topic chapi =[v i,1 ,v i,2 ,...,v i,k ]. Then we can use the formula r i,j =cosine(Topic chapi ,Topic wordj ) Calculate the topic-related information r between candidate keywords and chapters chap,word .

[0186] Then, the unit frequency sub-information corresponding to the candidate keyword can be calculated through TF-IDF; when calculating the unit frequency sub-information corresponding to the candidate keyword "I", the frequency of occurrence of the candidate keyword "I" in the chapter can be obtained. j ), and the number of all candidate keywords in the chapter #(word in chap), and according to the formula Calculate the unit word ratio information. Then select the candidate target text unit including the candidate keyword "I" from the book to be processed, and obtain the number of candidate target text units # (chap has word j ), and the number of all chapters in the book to be processed #(chap), and then according to the formula Calculate the text unit ratio sub-information. Finally, according to the calculation formula of the unit frequency sub-information Calculate the unit frequency sub-information of the candidate keyword "I" for the chapter.

[0187] Then, according to the length of the candidate keywords, the weight can be calculated by obtaining the word length information. length ={1:0.7,2:1.0,3:1.2,4:1.5,5:1.2}Get the word length information corresponding to the candidate keywords weight len(word) .

[0188] Finally, according to the formula weight word =r chap,word × chap,word ×weight len(word) , fuse the topic-related information, unit frequency sub-information and word length information to obtain the unit frequency information weight of the candidate keyword for the chapter word .

[0189] 304. The network device selects a unit keyword corresponding to each chapter from candidate keywords corresponding to each chapter according to the unit frequency information.

[0190] In practical applications, for example, obtaining the unit frequency information weight of candidate keywords for chapters word Afterwards, the candidate keywords in each chapter can be sorted from large to small according to the size of the unit frequency information value of the candidate keywords, and the first 20 candidate keywords with large unit frequency information values ​​are used as the unit keywords corresponding to each chapter.

[0191] 305. The network device obtains text frequency information of the unit keyword for the book to be processed according to the text set measurement parameter of the unit keyword's importance to the book to be processed.

[0192] In practical applications, for example, when calculating the first text frequency sub-information of the unit keyword "I", the unit frequency information weight corresponding to the unit keyword "I" can be obtained. wordi , and the frequency of the unit keyword "I" appearing in the books to be processed, and the unit frequency information weight is weighted according to the frequency of "I" appearing in the books to be processed wordi Accumulate and calculate the fusion frequency sub-information ∑ of the unit keyword "I" in the books to be processed wordi weight wordi Then obtain the unit frequency information weight corresponding to each unit keyword in the book to be processed word , and accumulate the unit frequency information corresponding to all unit keywords to obtain the cumulative frequency sub-information ∑ of all unit keywords in the book to be processed words weight word Then we can calculate the ratio of the fused frequency sub-information to the cumulative frequency sub-information Get the first text frequency sub-information KF corresponding to the unit keyword "I" weighted .

[0193] Then, the maximum frequency keyword with the largest unit frequency information value in each chapter of the book to be processed and the unit frequency information value max(weight words ), and compare the unit frequency information value corresponding to the maximum frequency keyword with 1, and obtain the larger value of the unit frequency information value corresponding to the maximum frequency keyword and 1, max(1.0, max(weight words ). And the larger value in all chapters of the book to be processed is accumulated to obtain the comprehensive cumulative frequency sub-information ∑ docs max(1.0,max(weight words )). Then, the target text unit including the unit keyword "I" can be selected from multiple chapters of the book to be processed, and the maximum unit frequency information max(weight) of the corresponding unit keyword "I" in each target text unit can be obtained. wordi ), then accumulate the unit frequency information of the unit keyword "I" with the largest corresponding value in all target text units to obtain the specified cumulative frequency sub-information ∑ docs has wordi max(weight wordi ). Then according to the calculation formula of the second text frequency sub-information The second text frequency sub-information corresponding to the calculation unit keyword "I" Then we can use the formula Get the text frequency information weight of the unit keyword for the book to be processed word .

[0194] 306. The network device extracts keywords from a plurality of unit keywords of the book to be processed according to the text frequency information.

[0195] In practical applications, for example, a preset number of unit keywords with large text frequency information values ​​can be used as keywords for the entire book. Among them, the keywords corresponding to the entire book can be obtained as follows: Zhong Shi: 0.075168, SWAT team member: 0.059726, Dong: 0.046732, Frogman: 0.039869, Initiate: 0.037946, Reserve Force: 0.035875, Tang: 0.033632, Binhai Police: 0.032783, Qin: 0.030709, Sunglasses Man: 0.026317, Company Equity: 0.025288, Sniper Rifle: 0.024864, Tactical Backpack: 0.023070, Party A: 0 .022199, partnership: 0.021476, divorce lawyer: 0.020492, training team: 0.020036, exhibition: 0.020034, cobra: 0.020021, liability insurance: 0.019668, baseball cap man: 0.019668, reconnaissance equipment: 0.019124, photo company: 0.018494, power grid: 0.017971, manager: 0.017759, combat readiness: 0.017301, bayonet: 0.015978, questionnaire: 0.01541 5. Emergency room: 0.015231. Patrolman: 0.014060. Hound: 0.013307. Safe island: 0.012297. Emergency center: 0.012257. Hoarse throat: 0.011931. Violation: 0.011926. Conservatory of Music: 0.011926. Vulture: 0.011550. Employment: 0.011215. Labor Standards Law: 0.011134. Personal reasons: 0.010949. Masked man: 0.010912. Commission: 0.010890. Poverty: 0.01 0751, investor: 0.010691, 506: 0.010574, obligation: 0.010220, termination: 0.010217, flap: 0.009624, subordinate: 0.009364, eagle: 0.009084, telescope: 0.008983, 56: 0.008353, stock: 0.007776, unit: 0.007724, 0.001: 0.007514, member: 0.006807, freighter: 0.006679, patrol: 0.006429, etc. Among them, the text frequency information corresponding to each keyword can also be marked after the keyword.

[0196] In one embodiment, after obtaining the keywords corresponding to the books to be processed, the network device can mark the books in the text reading application with corresponding keywords based on the obtained keywords, so that the user can understand the content, theme and other information of the corresponding books in the text reading application based on the keywords marked corresponding to the books in the text reading application, and then decide whether to read the books.

[0197] In one embodiment, the text reading application can also obtain the historical reading books that the user has read before and the keywords corresponding to the historical reading books, and recommend recommended books with similar or identical keywords to the user based on the keywords corresponding to the historical reading books. Figure 6 As shown, when a user searches for books through a text reading application, the text reading application can display the covers of recommended books on the interface, and the user can read the books by clicking on the covers of the books of interest. When the recommended books displayed on the interface cannot meet the user's reading needs, the user can also switch recommended books by clicking the "Change Batch" button on the interface. This method recommends books that may be of interest to the user based on the user's historical reading records, so that new books with fewer reading times can also be recommended through keyword acquisition, effectively improving the recall rate of new books. The recommended books in the text reading application interface can be updated every other day so that users can get different recommended books every day.

[0198] In one embodiment, the text reading application can also mark after the recommended book which specific historical reading book the book is recommended based on, for example, Figure 7 As shown, the text reading application can mark the recommended book 1 as being recommended based on book a next to the recommended book 1. When the user wants to read a book similar to book a, the user can quickly find the corresponding book 1, thereby improving the accuracy and efficiency of the user's book search. Among them, the book 1 recommended based on book a can be a book with similar keywords to book a, for example, book 1 can be a book that includes the most common keywords with book a, book 1 can also be a book that includes the most similar keywords with book a, and so on.

[0199] As can be seen from the above, the embodiment of the present application can obtain the books to be processed through the network device, perform keyword extraction on the text content of each chapter in the book to be processed, obtain the candidate keywords corresponding to each chapter, obtain the unit frequency information of the candidate keywords for the chapter according to the text unit measurement parameters of the candidate keywords for the importance of the chapter, select the unit keywords corresponding to each chapter from the candidate keywords corresponding to each chapter according to the unit frequency information, obtain the text frequency information of the unit keywords for the book to be processed according to the text set measurement parameters of the importance of the unit keywords for the book to be processed, and extract the keywords from the multiple unit keywords of the book to be processed according to the text frequency information. This scheme can obtain the frequency information of the keywords from two levels, first obtain the unit frequency information of the keywords for the text unit, and then obtain the text frequency information of the keywords for the text set according to the unit frequency information of the keywords, and use the text frequency information as the importance of the keywords for the entire text set, and obtain the keywords from the text set according to the importance, thereby improving the accuracy of keyword extraction in the text set.

[0200] According to the method described in the previous embodiment, the keyword extraction device will be further described in detail below by taking the example of being specifically integrated into a network device.

[0201] refer to Figure 4 The specific process of the keyword extraction method of the embodiment of the present application can be as follows:

[0202] 401. The network device obtains the books to be processed.

[0203] In practical applications, for example, a network device can obtain a book as a book to be processed. The book can include multiple chapters. The book to be processed can be represented by Book, and the chapter can be represented by Chap. The relationship between the book to be processed and the chapter can be represented as Book = {Chap1,Chap2,...,Chap n}, where Chap n It can represent the Nth chapter in the book to be processed.

[0204] 402. The network device extracts keywords from the text content of each chapter in the book to be processed by named entity recognition to obtain candidate keywords corresponding to each chapter.

[0205] In practical applications, for example, the network device can perform text segmentation on each chapter in the book to be processed, and divide each chapter in the book to be processed into multiple original keywords. The relationship between the book to be processed and the divided chapters can be expressed as Book seg = {Chap1 seg ,Chap2 seg ,...,Chapn seg}.

[0206] After each chapter is segmented, named entity recognition can be used to label each original keyword according to its word features, that is, to give each original keyword a label, and to extract candidate keywords from the original keywords according to the labels of the original keywords. At this point, the relationship between the book to be processed and the chapter can be expressed as Book ner = {Chap1 ner ,Chap2 ner ,...,Chap n ner}.

[0207] For example, after named entity recognition, named entities such as "Jiaxuan / PER", "Jiang Jie / PER", "Jiang Kuoyun / PER", "Tianming / LOC", and "United States / LOC" can be identified and used as candidate keywords. Among them, "PER" and "LOC" can be labels of named entities, "PER" indicates that the named entity is a person's name, and "LOC" indicates that the named entity is a place name, etc.

[0208] 403. The network device obtains unit frequency information of the candidate keyword for the chapter according to the text unit measurement parameter of the candidate keyword's importance to the chapter.

[0209] In practical applications, for example, a network device can obtain 10,000 books for topic acquisition, and the 10,000 books can be divided into 5,000,000 chapters and 3,000,000 non-repeated candidate keywords. However, due to the large amount of data, a single machine cannot support the operation of LDA. Therefore, the acquired data can be divided into k parts, each of which is divided according to the chapter number, so that the data of each book is evenly distributed in each piece of data. Among them, the value of K can be adjusted according to the actual situation, so that each piece of data can be run on a single machine. Then, through LDA, the keyword topic probability Topic of each candidate keyword corresponding to the preset topic is obtained respectively. wordj =[v j,1 ,v j,2 ,...,v j,k ], and the unit topic probability Topic of each chapter corresponding to the preset topic chapi =[v i,1 ,v i,2 ,...,v i,k ]. Then we can use the formula r i,j =cosine(Topic chapi ,Topic wordj ) Calculate the topic-related information r between candidate keywords and chapterschap,word .

[0210] Then, the unit frequency sub-information corresponding to the candidate keyword can be calculated through TF-IDF; when calculating the unit frequency sub-information corresponding to the candidate keyword "China", the frequency of occurrence of the candidate keyword "China" in the chapter can be obtained. j ), and the number of all candidate keywords in the chapter #(word in chap), and according to the formula Calculate the unit word ratio information. Then select the candidate target text unit including the candidate keyword "China" from the book to be processed, and obtain the number of candidate target text units # (chap has word j ), and the number of all chapters in the book to be processed #(chap), and then according to the formula Calculate the text unit ratio sub-information. Finally, according to the calculation formula of the unit frequency sub-information Calculate the unit frequency sub-information of the candidate keyword "China" for the chapter.

[0211] Then, according to the length of the candidate keywords, the weight can be calculated by obtaining the word length information. length ={1:0.7,2:1.0,3:1.2,4:1.5,5:1.2}Get the word length information corresponding to the candidate keywords weight len(word) .

[0212] Finally, according to the formula weight word =r chap,word × chap,word ×weight len(word) , fuse the topic-related information, unit frequency sub-information and word length information to obtain the unit frequency information weight of the candidate keyword for the chapter word .

[0213] 404. The network device selects a unit keyword corresponding to each chapter from candidate keywords corresponding to each chapter according to the unit frequency information.

[0214] In practical applications, for example, obtaining the unit frequency information weight of candidate keywords for chapters word Afterwards, the candidate keywords in each chapter can be sorted from large to small according to the size of the unit frequency information value of the candidate keywords, and the first 20 candidate keywords with large unit frequency information values ​​are used as the unit keywords corresponding to each chapter.

[0215] 405. The network device obtains text frequency information of the unit keyword for the book to be processed according to the text set measurement parameter of the unit keyword's importance to the book to be processed.

[0216] In practical applications, for example, when calculating the first text frequency sub-information of the unit keyword "China", the unit frequency information weight corresponding to the unit keyword "China" can be obtained. wordi , and the frequency of the unit keyword "China" appearing in the books to be processed, and weight the unit frequency information according to the frequency of "China" appearing in the books to be processed wordi Accumulate and calculate the fusion frequency sub-information ∑ of the unit keyword "China" in the books to be processed wordi weight wordi Then obtain the unit frequency information weight corresponding to each unit keyword in the book to be processed word , and accumulate the unit frequency information corresponding to all unit keywords to obtain the cumulative frequency sub-information ∑ of all unit keywords in the book to be processed words weight word Then we can calculate the ratio of the fused frequency sub-information to the cumulative frequency sub-information Get the first text frequency sub-information KF corresponding to the unit keyword "China" weighted .

[0217] Then, the maximum frequency keyword with the largest unit frequency information value in each chapter of the book to be processed and the unit frequency information value max(weight words ), and compare the unit frequency information value corresponding to the maximum frequency keyword with 1, and obtain the larger value of the unit frequency information value corresponding to the maximum frequency keyword and 1, max(1.0, max(weight words ). And the larger value in all chapters of the book to be processed is accumulated to obtain the comprehensive cumulative frequency sub-information ∑ docs max(1.0,max(weight words )). Then, the target text unit including the unit keyword "China" can be selected from multiple chapters of the book to be processed, and the maximum unit frequency information max(weight) of the corresponding unit keyword "China" in each target text unit can be obtained. wordi ), then accumulate the unit frequency information of the unit keyword "China" with the largest corresponding value in all target text units to obtain the specified cumulative frequency sub-information ∑ docs has wordi max(weight wordi ). Then according to the calculation formula of the second text frequency sub-information Calculate the second text frequency sub-information corresponding to the unit keyword "China" Then we can use the formula Get the text frequency information weight of the unit keyword for the book to be processed word .

[0218] 406. The network device extracts keywords from a plurality of unit keywords of the book to be processed according to the text frequency information.

[0219] In practical applications, for example, a preset number of unit keywords with larger text frequency information values ​​can be used as keywords for the entire book. Among them, the keywords corresponding to the entire book can be obtained as follows: ner-Han Guang: 1.053325, ner-Ji Hui: 0.812526, ner-He Shichang: 0.651450, ner-Xiao Jun: 0.547707, ner-Cai Xiaochun: 0.371123, ner-Lin Rui: 0.201864, ner-Tang Xiaojun: 0.185442, ner-Yan Lin: 0.146594, ner-Hermann: 0.128432, ner-Zhao Baihe: 0 .107168, ner-Wang Xin: 0.074263, ner-Zhong Shijia: 0.068198, ner-Feng Yunshan: 0.068186, ner-Qin Wei: 0.065761, ner-Tian Xiaoniu: 0.064950, ner-Fu Kang: 0.063059, ner-Black Panther: 0.048289, ner-Roy: 0.046849, ner-Xue Gang: 0.044375, ner-Huangmao: 0.042946, ner-Qin Mi Shu: 0.034775, ner-Dite: 0.034694, ner-Ge Tong: 0.034419, ner-Zhang Chao: 0.029652, ner-Tianyu: 0.026411, ner-Jiamei: 0.024464, ner-Madi: 0.023369, ner-Telephoto: 0.023190, ner-Teacher Zhong: 0.021387, ner-Lawyer Xu: 0.020115, ner-Wang Bin: 0.019930, ner- Term: 0.018647, ner-Lily: 0.017575, ner-Dr. Lin: 0.016030, ner-Vacation: 0.014477, ner-Diligence: 0.014009, ner-Director: 0.013335, ner-Mountain Eagle: 0.012984, ner-Criminal Police: 0.011864, ner-Captain: 0.011813, ner-Key: 0.011650, ner-Captain: 0.008063, etc. Among them, ner can indicate that the keyword is a named entity, and the text frequency information corresponding to the keyword can be annotated after the keyword.

[0220] As can be seen from the above, the embodiment of the present application can obtain the books to be processed through the network device, extract keywords from the text content of each chapter in the book to be processed through named entity recognition, obtain the candidate keywords corresponding to each chapter, obtain the unit frequency information of the candidate keywords for the chapter according to the text unit measurement parameters of the candidate keywords for the chapter importance, select the unit keywords corresponding to each chapter from the candidate keywords corresponding to each chapter according to the unit frequency information, obtain the text frequency information of the unit keywords for the book to be processed according to the text set measurement parameters of the importance of the unit keywords to the book to be processed, and extract keywords from multiple unit keywords of the book to be processed according to the text frequency information. This scheme can obtain the frequency information of keywords from two levels, first obtain the unit frequency information of the keywords for the text unit, and then obtain the text frequency information of the keywords for the text set according to the unit frequency information of the keywords, and use the text frequency information as the importance of the keywords for the entire text set, and obtain keywords from the text set according to the importance, thereby improving the accuracy of keyword extraction in the text set.

[0221] In order to better implement the above method, an embodiment of the present application may also provide a keyword extraction device, which may be specifically integrated in a network device, which may include a server, a terminal, etc., wherein the terminal may include: a mobile phone, a tablet computer, a laptop computer or a personal computer (PC, Personal Computer), etc.

[0222] For example, Figure 8 As shown, the keyword extraction device may include a text set acquisition module 81, a first extraction module 82, a first information acquisition module 83, a selection module 84, a second information acquisition module 85, and a second extraction module 86, as follows:

[0223] A text set acquisition module 81 is used to acquire a text set, wherein the text set includes a plurality of text units in a certain order relationship;

[0224] A first extraction module 82 is used to extract keywords from the text content of each text unit to obtain candidate keywords corresponding to each text unit;

[0225] A first information acquisition module 83, configured to acquire unit frequency information of the candidate keyword for the text unit according to a text unit measurement parameter of the importance of the candidate keyword to the text unit;

[0226] A selection module 84, configured to select a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information;

[0227] A second information acquisition module 85 is used to acquire text frequency information of the unit keyword for the text set according to a text set measurement parameter of the importance of the unit keyword to the text set;

[0228] The second extraction module 86 is used to extract keywords from the multiple unit keywords in the text set according to the text frequency information.

[0229] In one embodiment, the first information acquisition module 83 may include a unit topic probability acquisition submodule 831, a related information acquisition submodule 832, a unit frequency sub-information acquisition submodule 833, a word length information acquisition submodule 834 and a unit frequency information acquisition submodule 835, as follows:

[0230] The unit topic probability acquisition submodule 831 is used to acquire the keyword topic probability of each candidate keyword corresponding to the preset topic, and the unit topic probability of each text unit corresponding to the preset topic;

[0231] The related information acquisition submodule 832 is used to acquire the topic related information between the candidate keyword and the text unit according to the keyword topic probability corresponding to the candidate keyword and the unit topic probability corresponding to the text unit where the candidate keyword is located;

[0232] The unit frequency sub-information acquisition submodule 833 is used to acquire the unit frequency sub-information of the candidate keyword for the text unit according to the frequency of occurrence of the candidate keyword in the corresponding text unit;

[0233] The word length information acquisition submodule 834 is used to acquire the word length information corresponding to the candidate keyword based on the word length of the candidate keyword;

[0234] The unit frequency information acquisition submodule 835 is used to fuse the topic related information, the unit frequency sub-information and the word length information to obtain the unit frequency information of the candidate keyword for the text unit.

[0235] In one embodiment, the unit frequency sub-information acquisition submodule 833 may be specifically used for:

[0236] Obtain unit word proportion sub-information of the frequency of occurrence of the candidate keyword in the text unit to the total number of candidate keywords in the text unit;

[0237] Selecting a candidate target text unit including the candidate keyword from a plurality of text units in the text set;

[0238] Obtaining text unit ratio sub-information of the number of candidate target text units to the number of all text units in the text set;

[0239] Based on the unit word proportion sub-information and the text unit proportion sub-information, the unit frequency sub-information of the candidate keyword with respect to the text unit is obtained.

[0240] In one embodiment, the unit topic probability acquisition submodule 831 may be specifically used for:

[0241] Determine an initial keyword topic probability of each candidate keyword corresponding to a preset topic, and an initial unit topic probability of each text unit corresponding to the preset topic;

[0242] Based on the initial keyword topic probability and the initial unit topic probability, sampling the topic probability distribution by a preset sampling algorithm to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic;

[0243] When the keyword topic probability and the unit topic probability meet the probability adjustment condition, the initial keyword topic probability is adjusted to the keyword topic probability, and the initial unit topic probability is adjusted to the unit topic probability;

[0244] Return to the step of sampling the topic probability distribution by a preset sampling algorithm based on the initial keyword topic probability and the initial unit topic probability to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic;

[0245] When the keyword topic probability and the unit topic probability do not satisfy the probability adjustment condition, the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic are obtained.

[0246] In one embodiment, the second information acquisition module 85 may include a first text frequency sub-information acquisition sub-module 851, a second text frequency sub-information acquisition sub-module 852 and a text frequency information acquisition sub-module 853, as follows:

[0247] The first text frequency sub-information acquisition submodule 851 is used to acquire the first text frequency sub-information corresponding to the unit keyword according to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set;

[0248] The second text frequency sub-information acquisition submodule 852 is used to acquire the second text frequency sub-information corresponding to the unit keyword according to the unit frequency information corresponding to the unit keyword in the text unit of the text set;

[0249] The text frequency information acquisition submodule 853 is used to merge the first text frequency sub-information and the second text frequency sub-information to obtain the text frequency information of the unit keyword for the text set.

[0250] In one embodiment, the first text frequency sub-information obtaining submodule 851 may be specifically used for:

[0251] The unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set are merged to obtain the fusion frequency sub-information of the unit keyword in the text set;

[0252] According to the unit frequency information of each unit keyword in the text set, the cumulative frequency sub-information of all unit keywords in the text set is obtained;

[0253] The first text frequency sub-information corresponding to the unit keyword is obtained according to the ratio of the fused frequency sub-information to the accumulated frequency sub-information.

[0254] In one embodiment, the second text frequency sub-information obtaining submodule 852 may be specifically used for:

[0255] Obtaining the maximum frequency keyword having the maximum unit frequency information value in each text unit of the text set;

[0256] Accumulating the unit frequency information corresponding to all the maximum frequency keywords in the text set to obtain comprehensive cumulative frequency sub-information;

[0257] Selecting a target text unit including the unit keyword from a plurality of text units in the text set;

[0258] Obtain unit frequency information of the unit keyword with the largest corresponding value in each target text unit;

[0259] Accumulate the unit frequency information with the largest corresponding value of the unit keyword in all target text units to obtain the specified cumulative frequency sub-information;

[0260] The second text frequency sub-information corresponding to the unit keyword is acquired according to the comprehensive cumulative frequency sub-information and the specified cumulative frequency sub-information.

[0261] In one embodiment, the first extraction module 82 may include an original keyword acquisition submodule 821 and a candidate keyword acquisition submodule 822, as follows:

[0262] The original keyword acquisition submodule 821 is used to perform text segmentation processing on the text content of each text unit, and divide the text content of the text unit into multiple original keywords;

[0263] The candidate keyword acquisition submodule 822 is used to merge the original keywords according to a preset word merging rule to obtain candidate keywords corresponding to each text unit.

[0264] In one embodiment, the candidate keyword acquisition submodule 822 may be specifically used for:

[0265] Merge the original keywords according to a preset word merging rule to obtain the original candidate keywords corresponding to each text unit;

[0266] When the original candidate keyword meets the preset splitting condition, splitting the original candidate keyword into at least one candidate keyword;

[0267] When the original candidate keyword does not meet the preset splitting condition, the original candidate keyword is determined as a candidate keyword.

[0268] In one embodiment, the keyword extraction device may further include a marking module 87 and a keyword extraction module 88, as follows:

[0269] A marking module 87, used for marking the original keywords in the text content according to the word features of each original keyword;

[0270] The keyword extraction module 88 is used to extract candidate keywords from the original keywords in the text content according to the annotations of the original keywords.

[0271] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0272] As can be seen from the above, the keyword extraction device of this embodiment obtains a text set through a text set acquisition module 81, and the text set includes multiple text units in a certain sorting relationship. The first extraction module 82 performs keyword extraction on the text content of each text unit to obtain candidate keywords corresponding to each text unit. The first information acquisition module 83 obtains unit frequency information of the candidate keywords for the text unit according to the text unit measurement parameters of the candidate keywords' importance to the text unit. The selection module 84 selects the unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit according to the unit frequency information. The second information acquisition module 85 obtains the text frequency information of the unit keywords for the text set according to the text set measurement parameters of the unit keywords' importance to the text set. The second extraction module 86 extracts keywords from multiple unit keywords in the text set according to the text frequency information. This scheme can obtain the frequency information of keywords from two levels. First, the unit frequency information of the keywords for the text unit is obtained. Then, based on the unit frequency information of the keywords, the text frequency information of the keywords for the text set is obtained. The text frequency information is used as the importance of the keywords for the entire text set. Keywords are obtained from the text set based on the importance, thereby improving the accuracy of keyword extraction in the text set.

[0273] The embodiment of the present application also provides a network device, which can integrate any keyword extraction device provided in the embodiment of the present application.

[0274] For example, Fig. 9 As shown, it shows a schematic diagram of the structure of the network device involved in the embodiment of the present application, specifically:

[0275] The network device may include one or more processing core processors 901, one or more computer-readable storage media memories 902, a power supply 903, an input unit 904 and other components. Those skilled in the art will appreciate that Fig. 9 The network device structure shown in the figure does not constitute a limitation on the network device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0276] The processor 901 is the control center of the network device. It uses various interfaces and lines to connect various parts of the entire network device. By running or executing software programs and / or modules stored in the memory 902 and calling data stored in the memory 902, it executes various functions of the network device and processes data, thereby performing overall detection of the network device. Optionally, the processor 901 may include one or more processing cores; preferably, the processor 901 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 901.

[0277] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area, wherein the program storage area may 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 may store data created according to the use of the network device, etc. In addition, the memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 902 may also include a memory controller to provide the processor 901 with access to the memory 902.

[0278] The network device also includes a power supply 903 for supplying power to each component. Preferably, the power supply 903 can be logically connected to the processor 901 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 903 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0279] The network device may further include an input unit 904, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0280] Although not shown, the network device may also include a display unit, etc., which will not be described in detail here. Specifically in this embodiment, the processor 901 in the network device will load the executable files corresponding to the processes of one or more application programs into the memory 902 according to the following instructions, and the processor 901 will run the application programs stored in the memory 902, thereby realizing various functions, as follows:

[0281] A text set is obtained, wherein the text set includes multiple text units in a certain ordering relationship, keywords are extracted from the text content of each text unit to obtain candidate keywords corresponding to each text unit, and unit frequency information of the candidate keywords for the text unit is obtained based on a text unit measurement parameter of the candidate keywords' importance to the text unit. According to the unit frequency information, a unit keyword corresponding to each text unit is selected from the candidate keywords corresponding to each text unit, and text frequency information of the unit keyword for the text set is obtained based on a text set measurement parameter of the unit keyword's importance to the text set. Keywords are extracted from multiple unit keywords of the text set based on the text frequency information.

[0282] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0283] As can be seen from the above, the embodiment of the present application can obtain a text set, which includes multiple text units in a certain sorting relationship, perform keyword extraction on the text content of each text unit, obtain candidate keywords corresponding to each text unit, obtain unit frequency information of the candidate keywords for the text unit according to the text unit measurement parameters of the candidate keywords' importance to the text unit, select the unit keywords corresponding to each text unit from the candidate keywords corresponding to each text unit according to the unit frequency information, obtain the text frequency information of the unit keywords for the text set according to the text set measurement parameters of the unit keywords' importance to the text set, and extract keywords from multiple unit keywords of the text set according to the text frequency information. This scheme can obtain the frequency information of keywords from two levels, first obtain the unit frequency information of the keywords for the text unit, and then obtain the text frequency information of the keywords for the text set according to the unit frequency information of the keywords, and use the text frequency information as the importance of the keywords for the entire text set, and obtain keywords from the text set according to the importance, thereby improving the accuracy of keyword extraction in the text set.

[0284] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0285] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any keyword extraction method provided in the embodiment of the present application. For example, the instructions can execute the following steps:

[0286] A text set is obtained, wherein the text set includes multiple text units in a certain ordering relationship, keywords are extracted from the text content of each text unit to obtain candidate keywords corresponding to each text unit, and unit frequency information of the candidate keywords for the text unit is obtained based on a text unit measurement parameter of the candidate keywords' importance to the text unit. According to the unit frequency information, a unit keyword corresponding to each text unit is selected from the candidate keywords corresponding to each text unit, and text frequency information of the unit keyword for the text set is obtained based on a text set measurement parameter of the unit keyword's importance to the text set. Keywords are extracted from multiple unit keywords of the text set based on the text frequency information.

[0287] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0288] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0289] Since the instructions stored in the storage medium can execute the steps in any keyword extraction method provided in the embodiments of the present application, the beneficial effects that can be achieved by any keyword extraction method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0290] The above is a detailed introduction to a keyword extraction method and device provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A keyword extraction method, characterized in that: include: Acquire a text set, wherein the text set includes a plurality of text units in a certain order relationship; Perform keyword extraction on the text content of each text unit to obtain candidate keywords corresponding to each text unit; According to the text unit measurement parameter of the candidate keyword's importance to the text unit, obtaining unit frequency information representing the importance of the candidate keyword relative to the text unit, wherein the unit frequency information is related to the frequency of occurrence of the candidate keyword in the text unit; Selecting a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information; According to the text set measurement parameter of the importance of the unit keyword to the text set, obtaining text frequency information representing the importance of the unit keyword relative to the text set, wherein the text frequency information is related to the frequency of occurrence of the unit keyword in the text set and the unit frequency information corresponding to the unit keyword in the text unit of the text set; Keywords are extracted from a plurality of unit keywords in the text set according to the text frequency information.

2. The keyword extraction method according to claim 1, characterized in that: The text unit measurement parameters include topic related information, unit frequency sub-information and word length information; Acquiring unit frequency information of the candidate keyword for the text unit according to a text unit measurement parameter of the importance of the candidate keyword to the text unit includes: Obtaining a keyword topic probability of each candidate keyword corresponding to a preset topic, and a unit topic probability of each text unit corresponding to a preset topic; Acquire topic-related information between the candidate keyword and the text unit according to the keyword topic probability corresponding to the candidate keyword and the unit topic probability corresponding to the text unit where the candidate keyword is located; According to the frequency of occurrence of the candidate keyword in the corresponding text unit, obtaining unit frequency sub-information of the candidate keyword for the text unit; Based on the word length of the candidate keyword, obtaining word length information corresponding to the candidate keyword; The subject-related information, the unit frequency sub-information and the word length information are integrated to obtain the unit frequency information of the candidate keyword for the text unit.

3. The keyword extraction method according to claim 2, characterized in that: According to the frequency of occurrence of the candidate keyword in the corresponding text unit, obtaining the unit frequency sub-information of the candidate keyword for the text unit includes: Obtain unit word proportion sub-information of the frequency of occurrence of the candidate keyword in the text unit to the total number of candidate keywords in the text unit; Selecting a candidate target text unit including the candidate keyword from a plurality of text units in the text set; Obtaining text unit ratio sub-information of the number of candidate target text units to the number of all text units in the text set; Based on the unit word proportion sub-information and the text unit proportion sub-information, the unit frequency sub-information of the candidate keyword with respect to the text unit is obtained.

4. The keyword extraction method according to claim 2, characterized in that: Obtaining the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic, including: Determine an initial keyword topic probability of each candidate keyword corresponding to a preset topic, and an initial unit topic probability of each text unit corresponding to the preset topic; Based on the initial keyword topic probability and the initial unit topic probability, sampling the topic probability distribution by a preset sampling algorithm to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic; When the keyword topic probability and the unit topic probability meet the probability adjustment condition, the initial keyword topic probability is adjusted to the keyword topic probability, and the initial unit topic probability is adjusted to the unit topic probability; Return to the step of sampling the topic probability distribution by a preset sampling algorithm based on the initial keyword topic probability and the initial unit topic probability to obtain the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic; When the keyword topic probability and the unit topic probability do not satisfy the probability adjustment condition, the keyword topic probability of each candidate keyword corresponding to the preset topic and the unit topic probability of each text unit corresponding to the preset topic are obtained.

5. The keyword extraction method according to claim 1, characterized in that: The text set measurement parameters include first text frequency sub-information and second text frequency sub-information; According to the text set measurement parameter of the importance of the unit keyword to the text set, obtaining the text frequency information of the unit keyword for the text set includes: According to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set, obtaining first text frequency sub-information corresponding to the unit keyword; According to the unit frequency information corresponding to the unit keyword in the text unit of the text set, obtaining the second text frequency sub-information corresponding to the unit keyword; The first text frequency sub-information and the second text frequency sub-information are merged to obtain the text frequency information of the unit keyword for the text set.

6. The keyword extraction method according to claim 5, characterized in that: According to the unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set, obtaining first text frequency sub-information corresponding to the unit keyword includes: The unit frequency information of the unit keyword and the frequency of occurrence of the unit keyword in the text set are merged to obtain the fusion frequency sub-information of the unit keyword in the text set; According to the unit frequency information of each unit keyword in the text set, the cumulative frequency sub-information of all unit keywords in the text set is obtained; The first text frequency sub-information corresponding to the unit keyword is obtained according to the ratio of the fused frequency sub-information to the accumulated frequency sub-information.

7. The keyword extraction method according to claim 5, characterized in that: Acquiring second text frequency sub-information corresponding to the unit keyword according to the unit frequency information corresponding to the unit keyword in the text unit of the text set includes: Obtaining the maximum frequency keyword having the maximum unit frequency information value in each text unit of the text set; Accumulating the unit frequency information corresponding to all the maximum frequency keywords in the text set to obtain comprehensive cumulative frequency sub-information; Selecting a target text unit including the unit keyword from a plurality of text units in the text set; Obtain unit frequency information of the unit keyword with the largest corresponding value in each target text unit; Accumulate the unit frequency information with the largest corresponding value of the unit keyword in all target text units to obtain the specified cumulative frequency sub-information; The second text frequency sub-information corresponding to the unit keyword is acquired according to the comprehensive cumulative frequency sub-information and the specified cumulative frequency sub-information.

8. The keyword extraction method according to claim 1, characterized in that: Perform keyword extraction on the text content of each text unit to obtain candidate keywords corresponding to each text unit, including: Performing text segmentation processing on the text content of each text unit, dividing the text content of the text unit into a plurality of original keywords; Merge the original keywords according to a preset word merging rule to obtain the original candidate keywords corresponding to each text unit; When the original candidate keyword meets the preset splitting condition, splitting the original candidate keyword into at least one candidate keyword; When the original candidate keyword does not meet the preset splitting condition, the original candidate keyword is determined as a candidate keyword.

9. The keyword extraction method according to claim 8, characterized in that: Performing text segmentation processing on the text content of each text unit, and dividing the text content of the text unit into a plurality of original keywords, further comprising: Marking the original keywords in the text content according to the word features of each original keyword; According to the annotation of the original keywords, candidate keywords are extracted from the original keywords of the text content.

10. A keyword extraction device, characterized in that: include: A text set acquisition module, used to acquire a text set, wherein the text set includes a plurality of text units in a certain order relationship; The first extraction module is used to extract keywords from the text content of each text unit to obtain candidate keywords corresponding to each text unit; A first information acquisition module, configured to acquire unit frequency information representing the importance of the candidate keyword relative to the text unit according to a text unit measurement parameter of the importance of the candidate keyword to the text unit, wherein the unit frequency information is related to the frequency of occurrence of the candidate keyword in the text unit; A selection module, configured to select a unit keyword corresponding to each text unit from candidate keywords corresponding to each text unit according to the unit frequency information; A second information acquisition module is used to acquire text frequency information representing the importance of the unit keyword relative to the text set according to a text set measurement parameter of the importance of the unit keyword to the text set, wherein the text frequency information is related to the frequency of occurrence of the unit keyword in the text set and the unit frequency information corresponding to the unit keyword in the text unit of the text set; The second extraction module is used to extract keywords from the multiple unit keywords in the text set according to the text frequency information.