Keyword extraction method and apparatus

By constructing a complex text network and utilizing parameters such as node strength, in-degree, and path length, keywords are automatically extracted, solving the problem of semantic structure being ignored in existing methods and achieving efficient and accurate keyword extraction.

CN115186067BActive Publication Date: 2026-03-20BEIJING JINGDONG ZHENSHI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing keyword extraction methods ignore the semantic and structural information of documents, resulting in low extraction accuracy. They also require manual rule construction, which consumes a lot of human resources and has poor promotion capabilities.

Method used

By constructing a complex text network, keywords are automatically extracted using parameters such as node strength, in-degree, edge weights and clustering coefficients, symmetric mixing, and path length, thus avoiding text preprocessing and training.

Benefits of technology

It improves the accuracy and comprehensiveness of keyword extraction, especially in extracting keywords that contribute significantly to the core content of documents but appear infrequently, thus reducing time and space costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186067B_ABST
    Figure CN115186067B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a keyword extraction method, comprising: first acquiring a text complex network corresponding to a to-be-processed text, the text complex network comprising nodes corresponding to a plurality of single characters in the to-be-processed text, weight values of connecting edges between the plurality of nodes, strengths of the plurality of nodes and in-out degrees of the plurality of nodes; then calculating a clustering coefficient of connections between the plurality of nodes based on the strengths of the plurality of nodes, the in-out degrees of the plurality of nodes and the weight values of the connecting edges in the text complex network; thereafter calculating a proportional mixing amount of the connections between the plurality of nodes based on the in-out degrees of the plurality of nodes, the in-out degrees of nodes connected by the plurality of nodes and the number of connecting edges in the text complex network; and calculating path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes; and finally extracting keywords corresponding to the to-be-processed text based on the clustering coefficient of the connections between the plurality of nodes, the proportional mixing amount and the path lengths, thereby improving the accuracy and comprehensiveness of keyword extraction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present disclosure relate to the technical field of computer and the technical field of Internet, in particular to the technical field of natural language processing and the technical field of text analysis, and more particularly to a keyword extraction method and device. BACKGROUND

[0002] In the face of massive text data generated on the Internet every day in the big data era, it is completely unrealistic to rely on manual text information extraction, because the energy of human is limited, and it is impossible to spend a lot of time on reading, induction and summary for each text. This has generated the demand for automatic extraction of text keywords. Through keywords, we can quickly understand the main content of a text and obtain the key information in the text, greatly improving the efficiency.

[0003] Currently, the extraction of keywords mainly includes statistical-based algorithm, machine learning-based algorithm and language-based algorithm. The statistical-based method is simple and fast, and can extract high-frequency words, but ignores the words with important meaning but low frequency in the document, so the extraction of keywords is one-sided. The traditional keyword extraction algorithm only focuses on the surface statistical characteristics of the document (such as word frequency, word position, word length, etc.), ignores the semantic structure and structural information of the document, resulting in the loss of keyword semantics and structural information, and low extraction accuracy. Secondly, some keyword extraction methods still need to manually construct rules, which consumes a lot of human resources and has poor promotion ability. SUMMARY

[0004] Embodiments of the present disclosure provide a keyword extraction method, device, electronic equipment and computer readable medium.

[0005] In a first aspect, the embodiments of the present disclosure provide a keyword extraction method, which comprises: obtaining a text complex network corresponding to a to-be-processed text, wherein the text complex network comprises nodes corresponding to a plurality of single characters in the to-be-processed text, weight values of connecting edges between the plurality of nodes, strengths and in-out degrees of the plurality of nodes; calculating a clustering coefficient of connections between the plurality of nodes based on the strengths, in-out degrees and weight values of the connecting edges in the text complex network; calculating a mixing amount of the connections between the plurality of nodes based on the in-out degrees of the plurality of nodes, in-out degrees of nodes connected by the plurality of nodes and the number of connecting edges in the text complex network; calculating path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes; and extracting keywords corresponding to the to-be-processed text based on the clustering coefficient, the mixing amount and the path lengths of the connections between the plurality of nodes.

[0006] In some embodiments, the text complex network corresponding to the text to be processed is obtained by: in response to obtaining the text to be processed, constructing connection edges between a plurality of characters based on semantic relationships between the plurality of characters; determining degrees, strengths of the plurality of nodes, and weights of the connection edges between the plurality of nodes based on the plurality of nodes and the connection edges between the plurality of nodes; and obtaining the text complex network corresponding to the text to be processed based on the plurality of nodes, the connection edges between the plurality of nodes, the strengths of the plurality of nodes, the degrees, and the weights of the connection edges between the plurality of nodes.

[0007] In some embodiments, the strengths of the plurality of nodes are determined by: determining degrees of the plurality of nodes and a number of the plurality of nodes based on the plurality of nodes; and calculating the strengths of the plurality of nodes based on the degrees of the plurality of nodes and the number of the plurality of nodes.

[0008] In some embodiments, the keywords corresponding to the text to be processed are extracted based on a clustering coefficient, a mixing amount, and a path length of the connection between the plurality of nodes by: performing a first screening on the plurality of nodes in the text complex network based on the mixing amount of the connection between the plurality of nodes to obtain a first screening result corresponding to the plurality of nodes; performing a second screening on the first screening result corresponding to the plurality of nodes based on the path length of the connection between the plurality of nodes to obtain a second screening result corresponding to the plurality of nodes; and sorting the second screening result based on the clustering coefficient of the connection between the plurality of nodes to extract the keywords corresponding to the text to be processed.

[0009] In some embodiments, the method further includes: receiving a set number of keywords; and extracting the keywords corresponding to the text to be processed based on a sorting result of the connection between the plurality of nodes by: sorting the second screening result based on the clustering coefficient of the connection between the plurality of nodes to obtain the sorting result of the connection between the plurality of nodes; and extracting the keywords corresponding to the text to be processed from the sorting result based on the set number of keywords.

[0010] In some embodiments, the method further includes: calculating a proximity between the plurality of nodes and adjacent nodes based on the degrees of the plurality of nodes, the adjacent nodes, and the degrees of the adjacent nodes; performing a first judgment on the text complex network based on the proximity between the plurality of nodes and the adjacent nodes and an average proximity of the plurality of nodes to determine whether the text complex network is coordinated; and generating a first prompt information in response to determining that the text complex network is coordinated, wherein the first prompt information indicates that the keywords corresponding to the text to be processed are accurate.

[0011] In some embodiments, the method further comprises: in response to determining that the text complex network is not coordinated, calculating a weighted proximity between the plurality of nodes and the adjacent nodes; based on the weighted proximity between the plurality of nodes and the adjacent nodes and the average proximity of the plurality of nodes, making a second determination on the text complex network to determine whether the text complex network is coordinated; and in response to determining that the text complex network is coordinated, generating the first prompt information.

[0012] In some embodiments, the method further comprises: in response to determining that the text complex network is not coordinated, generating second prompt information, wherein the second prompt information indicates that there is an error in the keywords corresponding to the text to be processed.

