Keyword extraction method and device, electronic device and readable storage medium

By extracting preset characters from the text to be detected, and combining common character tables and reference text libraries, two keyword extractions are performed, the problem that keyword extraction in the prior art is not suitable for specific task scenarios, and more accurate keyword extraction is achieved.

CN119739842APending Publication Date: 2025-04-01DONGGUAN EPROPULSION INTELLIGENCE TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411800165.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

The keyword extraction methods in the prior art cannot adapt to the needs of specific task scenarios, resulting in inaccurate keyword extraction results.

Method used

By extracting preset characters from the text to be detected, combining common character tables and reference text libraries, two keyword extractions are performed to eliminate common characters in specific task scenarios, and ensure the accuracy of the target keywords.

Benefits of technology

The accuracy of keyword extraction is improved, especially in word use scenarios that do not have clear meaning in natural language, which can better adapt to the needs of specific task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739842A_ABST
    Figure CN119739842A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a keyword extraction method and device, electronic device and readable storage medium. Obtain a text to be detected; extract characters without natural language meaning from the text to be detected; extract target keywords from the characters without natural language meaning according to a common character table corresponding to the characters without natural language meaning and a reference text library corresponding to the text to be detected. Thus, by combining the common character table and the reference text library to eliminate common characters in a specific task scenario, accurate extraction of target keywords is achieved, which is particularly suitable for scenarios where words in the problem text do not have clear meanings in natural language.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of language processing technology, and in particular to a keyword extraction method and device, an electronic device, and a readable storage medium. Background Art

[0002] Keyword extraction is an important task in the natural language processing process. Its main purpose is to extract the vocabulary required for a specific task scenario from the text. The accuracy of keyword extraction is crucial to the execution of tasks in specific task scenarios. For example, in a question-answering scenario, the question-answering system often extracts keywords from the question text, and then finds the answer text based on the keywords to provide corresponding answers to the questions raised by users.

[0003] However, the keyword extraction method in the related art may not necessarily be able to extract the keywords required to be extracted in a specific task scenario, resulting in that the keyword extraction result cannot adapt to the extraction requirements of the specific task scenario. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a keyword extraction method and device, an electronic device and a readable storage medium.

[0005] In a first aspect, the present disclosure provides a keyword extraction method, the method comprising:

[0006] Get the text to be detected;

[0007] Extracting preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces;

[0008] Extracting initial keywords from the text to be screened according to a common character table;

[0009] Extract target keywords from the initial keywords according to a reference text library corresponding to the text to be detected.

[0010] In some embodiments of the present disclosure, extracting initial keywords from the text to be screened according to the common character table includes:

[0011] Deleting the search common characters belonging to the common character table from the text to be screened;

[0012] The remaining characters in the text to be screened except the common search characters are used as the initial keywords.

[0013] In some embodiments of the present disclosure, extracting target keywords from the initial keywords according to a reference text library corresponding to the text to be detected includes:

[0014] Determining the number of times the initial keyword appears in the text of the reference text library;

[0015] A keyword whose number of occurrences is within a preset number interval is obtained from the initial keywords as the target keyword.

[0016] In some embodiments of the present disclosure, the minimum value of the preset number interval is 0;

[0017] The maximum value of the preset number interval is determined according to the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

[0018] In some embodiments of the present disclosure, the maximum value of the preset number interval is between the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

[0019] In some embodiments of the present disclosure, before extracting the target keyword from the initial keyword according to the reference text library corresponding to the text to be detected, the method further includes:

[0020] Verifying the initial keywords to obtain verified keywords;

[0021] Correspondingly, the step of extracting target keywords from the initial keywords according to a reference text library corresponding to the text to be detected includes:

[0022] The target keyword is extracted from the initial keyword according to the verified keyword and the reference text library.

[0023] In some embodiments of the present disclosure, verifying the initial keyword to obtain the verified keyword includes:

[0024] Extracting predefined error-prone characters from the initial keywords;

[0025] The error-prone character is replaced with a predefined correction character to obtain the verified keyword, wherein the correction character is a character with a shape similar to that of the error-prone character.

[0026] In some embodiments of the present disclosure, verifying the initial keyword to obtain the verified keyword includes:

[0027] Calculate the similarity between the initial keyword and the reference keyword of each text in the reference text library;

