Text keyword mining method and device, storage medium, and computer equipment

By building a keyword tree and updating the keyword tree using the target path, the problems of inefficient keyword mining and unconsidered correlation in text data in the prior art are solved, and efficient keyword mining and maintenance are achieved.

CN114064793BActive Publication Date: 2025-02-18DAZHEN (HANGZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111433229.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-02-18
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

The prior art is inefficient in mining keywords in text data and fails to effectively consider the correlation between keywords, resulting in scattered keywords and difficult maintenance.

Method used

By building a keyword tree, put all keywords in a tree structure, use the target path to match and update the keyword tree from the text data, considering the correlation between keywords and keyword combinations.

Benefits of technology

It improves the mining efficiency of text keywords, simplifies the subsequent maintenance and iteration process, and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064793B_ABST
    Figure CN114064793B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for mining text keywords, a storage medium, and a computer device. The method includes: determining a target parent node to be mined from a keyword tree, and determining a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes a keyword node, the keyword node includes a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined; based on the target path, determining target text data matching the target path from the text data to be mined, and determining a newly added keyword node based on the target text data; using the newly added keyword node as a child node of the target parent node to be mined, and updating the keyword tree. The present application can greatly improve the mining efficiency of text keywords and reduce the subsequent maintenance costs.
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 text keyword mining method and device, a storage medium, and a computer device. Background Art

[0002] With the widespread application of computer technology, the era of big data has arrived. The use of big data technology will generate a large amount of text data. In order to facilitate the understanding and use of these text data, text keywords are usually used to help represent, index, share, retrieve, classify, and cluster these text data. However, text data is of various types and changes. Fixed text keywords are bound to affect the understanding and use of massive text data. Therefore, how to quickly and accurately mine text keywords from massive data becomes extremely important.

[0003] In the prior art, text data is usually explored by exploring keywords one by one, which not only makes the mining efficiency of text keywords low, but also does not consider the correlation between keywords and keywords, and between keyword combinations and keyword combinations. In addition, scattered keywords and keyword combinations are not convenient for subsequent maintenance. Summary of the invention

[0004] In view of this, the present application provides a text keyword mining method and device, storage medium, and computer equipment, which can not only consider the correlation between keywords and keywords, keyword combinations and keyword combinations, but also place all keywords in a keyword tree to facilitate subsequent maintenance and iteration, which can greatly improve the efficiency of text keyword mining and reduce subsequent maintenance costs.

[0005] According to one aspect of the present application, a text keyword mining method is provided, comprising:

[0006] Determine a target parent node to be mined from a keyword tree, and determine a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined;

[0007] Based on the target path, determining target text data matching the target path from the text data to be mined, and determining a new keyword node based on the target text data;

[0008] The newly added keyword node is used as a child node of the target parent node to be mined, and the keyword tree is updated.

[0009] Optionally, the determining, based on the target path, target text data matching the target path from the text data to be mined specifically includes:

[0010] When the target parent node to be mined does not have a child node, determining text data matching the target path from the text data to be mined as the target text data;

[0011] When the target parent node to be mined has a child node, the target child node path corresponding to the child node is determined based on the child node corresponding to the target parent node to be mined, and the text data that matches the target path and does not match the target child node path is determined from the text data to be mined as the target text data.

[0012] Optionally, the determining of a new keyword node based on the target text data specifically includes:

[0013] Determine from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and use any of the keyword nodes as a keyword node to be verified;

[0014] Determine a path to be verified based on the keyword node to be verified and the target path, determine first text data matching the path to be verified from the text data to be mined, and calculate a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data;

[0015] Determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data;

[0016] A target ratio is determined based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, the keyword node to be verified is used as a newly added keyword node.

[0017] Optionally, after taking the newly added keyword node as a child node of the target parent node to be mined, the method further includes:

[0018] The target ratio is bound to the newly added keyword node, and the keyword tree is updated according to the bound newly added keyword node.

[0019] Optionally, the method further comprises:

[0020] In response to the end update instruction, an identifier corresponding to the updated keyword tree is generated according to a preset naming rule, and the identifier is bound to the updated keyword tree and stored in a preset storage space, wherein the identifier includes an initial identifier corresponding to the initial keyword tree and an updated update identifier.

[0021] Optionally, after storing in a preset storage space, the method further includes:

[0022] At least two keyword trees with the same initial identifier are obtained from the preset storage space, and a keyword node change trend is determined based on the keyword nodes included in each of the keyword trees.

[0023] Optionally, after responding to the end update instruction, the method further includes:

[0024] Based on the text data to be mined, the node paths corresponding to each of the keyword nodes and each of the newly added keyword nodes in the updated keyword tree are determined respectively, and the third text data matching each of the node paths is determined respectively from the text data to be mined, and the third text coverage corresponding to each of the node paths is calculated based on the text data to be mined and the third text data.

[0025] According to another aspect of the present application, a text keyword mining device is provided, comprising:

[0026] A target path determination module, used to determine a target parent node to be mined from a keyword tree, and determine a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined;

[0027] A newly added node determination module is used to determine target text data matching the target path from the text data to be mined based on the target path, and to determine a newly added keyword node based on the target text data;

[0028] The keyword tree updating module is used to update the keyword tree by taking the newly added keyword node as a child node of the target parent node to be mined.

[0029] Optionally, the newly added node determination module is specifically used to:

[0030] When the target parent node to be mined does not have a child node, determining text data matching the target path from the text data to be mined as the target text data;

[0031] When the target parent node to be mined has a child node, the target child node path corresponding to the child node is determined based on the child node corresponding to the target parent node to be mined, and the text data that matches the target path and does not match the target child node path is determined from the text data to be mined as the target text data.

[0032] Optionally, the newly added node determination module is further configured to:

[0033] Determine from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and use any of the keyword nodes as a keyword node to be verified;

[0034] Determine a path to be verified based on the keyword node to be verified and the target path, determine first text data matching the path to be verified from the text data to be mined, and calculate a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data;

[0035] Determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data;

[0036] A target ratio is determined based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, the keyword node to be verified is used as a newly added keyword node.

[0037] Optionally, the device further comprises:

[0038] A binding module is used to bind the target ratio to the newly added keyword node after taking the newly added keyword node as a child node of the target parent node to be mined, and update the keyword tree according to the bound newly added keyword node.

[0039] Optionally, the device further comprises:

[0040] An identifier generation module is used to respond to the end update instruction, generate an identifier corresponding to the updated keyword tree according to a preset naming rule, bind the identifier to the updated keyword tree, and store it in a preset storage space, wherein the identifier includes an initial identifier corresponding to the initial keyword tree and an updated update identifier after the update.

[0041] Optionally, the device further comprises:

[0042] The change determination module is used to obtain at least two keyword trees with the same initial identifier from the preset storage space after the storage in the preset storage space, and determine the keyword node change trend based on the keyword nodes contained in each of the keyword trees.

[0043] Optionally, the device further comprises:

[0044] A calculation module is used to determine, after responding to the end update instruction, the node paths corresponding to each keyword node and each newly added keyword node in the updated keyword tree based on the text data to be mined, and to determine the third text data matching each node path from the text data to be mined, and to calculate the third text coverage corresponding to each node path based on the text data to be mined and the third text data.

[0045] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned text keyword mining method is implemented.

[0046] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned text keyword mining method when executing the program.

[0047] By means of the above technical scheme, the present application provides a method and device for mining text keywords, a storage medium, and a computer device. A target parent node to be mined is determined from the keyword nodes contained in the keyword tree, and then a target path corresponding to the target parent node to be mined is determined from the keyword tree. The target path can be a combination of all keyword nodes passed through in the process from the root node to the target parent node to be mined. After determining the target path corresponding to the target parent node to be mined, the text data matching the target path can be further found from the text data to be mined as the target text data. After that, a newly added keyword node can be found from the target text data. After determining the newly added keyword node, the newly added keyword node can be added to the keyword tree as the child node corresponding to the target parent node to be mined, and the keyword tree is updated. The present application mines text keywords through the keyword tree, which can not only consider the correlation between keywords and keywords, keyword combinations and keyword combinations, but also put all keywords in a keyword tree to facilitate subsequent maintenance and iteration, which can greatly improve the mining efficiency of text keywords and reduce the maintenance cost in the later stage.

[0048] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0050] Figure 1 A flowchart of a text keyword mining method provided in an embodiment of the present application is shown;

