Search keyword trimming method and device, electronic equipment and computer storage medium
By preprocessing the search query and pruning keywords, target keywords are selected using keyword importance scores and semantic similarity, solving the problem of inaccurate search results in existing technologies and achieving higher search result accuracy.
Patent Information
- Application Number
- CN202510957324.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-11
- Publication Date
- 2025-11-14
AI Technical Summary
Current technology cannot accurately determine the keywords entered by users, resulting in inaccurate search results.
By preprocessing the search query, keywords that meet the preset criteria are obtained. The importance score of the keywords in the stored documents of the target database and the semantic similarity between the keywords are calculated. Based on the importance score and semantic similarity, the keywords are pruned to ensure that the importance score of the target keywords is greater than the preset score threshold and the semantic similarity is less than the preset threshold.
Improving keyword accuracy leads to improved search result precision.
Smart Images

Figure CN120950756A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of search engine technology, and in particular to a method, apparatus, electronic device, and computer storage medium for trimming search keywords. Background Technology
[0002] With the continuous development of information technology and the increasing maturity of search engine technology, accurate searches can provide users with a better user experience.
[0003] In existing technologies, it is common to rely on keywords entered by users to retrieve relevant content. However, the number, length, correctness of expression, and logical relationships between keywords (such as "or" and "and") directly affect search efficiency and accuracy. In practical applications, users mostly directly enter search statements or enter words they think of to search. When conducting a search, the search engine cannot determine accurate keywords, resulting in inaccurate search results.
[0004] This shows that existing technologies cannot accurately determine keywords, resulting in inaccurate search results. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, apparatus, electronic device, and computer storage medium for trimming search keywords to solve the problem that some technologies cannot accurately determine keywords, resulting in inaccurate search results.
[0006] To address the aforementioned problems, in a first aspect, the present invention provides a method for trimming search keywords, comprising: Obtain the search query for the target library, preprocess the search query, and obtain keywords that meet the preset specification conditions; Calculate the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords; Keywords are pruned based on importance score and semantic similarity to obtain target keywords. The importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
[0007] In one possible implementation, the search query is preprocessed to obtain keywords that meet preset criteria, including: The search query is segmented using a pre-defined word segmentation tool to obtain multiple decomposed words; Semantic recognition is performed on each decomposed word to identify stop words in each decomposed word, and stop words in each decomposed word are deleted to obtain the first candidate keyword; The first candidate keywords are standardized according to preset standardization conditions to obtain the keywords.
[0008] In one possible implementation, calculating the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords includes: Statistically analyze the term frequency and inverse document frequency of keywords in the stored documents of the target database, and calculate the importance score of keywords in the stored documents of the target database based on the term frequency and inverse document frequency; An embedded vector generation model is used to generate embedded vectors for keywords based on the context of the keywords, and the semantic similarity between keywords is calculated based on the embedded vectors of each keyword.
[0009] In one possible implementation, the importance score is calculated using the following formula:
[0010] in, Keywords k In the stored document d Importance score in Keywords k In the stored document d word frequency in N The total number of documents already stored. For keywords k The number of documents already stored; The formula for calculating semantic similarity is:
[0011] in, Keywords With keywords semantic similarity, Keywords Embedded vector, Keywords Embedded vector, Embedded vector The model, Embedded vector The model.
[0012] In one possible implementation, keywords are pruned based on importance scores and semantic similarity to obtain target keywords, including: Keywords with importance scores greater than a preset importance score threshold will be selected as second candidate keywords. When there is a pair of second candidate keywords with a semantic similarity greater than or equal to a preset semantic similarity threshold, the second candidate keyword with the lower importance score in the second candidate keyword pair is deleted to obtain the target keyword.
[0013] In one possible implementation, after obtaining the target keywords, the process includes: Search the target database based on the target keywords to obtain search results; The importance score threshold and semantic similarity threshold are adjusted based on the quantity and quality of search results, so that the search results corresponding to the target keywords determined based on the adjusted importance score threshold and semantic similarity threshold meet the preset search result conditions.
[0014] In one possible implementation, the importance score threshold and semantic similarity threshold are adjusted based on the quantity and quality of search results, including: When the number of search results exceeds a preset first quantity threshold or the quality score of the search results is less than or equal to the preset first quality score, the importance score threshold is increased and the semantic similarity threshold is decreased. When the number of search results is less than or equal to a preset second quantity threshold or the quality score of the search results is greater than a preset second quality score, the importance score threshold is reduced and the semantic similarity threshold is increased; wherein, the first quantity threshold is greater than the second quantity threshold and the second quality score is lower than the second quality score.
[0015] Secondly, the present invention also provides a search keyword trimming device, comprising: The keyword acquisition module is used to acquire search statements for the target database, preprocess the search statements, and obtain keywords that meet preset specification conditions. The calculation module is used to calculate the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords; The keyword trimming module is used to trim keywords based on importance score and semantic similarity to obtain target keywords. The importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
[0016] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, Memory, used to store programs; The processor, coupled to the memory, is used to execute a program stored in the memory to implement the steps in the search keyword trimming method of any of the above embodiments.
[0017] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps in the search keyword trimming method of any of the above embodiments.
[0018] The beneficial effects of this invention are as follows: The search keyword trimming method provided by this invention preprocesses the search statement to obtain keywords that meet preset standard conditions. It performs preliminary processing on the user-input search statement to ensure that the keywords meet the preset standard conditions. Furthermore, it filters keywords by using the importance score of the keywords in the stored documents in the target database and the semantic similarity between the keywords, ensuring that the importance score of the target keywords is greater than a preset score threshold and the semantic similarity between the target keywords is less than a preset similarity threshold, thereby improving the accuracy of the target keywords and the precision of the search results. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a search keyword trimming method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating a keyword extraction method provided in an embodiment of the present invention; Figure 3 A flowchart illustrating one implementation of S102 provided in this embodiment of the invention; Figure 4 A flowchart illustrating a method for determining target keywords provided in an embodiment of the present invention; Figure 5 This is a flowchart illustrating a threshold adjustment method provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of a search keyword trimming device provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0022] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0024] A specific embodiment of the present invention, such as Figure 1 As shown, a search keyword trimming method is disclosed, including: S101: Obtain the search statement for the target library, preprocess the search statement, and obtain keywords that meet the preset specification conditions.
[0025] In this embodiment of the invention, the search statement for the target database refers to the retrieval statement entered by the user in a search engine targeting the target database. Taking a bidding information database as an example, if a user needs to find relevant bidding information in the bidding information database, they can enter a relevant search statement in the search bar of the bidding database, such as: bidding information for air conditioning installation projects in a certain city. Because this search statement is entered by the user, keywords need to be extracted from the statement, and then a search is performed in the bidding database based on the keywords. Based on this, the search statement needs to be preprocessed to obtain keywords that meet preset specification conditions. The specific process of preprocessing will be described in detail later in this invention.
[0026] S102, calculate the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords.
[0027] In this embodiment of the invention, for the keywords determined in step S101, there may be keywords that are useless or redundant to the search results. It is necessary to further determine target keywords from these keywords for the final search. Therefore, the importance score of each keyword in the stored documents of the target database and the semantic similarity between keywords can be calculated. In this embodiment of the invention, the stored documents of the target database refer to data documents already stored in the target database. These data documents can be stored in the form of data bars or logs; this invention does not impose any restrictions on this.
[0028] In this embodiment of the invention, the importance score of a keyword in the stored documents of the target library is used to represent the importance of the keyword in the stored documents of the target library, and the semantic similarity between each keyword is used to represent the degree of similarity between each keyword. Based on the importance score and semantic similarity, the keywords can be further filtered.
[0029] S103. Based on importance score and semantic similarity, the keywords are pruned to obtain target keywords. The importance score of the target keywords is greater than the preset score threshold, and the semantic similarity between the target keywords is less than the preset similarity threshold.
[0030] In this embodiment of the invention, the final target keywords can be determined based on the importance score and semantic similarity calculated in S102. The importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold. The specific method for pruning keywords will be described in detail later in this invention.
[0031] The search keyword trimming method provided by this invention preprocesses the search query to obtain keywords that meet preset specification conditions. It performs preliminary processing on the user-input search query to ensure that the keywords meet the preset specification conditions. Furthermore, it filters keywords based on their importance scores in stored documents in the target database and the semantic similarity between keywords, ensuring that the importance score of the target keywords is greater than a preset threshold and the semantic similarity between target keywords is less than a preset similarity threshold. This improves the accuracy of target keywords and the precision of search results.
[0032] In embodiments of the present invention, such as Figure 2 As shown, the search query is preprocessed to obtain keywords that meet the preset criteria, including: S201, The search statement is segmented using a preset word segmentation tool to obtain multiple decomposed words; S202, perform semantic recognition on each decomposed word, identify stop words in each decomposed word, delete stop words in each decomposed word to obtain the first candidate keyword; S203, standardize the first candidate keyword according to the preset standard conditions to obtain the keyword.
[0033] In this embodiment of the invention, the preprocessing of the search statement includes word segmentation, stop word removal, and standardization. Specifically, a preset word segmentation tool can be used to segment the search statement to obtain multiple decomposed words. For example, the jieba word segmentation tool can be used to segment the input search statement into multiple decomposed words. For example, "bidding information for air conditioning installation projects in a certain place" can be decomposed into "a certain place", "of", "air conditioning", "installation", "project", "of", "bidding", and "information". However, many meaningless conjunctions exist among these decomposed words, so semantic recognition needs to be performed on each decomposed word. Meaningless words are identified and deleted as stop words to obtain the first candidate keywords, such as "of" and "information". The first candidate keywords obtained in this way may still have non-standard issues and need to be further standardized, such as changing "a certain place" to "a certain city" and "air conditioning" to "air conditioning equipment", etc., to obtain standardized keywords.
[0034] This invention preprocesses search queries to obtain standardized keywords, which facilitates subsequent keyword trimming and ensures the accuracy of search results.
[0035] In some possible embodiments of the present invention, such as Figure 3 As shown, the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords are calculated, including: S301, Calculate the word frequency and inverse document frequency of the keyword in the stored documents of the target database, and calculate the importance score of the keyword in the stored documents of the target database based on the word frequency and inverse document frequency; S302, using a preset embedding vector generation model to generate embedding vectors for keywords based on the context of the keywords, and calculating the semantic similarity between keywords based on the embedding vectors of each keyword.
[0036] In this embodiment of the invention, the term frequency (TF) of a keyword in the stored documents of the target database refers to the frequency of the keyword appearing in each document stored in each target database. The inverse document frequency (IVF) is the reciprocal of the document frequency. TF and IVF are used to evaluate the importance of a word to a document within a document set or corpus. The importance of a word increases proportionally to the number of times it appears in a document, but decreases inversely proportionally to its frequency in the corpus. If a word or phrase appears frequently in one article but rarely in others, it is considered to have good category discrimination ability and is suitable for classification. The fewer documents containing a term and the higher the IVF, the better the term's category discrimination ability. If the number of documents containing term t in a certain category is m, and the total number of documents containing t in other categories is k, then the total number of documents containing t is n = m + k. When m is large, n is also large, and the IVF value obtained according to the IVF formula will be small, indicating that the term t has weak category discrimination ability. The importance score of keywords in a document can be determined based on term frequency and inverse document frequency. Specifically, the formula for calculating the importance score is as follows:
[0037] in, Keywords k In the stored document d Importance score in Keywords k In the stored document d word frequency in N The total number of documents already stored. For keywords k The number of documents already stored; Furthermore, for each keyword, an embedding vector can be generated based on the keyword's context using a pre-defined embedding vector generation model, such as the Transformer model. The semantic similarity between keywords is then calculated based on their embedding vectors. Specifically, the semantic similarity calculation formula is as follows:
[0038] in, Keywords With keywords semantic similarity, Keywords Embedded vector, Keywords Embedded vector, Embedded vector The model, Embedded vector The model.
[0039] This invention calculates the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords, which facilitates the subsequent reasonable pruning of keywords.
[0040] In some possible embodiments of the present invention, such as Figure 4 As shown, keywords are pruned based on importance scores and semantic similarity to obtain target keywords, including: S401, keywords with importance scores greater than the preset importance score threshold are selected as second candidate keywords; S402, when there is a pair of second candidate keywords with a semantic similarity greater than or equal to a preset semantic similarity threshold, delete the second candidate keyword with the lower importance score in the second candidate keyword pair to obtain the target keyword.
[0041] In this embodiment of the invention, when pruning keywords, the first pruning is performed based on the importance score calculated in the aforementioned embodiments. Specifically, an importance score threshold can be set, such as 0.5. If the importance score is greater than this threshold, it indicates that the keyword is important to the document and can be retained. If the importance score is less than or equal to the threshold, it indicates that the keyword is not important to the document and can be deleted. Based on this, a second candidate keyword can be obtained. In certain specific scenarios, the second keyword obtained at this time is already the target keyword, which can accurately retrieve the search results that the user wants. However, for some other scenarios, such as when there are second candidate keyword pairs with semantic similarity greater than or equal to a preset semantic similarity threshold, that is, when there are keywords with high similarity among the second candidate keywords, such as semantic similarity greater than 0.8, further filtering of the highly similar keywords is required, and only one needs to be retained. Specifically, the second candidate keyword with the lower importance score among the two highly similar keywords is deleted, and the keyword with the higher importance score is retained as the target keyword.
[0042] This invention prunes keywords based on importance scores and semantic similarity to obtain target keywords, ensuring the accuracy of target keywords and improving search precision.
[0043] In some possible embodiments of the present invention, such as Figure 5 As shown, after obtaining the target keywords, the following are included: S501, Search the target database based on the target keywords to obtain search results; S502, adjust the importance score threshold and semantic similarity threshold based on the quantity and quality of search results, so that the search results corresponding to the target keywords determined based on the adjusted importance score threshold and semantic similarity threshold meet the preset search result conditions.
[0044] In this embodiment of the invention, after determining the target keywords, the target keywords can be input into a preset search engine, such as ElasticSearch, to obtain search results. In order to further improve the accuracy of the search results, the importance score threshold and semantic similarity threshold can be adjusted according to the quantity and quality of the search results, so that the search results corresponding to the target keywords determined based on the adjusted importance score threshold and semantic similarity threshold meet the preset search result conditions.
[0045] Specifically, when the number of search results exceeds a preset first quantity threshold or the quality score of the search results is less than or equal to a preset first quality score, the importance score threshold is increased and the semantic similarity threshold is decreased. When the number of search results is less than or equal to a preset second quantity threshold or the quality score of the search results is greater than a preset second quality score, the importance score threshold is reduced and the semantic similarity threshold is increased; wherein, the first quantity threshold is greater than the second quantity threshold and the second quality score is lower than the second quality score.
[0046] In this embodiment of the invention, for ease of explanation, a specific embodiment is used as an example. Regarding the number of returned search results, if the number of results is less than 10, it indicates too few search results; if the number of results is greater than 10,000, it indicates too many search results. Regarding the average relevance score of the search results (assuming the relevance score ranges from 0 to 1), if the average relevance score is less than 0.7, it indicates the search results are not accurate enough; if the average relevance score is greater than 0.9, it indicates the search results are sufficiently accurate. When adjusting the thresholds, if the number of search results is less than 10 or the average relevance score is lower than 0.7 (indicating insufficient results or low quality): the importance score threshold is decreased by 0.1 (e.g., from 0.5 to 0.4) to retain more keywords, and the semantic similarity threshold is increased by 0.1 (e.g., from 0.8 to 0.9) to allow more similar keywords to pass. If the number of search results is greater than 10,000 or the average relevance score is higher than 0.9 (indicating too many results or already high quality): the importance score threshold is increased by 0.1 (e.g., from 0.5 to 0.6) to more strictly filter keywords. Lower the semantic similarity threshold by 0.1 (e.g., from 0.8 to 0.7) to remove more similar keywords.
[0047] This invention, by dynamically adjusting the rules, can adjust the importance score threshold and semantic similarity threshold based on the search results, thereby further improving the quality of the search results.
[0048] To better implement the search keyword trimming method in this embodiment of the invention, based on the search keyword trimming method, correspondingly, such as... Figure 6 As shown, this embodiment of the invention also provides a search keyword trimming device, the search keyword trimming device 600 including: The keyword acquisition module 601 is used to acquire search statements for the target database, preprocess the search statements, and obtain keywords that meet preset specification conditions. The calculation module 602 is used to calculate the importance score of keywords in the stored documents of the target library and the semantic similarity between keywords; The keyword trimming module 603 is used to trim keywords based on importance score and semantic similarity to obtain target keywords. The importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
[0049] The search keyword trimming device 600 provided in the above embodiments can realize the technical solutions described in the above search keyword trimming method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above search keyword trimming method embodiments, and will not be repeated here.
[0050] like Figure 7 As shown, the present invention also provides an electronic device 700. The electronic device 700 includes a processor 701, a memory 702, and a display 703. Figure 7 Only some components of the electronic device 700 are shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.
[0051] In some embodiments, processor 701 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in memory 702 or process data, such as the search keyword trimming method of the present invention.
[0052] In some embodiments, processor 701 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 701 may be local or remote. In some embodiments, processor 701 may be implemented on a cloud platform. In some embodiments, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, or any combination thereof.
[0053] In some embodiments, memory 702 may be an internal storage unit of electronic device 700, such as a hard disk or memory of electronic device 700. In other embodiments, memory 702 may also be an external storage device of electronic device 700, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 700.
[0054] Furthermore, the memory 702 may include both internal storage units of the electronic device 700 and external storage devices. The memory 702 is used to store application software and various types of data installed on the electronic device 700.
[0055] In some embodiments, display 703 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 703 is used to display information from electronic device 700 and to display a visual user interface. Components 701-703 of electronic device 700 communicate with each other via a system bus.
[0056] In some embodiments, when processor 701 executes the search keyword trimming program in memory 702, the following steps may be performed: Obtain the search query for the target library, preprocess the search query, and obtain keywords that meet the preset specification conditions; Calculate the importance score of keywords in the stored documents of the target database and the semantic similarity between keywords; Keywords are pruned based on importance score and semantic similarity to obtain target keywords. The importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
[0057] It should be understood that when the processor 701 executes the search keyword trimming program in the memory 702, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.
[0058] Furthermore, the embodiments of the present invention do not specifically limit the type of electronic device 700 mentioned. Electronic device 700 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the present invention, electronic device 700 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0059] Accordingly, embodiments of the present invention also provide a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the search keyword trimming methods provided in the above-described method embodiments.
[0060] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0061] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for trimming search keywords, characterized in that, include: Obtain the search query for the target library, preprocess the search query to obtain keywords that meet preset specification conditions; Calculate the importance score of the keyword in the stored documents of the target library and the semantic similarity between the keywords; The keywords are pruned based on the importance score and the semantic similarity to obtain target keywords, wherein the importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
2. The search keyword trimming method according to claim 1, characterized in that, The preprocessing of the search query to obtain keywords that meet preset criteria includes: The search statement is segmented using a preset word segmentation tool to obtain multiple decomposed words; Semantic recognition is performed on each of the decomposed words to identify stop words in each of the decomposed words, and stop words in each of the decomposed words are deleted to obtain the first candidate keyword; The first candidate keywords are normalized according to preset standardization conditions to obtain the keywords.
3. The search keyword trimming method according to claim 1, characterized in that, The calculation of the importance score of the keyword in the stored documents of the target database and the semantic similarity between the keywords includes: The word frequency and inverse document frequency of the keyword in the stored documents of the target database are statistically analyzed, and the importance score of the keyword in the stored documents of the target database is calculated based on the word frequency and the inverse document frequency. An embedded vector generation model is used to generate embedded vectors for the keywords based on their context, and the semantic similarity between the keywords is calculated based on their embedded vectors.
4. The search keyword trimming method according to claim 3, characterized in that, The formula for calculating the importance score is as follows: in, Keywords k In the stored document d Importance score in Keywords k In the stored document d word frequency in N The total number of documents already stored. For keywords k The number of documents already stored; The formula for calculating semantic similarity is: in, Keywords With keywords semantic similarity, Keywords Embedded vector, Keywords Embedded vector, Embedded vector The model, Embedded vector The model.
5. The search keyword trimming method according to claim 1, characterized in that, The process of pruning the keywords based on the importance score and semantic similarity to obtain target keywords includes: Keywords whose importance scores are greater than a preset importance score threshold are selected as second candidate keywords. When there is a pair of second candidate keywords in the second candidate keywords whose semantic similarity is greater than or equal to a preset semantic similarity threshold, the second candidate keyword with the lower importance score in the second candidate keyword pair is deleted to obtain the target keyword.
6. The search keyword trimming method according to claim 5, characterized in that, After obtaining the target keywords, the process includes: Based on the target keywords, a search is performed in the target database to obtain search results; The importance score threshold and the semantic similarity threshold are adjusted based on the quantity and quality of the search results, so that the search results corresponding to the target keywords determined based on the adjusted importance score threshold and semantic similarity threshold meet the preset search result conditions.
7. The search keyword trimming method according to claim 6, characterized in that, The adjustment of the importance score threshold and the semantic similarity threshold based on the quantity and quality of the search results includes: When the number of search results is greater than a preset first quantity threshold or the quality score of the search results is less than or equal to a preset first quality score, the importance score threshold is increased and the semantic similarity threshold is decreased. When the number of search results is less than or equal to a preset second quantity threshold or the quality score of the search results is greater than a preset second quality score, the importance score threshold is decreased and the semantic similarity threshold is increased; wherein, the first quantity threshold is greater than the second quantity threshold, and the second quality score is lower than the second quality score.
8. A search keyword trimming device, characterized in that, include: The keyword acquisition module is used to acquire search statements for the target library, preprocess the search statements, and obtain keywords that meet preset specification conditions. The calculation module is used to calculate the importance score of the keywords in the stored documents of the target library and the semantic similarity between the keywords; The keyword trimming module is used to trim the keywords based on the importance score and the semantic similarity to obtain target keywords, wherein the importance score of the target keywords is greater than a preset score threshold, and the semantic similarity between the target keywords is less than a preset similarity threshold.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the search keyword trimming method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can perform the steps in the search keyword trimming method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for extracting searching value terms based on context search
CN102929873A
Determination method and determination device for semantic redundancy and corresponding search method and device
CN103390004A
Method and device for determining keywords of text
CN116306616A