[0028] A keyword with the highest similarity is selected from the reference keywords of each text in the reference text library as the verified keyword.

[0029] In a second aspect, the present disclosure provides a keyword extraction device, the device comprising:

[0030] A text acquisition module, used to acquire the text to be detected;

[0031] A character extraction module, used for extracting preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces;

[0032] An initial keyword extraction module, used to extract initial keywords from the text to be screened according to a common character table;

[0033] The target keyword extraction module is used to extract the target keyword from the initial keywords according to the reference text library corresponding to the text to be detected.

[0034] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the device comprising:

[0035] one or more processors;

[0036] a storage device for storing one or more programs,

[0037] When one or more programs are executed by one or more processors, the one or more processors implement the method provided in the first aspect.

[0038] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method provided in the first aspect is implemented.

[0039] The technical solution provided by the embodiments of the present disclosure has the following advantages:

[0040] A keyword extraction method and device, electronic device, and readable storage medium of an embodiment of the present disclosure, when it is desired to extract keywords required in a specific task scenario, first, extract preset characters such as letters, numbers, and spaces from the text to be detected in the specific task scenario to obtain the text to be screened, and then, in combination with a common character table and a reference text library corresponding to the text to be detected, extract the text to be screened twice to obtain the target keyword, and use it as the keyword required for the specific task scenario. Thus, by combining the common character table and the reference text library to eliminate common characters in a specific task scenario, accurate extraction of the target keyword is achieved, which is particularly suitable for scenarios where there are words in the question text that do not have a clear meaning in natural language. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0042] In order to more clearly illustrate the technical solution of the embodiment of the present disclosure, the drawings required for use in the description of the embodiment will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flowchart of a keyword extraction method provided by an embodiment of the present disclosure;

[0044] Figure 2 A schematic diagram of the structure of a keyword extraction device provided in an embodiment of the present disclosure;

[0045] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0046] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0047] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0048] In order to improve the accuracy of answering questions, the following Figure 1 The keyword extraction method provided in the embodiment of the present disclosure is described. In the embodiment of the present disclosure, the keyword extraction method can be executed by an electronic device or a server. The electronic device may include a device with a communication function such as a tablet computer, a desktop computer, a laptop computer, or a device simulated by a virtual machine or a simulator. The server may be a cloud server or a server cluster.

[0049] Figure 1 A flowchart of a keyword extraction method provided by an embodiment of the present disclosure is shown.

[0050] like Figure 1 As shown, the keyword extraction method may include the following steps.

[0051] S110: Obtain the text to be detected.

[0052] In this embodiment, the electronic device obtains any text input by the user as the text to be detected, and the text to be detected may include Chinese, English, wrong characters, special characters, etc. The input method may be voice input, keyboard input, touch input, etc., and this application does not limit this.

[0053] Optionally, the text to be detected may be question text in a question-answering task scenario, or may be text in other specific task scenarios.

[0054] S120, extracting preset characters from the text to be detected to obtain the text to be screened, where the preset characters include one or more of letters, numbers, and spaces.

[0055] In this embodiment, in a specific task scenario, it is necessary to extract keywords from a text containing characters such as letters, numbers, and spaces. The electronic device first analyzes the types of each character in the text to be detected to extract one or more of the letters, numbers, and spaces as preset characters, and uses the text containing the preset characters as the text to be screened.

[0056] For example, the text to be detected is: I am a user from a certain country, My friennd just used my booooat, then the A70 told me B100C03 code, how to fix it, do I need to claim the warranty. The electronic device extracts preset characters such as letters, spaces, and numbers from the text to be detected, and the obtained text to be filtered is: My friennd just used my booooat then the A70 told me B100C03 code how to fix it do I need to claim the warranty.

[0057] S130, extracting initial keywords from the text to be screened according to the common character table.

[0058] It is understandable that when the electronic device searches for the corresponding answer text based on the to-be-processed text, it usually ignores characters that are very short and meaningless in natural language, but such characters are crucial to answering questions, and ignoring such characters will affect the accuracy of answering questions. Therefore, for this reason, the electronic device also preliminarily extracts keywords from the to-be-screened text in combination with the common character table, so as to use the common character table to assist in determining characters that are very short and meaningless in natural language.

[0059] The common character table refers to a set of commonly used search terms that is predefined in a specific task scenario.