[0051] Figure 2 A schematic diagram showing a flow chart of another text keyword mining method provided in an embodiment of the present application;

[0052] Figure 3 A schematic diagram of the structure of a text keyword mining device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

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

[0054] In this embodiment, a text keyword mining method is provided, such as Figure 1 As shown, the method includes:

[0055] Step 101, determining a target parent node to be mined from a keyword tree, and determining a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined;

[0056] The embodiment of the present application is mainly applicable to the scene of text keyword mining. The execution subject of the embodiment of the present application is a device or equipment capable of mining text keywords, which can be specifically arranged on the client or server side. The text keyword mining method provided by the embodiment of the present application can be implemented by a keyword tree, wherein the keyword tree can include one or more keyword nodes, each keyword node represents a text keyword, and the keyword node includes a root node, the root node can be a level 0 node of the keyword tree, and then the level 1 node is the child node of the root node, the level 2 node is the child node of the level 1 node, and so on. Each node in the keyword tree corresponds to a unique path to the root node, because the keyword tree can include multiple nodes, and thus the keyword tree can be maintained for multiple paths. First, a target parent node to be mined is determined from the keyword nodes contained in the keyword tree, and the target parent node to be mined can be any one of the keyword nodes contained in the keyword tree. Then, the target path corresponding to the target parent node to be mined is determined from the keyword tree. The target path can be a combination of all keyword nodes passed through during the process from the root node to the target parent node to be mined. For example, if the target parent node to be mined is "sportswear" and the root node is "third quarter", then the target path can be "third quarter-A brand-sportswear", where "A brand" is the keyword node passed through in the process from "third quarter" to "sportswear". When the target parent node to be mined is the root node of the keyword tree, then the corresponding target path only includes the root node.

