Method, device, electronic device and storage medium for determining key information

By determining the query information of the target business and selecting key phrases based on similarity, the problem of inaccurate identification of key information in the existing technology is solved, higher accuracy and fit are achieved, and better search services are provided.

CN113220838BActive Publication Date: 2024-09-17BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110520029.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-12
Publication Date
2024-09-17
Estimated Expiration
2041-05-12

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately identify key information in user query information, resulting in service information that does not meet user needs.

Method used

By determining the query information involving the target business, extracting candidate key phrases, and based on the similarity between the candidate key phrases and the business name of the target business, select phrases with high similarity as key information to provide more accurate service information.

Benefits of technology

It improves the accuracy and relevance of key information, can better meet user needs, and provides better search services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113220838B
    Figure CN113220838B
Patent Text Reader

Abstract

The present disclosure provides a method, device, electronic device and storage medium for determining key information, which are applied to the field of electronic technology, and are specifically applied to the fields of natural language processing, deep learning and data mining. The specific implementation scheme of the method for determining key information is: determining query information related to a target business as target query information; extracting candidate key phrases from the target query information; and determining a target phrase in the candidate key phrases based on the similarity between the candidate key phrases and the business name of the target business as key information for the target business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of electronic technology, specifically to the field of natural language processing, the field of deep learning and the field of data mining, and more specifically to a method, apparatus, device and storage medium for determining key information. Background Art

[0002] With the development of electronic technology and Internet technology, people tend to search for information through the Internet. In order to improve user experience, how to provide users with service information that meets their needs based on the query information entered by users has become one of the research hotspots.

[0003] In order to provide users with service information that meets their needs, trigger phrases can be set for various services. In this way, the type of service information provided to the user can be determined based on the trigger phrases included in the query information. Summary of the invention

[0004] Provided are a method, device, electronic device and storage medium for determining key information with improved accuracy.

[0005] According to one aspect of the present disclosure, a method for determining key information is provided, the method comprising: determining query information related to a target business as target query information; extracting candidate key phrases from the target query information; and determining a target phrase in the candidate key phrases based on a similarity between the candidate key phrases and a business name of the target business as key information for the target business.

[0006] According to another aspect of the present disclosure, a device for determining key information is provided, the device comprising: a query information determination module, used to determine query information related to a target business as target query information; a phrase extraction module, used to extract candidate key phrases from the target query information; and a key information determination module, used to determine a target phrase among the candidate key phrases based on a similarity between the candidate key phrases and a business name of the target business as key information for the target business.