[0060] The specific implementation method of S130 includes but is not limited to the following methods: deleting the common search characters belonging to the common character table from the text to be filtered; and using the remaining characters in the text to be filtered except the common search characters as initial keywords.

[0061] Specifically, the electronic device can determine whether each character belongs to the common search characters in the common character table based on the character expression order of the text to be filtered. If it does, the common search characters will be deleted from the text to be filtered, and the remaining characters (i.e., characters that are very short and meaningless in natural language) will be used as the initial keywords extracted in the specific task scenario.

[0062] Optionally, the remaining characters in the text to be screened except for the common characters to be searched include typos and characters that do not appear frequently in a specific task scenario.

[0063] For example, the text to be filtered is: My friennd just used my booooat then the A70 told me B100C03 code how to fix it do I need to claim the warranty. In the text to be filtered, friennd, booooat, A70, and B100C03 are very short and have no meaning in natural language. These characters are the remaining characters in the text to be filtered except for the commonly searched characters and serve as initial keywords.

[0064] S140 , extracting target keywords from the initial keywords according to a reference text library corresponding to the text to be detected.

[0065] In this embodiment, the initial keywords are further extracted secondary keywords in combination with the reference text library corresponding to the text to be detected to obtain target keywords as keywords required for a specific task scenario.

[0066] The reference text library refers to the collection of answer texts corresponding to the text to be processed.

[0067] For example, if the specific task scenario is a voice navigation task scenario in a question-and-answer task scenario, the reference text library may be a collection of information including navigation routes and road conditions of the navigation routes. Thus, when the question text to be processed includes the question "navigate to XXX", the corresponding answer text may be obtained from the reference text library.

[0068] For another example, if the question-answering task scenario is a weather forecast scenario, the reference text library can be a collection of information containing detailed information on past, current, and future weather conditions and clothing recommendations. In this way, when the question text to be processed contains a question about "the weather conditions on XXX day", the corresponding answer text can be obtained from the reference text library.

[0069] For another example, the question-answering task scenario is product after-sales service, such as after-sales service for marine propulsion units. In this case, the reference text library can be a collection of product information provided by the manufacturer of the marine propulsion unit, such as a collection of product manuals, fault and handling strategy descriptions, etc. In this way, when the question text to be processed contains information such as product fault codes and fault descriptions, the corresponding answer text can be obtained from the reference text library.

[0070] Among them, the target keyword refers to the keyword finally extracted from the text to be detected in a specific task scenario.

[0071] The specific implementation method of S140 includes but is not limited to the following method: determining the number of times the initial keyword appears in the text of the reference text library; obtaining keywords whose number of appearances is within a preset number interval from the initial keywords as target keywords.

[0072] Specifically, the electronic device searches for keywords in all texts in the reference text library and counts the number of times the initial keyword appears in all texts in the reference text library. If the number of times the initial keyword appears is within a preset number range, the initial keyword is considered to be a keyword required for a specific task scenario and is used as a target keyword. Otherwise, if the number of times the initial keyword appears is not within the preset number range, the initial keyword is considered not to be a keyword required for a specific task scenario and is deleted.

[0073] The minimum value of the preset number interval is 0; the maximum value of the preset number interval is determined according to the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library. Specifically, the maximum value of the preset number interval is between the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

[0074] The predefined keywords and predefined non-keywords are words pre-selected from a reference text library in order to determine a preset frequency interval.

[0075] Specifically, the method for determining the preset number interval is: obtain multiple groups of pending problem texts and reference text libraries for testing, continuously increase the K value from 0 until the number of times all predefined keywords in the pending problem text appear is less than K, record K as the minimum value K1 of the preset number interval, continue to increase the K value until the number of times a certain predefined non-keyword in the pending problem text appears is equal to K, record K as the maximum value K2 of the preset number interval, then the preset number interval is (0, Kn), where Kn is greater than K1 and less than K2.