[0013] In a second aspect, embodiments of the present disclosure provide a keyword extraction device, the device comprising: an acquisition module configured to acquire a text complex network corresponding to text to be processed, wherein the text complex network comprises nodes corresponding to a plurality of characters in the text to be processed, weight values of connecting edges between the plurality of nodes, strengths of the plurality of nodes, and in-degrees and out-degrees of the plurality of nodes; a clustering coefficient calculation module configured to calculate a clustering coefficient of connections between the plurality of nodes based on the strengths of the plurality of nodes, the in-degrees and the out-degrees of the plurality of nodes, and the weight values of the connecting edges; a homophily calculation module configured to calculate a homophily of the connections between the plurality of nodes based on the in-degrees and the out-degrees of the plurality of nodes, the in-degrees and the out-degrees of nodes connected to the plurality of nodes, and a number of the connecting edges in the text complex network; a path length calculation module configured to calculate path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes; and an extraction module configured to extract keywords corresponding to the text to be processed based on the clustering coefficient, the homophily, and the path lengths of the connections between the plurality of nodes.

[0014] In some embodiments, the acquisition module comprises: a construction unit configured to, in response to acquiring the text to be processed, construct connecting edges between a plurality of characters based on semantic relationships between the plurality of characters in the text to be processed; a determination unit configured to determine in-degrees and out-degrees of the plurality of nodes, strengths of the plurality of nodes, and weight values of the connecting edges between the plurality of nodes by taking the plurality of characters as nodes; and an acquisition unit configured to acquire the text complex network corresponding to the text to be processed based on the plurality of nodes, the connecting edges between the plurality of nodes, the strengths of the plurality of nodes, the in-degrees and the out-degrees of the plurality of nodes, and the weight values of the connecting edges between the plurality of nodes.

[0015] In some embodiments, the determination unit is further configured to: determine the in-degrees and the out-degrees of the plurality of nodes and a number of the plurality of nodes by taking the plurality of characters as nodes; and calculate the strengths of the plurality of nodes based on the in-degrees and the out-degrees of the plurality of nodes and the number of the plurality of nodes.

[0016] In some embodiments, the extraction module comprises: a first screening unit configured to perform first screening on the plurality of nodes in the text complex network based on a proper mixing amount of connections between the plurality of nodes to obtain first screening results corresponding to the plurality of nodes; a second screening unit configured to perform second screening on the first screening results corresponding to the plurality of nodes based on path lengths of connections between the plurality of nodes to obtain second screening results corresponding to the plurality of nodes; and an extraction unit configured to sort the second screening results based on clustering coefficients of connections between the plurality of nodes, and extract keywords corresponding to the text to be processed.

[0017] In some embodiments, the apparatus further comprises a receiving module configured to receive a set number of keywords, and the extraction unit is further configured to sort the second screening results based on clustering coefficients of connections between the plurality of nodes to obtain a sorting result of the connection results between the plurality of nodes, and extract the keywords corresponding to the text to be processed from the sorting result based on the set number of keywords.

[0018] In some embodiments, the apparatus further comprises: a proximity calculation module configured to calculate proximities between the plurality of nodes and adjacent nodes based on in-degrees and out-degrees of the plurality of nodes, adjacent nodes and in-degrees and out-degrees of the adjacent nodes; a first judgment module configured to perform first judgment on the text complex network based on the proximities between the plurality of nodes and the adjacent nodes and an average proximity of the plurality of nodes to determine whether the text complex network is coordinated; and a generation module configured to generate first prompt information in response to determining that the text complex network is coordinated, wherein the first prompt information represents that the keywords corresponding to the text to be processed are accurate.

[0019] In some embodiments, the apparatus further comprises: a weighted proximity calculation module configured to calculate weighted proximities between the plurality of nodes and adjacent nodes in response to determining that the text complex network is not coordinated; a second judgment module configured to perform second judgment on the text complex network based on the weighted proximities between the plurality of nodes and the adjacent nodes and the average proximity of the plurality of nodes to determine whether the text complex network is coordinated; and the generation module is further configured to generate the first prompt information in response to determining that the text complex network is coordinated.

[0020] In some embodiments, the generation module is further configured to generate second prompt information in response to determining that the text complex network is not coordinated, wherein the second prompt information represents that there is an error in the keywords corresponding to the text to be processed.

[0021] In a third aspect, embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon; and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the embodiments of the first aspect.

[0022] In a fourth aspect, an embodiment of the present disclosure provides a computer readable medium, having stored thereon a computer program, which, when executed by a processor, implements the method described in any of the embodiments of the first aspect.

[0023] The keyword extraction method provided by the embodiment of the present disclosure, the execution subject first acquires the text complex network corresponding to the to-be-processed text, the text complex network includes nodes corresponding to a plurality of single characters in the to-be-processed text, weight values of connecting edges between the plurality of nodes, strengths and in-degrees of the plurality of nodes, then calculates the clustering coefficient of the connections between the plurality of nodes based on the strengths, in-degrees and weight values of the connecting edges of the plurality of nodes in the text complex network, then calculates the assortativity mixing of the connections between the plurality of nodes based on the in-degrees of the plurality of nodes, the in-degrees of the nodes connected by the plurality of nodes and the number of connecting edges in the text complex network, and calculates the path length of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes, and finally extracts the keywords corresponding to the to-be-processed text based on the clustering coefficient, the assortativity mixing and the path length of the connections between the plurality of nodes. Without any text preprocessing process and without relying on the training of the text, the text complex network corresponding to the to-be-processed text is acquired, the process of keyword extraction of the entire text network is shortened, the time and space costs are further reduced, the keyword extraction efficiency is improved, and in the case of not needing training samples and not needing preprocessing of the text, the assortativity mixing, the path length and the clustering coefficient of each node are comprehensively analyzed, the accuracy of the finally extracted keywords of the text is higher, especially for keywords that contribute greatly to the extraction of the central content of the document but have a low frequency, the accuracy and comprehensiveness of the keyword extraction are improved. BRIEF DESCRIPTION OF DRAWINGS

[0024] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:

[0025] Figure 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;

[0026] Figure 2 is a flowchart of one embodiment of the keyword extraction method according to the present disclosure;

[0027] Figure 3 is a flowchart of one embodiment of acquiring the text complex network corresponding to the to-be-processed text according to the present disclosure;

[0028] Figure 4 is a flowchart of one embodiment of extracting the keywords corresponding to the to-be-processed text according to the present disclosure;

[0029] Figure 5is a flow chart of another embodiment of the keyword extraction method according to the present disclosure;

[0030] Figure 6 is a structural schematic diagram of an embodiment of the keyword extraction apparatus according to the present disclosure;

[0031] Figure 7 is a structural schematic diagram of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0032] The present disclosure will be further described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the relevant disclosure, but not to limit the disclosure. In addition, it should be noted that, for the sake of description, only the parts related to the disclosure are shown in the drawings.

[0033] It should be noted that the embodiments in the present disclosure and the features in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.

[0034] Figure 1 An exemplary system architecture 100 of the keyword extraction method and apparatus to which embodiments of the present disclosure can be applied is shown.

[0035] As shown in Figure 1 The system architecture 100 can include terminal devices 104, 105, 106, a network 107, servers 101, 102, 103. The network 107 is a medium to provide a communication link between the terminal devices 104, 105, 106 and the servers 101, 102, 103. The network 107 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0036] A user can interact with the servers 101, 102, 103 belonging to the same server cluster through the terminal devices 104, 105, 106 through the network 107 to receive or send information, etc. Various applications can be installed on the terminal devices 104, 105, 106, such as an item display application, a data analysis application, a search application, etc.