[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for determining key information provided by the present disclosure.

[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the method for determining key information provided by the present disclosure.

[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method for determining key information provided by the present disclosure is implemented.

[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0012] Figure 1 It is a schematic diagram of an application scenario of a method, device, electronic device, and storage medium for determining key information according to an embodiment of the present disclosure;

[0013] Figure 2 is a flow chart of a method for determining key information according to an embodiment of the present disclosure;

[0014] Figure 3 is a schematic diagram of the principle of determining query information related to a target business according to an embodiment of the present disclosure;

[0015] Figure 4 is a schematic diagram of the principle of extracting candidate key phrases from target query information according to an embodiment of the present disclosure;

[0016] Figure 5 is a schematic diagram of the principle of determining a target phrase among candidate key phrases according to an embodiment of the present disclosure;

[0017] Figure 6 is a schematic diagram of the principle of a method for determining key information according to an embodiment of the present disclosure;

[0018] Figure 7 is a structural block diagram of an apparatus for determining key information according to an embodiment of the present disclosure; and

[0019] Figure 8 The present invention is a block diagram of an electronic device for implementing the method for determining key information according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0021] The present disclosure provides a method for determining key information, which includes a query information determination stage, a phrase extraction stage, and a key information determination stage. In the query information determination stage, query information related to a target business is determined as target query information. In the phrase extraction stage, candidate key phrases are extracted from the target query information. In the key information determination stage, based on the similarity between the candidate key phrases and the business name of the target business, a target phrase in the candidate key phrases is determined as key information for the target business.

[0022] The following will be combined Figure 1 The application scenarios of the method and device provided by the present disclosure are described.

[0023] Figure 1 It is a schematic diagram of an application scenario of the method and device for determining key information according to an embodiment of the present disclosure.

[0024] like Figure 1 As shown, the application scenario 100 includes a user 110, a terminal device 120 and a server 130. The terminal device 120 may be communicatively connected to the server 130 via a network, and the network may include a wired or wireless communication link.

[0025] For example, the user 110 can use the terminal device 120 to interact with the server 130 through the network to receive or send messages, etc. The terminal device 120 can be a terminal device with a display screen and processing functions, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.

[0026] Exemplarily, the terminal device 120 may obtain the query information 140 in response to a user operation, or may recognize the user's voice information through voice recognition technology to obtain the query information 140. The terminal device 120 may also send the query information 140 to the server 130 to obtain service information 150 that meets the user's needs from the server 130. The query information 140 may be, for example, a query in a search scenario.

[0027] The server 130 may be a server that provides various services, such as a background management server that provides support for websites or client applications browsed by users using the terminal device 120. The server 130 may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0028] Exemplarily, the server 130 may, for example, respond to the received query information 140 by matching the query information 140 with trigger phrases of multiple categories of service information maintained in advance, determine a trigger phrase that matches the query information 140, and feedback the service information 150 corresponding to the matching trigger phrase to the terminal device 120.

[0029] According to the embodiments of the present disclosure, Figure 1 As shown, the application scenario 100 may further include a database 160. The database 160 stores historical query information. The server 130 may, for example, access the database 160 to determine trigger phrases of multiple types of service information according to the historical query information.

[0030] Exemplarily, the aforementioned multiple types of service information may include, for example, “attraction ticket” information, “full-time recruitment” information, “home appliance repair” information, and other service information related to work, life, education, and other fields.

[0031] It should be noted that the key information determined in the present disclosure may be the aforementioned trigger phrase. The method for determining key information provided in the present disclosure may be executed by the server 130. Accordingly, the device for determining key information provided in the present disclosure may be set in the server 130.

[0032] It should be understood that Figure 1 The number and type of terminal devices, servers and databases in the embodiment are only for illustration. According to the implementation requirements, there may be any number and type of terminal devices, servers and databases.

[0033] Figure 2 is a flowchart of a method for determining key information according to an embodiment of the present disclosure.

[0034] like Figure 2 As shown, the method 200 for determining key information of this embodiment may include operations S210 to S230.

[0035] In operation S210, query information related to a target business is determined as target query information.

[0036] The target business may be a business that can provide the aforementioned multiple types of service information, such as "attraction ticket" business, "home appliance repair" business, "full-time recruitment" business and / or "house rental" business, etc. The target business is any one of the service items provided in multiple fields such as life, work, education, and medical care.

[0037] Exemplarily, query information related to the target business can be recalled from historical query information. For example, the historical query information can be stored according to the target business involved, and the target business involved is used as an index. This embodiment can first determine the target business, and use the historical query information indexed by the target business as the target query information. Alternatively, the query information in the historical query information that has a large similarity with the business name of the target business can be used as the target query information. Among them, the determined target query information can be one or more. In order to improve the accuracy of the determined key information, multiple target query information can be recalled.

[0038] In operation S220 , candidate key phrases are extracted from the target query information.

[0039] According to the embodiments of the present disclosure, a phrase extraction algorithm may be used to extract candidate key phrases. The phrase extraction algorithm may be a Rapid Automatic Keyword Extraction (RAKE) algorithm, an extraction algorithm based on mutual information and left and right information entropy, or a key phrase-extract operator provided by a natural language processing platform. A phrase refers to a language unit without intonation that is composed of language units that can be matched at the three levels of syntax, semantics, and pragmatics, also called a phrase. The phrase is a grammatical unit that is larger than a word but does not form a sentence.

[0040] It can be understood that the above phrase extraction algorithm is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit this.

[0041] In operation S230 , based on the similarity between the candidate key phrases and the service name of the target service, a target phrase among the candidate key phrases is determined as key information for the target service.

[0042] After obtaining the candidate key phrases, a semantic similarity calculation method can be used to determine the similarity between the candidate key phrases and the business name. A phrase whose similarity with the business name is greater than a similarity threshold is selected from the candidate key phrases as key information for the target business. The similarity threshold can be set according to actual needs, and the present disclosure does not limit this.

[0043] Exemplarily, the semantic similarity calculation method may include: ord Mover's Distance), a method based on smooth inverse frequency (Smooth Inverse Frequency), and a method using deep structured semantic models (DSSM), etc. It can be understood that the above semantic similarity calculation method is only used as an example to facilitate understanding of the present disclosure, and the present disclosure does not limit this.

[0044] After determining the key information, if the query obtained by the terminal device includes the key information, this embodiment can feed back the service information of the target service to the terminal device to be displayed to the user as feedback information in response to the query.

[0045] Compared with the technical solution in the related art that obtains key information by rewriting the business name of the target business (such as the name of a service item), the embodiment of the present disclosure can expand the text range of the source text of the key information by recalling the query information related to the target business from the historical query information, and mining phrases with high similarity to the business name from the query information as key information, and can mine key information that is different from the text included in the business name but semantically related. Therefore, this embodiment can obtain key information with high accuracy and more suitable for the use scenario. The technical solution based on this embodiment is convenient for providing better search services to users.

[0046] Figure 3 It is a schematic diagram of the principle of determining query information related to a target business according to an embodiment of the present disclosure.

[0047] The disclosed embodiment can generate a dictionary tree based on the business names of multiple businesses in advance, and when recalling target query information, query information related to the target business can be found from historical query information based on the dictionary tree. This improves the efficiency and accuracy of recalling target query information. Among them, the multiple businesses include the aforementioned target business, and the multiple businesses can be set according to actual needs, which is not limited by the present disclosure.

[0048] When generating a dictionary tree, the business name of each business in the multiple businesses can be divided into words to obtain a phrase for each business. After obtaining the phrase for each business, a branch for each business is generated based on the phrase to obtain multiple branches, and a predetermined dictionary tree is formed based on the multiple branches.

[0049] Exemplarily, the business name of each business can be segmented according to a custom dictionary or a Jieba word segmentation tool. For example, for the business name "attraction tickets", the phrase {attractions, tickets} can be obtained through word segmentation. Based on the order of the characters in the phrase, nodes indicating the characters are established in sequence to obtain multiple nodes, and the multiple nodes are connected in sequence according to the order of the characters to obtain branches for each business. For the phrase {attractions, tickets}, a first node indicating "scenery", a second node indicating "point", a third node indicating "door" and a fourth node indicating "ticket" can be established in sequence, and the first node, the second node, the third node and the fourth node are connected in sequence to obtain a branch for the "attraction tickets" business. Connecting multiple branches to the root node can obtain a dictionary tree. Among them, the root node does not indicate character information.

[0050] Exemplarily, after connecting multiple branches to the root node, the embodiment may also use a string matching algorithm to add mismatch pointers to each node in the branch. The string matching algorithm may be, for example, the Knuth-Morris-Pratt Algorithm (KMP Algorithm), the BM (Boyer-Moore) algorithm, etc. By adding the mismatch pointer, the query efficiency of the dictionary tree may be improved.

[0051] When searching for query information related to the target service from historical query information based on the dictionary tree, the historical query information can be matched with a predetermined dictionary tree, and the query information matching the branch for the target service in the predetermined dictionary tree is used as the target query information.

[0052] Exemplarily, a predetermined dictionary tree can be queried based on each historical query information. If a certain historical query information includes a string that matches a phrase indicated by a branch in the predetermined dictionary tree, the certain historical query information is retained, and the business targeted by the phrase is combined with the certain historical query information to form a query-business pair. In this way, multiple query-business pairs can be obtained. The historical query information that forms a query-business pair with the target business is used as the aforementioned target query information. Among them, if a mismatch pointer is added to the predetermined dictionary tree, the aforementioned string matching algorithm can be used to query the predetermined dictionary tree. For example, the predetermined dictionary tree can be generated and queried based on the AC automaton (Aho-Corasick automaton) algorithm, which is not limited in the present disclosure.

[0053] In one embodiment, after the query information matching the branch for the target business is recalled by querying the predetermined dictionary tree, the recalled query information can be filtered according to the similarity between the business name of the target business, and the filtered query information is used as the target query information. In this way, the relevance between the target query information and the target business can be improved, and thus the accuracy of the key information determined for the target business can be improved.

[0054] For example, Figure 3 As shown, when determining the query information related to the target business, the embodiment 300 can first query the predetermined dictionary tree 320 based on each historical query information in the query information library 310, that is, match the historical query information with the predetermined dictionary tree, and obtain the query information that matches the branch for the target business in the predetermined dictionary tree as the candidate query information 330. After obtaining the candidate query information, the similarity 350 between each candidate query information 330 and the business name 340 of the target business is determined. The candidate query information whose similarity with the business name of the target business is greater than or equal to the first threshold is selected from the candidate query information 330 to obtain the target query information 360. Among them, for example, the semantic similarity calculation method described above can be used to determine the similarity 350 between each candidate query information 330 and the business name 340 of the target business, and the present disclosure does not limit this. Among them, the first threshold can be set according to actual needs, for example, it can be set to any value not less than 0.5, and the present disclosure does not limit this. For example, if the candidate query information is "modern simple style", the business name of the target business is "decoration", and the similarity between the two is 0.58, then the candidate query information "modern simple style" is used as a target query information.

[0055] In one embodiment, after obtaining the candidate query information 330 or the target query information, the obtained query information may be filtered based on a pre-built blacklist, for example, to filter out the query information including words in the blacklist. The pre-built blacklist may include banned words issued by an authority or sensitive words that violate the law, social morality, and harm the public interest.

[0056] Figure 4 It is a schematic diagram of the principle of extracting candidate key phrases from target query information according to an embodiment of the present disclosure.

[0057] The disclosed embodiment can perform word segmentation and part-of-speech analysis on the target query information, and obtain a predetermined blacklist that cannot be used as key information based on the processing results. When extracting candidate key phrases from the target query information, the key phrases extracted from the target query information can be eliminated according to the predetermined blacklist, and the phrases after the eliminated words are used as candidate key phrases. In this way, the determined candidate key phrases can be made more in line with the setting requirements of the key information to a certain extent, and the efficiency and accuracy of determining the key information can be improved.

[0058] According to the embodiments of the present disclosure, Figure 4 As shown, the target query information may be multiple. When extracting candidate key phrases from the target query information, the embodiment 400 may first extract the key phrases of each of the multiple target query information 410 to obtain multiple key phrases 420. Then, based on the predetermined blacklist 430, the candidate key phrases in the multiple key phrases 420 are determined. When determining the candidate key phrases in the multiple key phrases, the words in the predetermined blacklist may be eliminated from the key phrases based on the predetermined blacklist to obtain the candidate key phrases.

[0059] In one embodiment, the predetermined blacklist 430 may include non-permitted parts of speech 431. When determining candidate key phrases among a plurality of key phrases, the parts of speech of each word included in each phrase of the plurality of key phrases 420 may be determined first. Then, words with non-permitted parts of speech are removed from each phrase to obtain candidate key phrases. Among them, a lexical analyzer (LA) or a natural language analysis tool in the related art may be used to perform part-of-speech analysis on the key phrases, thereby determining the parts of speech of each word included in each phrase. Among them, the non-permitted parts of speech may be, for example, at least one of group / organizational nouns, quantifiers, adverbs, English abbreviations, and the like.

[0060] In one embodiment, the key phrase obtained after removing words with non-permitted parts of speech from each phrase in the above embodiment can be used as the third phrase 440. Then, based on the similarity between the third phrase 440 and the business name 450 of the target business, the candidate key phrases are screened from the third phrase. Specifically, the third phrase with a greater similarity to the business name 450 of the target business can be used as a candidate key phrase. Among them, the third phrase with a greater similarity can be selected according to a pre-set fourth threshold. The fourth threshold can be greater than the first threshold described above, so as to gradually increase the requirements for the relevance of the screened phrases to the target business. After removing words from the key phrases, this embodiment can screen the third phrase based on the similarity with the business name, which can facilitate the improvement of the accuracy of the key information subsequently determined and reduce the waste of unnecessary computing resources to a certain extent.

[0061] In one embodiment, the predetermined blacklist 430 may also include non-permitted words 432. When determining candidate key phrases among multiple key phrases, after selecting the third phrase with greater similarity according to the fourth threshold through the above embodiment, a fourth phrase 460 may be obtained. The fourth phrase 460 is a third phrase whose similarity with the business name 450 of the target business is greater than or equal to the fourth threshold. After obtaining the fourth phrase 460, non-permitted words may be removed from the fourth phrase 460 to obtain a candidate key phrase 470. For example, the fourth phrase 460 may be character-matched with the non-permitted words 432 to identify the non-permitted words in the fourth phrase 460, and the non-permitted words may be removed. For example, the non-permitted words in this embodiment may include words belonging to the non-permitted parts of speech described above. Since there is an inaccurate analysis when the phrase is analyzed for parts of speech, this embodiment further removes the words in the phrase based on the non-permitted words, so that the determined candidate key phrases can further conform to the setting rules of the key information, thereby improving the efficiency and accuracy of determining the key information.

[0062] According to an embodiment of the present disclosure, in order to facilitate the elimination of words in the third key phrase based on non-permitted parts of speech, the embodiment can generate non-permitted parts of speech based on multiple target query information in advance. For example, part-of-speech analysis can be performed on multiple target query information 410 to obtain the parts of speech of the words included in each query information in the multiple target query information. By counting the parts of speech of the words in the multiple target query information, a vocabulary can be generated for each part of speech, and the words belonging to each part of speech in the multiple target query information can be included in the vocabulary. In this way, a vocabulary for each part of speech in multiple parts of speech can be obtained. After obtaining the vocabulary, the average similarity between each word in the vocabulary for each part of speech and the business name of the target business can be determined as the average similarity for each part of speech. The parts of speech for which the average similarity is less than the third threshold value are listed as non-permitted parts of speech.

[0063] Exemplarily, after obtaining a vocabulary for each part of speech, the similarity between each word in the vocabulary and the business name of the target business can be calculated. The average value of the similarity between all words in the vocabulary and the business name is calculated as the average similarity for the part of speech. The third threshold can be set according to actual needs, for example, it can be 0.5, etc., and the present disclosure does not limit this.

[0064] According to an embodiment of the present disclosure, in order to facilitate the elimination of words in the third phrase based on non-permitted words, the embodiment can generate non-permitted words based on multiple target query information after determining the non-permitted parts of speech. For example, a target part of speech among the non-permitted parts of speech can be determined, and all words in the vocabulary for the target part of speech can be used as non-permitted words. The part of speech targeted by the vocabulary in which the similarity between each word included and the business name of the target business is less than a fifth threshold can be used as the target part of speech. Among them, the fifth threshold can be any value less than the third threshold described above, for example, it can be 0.3, etc., and the present disclosure does not limit this.

[0065] Figure 5 It is a schematic diagram of the principle of determining a target phrase among candidate key phrases according to an embodiment of the present disclosure.

[0066] According to an embodiment of the present disclosure, when determining a target phrase among candidate key phrases, a phrase with low perplexity can be selected as the target phrase to filter out phrases with high perplexity, so that the determined target phrase is more in line with the expression of the query information, thereby improving the accuracy of the service information fed back to the user. In the natural language processing model, the smaller the perplexity, the higher the probability of each word in the phrase, which means that the text has a higher fit and fluency.

[0067] Exemplarily, when determining the target phrase in the candidate key phrases, the perplexity of the candidate key phrases can be determined first. The candidate key phrases whose perplexity is less than the perplexity threshold are used as the target phrases. Among them, for example, a statistical language model or a deep learning language model can be used to determine the perplexity of the candidate key phrases. Among them, the statistical language model can be an N-Gram model, etc., the deep learning language model can be a convolutional neural network model, a bidirectional encoder representation from transformers (Bert) model, etc., and the convolutional neural network model can be, for example, a long short-term memory (Long Short-Term Memory, LSTM) network model, a bidirectional long short-term memory network model (Bi-LSTM) or a deep contextualized word representation (Deep contextualizedword representation, ELMo) model, etc. It can be understood that the model for determining the perplexity is only used as an example to facilitate the understanding of the present disclosure, and the present disclosure does not limit this. Among them, the perplexity threshold can be set according to actual needs, for example, it can be 0.5, etc., and the present disclosure does not limit this.

[0068] For example, for the candidate key phrase "bad decoration", the confusion is high due to unclear semantics, so the candidate key phrase can be filtered out. For the candidate key phrase "simple style decoration", the confusion is low due to clear semantics, so the candidate key phrase can be used as the target phrase.

[0069] According to an embodiment of the present disclosure, considering that the candidate key phrases include phrases with some words removed based on the blacklist, the similarity between the candidate key phrase and the business name of the target business will be different from the similarity between the target query information and the business name of the target business. After selecting a phrase with a lower perplexity, this embodiment can select a phrase with a greater similarity to the business name of the target business from the phrase with a lower perplexity as the target phrase. For example, a phrase can be selected whose similarity to the business name of the target business is greater than or equal to a second threshold. Among them, the second threshold can be any value greater than the first threshold described above, and the second threshold can also be greater than the fourth threshold described above, so as to gradually increase the requirements for the relevance of the screened phrases to the target business and improve the accuracy of the determined target phrases. Through this similarity-based screening, the relevance of the determined target phrase to the target business can be further improved, and the accuracy of the determined target phrase can be improved.

[0070] According to an embodiment of the present disclosure, in order to improve the hit rate of service information based on accurately providing service information based on the determined target phrase, longer candidate key phrases may be further subjected to phrase extraction or words that do not meet the key information rules of the target business may be eliminated.

[0071] For example, Figure 5 As shown, the embodiment 500 can divide the candidate key phrases 510 into a fifth phrase 520 having a length less than or equal to a predetermined length and a first phrase 530 having a length greater than a predetermined length according to the length of each phrase in the candidate key phrases. For the first phrase 530, a phrase having a length less than or equal to a predetermined length can be extracted from the first phrase 530 based on the target part of speech 540 for the target business as a second phrase 550. The first phrase is replaced with the second phrase 550 to obtain a replaced candidate key phrase 560. Then, after determining the perplexity of each phrase in the replaced candidate key phrase 560, a phrase 570 having a lower perplexity (i.e., a phrase having a perplexity less than a perplexity threshold) is selected from the replaced candidate key phrase 560, and a phrase having a greater similarity with the business name of the target business is selected from the phrase 570 having a lower perplexity as a target phrase 580.

[0072] The predetermined length can be set according to actual needs, for example, it can be set to any value such as 6. The target part of speech 540 can be set in advance according to actual needs, and the target part of speech can include verbs and nouns, etc. For example, if the candidate key phrase is "broken refrigerator needs repair", and the length of the phrase exceeds the predetermined length, the candidate key phrase can be segmented and analyzed, and the "refrigerator" and "repair" with the target part of speech are retained to obtain the second phrase "refrigerator repair".

[0073] For example, if the phrase length of the target part of speech in the candidate key phrase is still greater than the predetermined length, a string of predetermined length located at the front position can be selected as the second phrase. Alternatively, the phrase still greater than the predetermined length can be directly filtered out.

[0074] According to an embodiment of the present disclosure, after obtaining the replaced candidate key phrase 560, a deduplication operation may be performed on the replaced candidate key phrase 560. Then, the perplexity is calculated for the candidate key phrases remaining after the deduplication operation. In this way, repeated processing of the same phrase may be reduced, and processing efficiency may be improved to a certain extent.

[0075] Figure 6 It is a schematic diagram of the principle of a method for determining key information according to an embodiment of the present disclosure.

[0076] like Figure 6 As shown, in the application scenario of providing service items to users in response to query information, the method 600 for determining key information in this embodiment can be generally divided into a target query determination process 610 , a candidate key phrase determination process 620 and a trigger phrase determination process 630 .

[0077] In the target query determination process 610, the service item names in the service item category 611 can be segmented to obtain word pairs 612 for each service item. After obtaining the word pairs 612, a dictionary tree (Trie tree 613) can be generated based on the word pairs 612. The above operation is similar to the operation of generating a dictionary tree described above. In the obtained dictionary tree, the Trie tree 613 can be queried based on each query in the query library 614, and the query matching the Trie tree and the service item targeted by the branch matching the query constitute a query-service item pair 615. Based on the similarity between the query and the paired service item name, the query in the query-service item pair 615 is screened, and the query with higher similarity obtained by screening is used as the target query 616 for subsequent processes to complete the target query determination process 610.

[0078] After completing the target query determination process 610, the target query can be grouped based on the service items paired with the target query, so as to divide the queries paired with the same service item into one group, and obtain a query group for each service item. Then, each service item is used as the target business described above, and the candidate key phrase determination process 620 and the trigger phrase determination process 630 are executed.

[0079] In the candidate key phrase determination process 620, each query in the query group for each service item can be segmented and analyzed for part of speech, and a predetermined blacklist 621 is generated based on the statistical results of the similarity between each word obtained by the segmentation and the service item name. The predetermined blacklist 621 includes non-permitted parts of speech 6211 and non-permitted words 6212. The method for generating the predetermined blacklist 621 is similar to the method described above. The phrase extraction algorithm described above is used to extract phrases from each target query in the query group for the target business to obtain key phrases 622. After obtaining the predetermined blacklist 621 and the key phrases 622, the words with non-permitted parts of speech 6211 in the key phrases 622 can be eliminated based on the predetermined blacklist 621, and the non-permitted words 6212 can be eliminated to obtain candidate key phrases 623. Among them, the method for obtaining the candidate key phrases 623 based on the predetermined blacklist is similar to the method described above.

[0080] In the trigger phrase determination process 630, operation S631 is first performed to determine whether the length of each phrase in the candidate key phrase 623 is less than or equal to the predetermined length. If it is less than or equal to the predetermined length, the perplexity 633 of the phrase is directly calculated. If it is greater than the predetermined length, the words of the target part of speech can be first screened from the phrase, and the words screened from each phrase are combined into a second phrase 632 corresponding to each phrase. The length of the second phrase 632 is less than or equal to the predetermined length. The perplexity 633 of the second phrase 632 is then calculated. After obtaining the perplexity of each phrase whose length is less than or equal to the predetermined length, a phrase 634 with low perplexity is screened from all phrases (which can be a phrase with a perplexity less than the perplexity threshold described above). Finally, after deduplication and similarity screening of the phrase 634 with low perplexity, a trigger phrase 635 is obtained. Similarity screening is to select a phrase with a higher similarity with the service item name from the first key phrase.

[0081] Based on the above method for determining key information, the present disclosure also provides a device for determining key information. Figure 7 The device is described in detail.

[0082] Figure 7 It is a structural block diagram of a device for determining key information according to an embodiment of the present disclosure.

[0083] like Figure 7 As shown, the apparatus 700 for determining key information may include a query information determining module 710 , a phrase extracting module 720 and a key information determining module 730 .

[0084] The query information determination module 710 is used to determine query information related to the target business as the target query information. In one embodiment, the query information determination module 710 can be used to perform the operation S210 described above, which will not be described in detail here.

[0085] The phrase extraction module 720 is used to extract candidate key phrases from the target query information. In one embodiment, the phrase extraction module 720 can be used to perform the operation S220 described above, which will not be described in detail here.

[0086] The key information determination module 730 is used to determine the target phrase in the candidate key phrases based on the similarity between the candidate key phrases and the business name of the target business as the key information for the target business. In one embodiment, the key information determination module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0087] According to an embodiment of the present disclosure, the query information determination module 710 may include a matching submodule and an information determination submodule. The matching submodule is used to match the historical query information with a predetermined dictionary tree to obtain candidate query information. The information determination submodule is used to determine the candidate query information whose similarity with the business name of the target business is greater than or equal to a first threshold as the target query information. The predetermined dictionary tree includes a plurality of branches, the plurality of branches include a branch for the target business, and the candidate query information matches the branch for the target business.