[0057] Step 102, based on the target path, determining target text data matching the target path from the text data to be mined, and determining a new keyword node based on the target text data;

[0058] In this embodiment, after determining the target path corresponding to the target parent node to be mined, the text data that matches the target path can be further found from the text data to be mined as the target text data. Here, the text data to be mined can be text data generated on a certain day, or it can be text data generated at a certain stage. For example, the target path can be "third quarter-A brand-sportswear", and the text data to be mined can be "third quarter A brand has an event, buy one get one free for sportswear", then the text data to be mined can match the target path, and the text data to be mined is the target text data; if the text data to be mined is "third quarter A brand has an event, buy one get one free for basketball shoes", then the text data to be mined does not match the target path, and the text data to be mined is not the target text data. Afterwards, the newly added keyword node can be found from the target text data.

[0059] Step 103: Use the newly added keyword node as a child node of the target parent node to be mined, and update the keyword tree.

[0060] In this embodiment, after the newly added keyword node is determined, the newly added keyword node can be added to the keyword tree as a child node corresponding to the target parent node to be mined, and the keyword tree is updated.

[0061] By applying the technical scheme of the present embodiment, a target parent node to be mined is determined from the keyword nodes contained in the keyword tree, and then, the target path corresponding to the target parent node to be mined is determined from the keyword tree. The target path can be a combination of all keyword nodes passed by in the process from the root node to the target parent node to be mined. After determining the target path corresponding to the target parent node to be mined, the text data that matches the target path can be further found from the text data to be mined as the target text data. Afterwards, the newly added keyword node can be found from the target text data. After determining the newly added keyword node, the newly added keyword node can be added to the keyword tree as the child node corresponding to the target parent node to be mined, and the keyword tree is updated. The present application mines text keywords through the keyword tree, which can not only consider the relevance between keywords and keywords, keyword combinations and keyword combinations, but also put all keywords in a keyword tree to facilitate subsequent maintenance and iteration, which can greatly improve the mining efficiency of text keywords and reduce the maintenance cost in the later stage.

[0062] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another text keyword mining method is provided, such as Figure 2 As shown, the method includes:

[0063] Step 201, determining a target parent node to be mined from a keyword tree, and determining a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined;