[0037] The terminal devices 104, 105, 106 can be hardware or software. When the terminal device is hardware, it can be various electronic devices with a display screen and supporting communication with a server, including but not limited to a smart phone, a tablet computer, a laptop computer and a desktop computer, etc. When the terminal device is software, it can be installed in the above-mentioned electronic devices. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made herein.

[0038] The servers 101, 102, 103 can be servers providing various services, such as a background server receiving a request sent by a terminal device establishing a communication connection therewith. The background server can receive and analyze the request sent by the terminal device, and generate a processing result.

[0039] The servers 101, 102, 103 can obtain a text complex network corresponding to the text to be processed, the text complex network including nodes corresponding to a plurality of characters in the text to be processed, weight values of connecting edges between the plurality of nodes, strengths and in-degrees of the plurality of nodes, then calculate a clustering coefficient of connections between the plurality of nodes based on the strengths, in-degrees, and weight values of the connecting edges in the text complex network, calculate a assortative mixing of the connections between the plurality of nodes based on the in-degrees of the plurality of nodes, in-degrees of nodes connected to the plurality of nodes, and a number of connecting edges in the text complex network, calculate path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes, and finally extract keywords corresponding to the text to be processed based on the clustering coefficient, assortative mixing, and path lengths of the connections between the plurality of nodes.

[0040] It should be noted that the server can be hardware or software. When the server is hardware, it can be various electronic devices providing various services for terminal devices. When the server is software, it can be implemented as a plurality of software or software modules providing various services for terminal devices, or as a single software or software module providing various services for terminal devices. No specific limitation is made herein.

[0041] It should be noted that the keyword extraction method provided by the embodiments of the present disclosure can be executed by the servers 101, 102, 103. Accordingly, the keyword extraction apparatus is arranged in the servers 101, 102, 103.

[0042] It should be understood that Figure 1 The number of terminal devices, networks, and servers in

[0043] With reference to Figure 2 , a flow 200 of one embodiment of the keyword extraction method according to the present disclosure is shown. The keyword extraction method includes the following steps:

[0044] In step 210, a text complex network corresponding to the text to be processed is obtained.