[0088] According to an embodiment of the present disclosure, the key information determination module 730 may include a perplexity determination submodule and a target phrase determination submodule. The perplexity determination submodule is used to determine the perplexity of the candidate key phrases. The target phrase determination submodule is used to determine the target phrase based on the candidate key phrases whose perplexity is less than the perplexity threshold.

[0089] According to an embodiment of the present disclosure, the target phrase determination submodule is specifically used to determine, as the target phrase, a key phrase whose similarity with the service name of the target service is greater than or equal to a second threshold among the candidate key phrases whose perplexity is less than the perplexity threshold.

[0090] According to an embodiment of the present disclosure, the above-mentioned perplexity determination submodule may include a first phrase determination unit, a phrase extraction unit, and a perplexity determination unit. The first phrase determination unit is used to determine a first phrase whose length is greater than a predetermined length in the candidate key phrase. The phrase extraction unit is used to extract a second phrase whose length is greater than or equal to a predetermined length from the first phrase based on a target part of speech for a target business, and replace the first phrase with the second phrase. The perplexity determination unit is used to determine the perplexity of the second phrase.

[0091] According to an embodiment of the present disclosure, the target query information is multiple, and the phrase extraction module 720 may include a phrase extraction submodule and a candidate phrase determination submodule. The phrase extraction submodule is used to extract the key phrases of the multiple target query information to obtain multiple key phrases. The candidate phrase determination submodule is used to determine the candidate key phrases among the multiple key phrases based on a predetermined blacklist. The predetermined blacklist is generated based on the multiple target query information.