[0064] In this embodiment, the keyword tree may include one or more keyword nodes, each keyword node represents a text keyword, and the keyword node includes a root node. Each node in the keyword tree corresponds to a unique path to the root node. Because the keyword tree may include multiple nodes, the keyword tree can be maintained with multiple paths. First, a target parent node to be mined is determined from the keyword nodes included in the keyword tree, and then, a target path corresponding to the target parent node to be mined is determined from the keyword tree. The target path can be a combination of all keyword nodes passed through in the process from the root node to the target parent node to be mined.

[0065] Step 202, when the target parent node to be mined does not have a child node, determining text data matching the target path from the text data to be mined as the target text data;

[0066] In this embodiment, the selected target parent node to be mined may include two situations, one is that the target parent node to be mined is the highest level node in the keyword tree, that is, the target parent node to be mined does not have a corresponding child node in the keyword tree, and the other is that the target parent node to be mined is not the highest level node in the keyword tree, that is, the target parent node to be mined has a corresponding child node in the keyword tree. For the first situation, text data that can match the target path corresponding to the target parent node to be mined can be found from the text data to be mined, and these text data are used as target text data.

[0067] Step 203, when the target parent node to be mined has a child node, based on the child node corresponding to the target parent node to be mined, determine the target child node path corresponding to the child node, and determine the text data that matches the target path and does not match the target child node path from the text data to be mined as the target text data;

[0068] In this embodiment, for the second situation, the target child node path corresponding to the target parent node to be mined can be determined from the keyword tree first according to the child node corresponding to the target parent node to be mined, and the target child node path includes all keyword nodes from the root node of the keyword tree to the child node. Then, find out the text data that can match the target path corresponding to the target parent node to be mined from the text data to be mined, and further remove the text data that can match the target child node path from these text data, and the text data remaining at last is the target text data. For example, the target path can be "third quarter-A brand-sportswear", and the target child node path can be "third quarter-A brand-sportswear-special sale". The text data to be mined one can be "third quarter A brand does activities, sportswear buy one get one free", and the text data to be mined two can be "third quarter A brand does activities, sportswear clearance sale", and the text data to be mined one and the text data to be mined two can both match the target path, but the text data to be mined two can match the target child node path, so only the text data to be mined one is the target text data.

[0069] Step 204, determining from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and taking any of the keyword nodes as a keyword node to be verified;

[0070] In this embodiment, based on the determined target text data, keywords with a large number of occurrences are determined from the target text data. If the number of occurrences of a keyword among these keywords is greater than a preset threshold, and the keyword does not belong to the keyword in the keyword node included in the target path, then the keyword can be used as the keyword node to be verified corresponding to the target parent node to be mined.

[0071] Step 205, determining a path to be verified based on the keyword node to be verified and the target path, determining first text data matching the path to be verified from the text data to be mined, and calculating a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data;

[0072] In this embodiment, according to the target path and the keyword node to be verified, the path to be verified corresponding to the keyword node to be verified can be further determined. Here, the path to be verified is the only path from the keyword node to be verified to the root node. For example, the target path is "North-Winter", "Winter" is the target parent node to be mined, and the keyword node to be verified is "Cold", then the path to be verified can be "North-Winter-Cold". Next, the first text data matching the path to be verified can be determined from the text data to be mined, and the first text coverage rate corresponding to the path to be verified is calculated based on the text data to be mined and the first text data. For example, there are 50 text data in the text data to be mined, of which 25 are matched by the path to be verified, so the first text coverage rate corresponding to the path to be verified is 50%.

[0073] Step 206, determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data;

[0074] In this embodiment, the second text data matching the target path is found from the text data to be mined, and the second text coverage corresponding to the target path is calculated based on the text data to be mined and the second text data. For example, there are 50 text data in the text data to be mined, 30 of which are matched by the target path, so the second text coverage corresponding to the target path is 60%. The second text coverage is greater than or equal to the first text coverage.

[0075] Step 207, determining a target ratio based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, taking the keyword node to be verified as a newly added keyword node;