[0045] In this step, the keyword extraction method is executed by an execution subject (for example Figure 1The server 101, 102, 103 in the server group can read the to-be-processed text through the network or in the local database, and the to-be-processed text can be a text for which keywords are to be extracted or can be any text. After the execution subject obtains the to-be-processed text, the execution subject can extract and analyze each character included in the to-be-processed text, and construct a text complex network corresponding to the to-be-processed text. The text complex network can be a network structure composed of each character in the to-be-processed text as a node, and is a graph with complex topological structure characteristics. The text complex network can represent the semantic relationship and connection relationship between each character in the to-be-processed text.

[0046] The text complex network can be a network structure composed of multiple nodes and complex relationships between the multiple nodes. The text complex network can include nodes corresponding to multiple characters in the to-be-processed text, connection edges between the multiple nodes, weights of the connection edges between the multiple nodes, strengths of the multiple nodes, and in-degrees of the multiple nodes.

[0047] Each character in the to-be-processed text can be a node in the text complex network. Each adjacent two characters have a connection relationship, that is, there is a connection edge between two adjacent nodes. The direction of the connection edge can be from the previous node to the next node, thereby determining the connection edges between the multiple nodes. The weight of the connection edge represents the number of times the character corresponding to the node exists in the to-be-processed text. The strength of the node represents the sum of the weights of all the nodes from the node to the next node, that is, the frequency of the character corresponding to the node in the to-be-processed text. The in-degree of the node represents the number of successor nodes connected to the node.

[0048] In step 220, based on the strength, in-degree, and weight of the connection edge of the multiple nodes in the text complex network, the clustering coefficient of the connection between the multiple nodes is calculated.

[0049] In this step, after the execution subject obtains the to-be-processed text and the text complex network corresponding to the to-be-processed text, the strength, in-degree, and weight of the connection edge of each node in the text complex network can be obtained. The execution subject can calculate the clustering coefficient of the connection between the node and other nodes by using the strength, in-degree, connection edge, and weight of the connection edge between the node and other nodes, and the total number of nodes in the text complex network. The clustering coefficient can represent the association between the node and any other node.

[0050] Specifically, the execution subject can calculate the clustering coefficient of the connection between each node and other nodes by using the strength, in-degree, connection edge, and weight of the connection edge between each node and other nodes, and the total number of nodes in the text complex network, through the following clustering coefficient calculation formula. The clustering coefficient calculation formula can be:

[0051]

[0052] wherein, i, j, h represent nodes, i represents the node currently calculated, j, h represent other nodes in the text complex network except node i; s i represents the strength of node i; W ij represents the weight of the connecting edge between node i and node j; W ih represents the weight of the connecting edge between node i and node h; N represents the number of all nodes in the text complex network; a ij represents that if there is an edge between node i and node j, then a ij is 1, otherwise a ij is 0; a ih represents that if there is an edge between node i and node h, then a ih is 1, otherwise a ih is 0; a jh represents that if there is an edge between node j and node h, then a jh is 1, otherwise a jh is 0; k i represents the in-out degree of node i.

[0053] Step 230, based on the in-out degrees of the plurality of nodes, the in-out degrees of the nodes connected by the plurality of nodes, and the number of connecting edges in the text complex network, the proportional mixing amount of the connections between the plurality of nodes is calculated.

[0054] In this step, after the above execution subject obtains the to-be-processed text and the text complex network corresponding to the to-be-processed text, the in-out degrees of each node, the other nodes connected by each node, and the number of connecting edges in the text complex network can be obtained. The above execution subject can calculate the proportional mixing amount of the connections between each node and other nodes by using the in-out degrees of the node, the other nodes connected by the node, and the number of connecting edges in the text complex network. The proportional mixing amount can represent the associativity between the node and any other node.

[0055] Specifically, the above execution subject can calculate the proportional mixing amount of the connections between each node and other nodes by using the in-out degrees of each node, the in-out degrees of the nodes connected by the plurality of nodes, and the number of connecting edges in the text complex network through the following proportional mixing amount calculation formula. Wherein, the proportional mixing amount calculation formula can be:

[0056]

[0057] wherein, M represents the number of connecting edges in the text complex network; k i represents the in-out degree of node i; j represents the node connected to node i, ji denotes the out-degree of the node i.

[0058] The proper mixing amount of each node can be in the interval [-1, 1], and if the proper mixing amount is equal to 0, it indicates that the node i has no correlation with other nodes.

[0059] In step 240, the path length of the connection between the plurality of nodes is calculated based on the connection edges between the plurality of nodes.

[0060] In this step, after the execution subject obtains the text to be processed and the text complex network corresponding to the text to be processed, the execution subject can obtain the connection edges between the plurality of nodes from the text complex network. The execution subject can calculate the number of connection edges between any two nodes based on the connection edges between the plurality of nodes in the text complex network, and take the minimum value in the number of connection edges as the path length of the connection between any two nodes, so that the execution subject can calculate the path length of the connection between the plurality of nodes based on the number of connection edges between the plurality of nodes, that is, the path length can represent the number of connection edges of the shortest path between two nodes. It can be represented by path length d(i, j) to represent the number of connection edges of the shortest path between nodes i and j.

[0061] In step 250, the keyword corresponding to the text to be processed is extracted based on the clustering coefficient, the proper mixing amount, and the path length of the connection between the plurality of nodes.

[0062] In this step, after the execution subject determines the clustering coefficient, the proper mixing amount, and the path length of the connection between the plurality of nodes based on the text complex network of the text to be processed, the execution subject can determine the connection relationship between each node and any other node from the connection relationship between each node and any other node based on the clustering coefficient, the proper mixing amount, and the path length of the connection between each node and any other node, and the connection relationship between the clustering coefficient, the proper mixing amount, and the path length of the connection between the two nodes meets the extraction condition. The connection relationship can be the connection relationship between each node and other nodes, that is, the connection relationship between the node and other nodes can make the clustering coefficient, the proper mixing amount, and the path length of the connection between the two nodes meet the extraction condition. The extraction condition can represent the condition for extraction from the connection relationship between the plurality of nodes, which can include coordinating the clustering coefficient, the proper mixing amount, and the path length of the connection between the two nodes, selecting the two connected nodes corresponding to the optimal value of the clustering coefficient, the proper mixing amount, and the path length, and can also include selecting the two connected nodes corresponding to the clustering coefficient greater than the preset coefficient, the proper mixing amount greater than the preset threshold, and the path length greater than the preset length, and the present disclosure does not make specific limitations.

[0063] The execution subject selects one or more connectable two nodes meeting the extraction condition based on the clustering coefficient, the assortativity mixing and the path length between any two nodes and the extraction condition, can combine the single characters corresponding to the one or more connected two nodes, generates a plurality of corresponding word groups, and determines the key words corresponding to the to-be-processed text. The key words can include a plurality of or one, without specific limitation.

[0064] The keyword extraction method provided by the embodiment of the disclosure first acquires the text complex network corresponding to the to-be-processed text, the text complex network including nodes corresponding to a plurality of single characters in the to-be-processed text, weight values of connection edges between the nodes, strengths and in-degrees of the nodes, then calculates the clustering coefficient of the connection between the nodes based on the strengths, in-degrees and weight values of the connection edges of the nodes in the text complex network, calculates the assortativity mixing of the connection between the nodes based on the in-degrees of the nodes, in-degrees of the nodes connected by the nodes and the number of connection edges in the text complex network, and calculates the path length of the connection between the nodes based on the connection edges between the nodes, and finally extracts the key words corresponding to the to-be-processed text based on the clustering coefficient, the assortativity mixing and the path length of the connection between the nodes. Without any text preprocessing process and without relying on the training text of the word segmentation system, the text complex network corresponding to the to-be-processed text is acquired, the process of the keyword extraction of the whole text network is shortened, the time and space costs are further reduced, the keyword extraction efficiency is improved, and in the case of not needing training samples and not needing text preprocessing, the assortativity mixing, the path length and the clustering coefficient of each node are comprehensively analyzed, the accuracy of the finally extracted text key words is higher, especially for the key words with high contribution to the extraction of the document center content but low frequency, the accuracy and comprehensiveness of the keyword extraction are improved.

[0065] Reference Figure 3 , Figure 3 A flowchart 300 of one embodiment of acquiring the text complex network corresponding to the to-be-processed text is shown, that is, the step 210, acquiring the text complex network corresponding to the to-be-processed text can include the following steps:

[0066] In step 310, in response to acquiring the to-be-processed text, the connection edges between the plurality of single characters are constructed based on the semantic relationship between the plurality of single characters in the to-be-processed text.

[0067] In this step, the execution subject reads the to-be-processed text through the network or reads the to-be-processed text in the local database, can perform semantic analysis on the acquired to-be-processed text, and determines the semantic relationship between the plurality of single characters in the to-be-processed text. The semantic relationship can be used as the connection relationship between the plurality of single characters.

[0068] After determining the semantic relationship between the plurality of characters, the execution subject determines a connection relationship between each character and other characters according to the semantic relationship between each character and other characters, and constructs a connection edge between the plurality of characters according to the connection relationship.

[0069] For example, after performing semantic analysis on the word group ABC and determining that there is a semantic relationship between A and B, there is a connection relationship between A and B, and there is a semantic relationship between B and C, there is a connection relationship between B and C. The execution subject can construct a connection edge between A and B according to the connection relationship between A and B, and construct a connection edge between B and C according to the connection relationship between B and C.

[0070] In step 320, the plurality of characters are taken as nodes, and the out-degree, strength and weight of the connection edge between the plurality of nodes are determined.

[0071] In this step, the execution subject can take each character in the to-be-processed text as a node, and determine the out-degree of each node according to the connection edge between each node and other nodes, i.e., the number of successor nodes connected by each node is taken as the out-degree of each node.

[0072] The execution subject can also count the number of occurrences of the character corresponding to the node in the to-be-processed text according to the connection edge between the plurality of nodes and all characters in the to-be-processed text, and take the counted number of occurrences as the weight of the connection edge of the node. For example, there is a connection edge between A and B, the number of occurrences of A in the to-be-processed text can be counted, and the number of occurrences of A is taken as the weight of the connection edge between A and B.

[0073] The execution subject can also count the sum of weights of all edges from each node to the following nodes corresponding to each node, i.e., the frequency of occurrence of the character corresponding to the node in the to-be-processed text, and take the counted value as the strength of each node.

[0074] As an optional implementation, step 320 of taking the plurality of characters as nodes to determine the strength of the plurality of nodes can include the following steps: taking the plurality of characters as nodes to determine the out-degree of the plurality of nodes and the number of the plurality of nodes; and calculating the strength of the plurality of nodes based on the out-degree of the plurality of nodes and the number of the plurality of nodes.

[0075] Specifically, the execution subject can take each character in the to-be-processed text as a node, and determine the out-degree of each node according to the connection edge between each node and other nodes, i.e., the number of successor nodes connected by each node is taken as the out-degree of each node, and the execution subject can also count the total number of nodes.

[0076] The execution subject can calculate the strength of each node according to the in-degree and out-degree of the node, the number of other nodes and the number of nodes, and the strength can represent the frequency of existence of the single character corresponding to the node. Specifically, the execution subject can calculate the strength of each node by using the in-degree and out-degree of each node, the number of other nodes and the number of nodes, and the following strength calculation formula.

[0077] The strength calculation formula can be:

[0078]

[0079] wherein i, j, h represent nodes, i represents the node currently calculated, j and h represent other nodes in the text complex network except node i; N represents the number of all nodes; a ij represents that if there is an edge between node i and node j, then a ij is 1, otherwise a ij is 0; a ih represents that if there is an edge between node i and node h, then a ih is 1, otherwise a ih is 0; a jh represents that if there is an edge between node j and node h, then a jh is 1, otherwise a jh is 0; k i represents the in-degree and out-degree of node i.

[0080] In the implementation mode, by calculating the strength of the nodes according to the in-degree and out-degree of the nodes and the number of nodes, the strength of each node can be accurately determined, and the accuracy of the node strength is improved.

[0081] In step 330, based on the plurality of nodes, the connection edges between the plurality of nodes, the strength, the in-degree and out-degree of the plurality of nodes, and the weight of the connection edges between the plurality of nodes, a text complex network corresponding to the text to be processed is obtained.

[0082] In this step, after the execution subject obtains the plurality of nodes, the connection edges between the plurality of nodes, the strength, the in-degree and out-degree of the plurality of nodes, and the weight of the connection edges between the plurality of nodes, the execution subject can construct an initial complex network corresponding to the text to be processed according to the plurality of nodes and the connection edges between the plurality of nodes, and perfect the attributes of the initial complex network according to the strength, the in-degree and out-degree of the plurality of nodes, and the weight of the connection edges between the plurality of nodes, so as to obtain the text complex network corresponding to the text to be processed.

[0083] In the present implementation, by taking each single character as a node, and based on the plurality of nodes, the connecting edges between the plurality of nodes, the strengths of the plurality of nodes, the in-degrees and out-degrees, and the weights of the connecting edges between the plurality of nodes, a text complex network corresponding to the text to be processed is obtained, the text complex network is constructed based on the text semantic relationship, and the feature attributes between the single characters in the text to be processed are embodied based on the text complex network.

[0084] Reference Figure 4 , Figure 4 A flowchart 400 of one embodiment of extracting keywords corresponding to the text to be processed is shown, i.e., the above-mentioned step 240, based on the clustering coefficient, the assortativity mixing, and the path length of the connections between the plurality of nodes, the keywords corresponding to the text to be processed are extracted, which can include the following steps:

[0085] In step 410, based on the assortativity mixing of the connections between the plurality of nodes, the plurality of nodes in the text complex network are first screened to obtain a first screening result corresponding to the plurality of nodes.

[0086] In this step, after the above-mentioned subject can obtain the assortativity mixing of the connections between the plurality of nodes, since the assortativity mixing represents the correlation degree of the connections between two nodes, the above-mentioned subject can determine the correlation degree of the connections between any two nodes based on the assortativity mixing of the connections between the plurality of nodes.

[0087] The above-mentioned subject can compare the assortativity mixing of the connections between each two nodes with a preset threshold, and take the assortativity mixing greater than the preset threshold as a result satisfying the condition, so as to realize the first screening of the plurality of nodes in the text complex network, and thus the above-mentioned subject can obtain a plurality of groups of connected nodes with the path length greater than the preset length based on the first screening, and obtain the second screening result corresponding to the plurality of nodes.

[0088] In step 420, based on the path length of the connections between the plurality of nodes, the first screening result corresponding to the plurality of nodes is second screened to obtain a second screening result corresponding to the plurality of nodes.

[0089] In this step, after the above-mentioned subject obtains the first screening result, the second screening can be performed according to the path length of the connections between the plurality of nodes. That is, the above-mentioned subject can obtain the path length between the plurality of groups of connected nodes in the first screening result, compare the path length between each group of connected nodes with a preset length, determine the connected nodes with the path length greater than the preset length, realize the second screening of the first screening result corresponding to the plurality of nodes, and thus the above-mentioned subject can obtain a plurality of groups of connected nodes with the path length greater than the preset length based on the second screening, and obtain the second screening result corresponding to the plurality of nodes.

[0090] The preset length can be a preset numerical value, or an average value of path lengths of all nodes, and the disclosure does not make specific limitations thereto.

[0091] In step 430, the second screening result is sorted based on the clustering coefficient of the connection between the plurality of nodes, and the keyword corresponding to the text to be processed is extracted.

[0092] In this step, after the execution subject obtains the second screening result, the proportional mixing amount of the plurality of connected nodes included in the second screening result is greater than the preset threshold, and the path length is greater than the preset length. The clustering coefficient of the connection between the plurality of nodes can be sorted. The execution subject can obtain the clustering coefficient of the plurality of connected nodes in the second screening result, sort the plurality of connected nodes in the second screening result according to the size of the clustering coefficient, and obtain the sorting result of the plurality of connected nodes. The execution subject can generate a sorting result of a plurality of word groups according to the nodes in the sorting result, and extract the keyword corresponding to the text to be processed from the sorting result of the plurality of word groups.

[0093] As an optional implementation, the keyword extraction method can further include receiving a set keyword quantity. And, the step 430 of sorting the second screening result based on the clustering coefficient of the connection between the plurality of nodes, and extracting the keyword corresponding to the text to be processed, can include the following steps: sorting the second screening result based on the clustering coefficient of the connection between the plurality of nodes to obtain the sorting result of the connection result between the plurality of nodes; and extracting the keyword corresponding to the text to be processed from the sorting result based on the set keyword quantity.

[0094] Specifically, the execution subject can also receive a keyword quantity set by the user, which can be set by the user himself / herself, and the disclosure does not make specific limitations thereto. After the execution subject obtains the second screening result, the clustering coefficient of the connection between the plurality of nodes can be sorted. The execution subject can obtain the clustering coefficient of the plurality of connected nodes in the second screening result, sort the plurality of connected nodes in the second screening result according to the size of the clustering coefficient, and obtain the sorting result of the connection result between the plurality of nodes. The execution subject can generate a sorting result of a plurality of word groups according to the nodes in the sorting result, extract the word group in front of the sorting based on the set keyword quantity from the sorting result as the keyword corresponding to the text to be processed, and the number of keywords is the same as the set keyword quantity.

[0095] In this implementation, by extracting the keyword of the text to be processed based on the keyword quantity set by the user, the number of text keywords required to be extracted can be freely set, the flexibility of keyword extraction is improved, and different needs of users and scenes can be met.

[0096] In the present implementation, the keywords corresponding to the text to be processed are extracted by the clustering coefficient of the connections between the plurality of nodes, the assortativity mixing amount and the path length, the assortativity mixing amount, the path length and the clustering coefficient of each node are comprehensively analyzed, the accuracy of the extracted text keywords is higher, and the keywords with high contribution to the extraction of the document center content but low frequency can be extracted.

[0097] Reference Figure 5 , Figure 5 A flowchart 500 illustrating another embodiment of a keyword extraction method can include the following steps:

[0098] Step 501, obtaining a text complex network corresponding to the text to be processed.

[0099] Step 501 of the present embodiment can be performed in a similar manner to step 210 in the embodiment shown in Figure 2 , which will not be described here.

[0100] Step 502, calculating the clustering coefficient of the connections between the plurality of nodes based on the strength, out-degree and in-degree of the plurality of nodes, and the weight of the connection edges in the text complex network.

[0101] Step 502 of the present embodiment can be performed in a similar manner to step 220 in the embodiment shown in Figure 2 , which will not be described here.

[0102] Step 503, calculating the assortativity mixing amount of the connections between the plurality of nodes based on the out-degree and in-degree of the plurality of nodes, the out-degree and in-degree of the nodes connected by the plurality of nodes, and the number of connection edges in the text complex network.

[0103] Step 503 of the present embodiment can be performed in a similar manner to step 230 in the embodiment shown in Figure 2 , which will not be described here.

[0104] Step 504, calculating the path length of the connections between the plurality of nodes based on the connection edges between the plurality of nodes.

[0105] Step 504 of the present embodiment can be performed in a similar manner to step 240 in the embodiment shown in Figure 2 , which will not be described here.

[0106] Step 505, extracting keywords corresponding to the text to be processed based on the clustering coefficient of the connections between the plurality of nodes, the assortativity mixing amount and the path length.

[0107] Step 505 of the present embodiment can be performed in a similar manner to step 250 in the embodiment shown in Figure 2 , which will not be described here.

[0108] Step 506: Calculate the proximity between multiple nodes and their neighboring nodes based on the in-degree and out-degree of multiple nodes, neighboring nodes, and the in-degree and out-degree of neighboring nodes.

[0109] In this step, the aforementioned execution entity can also calculate the proximity between each node and its neighboring nodes based on the in-degree and out-degree of multiple nodes, neighboring nodes, and the in-degree and out-degree of neighboring nodes, using a proximity calculation formula. This proximity calculation formula can be:

[0110]

[0111] Where i and j represent nodes, i represents the currently computed node, and j represents the neighboring node connected to node i in the text complex network; a ij This means that if there is an edge between node i and node j, then a ij It's 1, otherwise a ij It is 0; k i k represents the in-degree and out-degree of node i; j This represents the in-degree and out-degree of node j.

[0112] Step 507: Based on the proximity between multiple nodes and their neighboring nodes and the average proximity of multiple nodes, a first judgment is made on the complex text network to determine whether the complex text network is coordinated.

[0113] In this step, the aforementioned execution entity can calculate the average proximity of multiple nodes based on the proximity of each node to its neighboring nodes. After obtaining the proximity of multiple nodes to their neighboring nodes, the execution entity can compare the proximity of each node to its neighboring nodes with the average proximity to determine whether the proximity of each node to its neighboring nodes is greater than the average proximity. Finally, it determines whether the number of nodes with proximity greater than the average proximity exceeds a threshold, thereby performing a first judgment on the text complex network and determining whether the text complex network is coordinated.

[0114] In response to determining the text complex network coordination, step 508 is executed, and in response to determining the text complex network coordination, a first prompt message is generated.

[0115] In this step, the execution entity determines that the number of words with a final proximity greater than the average exceeds a threshold. If this is determined, the text complex network coordination is confirmed. This can confirm that the keywords extracted based on the text complex network are accurate, and generate a first prompt message. This first prompt message indicates that the keywords corresponding to the text to be processed are accurate.

[0116] In this embodiment, the coordination of the complex text network is determined by the proximity between multiple nodes and their neighboring nodes, thereby judging whether the extracted keywords are accurate and further ensuring the accuracy of the extracted keywords.

[0117] With reference to both Figure 5 The keyword extraction method further comprises the following steps:

[0118] In response to determining that the text complex network is not coordinated, step 509 is performed, and in response to determining that the text complex network is not coordinated, the weighted proximity between the plurality of nodes and adjacent nodes is calculated.

[0119] In this step, the execution subject determines that the text complex network is not coordinated by judging that the number of nodes greater than the average proximity does not exceed the threshold value. The weighted proximity between the plurality of nodes and adjacent nodes can be calculated based on the strength of the node, the number of nodes, the out-degree and in-degree of adjacent nodes, and the out-degree and in-degree of the node, through a weighted proximity calculation formula. The weighted proximity calculation formula can be:

[0120]

[0121] where i, j represent nodes, i represents the currently calculated node, and j represents the adjacent node connected to node i in the text complex network; s i represents the strength of node i; w ij represents the weight of the connection edge between node i and node j; N represents the number of all nodes in the text complex network; k j represents the out-degree and in-degree of node j.

[0122] Step 510, based on the weighted proximity between the plurality of nodes and adjacent nodes and the average proximity of the plurality of nodes, a second judgment is made on the text complex network to determine whether the text complex network is coordinated.

[0123] In this step, the execution subject can compare the weighted proximity between the plurality of nodes and adjacent nodes and the average proximity of the plurality of nodes to determine whether the weighted proximity between each node and adjacent node is greater than the average proximity. The number of nodes greater than the average proximity is determined by comparing the average proximity, and it is judged whether the number of nodes greater than the average proximity exceeds the threshold value, to make a second judgment on the text complex network to determine whether the text complex network is coordinated.

[0124] In response to determining that the text complex network is coordinated, step 508 is performed, and in response to determining that the text complex network is coordinated, a first prompt information is generated.

[0125] In response to determining that the text complex network is not coordinated, step 511 is performed, and in response to determining that the text complex network is not coordinated, a second prompt information is generated.

[0126] In this step, the execution subject determines that the text complex network is not coordinated when the number of final degrees greater than the average degree of proximity does not exceed the threshold value, and determines that the keywords extracted based on the text complex network are inaccurate, and the keywords have errors. A second prompt information is generated, and the second prompt information indicates that the keywords corresponding to the text to be processed have errors.

[0127] In this embodiment, whether the keywords extracted are accurate is determined by further determining whether the text complex network is coordinated based on the weighted degrees of proximity between the plurality of nodes and the adjacent nodes, thereby further ensuring the accuracy of the extracted keywords.

[0128] Further reference Figure 6 , as an implementation of the method shown in the above figures, the disclosure provides an embodiment of a keyword extraction device. The device embodiment corresponds to the method embodiment shown in Figure 2 .

[0129] As shown in Figure 6 , the keyword extraction device 600 of the present embodiment can include an acquisition module 610, a clustering coefficient calculation module 620, a mixing amount calculation module 630, a path length calculation module 640, and an extraction module 650.

[0130] The acquisition module 610 is configured to acquire a text complex network corresponding to a text to be processed, wherein the text complex network includes nodes corresponding to a plurality of single characters in the text to be processed, weight values of connecting edges between the plurality of nodes, strengths and out-degrees of the plurality of nodes.

[0131] The clustering coefficient calculation module 620 is configured to calculate a clustering coefficient of the connections between the plurality of nodes based on the strengths, out-degrees, and weight values of the connecting edges of the plurality of nodes in the text complex network.

[0132] The mixing amount calculation module 630 is configured to calculate a mixing amount of the connections between the plurality of nodes based on the out-degrees of the plurality of nodes, the out-degrees of the nodes connected to the plurality of nodes, and the number of connecting edges in the text complex network.

[0133] The path length calculation module 640 is configured to calculate a path length of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes.

[0134] The extraction module 650 is configured to extract keywords corresponding to the text to be processed based on the clustering coefficient, the mixing amount, and the path length of the connections between the plurality of nodes.

[0135] In some optional implementations of the present embodiment, the obtaining module comprises: a constructing unit configured to, in response to obtaining the text to be processed, construct connection edges between the plurality of characters based on semantic relationships between the plurality of characters in the text to be processed; a determining unit configured to determine, taking the plurality of characters as nodes, in-degrees and out-degrees of the plurality of nodes, strengths of the plurality of nodes, and weights of the connection edges between the plurality of nodes; and an obtaining unit configured to obtain the text complex network corresponding to the text to be processed based on the plurality of nodes, the connection edges between the plurality of nodes, the strengths of the plurality of nodes, the in-degrees and the out-degrees, and the weights of the connection edges between the plurality of nodes.

[0136] In some optional implementations of the present embodiment, the determining unit is further configured to: determine, taking the plurality of characters as nodes, in-degrees and out-degrees of the plurality of nodes, and a number of the plurality of nodes; and calculate the strengths of the plurality of nodes based on the in-degrees and the out-degrees of the plurality of nodes and the number of the plurality of nodes.

[0137] In some optional implementations of the present embodiment, the extracting module comprises: a first screening unit configured to perform first screening on the plurality of nodes in the text complex network based on a proper mixing amount of the connections between the plurality of nodes to obtain first screening results corresponding to the plurality of nodes; a second screening unit configured to perform second screening on the first screening results corresponding to the plurality of nodes based on path lengths of the connections between the plurality of nodes to obtain second screening results corresponding to the plurality of nodes; and an extracting unit configured to sort the second screening results based on clustering coefficients of the connections between the plurality of nodes, and extract the keywords corresponding to the text to be processed.

[0138] In some optional implementations of the present embodiment, the apparatus further comprises a receiving module configured to receive a set number of keywords, and the extracting unit is further configured to sort the second screening results based on the clustering coefficients of the connections between the plurality of nodes to obtain a sorting result of the connection results between the plurality of nodes, and extract the keywords corresponding to the text to be processed from the sorting result based on the set number of keywords.

[0139] In some optional implementations of the present embodiment, the apparatus further comprises: a proximity calculating module configured to calculate proximities between the plurality of nodes and adjacent nodes based on the in-degrees and the out-degrees of the plurality of nodes, the adjacent nodes, and the in-degrees and the out-degrees of the adjacent nodes; a first judging module configured to perform first judgment on the text complex network based on the proximities between the plurality of nodes and the adjacent nodes and an average proximity of the plurality of nodes to determine whether the text complex network is coordinated; and a generating module configured to generate a first prompt information in response to determining that the text complex network is coordinated, wherein the first prompt information indicates that the keywords corresponding to the text to be processed are accurate.

[0140] In some optional implementations of the present embodiment, the apparatus further comprises: a weighted proximity calculation module configured to calculate a weighted proximity between the plurality of nodes and the adjacent nodes in response to determining that the text complex network is not coordinated; a second judgment module configured to make a second judgment on the text complex network based on the weighted proximity between the plurality of nodes and the adjacent nodes and the average proximity of the plurality of nodes to determine whether the text complex network is coordinated; and a generation module further configured to generate the first prompt information in response to determining that the text complex network is coordinated.

[0141] In some optional implementations of the present embodiment, the generation module is further configured to generate a second prompt information in response to determining that the text complex network is not coordinated, wherein the second prompt information indicates that there is an error in the keywords corresponding to the text to be processed.

[0142] The keyword extraction apparatus provided by the above embodiments of the present disclosure first acquires a text complex network corresponding to the text to be processed, the text complex network including nodes corresponding to a plurality of characters in the text to be processed, weight values of connecting edges between the plurality of nodes, strengths of the plurality of nodes, and in-degrees and out-degrees of the plurality of nodes, then calculates a clustering coefficient of connections between the plurality of nodes based on the strengths of the plurality of nodes, the in-degrees and the out-degrees of the plurality of nodes, and the weight values of the connecting edges in the text complex network, calculates a mixing amount of the connections between the plurality of nodes based on the in-degrees and the out-degrees of the plurality of nodes, the in-degrees and the out-degrees of the nodes connected to the plurality of nodes, and the number of the connecting edges in the text complex network, and calculates path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes, and finally extracts keywords corresponding to the text to be processed based on the clustering coefficient of the connections between the plurality of nodes, the mixing amount of the connections between the plurality of nodes, and the path lengths of the connections between the plurality of nodes, without any text preprocessing process and without relying on a word segmentation system to train the text to acquire the text complex network corresponding to the text to be processed, shortens the keyword extraction process of the entire text network, further reduces the time and space costs, improves the keyword extraction efficiency, and in the case of not needing training samples and not needing text preprocessing, comprehensively analyzes the mixing amount, the path length, and the clustering coefficient of each node to finally extract text keywords with higher accuracy, especially for keywords that contribute greatly to the extraction of document center content but have a low frequency, improves the accuracy and comprehensiveness of keyword extraction.

[0143] Those skilled in the art can understand that the above apparatus further comprises some other well-known structures, such as a processor, a memory, etc., and in order not to unnecessarily obscure the embodiments of the present disclosure, these well-known structures are not shown in the Figure 6 .

[0144] The above and other aspects of the present disclosure will become more apparent by describing in detail some embodiments thereof with reference to the attached drawings, in which: Figure 7The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as smart screens, laptops, tablets, PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0145] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0146] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 7 Each box shown can represent a device or multiple devices as needed.