[0092] According to an embodiment of the present disclosure, the predetermined blacklist includes non-permitted parts of speech. The phrase extraction submodule includes a part-of-speech determination unit, a word removal unit, and a second phrase determination unit. The part-of-speech determination unit is used to determine the part of speech of each word in each phrase for each phrase in a plurality of key phrases. The word removal unit is used to remove words with non-permitted parts of speech from each phrase to obtain a third phrase. The second phrase determination unit is used to determine a candidate key phrase based on the similarity between the third phrase and the business name of the target business.

[0093] According to an embodiment of the present disclosure, the above-mentioned device 700 for determining key information may also include a part-of-speech generation module for generating non-permitted parts-of-speech based on multiple target query information. The part-of-speech generation module may include a part-of-speech statistics submodule, a similarity determination submodule and a first part-of-speech determination submodule. The part-of-speech statistics submodule is used to count the parts of speech of words in multiple target query information to obtain a vocabulary for each part of speech in multiple parts of speech. The similarity determination submodule is used to determine the average similarity between each word in the vocabulary for each part of speech and the business name of the target business as the average similarity for each part of speech. The first part-of-speech determination submodule is used to determine that the part of speech for which the average similarity is less than the third threshold is a non-permitted part of speech.

[0094] According to an embodiment of the present disclosure, the predetermined blacklist may further include non-permitted words. The second phrase determination unit may include a phrase determination subunit and a word removal subunit. The phrase determination subunit is used to determine a third phrase whose similarity with the service name of the target service is greater than or equal to a fourth threshold value, and obtain a fourth phrase. The word removal subunit is used to remove non-permitted words from the fourth phrase to obtain a candidate key phrase, wherein the non-permitted words include words belonging to non-permitted parts of speech.