[0076] As an example, assume that the question-answering task scenario is the after-sales service of a marine propeller, and the reference text library is a collection of product information for marine propellers. In the reference text library, assume that there are 2 predefined keywords, both of which are fault codes, and the number of times they appear in the reference text library is 1 and 2 respectively; there are 3 predefined non-keywords, and the 3 keywords are product parameters (such as rated voltage, rated current, etc.), and the number of times they appear in the reference text library is 7, 5, and 10 respectively. Then, when determining the preset number interval, first set K equal to 0, then continue to increase the K value until the number of occurrences of the two predefined keywords is less than K. In this example, the largest number of occurrences of the two predefined keywords is 2 times, and K should be 3 at this time. Then, continue to increase the K value until the number of occurrences of a predefined non-keyword is equal to K. In this example, the smallest number of occurrences of the three predefined non-keywords is 5 times, and K should be 5 at this time. Then, it can be determined that the preset number interval should be (0, 5).

[0077] Further exemplary explanation, the initial keywords include: friennd, booooat, A70, B100C03, the preset number interval is (0, 60), friennd and booooat are error characters, the number of times they appear in the preset number interval is 0, A70 is the model number, the number of times it appears in the preset number interval is 60, B100C03 is the fault code, the number of times it appears in the preset number interval is 2, then the target keyword in the text to be detected is B100C03.

[0078] A keyword extraction method of an embodiment of the present disclosure, when it is desired to extract keywords required in a specific task scenario, first, extract preset characters such as letters, numbers, spaces, etc. from the text to be detected in the specific task scenario to obtain the text to be screened, then, in combination with a common character table and a reference text library corresponding to the text to be detected, extract the text to be screened twice to obtain the target keyword, and use it as the keyword required for the specific task scenario. Thus, by combining the common character table and the reference text library to eliminate common characters in a specific task scenario, accurate extraction of the target keyword is achieved, which is particularly suitable for scenarios where there are words in the question text that do not have a clear meaning in natural language.

[0079] In order to further improve the accuracy of keyword extraction, before executing S140, the method also includes: verifying the initial keywords to obtain verified keywords; accordingly, S140 specifically includes: extracting target keywords from the initial keywords based on the verified keywords and the reference text library.

[0080] In some embodiments, the initial keyword is verified to obtain the verified keyword. The specific implementation method includes: extracting predefined error-prone characters from the initial keyword; replacing the error-prone characters with predefined correction characters to obtain the verified keyword, wherein the predefined correction characters are characters that are similar in shape to the error-prone characters.

[0081] It is understandable that in many cases, the user may misread the keyword, causing the text to be detected to contain predefined easily mistaken characters, and further causing the initial keyword to contain the predefined easily mistaken characters. The electronic device then needs to detect one by one whether the initial keyword contains the predefined easily mistaken characters. If so, the electronic device obtains a character with a similar shape to the predefined easily mistaken character as the predefined correction character, and replaces the predefined easily mistaken character with the predefined correction character to obtain the verified keyword.

[0082] For example, an electronic device obtains a text to be detected input by a user. Because the user mistakenly inputs "1" as "I" and mistakenly inputs "0" as "O", the initial keyword contained in the text to be detected is BIOOC03. The predefined error-prone characters extracted by the electronic device from the initial keyword include "I" and "O", and the predefined correction character corresponding to the predefined error-prone character "I" is "1", and the predefined correction character corresponding to the predefined error-prone character "O" is "0". The electronic device replaces the predefined error-prone character "I" in the initial keyword "BIOOC03" with the predefined correction character "1", and replaces the predefined correction character corresponding to the predefined error-prone character "O" with "0", thereby obtaining the target keyword "B100C03".

[0083] In this way, the predefined error-prone characters in the initial keywords are replaced with predefined correction characters with similar characters, thereby obtaining the verified keywords, so as to improve the extraction accuracy of the target keywords based on the verified keywords.

[0084] In other embodiments, the initial keywords are verified to obtain verified keywords, and the specific implementation method includes: calculating the similarity between the initial keywords and the reference keywords of each text in the reference text library; and selecting the keyword with the highest similarity from the reference keywords of each text in the reference text library as the verified keyword.

[0085] It is understandable that in many cases, the user may input incorrect keywords into the electronic device, resulting in incorrect characters in the initial keywords extracted from the text to be detected. The electronic device then needs to calculate the similarity between the initial keywords and the reference keywords of each text in the reference text library based on each character in the initial keywords and each character in the reference keywords, and select the keyword with the highest similarity from the reference keywords of each text in the reference text library as the verified keyword.