[0147] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the methods of embodiments of the present disclosure are executed. It should be noted that the computer readable medium of embodiments of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but not limited to, be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In embodiments of the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In embodiments of the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take many forms, including but not limited to, an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the above.

[0148] Computer program code for carrying out operations of embodiments of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0149] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0150] The units described in the embodiments of the present application can be implemented by software, or by hardware. The units described can also be implemented by a processor, for example, can be described as: a processor includes an acquisition module, an aggregation coefficient calculation module, a proportionate mixture calculation module, a path length calculation module, and an extraction module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases.

[0151] As another aspect, the present application also provides a computer readable medium, which can be included in the electronic device or exist independently without being assembled into the electronic device. The computer readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a text complex network corresponding to the to-be-processed text, wherein the text complex network includes nodes corresponding to a plurality of characters in the to-be-processed text, weight values of connecting edges between the plurality of nodes, strengths and in-degrees of the plurality of nodes; calculate a clustering coefficient of connections between the plurality of nodes based on the strengths, the in-degrees and the weight values of the connecting edges in the text complex network; calculate a mixing amount of the connections between the plurality of nodes based on the in-degrees of the plurality of nodes, the in-degrees of nodes connected by the plurality of nodes and the number of connecting edges in the text complex network; calculate path lengths of the connections between the plurality of nodes based on the connecting edges between the plurality of nodes; and extract keywords corresponding to the to-be-processed text based on the clustering coefficient, the mixing amount and the path lengths of the connections between the plurality of nodes.