[0095] According to an embodiment of the present disclosure, the above-mentioned device 700 for determining key information may also include a word generation module for generating non-permitted words based on multiple target query information. The word generation module may include a second part-of-speech determination submodule and a word determination submodule. The second part-of-speech determination submodule is used to determine a target part-of-speech in the non-permitted part-of-speech, and the similarity between each word in the vocabulary of the target part-of-speech and the business name of the target business is less than a fifth threshold. The word determination submodule is used to determine that the words in the vocabulary of the target part-of-speech are non-permitted words.

[0096] According to an embodiment of the present disclosure, the above-mentioned device 700 for determining key information may further include a dictionary tree generation module, which is used to generate a predetermined dictionary tree based on the business names of multiple businesses. The dictionary tree generation module may include a phrase acquisition submodule and a dictionary tree generation submodule. The phrase acquisition submodule is used to divide the business name of each business in the multiple businesses in units of words to obtain a phrase for each business. The dictionary tree generation submodule is used to generate branches for each business according to the phrase for each business, and obtain multiple branches to form a predetermined dictionary tree.

[0097] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0098] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0099] Figure 8 A schematic block diagram of an electronic device 800 that can be used to implement an embodiment of the present disclosure for determining key information is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0100] like Figure 8As shown, the device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0101] A number of components in the device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as a method for determining key information. For example, in some embodiments, the method for determining key information may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the method for determining key information described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform a method for determining key information in any other appropriate manner (e.g., by means of firmware).