[0086] For example, the electronic device obtains the text to be detected input by the user. Because the user mistakenly inputs "B100C03" as "B100C04", the initial keyword contained in the text to be detected is B100C04. The electronic device needs to calculate the similarity between the initial keyword "B100C04" and the reference keywords of each text in the reference text library based on each character in the initial keyword "B100C04" and each character in the reference keywords (including "B100C03" and other fault codes), and select the keyword with the highest similarity from the reference keywords of each text in the reference text library (including "B100C03" and other fault codes) as the verified keyword "B100C03".

[0087] In this way, the initial keywords are verified by calculating the similarity between the initial keywords and the reference keywords of each text in the reference text library, thereby obtaining verified keywords, so as to improve the extraction accuracy of the target keywords based on the verified keywords.

[0088] Therefore, based on the different error situations of keywords, adopting appropriate correction methods for verification is conducive to accurately extracting target keywords.

[0089] In some cases, while outputting the target answer text, the electronic device can also output prompt information to remind the user whether they have read or entered the wrong characters. For example, it can output a text or voice prompt such as "No information related to fault code B100C04 was found. Please confirm whether the fault code is accurate. Here is information related to fault code B100C03. Please evaluate whether it is the information you need." In this way, a reminder can be given when the user has indeed entered the wrong characters but the user himself is not aware of it, so that the user can further enter the correct characters to obtain truly valuable information; at the same time, it can also avoid leaving a bad impression on the user that the answer is irrelevant, resulting in a decrease in the user's recognition of the product.

[0090] In this embodiment, after the electronic device obtains the target keyword, it can also obtain the target text corresponding to the text to be detected from the reference text library based on the target keyword. Accordingly, after executing S140, the method also includes: determining the first vector corresponding to the text to be detected, and determining the first target text corresponding to the text to be detected based on the first vector and the second vector of the text in the reference text library; obtaining the second target text containing the target keyword from the reference text library; and determining the target text corresponding to the text to be detected based on the first target text and the second target text.

[0091] Specifically, determining the first vector corresponding to the text to be detected specifically includes the following steps: performing vector extraction on the text to be detected using a pre-generated semantic vector model to obtain the first vector corresponding to the text to be detected.

[0092] Wherein, the semantic vector model is a neural network model that converts text into vector form. Optionally, the semantic vector model includes but is not limited to an embedding model (EM), and can also be a neural network model in other forms. For the embedding model, it can convert the text into a vector based on the semantic information of the text, and then the embedding model is used to convert the text to be detected into a first vector based on the semantic information of the text to be detected.

[0093] Similarly, the pre-generated semantic vector model is used to process the text in the reference text library to obtain a second vector corresponding to the text in the reference text library.

[0094] Specifically, based on the first vector and the second vector of the text in the reference text library, the first target text corresponding to the text to be detected is determined, which specifically includes the following steps: calculating the similarity between the first vector and the second vector; obtaining the text corresponding to the second vector with the highest similarity from the reference text library as the first target text corresponding to the text to be detected.

[0095] It can be understood that the highest similarity means that the text corresponding to the semantic vector has the greatest relevance to the user's question, thereby providing the user with a first target text with reference value.

[0096] Specifically, according to the first target text and the second target text, the target text corresponding to the text to be detected is determined, which specifically includes the following steps: integrating the first target text and the second target text to form a text sequence; using a pre-acquired large language model to process the text sequence to obtain the target text.

[0097] In specific implementation, the second target text can be spliced ​​to the end of the first target text to form a text sequence, or the first target text can be spliced ​​to the end of the second target text to form a text sequence, and then the large language model is called to process the text sequence to obtain the target text. Among them, the processing of the text sequence by the large language model may include marking the source of the text, combing and reorganizing the text as a whole to provide users with a more readable target text, etc. In this way, the target text corresponding to the text to be detected in a specific task scenario can be output.

[0098] Exemplarily, the text to be detected is the question text in the question-answering task scenario, the reference text library is a text library consisting of answer texts, and the target text is the answer text to the question.

[0099] It should be noted that when the target keyword extracted without verification can directly match the second target text in the reference text library, the target keyword can be considered to be an accurate target keyword, and the second target text is a target text with reference value. At this time, there is no need to perform a verification action. However, when the target keyword extracted without verification fails to match the second target text in the reference text library, you can try to verify the initial keyword to obtain the verified keyword. Subsequently, the target keyword is extracted from the verified keyword, thereby increasing the probability of successful matching between the keyword and the text.