[0152] The above description is merely the preferred embodiments of the present application and the explanation of the principles of the applied technology. It should be understood by those skilled in the art that the inventive scope of the embodiments of the present application is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the inventive concept. For example, the above features can be replaced with the technical features disclosed in the embodiments of the present application (but not limited to) having similar functions to form technical solutions.

Claims

1. A keyword extraction method, the method comprising: Obtain the text complex network corresponding to the text to be processed, wherein the text complex network includes nodes corresponding to multiple single words in the text to be processed, weights of the connecting edges between multiple nodes, and strengths and in-degrees of multiple nodes; Based on the strength, in-degree, and edge weights of multiple nodes in the complex text network, the clustering coefficient of the connections between the multiple nodes is calculated. Based on the in-degree of the multiple nodes, the in-degree of the nodes connected to the multiple nodes, and the number of connecting edges in the text complex network, calculate the symmetrical mixing amount of the connections between the multiple nodes; Calculate the path length between the multiple nodes based on the connecting edges between them; Based on the clustering coefficient, symmetric mixing amount, and path length of the connections between the multiple nodes, the keywords corresponding to the text to be processed are extracted. The step of extracting keywords corresponding to the text to be processed based on the clustering coefficient, symmetric mixing amount, and path length of the connections between the multiple nodes includes: Based on the symmetrical mixing amount of the connections between the multiple nodes, the multiple nodes in the text complex network are first filtered to obtain the first filtering result corresponding to the multiple nodes; Based on the path length connecting the multiple nodes, the first filtering result corresponding to the multiple nodes is subjected to a second filtering to obtain the second filtering result corresponding to the multiple nodes. Based on the clustering coefficients of the connections between the multiple nodes, the second filtering results are sorted, and the keywords corresponding to the text to be processed are extracted.

