Method and apparatus for selecting search intent phrase
By calculating the parameter information of candidate intent phrases, the qualified search intent phrases are screened out, which solves the problem of inaccurate search intent phrases in the existing technology and achieves more accurate information matching and better user experience.
Patent Information
- Application Number
- CN202010544790.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-15
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2040-06-15
AI Technical Summary
In existing methods, the selection of search intent phrases relies on manual experience, resulting in the inability to provide users with the required information content in a timely and accurate manner.
Based on multiple known intent phrases, multiple candidate intent phrases are determined from the sample texts of the pre-set text library, and the parameter information of each candidate intent phrase, such as page appearance frequency, surrounding word entropy and text collection appearance frequency, is calculated, and the qualified candidate intent phrases are screened out as search intent phrases.
It improves the accuracy of search intent phrases, can better match article content, and enhance user experience.
Smart Images

Figure CN111723291B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer application, in particular, the present application relates to a method and device for selecting search intent word group. BACKGROUND
[0002] With the rapid development of the Internet, people's daily life more and more rely on the network, for example, on the network to find information, academic papers, interested news content and so on. Usually, the user inputs the self-defined keyword, and the network lists all the information content related to the keyword, and the listing method can determine the correlation degree of each information content and the keyword by analyzing the keyword, and the information content with high correlation degree is considered to be the information content that the user wants to get most, so the information content with high correlation degree is displayed in the main position of the page. This method can bring good experience to the user, so that the user can find what he needs in the fastest speed.
[0003] In this process, how to quickly and accurately find the matching information content according to the keyword is the key. Usually, the search intent word group is created offline to realize the matching operation with the keyword, when the user inputs the keyword, if there is an intent word group matching the keyword, the information content corresponding to the intent word group, such as article, ppt, etc. is fed back to the user. It can be seen that how to select the accurate search intent word group is a very key content in this process.
[0004] In the existing method, the selection of search intent word group is mainly determined by artificial experience, which may lead to inaccurate search intent word group, and the user cannot be provided with the required information content in time and accurately. SUMMARY
[0005] The present application provides a method and device for selecting search intent word group, which can solve the problem that the user cannot be provided with the required information content accurately due to the inaccurate search intent word group. The technical solution is as follows:
[0006] In the first aspect, a method for selecting search intent word group is provided, which comprises:
[0007] Based on a plurality of known intent word groups, a plurality of candidate intent word groups are determined from the sample text of the pre-set text library; the plurality of candidate intent word groups include each word in the plurality of known intent word groups; the number of words in the plurality of candidate intent word groups is more than the number of words in the plurality of known intent word groups; any two adjacent words in any candidate intent word group are in an adjacent position relationship in the sample text of any candidate intent word group;
[0008] The parameter information of each candidate intent word group is calculated;
[0009] When the parameter information meets the condition, a candidate intent word group corresponding to the parameter information meeting the condition is selected as the search intent word group.
[0010] In one possible implementation, based on the plurality of known intent word groups, a plurality of candidate intent word groups are determined from sample texts in the pre-set text library, including:
[0011] In the sample texts in the pre-set text library, text positions of the sample texts where the plurality of known intent word groups are located are found;
[0012] According to the text positions of the sample texts where each known intent word group is located, a corresponding candidate intent word group is obtained from the sample text, the candidate intent word group includes any word in the corresponding known intent word group, and the number of words in the candidate intent word group meets a predetermined number of words.
[0013] In one possible implementation, the parameter information of any candidate intent word group is calculated, including:
[0014] The page appearance frequency of each word in any candidate intent word group is determined;
[0015] According to the page appearance frequency, the page appearance frequency product of any target intent word group is calculated and determined;
[0016] The appearance frequency of any candidate intent word group in all candidate intent word groups is calculated and determined;
[0017] The ratio of the page appearance frequency product to the appearance frequency is taken as the parameter information of any candidate intent word group.
[0018] In one possible implementation, the parameter information of any candidate intent word group is calculated, further including:
[0019] The peripheral word entropy of any candidate intent word group is calculated; the peripheral word is a word adjacent to any candidate intent word group in the sample text where any candidate intent word group is extracted;
[0020] The text set appearance frequency of each word of any candidate intent word group is determined, and the text set appearance frequency is the frequency of each word appearing in all sample texts in the pre-set text library;
[0021] The peripheral word entropy, the page appearance frequency, the text set appearance frequency of each word of any candidate intent word group, and the ratio are taken as the parameter information.
[0022] In one possible implementation, when the parameter information meets the condition, a candidate intent word group corresponding to the parameter information meeting the condition is selected as the search intent word group, including:
[0023] The parameter information is sorted in descending order.
[0024] The parameter information corresponding to the candidate intent phrase of a predetermined number of parameters before sorting is taken as the search intent phrase.
[0025] In one possible implementation, when the parameter information meets the condition, the candidate intent phrase corresponding to the parameter information is taken as the search intent phrase, including:
[0026] When the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word of any candidate intent phrase, and the ratio are respectively within the value range corresponding to the parameter information, the candidate intent phrase corresponding to the parameter information is taken as the search intent phrase.
[0027] In a second aspect, a device for selecting a search intent phrase is provided, and the device includes:
[0028] A determination module is configured to determine a plurality of candidate intent phrases from sample texts of a pre-set text library based on a plurality of known intent phrases; the plurality of candidate intent phrases include each word in the plurality of known intent phrases; the number of words in the plurality of candidate intent phrases is greater than the number of words in the plurality of known intent phrases; and any two adjacent words in any candidate intent phrase are in an adjacent position relationship in the sample text of the any candidate intent phrase.
[0029] A calculation module is configured to calculate parameter information of each candidate intent phrase.
[0030] A selection module is configured to, when the parameter information meets the condition, take the candidate intent phrase corresponding to the parameter information meeting the condition as the search intent phrase.
[0031] In a third aspect, an electronic device is provided, and the electronic device includes:
[0032] One or more processors;
[0033] A memory;
[0034] One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method for selecting a search intent phrase in the first aspect.
[0035] In a fourth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, which is executed by a processor to implement the method for selecting a search intent phrase in the first aspect.
[0036] The technical solution provided by the present application has the following beneficial effects:
[0037] In the present application, a plurality of candidate intent phrases are determined from a plurality of known intent phrases. The candidate intent phrases are more accurate than the known intent phrases, and are obtained based on the known intent phrases and by calculating parameters of the candidate intent phrases. Meanwhile, the selected candidate intent phrases that meet the conditions are further screened as final search intent phrases. Therefore, the accuracy of the search intent phrases relative to the known intent phrases is further improved, and the search intent phrases can better and more accurately match the article content. When a user searches by a keyword, the article content corresponding to the search intent phrases matching the keyword can be more accurately displayed to the user, which can improve the accuracy of the search intent phrases and improve the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced.
[0039] Figure 1 A flowchart of a method for selecting search intent phrases provided by the embodiments of the present application;
[0040] Figure 2 A flowchart of a method for calculating parameter information of search intent phrases provided by the embodiments of the present application;
[0041] Figure 3 A structural diagram of a device for selecting search intent phrases provided by the embodiments of the present application;
[0042] Figure 4 A structural diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0043] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the drawings, in which the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below are exemplary and are only used to explain the present application, and cannot be interpreted as a limitation on the present application.
[0044] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein also include the plural forms unless specifically stated otherwise. It should be further understood that the use of the term "include" in the specification of the present application means that the features, integers, steps, operations, elements, and / or components listed exist, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or there can be an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any single unit and all combinations of the associated listed items.
[0045] For the purpose, technical solutions and advantages of the present application to be clearer, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
[0046] Firstly, several terms related to the present application are introduced and explained:
[0047] The known intent phrase is a pre-set phrase that is predicted to be used as a keyword for matching the user to find, which can contain one or more words; for example, the known intent phrase is {north, weather}, when the user searches for the keyword "north" and / or "weather", the relevant articles containing the known intent phrase will be found and sent to the user end for display to the user;
[0048] The pre-set text library contains multiple sample texts crawled, which are used to train to obtain search intent phrases;
[0049] The page occurrence frequency is the frequency of each word in the known intent phrase appearing in the current page, for example, the occurrence frequency of the word "north" in the known intent phrase in the current page;
[0050] The text set occurrence frequency is the frequency of each word in the known intent phrase appearing in all sample texts in the pre-set text library, for example, the occurrence frequency of the word "north" in the known intent phrase in all sample texts;
[0051] The surrounding word is a word adjacent to the position of the intent phrase in the sample text containing the intent phrase, for example, the sample text contains a sentence: "When the migratory birds encounter cold weather in the north, they will migrate to the south", when the known intent phrase is {north, weather}, the surrounding words of the known intent phrase are "encounter" and "cold".
[0052] The following describes in detail the technical solution of this application and how it solves the technical problems involved in the summary of the invention using specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this application will be described below in conjunction with the accompanying drawings.
[0053] In order to clearly introduce the following embodiments, a sentence from a sample text of any candidate intent phrase is extracted as an example, for example, "When migratory birds encounter cold weather in the north, they will migrate to the south", and the known intent phrase is {north, weather};
[0054] The present application provides a method for selecting a search intent phrase, such as Figure 1 As shown, the method includes:
[0055] Step S11, based on the multiple known intent phrases, determining multiple candidate intent phrases from sample texts in a preset text library;
[0056] Specifically, the plurality of candidate intent phrases include each word in the plurality of known intent phrases; the number of words in the plurality of candidate intent phrases is greater than the number of words in the plurality of known intent phrases; any two adjacent words in any candidate intent phrase are in an adjacent positional relationship in a sample text for extracting any candidate intent phrase;
[0057] The pre-set text library is a type of sample text that can be used to train search intent phrases by crawling from multiple websites, databases, etc. using a corpus crawler.
[0058] The known intent phrase is pre-set. For the convenience of introducing the embodiment of this application, {north, weather} is used as the known intent phrase;
[0059] Specifically, in this step, based on the known intent phrase {north, weather}, the specific method of determining the candidate intent phrase from the sample text of the preset text library is as follows:
[0060] Find the text positions of the sample texts containing multiple known intent phrases in all samples of the pre-set text library;
[0061] Based on the text position of each known intent phrase in the sample text, the corresponding candidate intent phrase is obtained from the sample text. The candidate intent phrase includes any word in the corresponding known intent phrase, and the number of words in the candidate intent phrase meets the predetermined number of words. For example, if the predetermined number of words is set to 3, the obtained candidate intent phrases may be {north, weather, cold} or {north, weather, change}, etc.
[0062] Step S12, calculating the parameter information of each candidate intent phrase; the specific process is as follows:
[0063] Determining the page occurrence frequency of each word in any candidate intent phrase; taking the candidate intent phrase {north, weather, cold} as an example, the page occurrence frequencies of the three words "north", "weather", and "cold" are calculated respectively;
[0064] According to the page occurrence frequency, the page occurrence frequency product of any candidate intent phrase is calculated; the specific way is to take the product of the page occurrence frequencies of all the words in the candidate intent phrase as the page occurrence frequency product of the candidate intent phrase;
[0065] Calculating the occurrence frequency of any candidate intent phrase in all candidate intent phrases; in the process of selecting the search intent phrase, many candidate intent phrases will be obtained, so the occurrence frequency of each candidate intent phrase in all candidate intent phrases can be calculated;
[0066] Taking the ratio of the page occurrence frequency product and the occurrence frequency of the candidate intent phrase in all candidate intent phrases as the parameter information of any candidate intent phrase;
[0067] Step S13, when the parameter information meets the condition, selecting the candidate intent phrase corresponding to the parameter information that meets the condition as the search intent phrase, which is as follows:
[0068] Sorting all the calculated parameter information of the candidate intent phrase in descending order, and taking the candidate intent phrase corresponding to the parameter information of the top predetermined number as the search intent phrase; generally, the higher the ratio corresponding to the parameter information, the more accurate the information expressed by the candidate intent phrase, so the candidate intent phrase corresponding to the parameter information with a high ratio can be selected as the search intent phrase, and the specific range of the ratio can be set according to the actual situation.
[0069] In the above embodiments of the present application, multiple candidate intent phrases meeting the requirements are determined based on the known intent phrase, and one or more search intent phrases required are determined according to the ratio of the candidate intent phrase, so the method can well select the search intent phrase meeting the requirements, and when the user searches, more accurate search results can be provided according to the search intent phrase.
[0070] In the embodiments of the present application, a possible implementation is provided, which can more accurately select the search intent phrase compared to the previous embodiment, and the specific process is as shown in Figure 2
[0071] The way of determining multiple candidate intent phrases is the same as step S11 described above, which will not be repeated here.
[0072] The specific process of calculating the parameter information of each candidate intent phrase is as follows:
[0073] Step S21, calculating the ratio, the process is as follows:
[0074] Determine the page occurrence frequency of each word in any candidate intent phrase; according to the page occurrence frequency, calculate the page occurrence frequency product of any candidate intent phrase; calculate the occurrence frequency of any candidate intent phrase in all candidate intent phrases; calculate the ratio of the page occurrence frequency product and the occurrence frequency;
[0075] Step S22, calculating the peripheral word entropy of the peripheral word of any candidate intent phrase; the specific process is as follows:
[0076] The peripheral word is the word adjacent to any candidate intent phrase in the sample text of extracting any candidate intent phrase; for example, calculating the peripheral word entropy of the two words "meet" and "cold";
[0077] Step S23, determining the text set occurrence frequency of each word in any candidate intent phrase, the text set occurrence frequency is the frequency of each word appearing in the sample text of the pre-set text library; for example, the frequency of the word "north" in the candidate intent phrase {north, weather, cold} appearing in all sample texts of the pre-set text library, and the frequencies of the words "weather" and "cold" appearing in all sample texts of the pre-set text library are calculated in the same way;
[0078] Step S24, taking the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word in any candidate intent phrase, and the ratio as the parameter information;
[0079] The order of the above steps S21 to S24 of calculating the parameter information can be adjusted according to actual conditions.
[0080] When the parameter information meets the conditions, the candidate intent phrase corresponding to the parameter information that meets the conditions is selected as the search intent phrase, and the specific steps are as follows:
[0081] When the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word in any candidate intent phrase, and the ratio are respectively within the value range corresponding to them, the candidate intent phrase corresponding to the parameter information is selected as the search intent phrase. The value range can be selected according to actual conditions.
[0082] The above embodiments of the present application refine the process of calculating parameter information, add more detailed values to the parameter information, such as the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word in any candidate intent word group, the ratio, and further filter the better search intent word group according to these values. It can be seen that the method can more accurately find the search intent word group meeting the requirements.
[0083] Before the above embodiments of the present application are performed, all sample texts in the pre-set text library need to be segmented, and after the segmentation is completed, the page occurrence frequency and the text set occurrence frequency of each word can be calculated. Alternatively, the page occurrence frequency and the text set occurrence frequency of the words in the intent word group are calculated in the process of selecting the search intent word group. The specific case can be arranged according to the actual situation.
[0084] The embodiments of the present application provide a device for selecting a search intent word group, as shown in Figure 3 The device comprises:
[0085] A determination module 31 is configured to determine a plurality of candidate intent word groups from sample texts of a pre-set text library based on a plurality of known intent word groups; the plurality of candidate intent word groups include each word in the plurality of known intent word groups; the number of words in the plurality of candidate intent word groups is greater than the number of words in the plurality of known intent word groups; any two adjacent words in any candidate intent word group are in an adjacent position relationship in the sample text in which the candidate intent word group is extracted;
[0086] A calculation module 32 is configured to calculate parameter information of each candidate intent word group;
[0087] A selection module 33 is configured to select a candidate intent word group corresponding to the parameter information meeting the condition as a search intent word group when the parameter information meets the condition.
[0088] The determination module 31 is specifically configured to find the text positions of the sample texts in which the plurality of known intent word groups are located in the sample texts of the pre-set text library; and acquire a corresponding candidate intent word group from the sample text according to the text position of each known intent word group in the sample text, wherein the candidate intent word group includes any word in the corresponding known intent word group, and the number of words in the candidate intent word group meets a predetermined number of words.
[0089] The calculation module 32 is specifically configured to determine the page occurrence frequency of each word in any candidate intent word group; calculate the product of the page occurrence frequency of any candidate intent word group according to the page occurrence frequency; determine the occurrence frequency of any candidate intent word group in all candidate intent word groups; and take the ratio of the product of the page occurrence frequency and the occurrence frequency as the parameter information of any candidate intent word group.
[0090] The computing module 32 is specifically configured to calculate a peripheral word entropy of a peripheral word of any candidate intent phrase group; the peripheral word is a word adjacent to the any candidate intent phrase group in sample text in which the any candidate intent phrase group is extracted; determine a text set occurrence frequency of each word of the any candidate intent phrase group, the text set occurrence frequency being a frequency of each word occurring in all sample texts of a pre-set text library; and take the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word of the any candidate intent phrase group, and the ratio as parameter information.
[0091] The selecting module 33 is specifically configured to sort the parameter information in a descending order, and take candidate intent phrase groups corresponding to parameter information of a predetermined number of positions after sorting as search intent phrase groups.
[0092] The selecting module 33 is specifically configured to take a candidate intent phrase group corresponding to parameter information as a search intent phrase group when the peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word of the any candidate intent phrase group, and the ratio are respectively within a value range corresponding to the parameter information.
[0093] In the embodiments of the present application, an electronic device is provided, which includes a memory and a processor, and at least one program stored in the memory and used for being executed by the processor to achieve the following compared with the prior art: a plurality of candidate intent phrase groups are determined from a plurality of known intent phrase groups, the candidate intent phrase groups are obtained based on the known intent phrase groups and through parameter calculation of the candidate intent phrase groups, and thus are more accurate than the known intent phrase groups; and a final search intent phrase group is further selected from the plurality of candidate intent phrase groups, and thus it can be seen that the accuracy of the search intent phrase group relative to the known intent phrase group is further improved, and the search intent phrase group can better and more accurately match article content. When a user searches by a keyword, the article content corresponding to the search intent phrase group matched with the keyword can be more accurately displayed to the user, and thus the accuracy of the search intent phrase group and the experience of the user can be improved.
[0094] In an optional embodiment, an electronic device is provided, as shown in Figure 4 Figure 4 The electronic device 4000 shown in the figure includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, through a bus 4002. Optionally, the electronic device 4000 can also include a transceiver 4004. It should be noted that the transceiver 4004 is not limited to one in actual application, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0095] The processor 4001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logical blocks, modules and circuits described in connection with the disclosure. The processor 4001 can also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0096] The bus 4002 can include a path for transmitting information between the above-mentioned components. The bus 4002 can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus.
[0097] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, an optical disk storage (including a compact disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, and the like), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but not limited thereto.
[0098] The memory 4003 is configured to store application program codes for implementing the scheme of the present application, and the processor 4001 is configured to control the execution of the application program codes stored in the memory 4003. The processor 4001 is configured to execute the application program codes stored in the memory 4003 to implement the content shown in the foregoing method embodiments.
[0099] The electronic device includes, but is not limited to, a notebook computer, a desktop computer, and all devices that can implement the scheme of the present application.
[0100] The computer readable storage medium stores computer programs, and when the computer programs run on a computer, the computer can execute the corresponding content in the foregoing method embodiments. Compared with the prior art, the plurality of candidate intent word groups are determined based on the plurality of known intent word groups, the candidate intent word groups are obtained based on the known intent word groups and through parameter calculation of the candidate intent word groups, and therefore the candidate intent word groups are more accurate than the known intent word groups. Meanwhile, the final search intent word group is further selected from the plurality of selected candidate intent word groups, and therefore the accuracy of the search intent word group relative to the known intent word group is further improved, and the article content corresponding to the search intent word group matched with the keyword can be better and more accurately matched.
[0101] The present application provides a method for selecting a search intent word group, and the method comprises the following steps:
[0102] Step A: determining a plurality of candidate intent word groups from sample texts in a pre-set text library based on a plurality of known intent word groups; the plurality of candidate intent word groups include words in the plurality of known intent word groups; the number of words in the plurality of candidate intent word groups is greater than the number of words in the plurality of known intent word groups; any two adjacent words in any candidate intent word group are in an adjacent position relationship in the sample text in which the candidate intent word group is extracted;
[0103] Step B: calculating parameter information of each candidate intent word group;
[0104] Step C: when the parameter information meets a condition, selecting a candidate intent word group corresponding to the parameter information that meets the condition as a search intent word group.
[0105] In step A, the plurality of candidate intent word groups are determined from the sample texts in the pre-set text library based on the plurality of known intent word groups, and specifically comprising the following steps:
[0106] In the sample texts in the pre-set text library, the text positions of the sample texts in which the plurality of known intent word groups are located are found;
[0107] According to the text position of each known intent phrase in the sample text, a corresponding candidate intent phrase is obtained from the sample text, the candidate intent phrase including any one of the words in the corresponding known intent phrase, and the number of words in the candidate intent phrase satisfying a predetermined number of words.
[0108] In step B, the parameter information of any candidate intent phrase is calculated, specifically including:
[0109] The page occurrence frequency of each word in any candidate intent phrase is determined.
[0110] According to the page occurrence frequency, the page occurrence frequency product of any candidate intent phrase is calculated and determined.
[0111] The occurrence frequency of any candidate intent phrase in all candidate intent phrases is calculated and determined.
[0112] The ratio of the page occurrence frequency product to the occurrence frequency is taken as the parameter information of any candidate intent phrase.
[0113] In step B, the parameter information of any candidate intent phrase is calculated, specifically including:
[0114] The peripheral word entropy of any candidate intent phrase is calculated. The peripheral word is a word adjacent to the position of any candidate intent phrase in the sample text from which any candidate intent phrase is extracted.
[0115] The text set occurrence frequency of each word in any candidate intent phrase is determined. The text set occurrence frequency is the frequency of each word appearing in all sample texts in the pre-set text library.
[0116] The peripheral word entropy, the page occurrence frequency, the text set occurrence frequency of each word in any candidate intent phrase, and the ratio are taken as the parameter information.
[0117] When the parameter information meets the condition, the candidate intent phrase corresponding to the parameter information is selected as the search intent phrase, specifically including:
[0118] The parameter information is sorted in descending order.
[0119] The candidate intent phrase corresponding to the parameter information of the predetermined position before sorting is taken as the search intent phrase.
[0120] When the parameter information meets the condition, the candidate intent phrase corresponding to the parameter information is selected as the search intent phrase, specifically including:
[0121] When the peripheral word entropy, the page appearance frequency, the text set appearance frequency of each word of any candidate intention word group, and the ratio are respectively within the value range corresponding to the peripheral word entropy, the page appearance frequency, the text set appearance frequency of each word of any candidate intention word group, and the ratio, the candidate intention word group corresponding to the parameter information is selected as the search intention word group.
[0122] It should be understood that, although each step in the flowchart of the accompanying drawings is shown in sequence according to the indication of the arrow, these steps are not necessarily executed in sequence according to the indication of the arrow. Unless explicitly stated herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other sequences. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0123] The above only describes some embodiments of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, several improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A method for selecting a search intent phrase, characterized in that: The method comprises: determining a plurality of candidate intent word groups from sample texts of a pre-set text library based on a plurality of known intent word groups; the plurality of candidate intent word groups include each word in the plurality of known intent word groups; the number of words in the plurality of candidate intent word groups is greater than the number of words in the plurality of known intent word groups; any two adjacent words in any candidate intent word group are in an adjacent position relationship in the sample text from which the candidate intent word group is extracted; calculating parameter information of each candidate intent word group; when the parameter information meets the condition, selecting the candidate intent word group corresponding to the parameter information that meets the condition as a search intent word group matched with the search keyword; wherein calculating the parameter information of any candidate intent word group comprises: calculating the page appearance frequency product of the candidate intent word group, the peripheral word entropy of the peripheral word, the text set appearance frequency and the page appearance frequency of each word, and the appearance frequency of the candidate intent word group in all candidate intent word groups; wherein the page appearance frequency product refers to the product of the page appearance frequencies of all words in the candidate intent word group; the all candidate intent word groups are obtained in the process of selecting the search intent once; calculating the ratio of the page appearance frequency product to the appearance frequency, which represents the accuracy of the information expressed by the candidate intent word group; taking the peripheral word entropy, the page appearance frequency, the text set appearance frequency of each word, and the ratio as the parameter information; the parameter information meeting the condition comprises that the peripheral word entropy, the page appearance frequency, the text set appearance frequency of each word in any candidate intent word group, and the ratio are respectively within the value range corresponding thereto.
2. The method of claim 1, wherein, The method further comprises: finding the text positions of the sample texts in which the plurality of known intent word groups are located in the sample texts of the pre-set text library; acquiring the corresponding candidate intent word group from the sample text according to the text position of each known intent word group in the sample text, wherein the candidate intent word group includes any word in the corresponding known intent word group, and the number of words included in the candidate intent word group satisfies a predetermined number of words.
3. The method of claim 1, wherein, The peripheral word is a word adjacent to the candidate intent word group in position in the sample text from which the candidate intent word group is extracted; The text set appearance frequency is the frequency of each word appearing in all sample texts of the pre-set text library.
4. The method of claim 1, wherein, When the parameter information meets the condition, selecting the candidate intent word group corresponding to the parameter information as the search intent word group comprises: sorting the parameter information in descending order; taking the candidate intent word groups corresponding to the parameter information of the predetermined positions before sorting as the search intent word groups.
5. The method of claim 1, wherein, The method further comprises: previously crawling a type of sample texts that can be used to train the search intent word group from a plurality of websites and databases by using a corpus crawler, and taking the type of sample texts as the pre-set text library.
6. An apparatus for selecting a search intent phrase, the apparatus comprising: The device comprises: The determining module is configured to determine a plurality of candidate intent word groups from sample texts in a preset text library based on a plurality of known intent word groups; the plurality of candidate intent word groups include words in the plurality of known intent word groups; the number of words in the plurality of candidate intent word groups is greater than the number of words in the plurality of known intent word groups; any two adjacent words in any candidate intent word group are in an adjacent position relationship in the sample text in which the candidate intent word group is extracted; The calculating module is configured to calculate parameter information of each candidate intent word group; The selecting module is configured to select a candidate intent word group corresponding to parameter information meeting a condition as a search intent word group matching a search keyword when the parameter information meets the condition. The calculating module calculates parameter information of any candidate intent word group, including: calculating a page appearance frequency product of the candidate intent word group, a surrounding word entropy of surrounding words, a text set appearance frequency and a page appearance frequency of each word, and an appearance frequency of the candidate intent word group in all candidate intent word groups; the page appearance frequency product refers to a product of page appearance frequencies of all words in the candidate intent word group; the all candidate intent word groups are obtained in a process of selecting a search intent once; calculating a ratio of the page appearance frequency product to the appearance frequency, and the ratio represents an accuracy degree of information expressed by the candidate intent word group; the surrounding word entropy, the page appearance frequency, the text set appearance frequency of each word, and the ratio are taken as the parameter information; the parameter information meeting the condition includes that the surrounding word entropy, the page appearance frequency, the text set appearance frequency of each word in any candidate intent word group, and the ratio are respectively within a corresponding value range.
7. An electronic device, comprising: It includes: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method for selecting a search intent word group according to any one of claims 1-5.
8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the method for selecting a search intent word group according to any one of claims 1-5.
Citation Information
Patent Citations
Method and device for mining hot-spot words
CN103049443A
New word searching method and system
CN103593427A
Method and device for determining statement intention
CN107679039A
Subject term extraction method and device, equipment, and storage medium
CN111126060A