[0100] Through the above method, after determining the target keywords, it can be applied to the appropriate specific task scenario to determine the target text corresponding to the text to be detected, thereby improving the reliability of text screening in specific task scenarios, especially when applied to question-answering task scenarios, based on the target keywords extracted from the question text to accurately find the corresponding answer text, so as to improve the accuracy of the question answering results.

[0101] The present disclosure also provides a keyword extraction device for implementing the above keyword extraction method. Figure 2 In the disclosed embodiment, the keyword extraction device may be an electronic device or a server. The electronic device may include a tablet computer, a desktop computer, a laptop computer, or other devices with communication functions, or may include a virtual machine or a device simulated by a simulator. The server may be a cloud server or a server cluster.

[0102] Figure 2 A schematic diagram of the structure of a keyword extraction device provided by an embodiment of the present disclosure is shown.

[0103] like Figure 2 As shown, the keyword extraction device 200 may include:

[0104] The text acquisition module 210 is used to acquire the text to be detected;

[0105] A character extraction module 220 is used to extract preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces;

[0106] An initial keyword extraction module 230 is used to extract initial keywords from the text to be screened according to a common character table;

[0107] The target keyword extraction module 240 is used to extract target keywords from the initial keywords according to the reference text library corresponding to the text to be detected.

[0108] A keyword extraction device of an embodiment of the present disclosure, when it is desired to extract keywords required in a specific task scenario, first, extracts preset characters such as letters, numbers, spaces, etc. from the text to be detected in the specific task scenario to obtain the text to be screened, and then, in combination with a common character table and a reference text library corresponding to the text to be detected, extracts the text to be screened twice to obtain the target keywords, and uses them as the keywords required for the specific task scenario. Thus, by combining the common character table and the reference text library to eliminate common characters in a specific task scenario, accurate extraction of the target keywords is achieved, which is particularly suitable for scenarios in which words that do not have clear meanings in natural language exist in the question text.

[0109] In some embodiments of the present disclosure, the initial keyword extraction module 230 includes:

[0110] A deleting unit, used for deleting the search common characters belonging to the common character table from the text to be screened;

[0111] The first determining unit is used to use the remaining characters in the text to be screened except the common search characters as the initial keywords.

[0112] In some embodiments of the present disclosure, the target keyword extraction module 240 includes:

[0113] A second determining unit, configured to determine the number of times the initial keyword appears in the text of the reference text library;

[0114] The third determining unit is configured to obtain, from the initial keywords, keywords whose occurrence times are within a preset frequency range as the target keywords.

[0115] In some embodiments of the present disclosure, the minimum value of the preset number interval is 0;

[0116] The maximum value of the preset number interval is determined according to the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

[0117] In some embodiments of the present disclosure, the maximum value of the preset number interval is between the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

[0118] In some embodiments of the present disclosure, the device further includes:

[0119] A verification module, used to verify the initial keywords to obtain verified keywords;

[0120] Accordingly, the target keyword extraction module 240 is specifically used for:

[0121] The target keyword is extracted from the initial keyword according to the verified keyword and the reference text library.

[0122] In some embodiments of the present disclosure, the verification module includes:

[0123] An extraction unit, used for extracting predefined error-prone characters from the initial keywords;

[0124] The replacement unit is used to replace the error-prone character with a predefined correction character to obtain the verified keyword, wherein the predefined correction character is a character with a similar shape to the error-prone character.

[0125] In some embodiments of the present disclosure, the verification module includes:

[0126] A similarity calculation unit, used for calculating the similarity between the initial keyword and the reference keyword of each text in the reference text library;

[0127] The selection unit is used to select the keyword with the highest similarity from the reference keywords of each text in the reference text library as the verified keyword.

[0128] It should be noted that Figure 2 The keyword extraction device 200 shown can execute Figure 1 The various steps in the method embodiment shown in the figure are implemented Figure 1 The various processes and effects in the method embodiment shown are not described in detail here.

[0129] Figure 3 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown.

[0130] like Figure 3 As shown, the electronic device may include a processor 301 and a memory 302 storing computer program instructions.

[0131] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0132] The memory 302 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 302 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 302 is a non-volatile solid-state memory. In a particular embodiment, the memory 302 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.

[0133] The processor 301 reads and executes the computer program instructions stored in the memory 302 to perform the steps of the keyword extraction method provided in the embodiment of the present disclosure.