2. The method according to claim 1, wherein, The process of obtaining the text complex network corresponding to the text to be processed includes: In response to obtaining the text to be processed, connection edges between the multiple characters in the text to be processed are constructed based on the semantic relationships between the multiple characters. Using the multiple single characters as nodes, determine the in-degree, strength, and weight of the connecting edges between the multiple nodes; Based on the plurality of nodes, the connecting edges between the plurality of nodes, the strength, in-degree, and weight of the connecting edges between the plurality of nodes, the text complex network corresponding to the text to be processed is obtained.

3. The method according to claim 2, wherein, The step of using the multiple single characters as nodes and determining the strength of the multiple nodes includes: Using the multiple single characters as nodes, determine the in-degree and the number of the multiple nodes; The strength of the multiple nodes is calculated based on their in-degree and out-degree and the number of nodes.

4. The method according to claim 1, further comprising: The number of keywords to receive; And, the extraction of keywords corresponding to the text to be processed based on the sorting results of the connection results between the multiple nodes includes: Based on the clustering coefficient of the connections between the multiple nodes, the second screening results are sorted to obtain the sorting results of the connections between the multiple nodes; Based on the set number of keywords, extract the keywords corresponding to the text to be processed from the sorting results.

5. The method according to any one of claims 1-4, further comprising: Based on the in-degree and out-degree of the multiple nodes, the neighboring nodes, and the in-degree and out-degree of the neighboring nodes, the proximity degree between the multiple nodes and the neighboring nodes is calculated. Based on the proximity between the plurality of nodes and the adjacent nodes and the average proximity between the plurality of nodes, a first judgment is made on the text complex network to determine whether the text complex network is coordinated. In response to determining the text complex network coordination, a first prompt message is generated, wherein the first prompt message indicates that the keywords corresponding to the text to be processed are accurate.