[0076] In this embodiment, the target ratio can be determined by the first text coverage and the second text coverage. For example, if the first text coverage is A and the second text coverage is B, then the target ratio can be A / B. If it is found through calculation that the target ratio is greater than the preset ratio threshold, the keyword node to be verified can be used as the corresponding newly added keyword node in the keyword tree.

[0077] Step 208: Use the newly added keyword node as a child node of the target parent node to be mined, bind the target ratio to the newly added keyword node, and update the keyword tree according to the bound newly added keyword node.

[0078] In this embodiment, the newly added keyword node can be further used as the child node corresponding to the target parent node to be mined, and the target ratio and the determined newly added keyword node can be bound together, and then the bound newly added keyword node is added to the keyword tree to update the keyword tree. By continuously exploring the child nodes corresponding to each keyword node in the keyword tree, the keyword tree can contain more and more keyword nodes.

[0079] Optionally, the method further comprises:

[0080] In response to the end update instruction, an identifier corresponding to the updated keyword tree is generated according to a preset naming rule, and the identifier is bound to the updated keyword tree and stored in a preset storage space, wherein the identifier includes an initial identifier corresponding to the initial keyword tree and an updated update identifier.

[0081] In this embodiment, when the staff has finished mining the text data to be mined, the end update instruction can be triggered. In response to the end update instruction, an identifier corresponding to the updated keyword tree can be automatically generated based on the preset naming rule. After the identifier is generated, the generated identifier and the updated keyword tree can be bound together and then stored in the preset storage space. Here, the generated identifier can include two parts, one part can be the initial identifier corresponding to the initial keyword tree, and the other part can be the update identifier corresponding to the updated keyword tree. From the initial identifier, it can be seen which keyword tree is the initial version of the keyword tree used for this text keyword mining. For example, there are five keyword trees in the current preset storage space, and these five keyword trees are keyword tree No. 1, keyword tree No. 2...Keyword tree No. 5, among which keyword tree No. 2 is based on keyword tree No. 1 for keyword node mining, keyword tree No. 3 is based on keyword tree No. 2 for keyword node mining...and so on, keyword tree No. 5 is based on keyword tree No. 4 for keyword node mining. Then the identifier corresponding to keyword tree No. 1 is the initial identifier. If the identifier corresponding to keyword tree No. 1 is No. 1, then the identifier corresponding to keyword tree No. 2 can be No. 1-02, the identifier corresponding to keyword tree No. 3 can be No. 1-03, ... The identifier corresponding to keyword tree No. 5 can be No. 1-05. Although keyword trees No. 3, No. 4, and No. 5 are not directly based on keyword tree No. 1, the initial keyword trees they correspond to are all keyword tree No. 1. That is, different keyword trees, as long as the initial keyword trees are the same, then the initial identifiers of these keyword trees are the same. In addition, the update identifier of the keyword tree is the unique identifier representing the keyword tree. By generating an identifier corresponding to the initial identifier for each updated keyword tree, it is convenient to compare the nodes of the keyword trees with the same initial identifier in the future.

[0082] Optionally, after storing in a preset storage space, the method further includes:

[0083] At least two keyword trees with the same initial identifier are obtained from the preset storage space, and a keyword node change trend is determined based on the keyword nodes included in each of the keyword trees.

[0084] In this embodiment, by finding the keyword trees with the same initial identifier from the preset storage space and comparing the keyword nodes contained in these keyword trees, the changes in the keyword nodes in the keyword trees can be further determined. For example, by comparing the keyword nodes of keyword trees 1-02 and 1-03, the changes in the text data to be mined corresponding to different text keyword mining stages can be determined, and it can also be clearly seen which nodes are newly added in the two keyword trees.

[0085] Optionally, after responding to the end update instruction, the method further includes:

[0086] Based on the text data to be mined, the node paths corresponding to each of the keyword nodes and each of the newly added keyword nodes in the updated keyword tree are determined respectively, and the third text data matching each of the node paths is determined respectively from the text data to be mined, and the third text coverage corresponding to each of the node paths is calculated based on the text data to be mined and the third text data.