[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0105] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0107] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0108] A computer system may include a client and a server. The client and the server are generally far away from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. Among them, the server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server can also be a server of a distributed system, or a server combined with a blockchain.

[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0110] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for determining key information, comprising: Determine query information related to the target business as target query information; extracting candidate key phrases from the target query information; as well as Based on the similarity between the candidate key phrases and the business name of the target business, determining a target phrase among the candidate key phrases as key information for the target business; There are multiple target query information; extracting candidate key phrases from the target query information includes: Extracting key phrases of each of the plurality of target query information to obtain a plurality of key phrases; and determining candidate key phrases from the plurality of key phrases based on a predetermined blacklist, Wherein, the predetermined blacklist is generated based on the multiple target query information; the predetermined blacklist includes non-permitted parts of speech; and the method further includes generating the non-permitted parts of speech based on the multiple target query information in the following manner: Counting the parts of speech of the words in the plurality of target query information to obtain a word list for each part of speech in the plurality of parts of speech; Determine an average similarity between each word in the vocabulary for each part of speech and the business name of the target business as the average similarity for each part of speech; and The part of speech for which the average similarity is less than the third threshold is determined to be the non-permitted part of speech.

2. The method according to claim 1, wherein: The query information related to the target business is determined to include: Matching the historical query information with the predetermined dictionary tree to obtain candidate query information; and determining candidate query information whose similarity with the service name of the target service is greater than or equal to a first threshold as the target query information, The predetermined dictionary tree includes multiple branches, the multiple branches include a branch for the target business, and the candidate query information matches the branch for the target business.