[0134] In one example, the electronic device may further include a transceiver 303 and a bus 304. Figure 3 As shown, the processor 301, the memory 302 and the transceiver 303 are connected via a bus 304 and communicate with each other.

[0135] The bus 304 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 304 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0136] The following is an embodiment of a computer-readable storage medium provided in an embodiment of the present disclosure. The computer-readable storage medium and the keyword extraction method of the above-mentioned embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the computer-readable storage medium, reference can be made to the embodiment of the above-mentioned keyword extraction method.

[0137] This embodiment provides a storage medium containing computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to perform a keyword extraction method. The method includes:

[0138] Get the text to be detected;

[0139] Extracting preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces;

[0140] Extracting initial keywords from the text to be screened according to a common character table;

[0141] Extract target keywords from the initial keywords according to a reference text library corresponding to the text to be detected.

[0142] Of course, the computer executable instructions of a storage medium including computer executable instructions provided in an embodiment of the present disclosure are not limited to the above method operations, and can also execute related operations in the keyword extraction method provided in any embodiment of the present disclosure.

[0143] Through the above description of the implementation methods, the technical personnel in the relevant field can clearly understand that the present disclosure can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer cloud platform (which can be a personal computer, a server, or a network cloud platform, etc.) to execute the keyword extraction method provided by each embodiment of the present disclosure.

[0144] Note that the above are only preferred embodiments of the present disclosure and the technical principles used. Those skilled in the art will understand that the present disclosure is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present disclosure. Therefore, although the present disclosure is described in more detail through the above embodiments, the present disclosure is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present disclosure, and the scope of the present disclosure is determined by the scope of the appended claims.

Claims

1. A keyword extraction method, characterized in that: include: Get the text to be detected; Extracting preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces; Extracting initial keywords from the text to be screened according to a common character table; Extract target keywords from the initial keywords according to a reference text library corresponding to the text to be detected.

2. The method according to claim 1, characterized in that The step of extracting initial keywords from the text to be screened according to the common character table includes: Deleting the search common characters belonging to the common character table from the text to be screened; The remaining characters in the text to be screened except the common search characters are used as the initial keywords.

3. The method according to claim 1, characterized in that The step of extracting target keywords from the initial keywords according to a reference text library corresponding to the text to be detected includes: Determining the number of times the initial keyword appears in the text of the reference text library; A keyword whose number of occurrences is within a preset number interval is obtained from the initial keywords as the target keyword.

4. The method according to claim 3, characterized in that The minimum value of the preset number interval is 0; The maximum value of the preset number interval is determined according to the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

5. The method according to claim 4, characterized in that The maximum value of the preset number interval is between the number of times the predefined keyword appears in the reference text library and the number of times the predefined non-keyword appears in the reference text library.

6. The method according to claim 1, characterized in that Before extracting the target keyword from the initial keyword according to the reference text library corresponding to the text to be detected, the method further includes: Verifying the initial keywords to obtain verified keywords; Correspondingly, the step of extracting target keywords from the initial keywords according to a reference text library corresponding to the text to be detected includes: The target keyword is extracted from the initial keyword according to the verified keyword and the reference text library.

7. The method according to claim 6, characterized in that The verifying the initial keywords to obtain verified keywords includes: Extracting predefined error-prone characters from the initial keywords; The error-prone character is replaced with a predefined correction character to obtain the verified keyword, wherein the predefined correction character is a character with a shape similar to that of the error-prone character.

8. The method according to claim 6, characterized in that The verifying the initial keywords to obtain verified keywords includes: Calculate the similarity between the initial keyword and the reference keyword of each text in the reference text library; A keyword with the highest similarity is selected from the reference keywords of each text in the reference text library as the verified keyword.

9. A keyword extraction device, characterized in that: include: A text acquisition module, used to acquire the text to be detected; A character extraction module, used for extracting preset characters from the text to be detected to obtain the text to be screened, wherein the preset characters include one or more of letters, numbers, and spaces; An initial keyword extraction module, used to extract initial keywords from the text to be screened according to a common character table; The target keyword extraction module is used to extract the target keyword from the initial keywords according to the reference text library corresponding to the text to be detected.

10. An electronic device, characterized in that: include: processor; A memory for storing executable instructions; The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the method described in any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method according to any one of claims 1 to 8.