[0087] In this embodiment, after the staff has finished mining the text data to be mined, they can also determine the node path corresponding to each original keyword node in the updated keyword tree and the node path corresponding to each newly added keyword node based on the text data to be mined, and then find the third text data matching these node paths one by one from the text data to be mined, and further calculate the third text coverage corresponding to each node path based on the third text data and the text data to be mined. Subsequently, the changes corresponding to the text data to be mined at different stages can be determined by observing the third text coverage of each node contained in different keyword trees.

[0088] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a text keyword mining device, such as Figure 3 As shown, the device comprises:

[0089] A target path determination module, used to determine a target parent node to be mined from a keyword tree, and determine a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined;

[0090] A newly added node determination module is used to determine target text data matching the target path from the text data to be mined based on the target path, and to determine a newly added keyword node based on the target text data;

[0091] The keyword tree updating module is used to update the keyword tree by taking the newly added keyword node as a child node of the target parent node to be mined.

[0092] Optionally, the newly added node determination module is specifically used to:

[0093] When the target parent node to be mined does not have a child node, determining text data matching the target path from the text data to be mined as the target text data;

[0094] When the target parent node to be mined has a child node, the target child node path corresponding to the child node is determined based on the child node corresponding to the target parent node to be mined, and the text data that matches the target path and does not match the target child node path is determined from the text data to be mined as the target text data.

[0095] Optionally, the newly added node determination module is further configured to:

[0096] Determine from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and use any of the keyword nodes as a keyword node to be verified;

[0097] Determine a path to be verified based on the keyword node to be verified and the target path, determine first text data matching the path to be verified from the text data to be mined, and calculate a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data;

[0098] Determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data;

[0099] A target ratio is determined based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, the keyword node to be verified is used as a newly added keyword node.

[0100] Optionally, the device further comprises:

[0101] A binding module is used to bind the target ratio to the newly added keyword node after taking the newly added keyword node as a child node of the target parent node to be mined, and update the keyword tree according to the bound newly added keyword node.

[0102] Optionally, the device further comprises:

[0103] An identifier generation module is used to respond to the end update instruction, generate an identifier corresponding to the updated keyword tree according to a preset naming rule, bind the identifier to the updated keyword tree, and store it in a preset storage space, wherein the identifier includes an initial identifier corresponding to the initial keyword tree and an updated update identifier after the update.

[0104] Optionally, the device further comprises:

[0105] The change determination module is used to obtain at least two keyword trees with the same initial identifier from the preset storage space after the storage in the preset storage space, and determine the keyword node change trend based on the keyword nodes contained in each of the keyword trees.

[0106] Optionally, the device further comprises:

[0107] A calculation module is used to determine, after responding to the end update instruction, the node paths corresponding to each keyword node and each newly added keyword node in the updated keyword tree based on the text data to be mined, and to determine the third text data matching each node path from the text data to be mined, and to calculate the third text coverage corresponding to each node path based on the text data to be mined and the third text data.

[0108] It should be noted that for other corresponding descriptions of the functional units involved in the text keyword mining device provided in the embodiment of the present application, reference can be made to Figure 1 to Figure 2 The corresponding description in the method will not be repeated here.

[0109] Based on the above Figure 1 to Figure 2 The method shown in the embodiment of the present application is accordingly provided with a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned Figure 1 to Figure 2 The text keyword mining method shown.

[0110] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.

[0111] Based on the above Figure 1 to Figure 2 The method shown, and Figure 3 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 to Figure 2 The text keyword mining method shown.

[0112] Optionally, the computer device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a WI-FI interface), etc.

[0113] Those skilled in the art will appreciate that the computer device structure provided in this embodiment does not limit the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.

[0114] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages and saves the hardware and software resources of the computer device, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between the components inside the storage medium, and communication with other hardware and software in the physical device.

[0115] Through the description of the above implementation mode, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware platform, or by hardware. Determine a target parent node to be mined from the keyword nodes contained in the keyword tree, and then determine the target path corresponding to the target parent node to be mined from the keyword tree. The target path can be a combination of all keyword nodes passed by in the process from the root node to the target parent node to be mined. After determining the target path corresponding to the target parent node to be mined, the text data that matches the target path can be further found from the text data to be mined as the target text data. Afterwards, the newly added keyword node can be found from the target text data. After determining the newly added keyword node, the newly added keyword node can be added to the keyword tree as the child node corresponding to the target parent node to be mined, and the keyword tree is updated. The present application mines text keywords through the keyword tree, which can not only consider the relevance between keywords and keywords, keyword combinations and keyword combinations, but also put all keywords in a keyword tree to facilitate subsequent maintenance and iteration, which can greatly improve the mining efficiency of text keywords and reduce the maintenance cost in the later stage.