6. The method according to claim 5, further comprising: In response to determining that the text complex network is incoordination, the weighted proximity between the plurality of nodes and the neighboring nodes is calculated; Based on the weighted proximity between the multiple nodes and their neighboring nodes and the average proximity of the multiple nodes, a second judgment is made on the text complex network to determine whether the text complex network is coordinated. In response to determining the text complex network coordination, the first prompt message is generated.

7. The method according to claim 6, further comprising: In response to determining that the complex network of the text is incoherent, a second prompt message is generated, wherein the second prompt message indicates that there is an error in the keyword corresponding to the text to be processed.

8. A keyword extraction device, the device comprising: The acquisition module is configured to acquire the text complex network corresponding to the text to be processed, wherein the text complex network includes nodes corresponding to multiple single words in the text to be processed, weights of the connecting edges between multiple nodes, and strengths and in-degrees of multiple nodes. The clustering coefficient calculation module is configured to calculate the clustering coefficient between the multiple nodes based on the strength, in-degree, and weight of the connecting edges of the multiple nodes in the complex text network. The proportional mixture calculation module is configured to calculate the proportional mixture of connections between the multiple nodes based on the in-degree of the multiple nodes, the in-degree of the nodes connected to the multiple nodes, and the number of connection edges in the text complex network. The path length calculation module is configured to calculate the path length between the multiple nodes based on the connection edges between the multiple nodes. The extraction module is configured to extract keywords corresponding to the text to be processed based on the clustering coefficient, symmetric mixing amount, and path length of the connections between the multiple nodes. The extraction module includes: The first filtering unit is configured to perform a first filtering on the multiple nodes in the text complex network based on the symmetrical mixing amount of the connections between the multiple nodes, and obtain the first filtering result corresponding to the multiple nodes. The second filtering unit is configured to perform a second filtering on the first filtering results corresponding to the plurality of nodes based on the path length connecting the plurality of nodes, so as to obtain the second filtering results corresponding to the plurality of nodes. The extraction unit is configured to sort the second filtering results based on the clustering coefficients of the connections between the multiple nodes, and extract the keywords corresponding to the text to be processed.

9. The apparatus according to claim 8, wherein, The acquisition module includes: The construction unit is configured to, in response to obtaining the text to be processed, construct connection edges between the multiple words based on the semantic relationships between the multiple words in the text to be processed; The determining unit is configured to use the plurality of single words as nodes to determine the in-degree, strength, and weight of the connecting edges between the plurality of nodes; The acquisition unit is configured to acquire the text complex network corresponding to the text to be processed based on the plurality of nodes, the connection edges between the plurality of nodes, the strength, in-degree and out-degree of the plurality of nodes, and the weight of the connection edges between the plurality of nodes.

10. The apparatus according to claim 9, wherein, The determining unit is further configured to: Using the multiple single characters as nodes, determine the in-degree and the number of the multiple nodes; The strength of the multiple nodes is calculated based on their in-degree and out-degree and the number of nodes.

11. The apparatus according to claim 8, further comprising a receiving module; The receiving module is configured to: receive the set number of keywords; and, The extraction unit is further configured to sort the second filtering results based on the clustering coefficient of the connections between the multiple nodes, thereby obtaining a sorting result of the connections between the multiple nodes; and to extract the keywords corresponding to the text to be processed from the sorting result based on the set number of keywords.

12. The apparatus according to any one of claims 8-11, further comprising: The proximity calculation module is configured to calculate the proximity between the multiple nodes and the adjacent nodes based on the in-degree of the multiple nodes, the neighboring nodes, and the in-degree of the neighboring nodes. The first judgment module is configured to make a first judgment on the text complex network based on the proximity between the plurality of nodes and the adjacent nodes and the average proximity of the plurality of nodes, and to determine whether the text complex network is coordinated. The generation module is configured to generate a first prompt message in response to determining the text complex network coordination, wherein the first prompt message indicates that the keywords corresponding to the text to be processed are accurate.

13. The apparatus of claim 12, further comprising: The weighted proximity calculation module is configured to calculate the weighted proximity between the plurality of nodes and the adjacent nodes in response to determining that the text complex network is incoherent; The second judgment module is configured to perform a second judgment on the text complex network based on the weighted proximity between the multiple nodes and the adjacent nodes and the average proximity of the multiple nodes, to determine whether the text complex network is coordinated. The generation module is further configured to generate the first prompt information in response to determining the text complex network coordination.

14. The apparatus according to claim 13, wherein, The generation module is further configured to: In response to determining that the complex network of the text is incoherent, a second prompt message is generated, wherein the second prompt message indicates that there is an error in the keyword corresponding to the text to be processed.

15. An electronic device comprising: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.

16. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • The invention discloses an aAutomatic keyword extraction method based on a universal gravitation model

    CN109614626A

  • Platform for promoting intelligent development of industrial internet of things system

    CN114424167A