3. The method according to claim 1 or 2, wherein: Determining a target phrase among the candidate key phrases includes: determining the perplexity of the candidate key phrase; and The target phrase is determined based on the candidate key phrases whose perplexity is less than a perplexity threshold.

4. The method according to claim 3, wherein: Determining the target phrase includes: Determine, among the candidate key phrases whose perplexity is less than the perplexity threshold, a key phrase whose similarity to the service name of the target service is greater than or equal to a second threshold as the target phrase.

5. The method according to claim 3, wherein: Determining the perplexity of the candidate key phrase includes: Determine a first phrase among the candidate key phrases whose length is greater than a predetermined length; Based on a target part of speech for the target business, extracting a second phrase having a length less than or equal to the predetermined length from the first phrase, and replacing the first phrase with the second phrase; and The perplexity of the second phrase is determined.

6. The method according to claim 1 or 2, wherein: Determining a candidate key phrase from the plurality of key phrases comprises: For each of the plurality of key phrases, determining the part of speech of each word in the each phrase; Eliminate words with the non-permitted part of speech from each of the phrases to obtain a third phrase; and The candidate key phrase is determined based on the similarity between the third phrase and the service name of the target service.

7. The method according to claim 6, wherein: The predetermined blacklist also includes non-permitted words; determining the candidate key phrases includes: Determine a third phrase whose similarity to the business name of the target business is greater than or equal to a fourth threshold, to obtain a fourth phrase; and Eliminate the non-permitted words from the fourth phrase to obtain the candidate key phrase, The non-permitted words include words belonging to the non-permitted parts of speech.