[0116] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.

[0117] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.

Claims

1. A text keyword mining method, characterized in that: include: Determine a target parent node to be mined from a keyword tree, and determine a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined; Based on the target path, determining target text data matching the target path from the text data to be mined, and determining a new keyword node based on the target text data; Taking the newly added keyword node as a child node of the target parent node to be mined, and updating the keyword tree; The determining of a new keyword node based on the target text data specifically includes: Determine from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and use any of the keyword nodes as a keyword node to be verified; Determine a path to be verified based on the keyword node to be verified and the target path, determine first text data matching the path to be verified from the text data to be mined, and calculate a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data; Determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data; A target ratio is determined based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, the keyword node to be verified is used as a newly added keyword node.

2. The method according to claim 1, characterized in that The step of determining target text data matching the target path from the text data to be mined based on the target path specifically includes: When the target parent node to be mined does not have a child node, determining text data matching the target path from the text data to be mined as the target text data; When the target parent node to be mined has a child node, the target child node path corresponding to the child node is determined based on the child node corresponding to the target parent node to be mined, and the text data that matches the target path and does not match the target child node path is determined from the text data to be mined as the target text data.

3. The method according to claim 1, characterized in that After taking the newly added keyword node as a child node of the target parent node to be mined, the method further includes: The target ratio is bound to the newly added keyword node, and the keyword tree is updated according to the bound newly added keyword node.

4. The method according to claim 3, characterized in that The method further comprises: In response to the end update instruction, an identifier corresponding to the updated keyword tree is generated according to a preset naming rule, and the identifier is bound to the updated keyword tree and stored in a preset storage space, wherein the identifier includes an initial identifier corresponding to the initial keyword tree and an updated update identifier.

5. The method according to claim 4, characterized in that After storing in the preset storage space, the method further includes: At least two keyword trees with the same initial identifier are obtained from the preset storage space, and a keyword node change trend is determined based on the keyword nodes included in each of the keyword trees.

6. The method according to claim 4, characterized in that After responding to the end update instruction, the method further includes: Based on the text data to be mined, the node paths corresponding to each of the keyword nodes and each of the newly added keyword nodes in the updated keyword tree are determined respectively, and the third text data matching each of the node paths is determined respectively from the text data to be mined, and the third text coverage corresponding to each of the node paths is calculated based on the text data to be mined and the third text data.

7. A text keyword mining device, characterized in that: include: A target path determination module, used to determine a target parent node to be mined from a keyword tree, and determine a target path corresponding to the target parent node to be mined based on the keyword tree, wherein the keyword tree includes keyword nodes, the keyword nodes include a root node, and the target path includes all keyword nodes from the root node to the target parent node to be mined; A newly added node determination module is used to determine target text data matching the target path from the text data to be mined based on the target path, and to determine a newly added keyword node based on the target text data; A keyword tree updating module, used to update the keyword tree by taking the newly added keyword node as a child node of the target parent node to be mined; The newly added node determination module is further specifically used for: Determine from the target text data a keyword node whose occurrence times are greater than a preset threshold and which is not included in the target path, and use any of the keyword nodes as a keyword node to be verified; Determine a path to be verified based on the keyword node to be verified and the target path, determine first text data matching the path to be verified from the text data to be mined, and calculate a first text coverage rate corresponding to the path to be verified based on the text data to be mined and the first text data; Determining second text data matching the target path from the text data to be mined, and calculating a second text coverage rate corresponding to the target path based on the text data to be mined and the second text data; A target ratio is determined based on the first text coverage ratio and the second text coverage ratio, and when the target ratio is greater than a preset ratio threshold, the keyword node to be verified is used as a newly added keyword node.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method and device for recommending keywords

    CN106339399A

  • Information mining method, electronic device and readable storage medium

    CN107220300A