8. The method according to claim 7, further comprising generating non-permitted words based on the plurality of target query information in the following manner: Determine a target part of speech among the non-permitted parts of speech, wherein the similarity between each word in the vocabulary of the target part of speech and the service name of the target service is less than a fifth threshold; and A word in the vocabulary for the target part of speech is determined to be the non-permitted word.

9. The method according to claim 2 further comprises generating the predetermined dictionary tree based on the service names of multiple services in the following manner: Dividing the service name of each service in the plurality of services in units of words to obtain a phrase for each service; and Branches for each of the services are generated according to the phrases for each of the services, and the plurality of branches are obtained to form the predetermined dictionary tree.

10. A device for determining key information, comprising: A query information determination module, used to determine query information related to a target business as target query information; A phrase extraction module, used to extract candidate key phrases from the target query information; as well as A key information determination module, configured to determine a target phrase from among the candidate key phrases based on a similarity between the candidate key phrases and a business name of the target business, to serve as key information for the target business; Wherein, the target query information is multiple; the phrase extraction module includes: A phrase extraction submodule is used to extract key phrases of each of the plurality of target query information to obtain a plurality of key phrases; and a candidate phrase determination submodule, configured to determine a candidate key phrase from the plurality of key phrases based on a predetermined blacklist, The predetermined blacklist is generated based on the plurality of target query information; the predetermined blacklist includes non-permitted parts of speech; the device further includes a part-of-speech generation module for generating the non-permitted parts of speech based on the plurality of target query information; the part-of-speech generation module includes: A part-of-speech statistics submodule, used to count the parts-of-speech of words in the plurality of target query information, and obtain a word list for each part-of-speech in the plurality of parts-of-speech; a similarity determination submodule, configured to determine an average similarity between each word in the vocabulary for each part of speech and the service name of the target service as the average similarity for each part of speech; and The first part-of-speech determination submodule is used to determine the part-of-speech for which the average similarity is less than a third threshold as the non-permitted part-of-speech.

11. The device according to claim 10, wherein: The query information determination module includes: A matching submodule, used to match the historical query information with a predetermined dictionary tree to obtain candidate query information; and an information determination submodule, configured to determine candidate query information whose similarity with the service name of the target service is greater than or equal to a first threshold value, as the target query information, The predetermined dictionary tree includes multiple branches, the multiple branches include a branch for the target business, and the candidate query information matches the branch for the target business.

12. The device according to claim 10 or 11, wherein: The key information determination module includes: a perplexity determination submodule, configured to determine the perplexity of the candidate key phrase; and The target phrase determination submodule is used to determine the target phrase based on the candidate key phrases whose perplexity is less than the perplexity threshold.

13. The device according to claim 12, wherein: The target phrase determination submodule is specifically used for: Determine, among the candidate key phrases whose perplexity is less than the perplexity threshold, a key phrase whose similarity to the service name of the target service is greater than or equal to a second threshold as the target phrase.

14. The device according to claim 12, wherein: The perplexity determination submodule comprises: A first phrase determination unit, configured to determine a first phrase in the candidate key phrases whose length is greater than a predetermined length; a phrase extraction unit, configured to extract a second phrase having a length less than or equal to the predetermined length from the first phrase based on a target part of speech for the target business, and replace the first phrase with the second phrase; and The perplexity determination unit is configured to determine the perplexity of the second phrase.

15. The device according to claim 10 or 11, wherein: The phrase extraction submodule comprises: a part-of-speech determination unit, configured to determine, for each of the plurality of key phrases, the part-of-speech of each word in the phrase; a word elimination unit, configured to eliminate words with the non-permitted part of speech from each of the phrases to obtain a third phrase; and The second phrase determining unit is configured to determine the candidate key phrase based on the similarity between the third phrase and the service name of the target service.

16. The device according to claim 15, wherein: The predetermined blacklist also includes non-permitted words; the second phrase determination unit includes: a phrase determination subunit, configured to determine a third phrase having a similarity with the service name of the target service greater than or equal to a fourth threshold, to obtain a fourth phrase; and a word elimination subunit, configured to eliminate the non-permitted words from the fourth phrase to obtain the candidate key phrase, The non-permitted words include words belonging to the non-permitted parts of speech.

17. The apparatus according to claim 16, further comprising a word generation module, configured to generate non-permitted words based on the plurality of target query information; the word generation module comprising: A second part-of-speech determination submodule is used to determine a target part-of-speech among the non-permitted parts-of-speech, wherein the similarity between each word in the vocabulary of the target part-of-speech and the service name of the target service is less than a fifth threshold; as well as The word determination submodule is used to determine that the words in the vocabulary for the target part of speech are the non-permitted words.

18. The device according to claim 11, further comprising a dictionary tree generation module, configured to generate the predetermined dictionary tree based on the service names of a plurality of services; The dictionary tree generation module includes: A phrase acquisition submodule, used to divide the service name of each service in the plurality of services into words, and obtain a phrase for each service; as well as The dictionary tree generation submodule is used to generate branches for each business according to the phrases for each business, and obtain the multiple branches to form the predetermined dictionary tree.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of claims 1 to 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 9.

21. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 9.