Content search method and device, electronic equipment and storage medium

By establishing a correlation between preset keywords and content recommendation groups, and dividing the content recommendation group set, the problem of low search efficiency in content search is solved, and efficient content search is achieved.

CN115827973BActive Publication Date: 2026-02-03BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211514257.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2026-02-03
Estimated Expiration
2042-11-29

AI Technical Summary

Technical Problem

In content search, existing technologies suffer from low search efficiency when there are recommended content that users do not wish to see.

Method used

Establish a thesaurus containing several preset keywords. By querying target keywords that match the search terms, and based on the association between the preset keywords and the content recommendation groups, divide the content recommendation groups into first and second sets. Use the search terms' hit results for the first set as the search results, thus avoiding multiple queries for each content recommendation group.

Benefits of technology

It improves the efficiency of content search, reduces search time, avoids duplicate matching, and saves the number of searches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115827973B_ABST
    Figure CN115827973B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a content search method, device, electronic equipment and storage medium, belonging to the technical field of computers. The content search method comprises: establishing a word bank comprising a plurality of preset keywords; in response to a content search initiated by a search word, querying a target keyword matching the search word in the word bank; determining a target content recommendation group associated with the target keyword based on an association relationship established between the preset keywords in the word bank and the content recommendation groups; dividing all content recommendation groups into a first content recommendation group set and a second content recommendation group set, and all target content recommendation groups are divided into the second content recommendation group set; and taking all hit results of the search word on all content recommendation groups in the first content recommendation group set as the search results of the content search. The content search method, device, electronic equipment and storage medium provided by the present disclosure can at least solve the technical problems of avoiding multiple searches for content screening and low search efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, and particularly relates to a content search method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the development of computer technology, the technology of searching various contents is applied more and more widely, especially the content search technology.

[0003] However, in some application scenarios, there are some recommended contents which are not expected to be displayed to users, and in the content search, this part of recommended contents is usually avoided to be displayed to users in the content search result. For this kind of recommended contents, multiple matching retrievals with the avoidance display information need to be implemented in units of pre-divided content recommendation groups, so as to screen out all the recommended contents which are avoided to be displayed, thereby causing the problem of low search efficiency. SUMMARY

[0004] The present disclosure provides a content search method, device, electronic equipment and storage medium to at least solve the technical problem of low search efficiency in the application scenario of existing recommended contents which are avoided to be displayed in the related art.

[0005] According to an aspect of an embodiment of the present disclosure, a content search method is provided, comprising:

[0006] establishing a word bank comprising a plurality of preset keywords; wherein the word bank is composed of keywords included in all content recommendation groups;

[0007] in response to a content search initiated by a search keyword, querying a target keyword matched with the search keyword in the word bank;

[0008] determining a target content recommendation group associated with each of the target keywords based on an association relationship established between each of the preset keywords in the word bank and the content recommendation group;

[0009] dividing all the content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all the target content recommendation groups are divided into the second content recommendation group set;

[0010] taking all hit results of the search keyword on all content recommendation groups in the first content recommendation group set as a search result of the content search.

[0011] In a possible implementation manner, before the determining of the target content recommendation group associated with each of the target keywords based on the association relationship established between each of the preset keywords in the word bank and the content recommendation group, the content search method further comprises:

[0012] establish an association relationship between each of the preset keywords and all content recommendation groups including the same keyword;

[0013] The association relationship is updated in response to a change in at least one of the preset keywords and the preset content recommendation groups.

[0014] In a possible implementation, the establishing of the association relationship between each of the preset keywords and all content recommendation groups including the same keyword comprises:

[0015] An inverted index is established for each of the preset keywords, and the inverted index is used to represent the association relationship between the preset keyword and all content recommendation groups including the same keyword.

[0016] The key of the inverted index is the preset keyword, and the value of the inverted index is the group identifier of each content recommendation group including the preset keyword.

[0017] In a possible implementation, the value of the inverted index is stored in the form of a linked list.

[0018] In a possible implementation, the preset keywords include first preset keywords and second preset keywords; the first preset keyword is a preset keyword that is determined to be matched with a search keyword when the first preset keyword is completely consistent with the search keyword, and the second preset keyword is a preset keyword that is determined to be matched with the search keyword when the second preset keyword is contained in the search keyword.

[0019] The querying of the target keyword matched with the search keyword comprises: querying a first target keyword matched with the search keyword from all first preset keywords, and querying a second target keyword matched with the search keyword from all second preset keywords.

[0020] The target keyword includes at least one of the first target keyword and the second target keyword.

[0021] In a possible implementation, the association relationship established between the preset keyword and the content recommendation group includes a first association relationship between the first preset keyword and the content recommendation group, and a second association relationship between the second preset keyword and the content recommendation group.

[0022] The determining of the target content recommendation group associated with each of the target keywords comprises:

[0023] The third content recommendation group set associated with the first target keyword is determined based on the first association relationship.

[0024] determine a fourth content recommendation group set collection associated with all the second target keywords based on the second association relationship;

[0025] determine the target content recommendation group by taking a union of the third content recommendation group set and the fourth content recommendation group set.

[0026] In a possible implementation, the preset keywords include second preset keywords.

[0027] The querying, in the keyword library, the target keyword matching the search keyword includes: querying, in all the second preset keywords, a second target keyword matching the search keyword by a multi-mode matching method, as the target keyword.

[0028] According to another aspect of the embodiments of the present disclosure, a content search device is provided, which includes:

[0029] a storage unit configured to save a keyword library including a plurality of preset keywords, wherein the keyword library is composed of keywords included in all content recommendation groups;

[0030] a query matching unit configured to query, in the keyword library, a target keyword matching a search keyword in response to a content search initiated by the search keyword;

[0031] a content determination unit configured to determine a target content recommendation group associated with each of the target keywords based on an association relationship established between each of the preset keywords and a content recommendation group;

[0032] a content search unit configured to divide all the content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all the target content recommendation groups are divided into the second content recommendation group set, and further configured to take all hit results of the search keyword on all content recommendation groups in the first content recommendation group set as search results of the content search.

[0033] In a possible implementation, the search device further includes:

[0034] a relationship construction unit configured to establish, for each of the preset keywords, an association relationship between the preset keyword and all content recommendation groups including the same keyword;

[0035] The association relationship is updated in response to a change in at least one of the preset keywords and the preset content recommendation groups.

[0036] In a possible implementation, the relationship building unit is specifically configured to: build an inverted index for each of the preset keywords, the inverted index being used to represent the association relationship; wherein a keyword of the inverted index is the preset keyword, and a value of the inverted index is a group identifier of each content recommendation group including the preset keyword.

[0037] In a possible implementation, the value of the inverted index is stored in a form of a linked list.

[0038] In a possible implementation, the preset keywords include a first preset keyword and a second preset keyword; wherein the first preset keyword is a preset keyword that is determined to be matched with a search word when the first preset keyword is completely consistent with the search word, and the second preset keyword is a preset keyword that is determined to be matched with the search word when the second preset keyword is contained in the search word.

[0039] The query matching unit is specifically configured to: query a first target keyword matched with the search word from all the first preset keywords, and query a second target keyword matched with the search word from all the second preset keywords; wherein the target keyword includes at least one of the first target keyword and the second target keyword.

[0040] In a possible implementation, the association relationship established between the preset keyword and the content recommendation group includes a first association relationship between the first preset keyword and the content recommendation group, and a second association relationship between the second preset keyword and the content recommendation group.

[0041] The content determination unit is specifically configured to: determine a third content recommendation group set associated with all the first target keywords based on the first association relationship; determine a fourth content recommendation group set associated with all the second target keywords based on the second association relationship; and determine the target content recommendation group by taking a union set of the third content recommendation group set and the fourth content recommendation group set.

[0042] In a possible implementation, the preset keywords include a second preset keyword.

[0043] The content determination unit is specifically configured to: query, by a multimode matching method, a second target keyword matched with the search word from all the second preset keywords as the target keyword.

[0044] According to an aspect of an embodiment of the present disclosure, an electronic device is provided, including:

[0045] a processor;

[0046] a memory for storing executable instructions of the processor;

[0047] The processor is configured to execute the executable instructions to implement the content search method described above.

[0048] According to an aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, when at least one instruction in the computer readable storage medium is executed by a processor of an electronic device, the electronic device can implement the content search method described above.

[0049] The technical solutions provided by the embodiments of the present disclosure at least have the following beneficial effects:

[0050] The embodiments of the present disclosure can establish a word library including a plurality of preset keywords, wherein the word library is composed of keywords included in all content recommendation groups, for each preset keyword, an association relationship between the preset keyword and all content recommendation groups including the same keyword is provided, so that in response to each content search initiated by a search keyword, the target keyword matched with the search keyword and the associated target content recommendation group can be queried at one time, and then all content recommendation groups are divided into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are divided into the second content recommendation group set; all hit results of the search keyword on all content recommendation groups in the first content recommendation group set are taken as the search result of the content search. In this content search process, it is not necessary to query the target keyword for each content recommendation group, that is, the multiple searches for content exclusion are avoided, the number of searches is reduced, the search time is saved, and the search efficiency is improved.

[0051] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0052] The accompanying drawings incorporated in the specification and forming a part of it illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure, and do not constitute an undue limitation on the present disclosure.

[0053] Figure 1 is a basic flow diagram of the content search method in the present disclosure according to an exemplary embodiment;

[0054] Figure 2 is a specific flow diagram of the content search method in the present disclosure according to an exemplary embodiment;

[0055] Figure 3 is a schematic diagram of the inverted index in the present disclosure according to an exemplary embodiment;

[0056] Figure 4 is a basic structure schematic diagram of a content search device in the disclosure according to an exemplary embodiment;

[0057] Figure 5 is a basic structure schematic diagram of an electronic device in the disclosure according to an exemplary embodiment. DETAILED DESCRIPTION

[0058] In order to make the ordinary person skilled in the art better understand the technical solutions of the disclosure, the technical solutions in the embodiments of the disclosure will be clearly and completely described below with reference to the drawings.

[0059] It should be noted that the terms "first", "second", and the like in the specification and claims of the disclosure and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the disclosure described herein can be implemented in an order other than that illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the disclosure as detailed in the appended claims.

[0060] In the embodiments of the disclosure, all searchable content recommendations can be divided into several content recommendation groups. For example, all searchable content recommendations can be grouped according to the classification of content features in the recommended content.

[0061] In addition, in the embodiments of the disclosure, keywords can be used to distinguish between recommended content that is avoided to be displayed and recommended content that is allowed to be displayed. The keywords can be set in the content recommendation groups to represent information about recommended content that needs to be avoided to be displayed. When the search term matches the keyword, the content recommendation groups with the same keyword are set to form a second content recommendation group set, and the remaining content recommendation groups are set to form a first content recommendation group set. The search term hits all content recommendation groups in the first content recommendation group set as the search result of the content search. Through the above processing, keywords can be used to distinguish between content recommendation groups that are set to match the search term and content recommendation groups that are not set to match the search term, so that only the hit search content of the content recommendation groups that are not set to match the search term is displayed, and the hit search content of the content recommendation groups that are set to match the search term is avoided to be displayed. For example, training, physical stores, and the like can be used as keywords. In each search, in order to distinguish whether the keywords of each content recommendation group match the search term, the keywords that match the search term can be referred to as target keywords.

[0062] For example, in this embodiment of the disclosure, in response to a content search initiated using a search term, recommended content matching the search term can be searched in each content recommendation group; and, in this embodiment of the disclosure, for each content recommendation group where a matching recommended content is found, it can also be determined whether the content recommendation group is associated with a preset keyword. If not, the recommended content in the content recommendation group that matches the search term can be used as the search result.

[0063] Therefore, compared to performing multiple searches to filter all recommended content in the search results, using target keyword matching based on content recommendation groups can reduce the number of searches, save search time, and improve search efficiency.

[0064] However, the embodiments disclosed herein can further reduce the number of searches based on the above, and provide a better solution for this purpose. In this better solution, a keyword thesaurus composed of several keywords can be provided. This keyword thesaurus not only stores multiple preset keywords, but also allows configuration of the association relationship between preset keywords and preset content recommendation groups.

[0065] Therefore, target keywords matching the search term can be determined from the preset keywords, and the associated and unassociated content recommendation groups for each target keyword can be identified. The recommended content that matches the search term in the unassociated content recommendation group can be used as the search result. Thus, when the same keyword is associated with different content recommendation groups, multiple screenings performed separately for different content recommendation groups can be simplified into a single unified screening, thereby further reducing the number of searches, saving search time, and improving search efficiency.

[0066] At the same time, other content search systems with similar needs, besides content recommendation search systems, will also have the same problem.

[0067] In an exemplary scenario, a user enters a search term to find content recommendations, clicks the search button, and the backend system uses content search methods to retrieve the entered search term and outputs a series of search results.

[0068] In view of this, embodiments of this disclosure provide a content search method that, when matching target keywords with search terms, does not require a separate search for each content recommendation group, thereby effectively improving search efficiency.

[0069] Figure 1 This is a schematic diagram illustrating the basic flow of a content search method in this disclosure according to an exemplary embodiment. Figure 1 As shown, the method includes:

[0070] Step 101: Establish a thesaurus that includes several preset keywords.

[0071] The terminology database consists of keywords included in all content recommendation groups. In other words, preset keywords are obtained by traversing all the keywords included in all content recommendation groups, and the resulting preset keywords are used to form the terminology database.

[0072] Specifically, each preset content recommendation group can set its own keywords. Keywords in the corresponding preset content recommendation group can be collected and used as preset keywords to form a thesaurus.

[0073] Step 102: In response to a content search initiated using a search term, search for target keywords that match the search term among all preset keywords.

[0074] In this embodiment, a single query is performed on all preset keywords within each content recommendation group, instead of multiple queries per content recommendation group. Furthermore, the keywords matching the search term are referred to as target keywords. The recommended content within each content recommendation group can be textual content such as media information, or multimedia content such as videos.

[0075] Step 103: Based on the association established between each preset keyword and the content recommendation group, determine the target content recommendation group associated with each target keyword.

[0076] For each preset keyword A, an established association can exist between it and all content recommendation groups that contain the exact same keyword A. For example, if the preset keyword is "training," then there is an association between the preset keyword "training" and all content recommendation groups that contain the keyword "training." Based on this association, for the target keywords that match the search term, the content recommendation groups associated with the target keywords can be determined. These content recommendation groups associated with the target keywords are called target content recommendation groups.

[0077] Step 104: Divide all content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are assigned to the second content recommendation group set.

[0078] After determining the target content recommendation group through step 103, all content recommendation groups are divided into two content recommendation group sets, referred to as the first content recommendation group set and the second content recommendation group set, respectively. The second content recommendation group set is composed of all target content recommendation groups, and the other content recommendation groups in all content recommendation groups are composed of the first content recommendation group set.

[0079] As can be seen from the method of determining the target content recommendation group, the first content recommendation group set consists of all content recommendation groups not associated with the target keyword, while the second content recommendation group set consists of all content recommendation groups associated with the target keyword. Thus, the two content recommendation group sets introduced in this step distinguish between content recommendation groups associated with and not associated with the target keyword.

[0080] Step 105: Take all the matching results of the search term to all content recommendation groups in the first content recommendation group set as the search results for the content search.

[0081] Through the processing in step 104, all content recommendation groups not associated with the target keyword have been separately identified using the first content recommendation group set. Next, all matching results of the search term with all content recommendation groups in the first content recommendation group set will be used as the search results. That is, for all content recommendation groups not associated with the target keyword, the matching results of the search term with the corresponding content recommendation group will be the content that can be displayed, forming the search results. However, for all content recommendation groups associated with the target keyword, all matching results of the search term with the corresponding content recommendation group are considered content that should be avoided from being displayed and will not be shown.

[0082] exist Figure 1 In the illustrated method, for all preset keywords included in all preset content recommendation groups, a relationship is established between each keyword and all content recommendation groups containing the same keyword. Based on this, in response to a content search initiated using a search term, the target keyword matching the search term is retrieved all preset keywords at once, and the target content recommendation group associated with the target keyword is determined based on the provided relationship. Next, all content recommendation groups are divided into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are included in the second content recommendation group set. Finally, all matching results of the search term for all content recommendation groups in the first content recommendation group set are used as the search results for the content search. This eliminates the need to query the target keyword within each content recommendation group, avoids duplicate matching of the same keyword, reduces search time, and improves keyword matching efficiency and content search efficiency.

[0083] In some examples, to provide the association between each keyword and all content recommendation groups containing the same keyword, an association can be established between each preset keyword and all content recommendation groups containing the same keyword before responding to a content search initiated using the search term. Specifically, based on the preset keyword, various preset content recommendation groups containing the same keyword can be found, and a correspondence can be established between the preset keyword and each found preset content recommendation group.

[0084] The established association can be one-to-one, meaning that for a given preset keyword A, if only one preset content recommendation group B contains the same keyword A, then a one-to-one association is established between A and B. The established association can also be one-to-many, meaning that for a given preset keyword A, if multiple preset content recommendation groups (e.g., content recommendation group B1 and content recommendation group B2) contain the same keyword A, then an association is established between A and both B1 and B2, which is a one-to-many association.

[0085] Furthermore, as the content search continues, if at least one of the preset keywords and preset content recommendation groups is updated, the corresponding relationship is updated. That is, the relationship can be updated in response to a change in at least one of the preset keywords and preset content recommendation groups. For example, adding or deleting preset keywords or preset content recommendation groups can simultaneously update the relevant relationships.

[0086] In some examples, to support richer matching requirements, keywords can include at least one of two types: first preset keywords and second preset keywords. A first preset keyword is a preset keyword that is considered a match when the search term and the keyword are exactly the same. A second preset keyword is a preset keyword that is considered a match when the search term contains the keyword. In other words, for a first preset keyword, if it is exactly the same as the search term, it means that the first preset keyword matches the search term; for a second preset keyword, if the search term includes the second preset keyword, it means that the second preset keyword matches the search term. Preset keywords can include either first or second preset keywords.

[0087] In some examples, if the preset keywords include both a first preset keyword and a second preset keyword, then when establishing associations with preset content recommendation groups, the first and second preset keywords will each establish their own associations. For example, if "training" is set as the first preset keyword for content recommendation group 1 and the second preset keyword for content recommendation group 2, when establishing associations, "training" as the first preset keyword and "training" as the second preset keyword will each establish their own associations. That is, an association will be established between the first preset keyword "training" and all content recommendation groups that include it, and then an association will be established between the second preset keyword "training" and all content recommendation groups that include it.

[0088] It is important to note that when querying the target keywords that match the search term in step 101, it refers to a category of preset keywords. If the preset keywords include both the first preset keyword and the second preset keyword, then a query is performed among all the first preset keywords according to the matching principle of the first preset keyword to determine the first target keyword that matches the search term, and a query is performed among all the second preset keywords according to the matching principle of the second preset keyword to determine the second target keyword that matches the search term.

[0089] In some examples, the matching of the first preset keyword can be performed using various existing methods, such as multi-modal matching or string-by-string comparison. This disclosure does not limit the specific matching method for the first preset keyword.

[0090] Therefore, in this embodiment of the disclosure, a query is performed only once for each type of preset keyword, instead of a query for each content recommendation group. This greatly reduces search time and improves search efficiency when there is keyword duplication in different content recommendation groups.

[0091] The following specific embodiment illustrates the detailed implementation of the content search method disclosed herein.

[0092] Figure 2 This is a schematic flowchart illustrating a content search method in this disclosure according to an exemplary embodiment. In this embodiment, the preset keywords include two categories: first preset keywords and second preset keywords, and the second preset keywords are matched using a multi-modal matching method. For example, Figure 2 As shown, the method includes:

[0093] Step 201: Traverse all preset content recommendation groups, establish a thesaurus including several preset keywords, and for each preset keyword, establish a relationship between the preset keyword and all preset content recommendation groups including that preset keyword.

[0094] This step is used to establish a thesaurus and the relationships between preset keywords and preset content recommendation groups.

[0095] In some examples, a thesaurus can be built by iterating through all preset content recommendation groups, specifically by using the keywords of all preset content recommendation groups as preset keywords to form the thesaurus.

[0096] In some examples, inverted indexes can be used to represent the relationships between preset keywords and preset content recommendation groups. This facilitates establishing these relationships and makes subsequent queries for target keywords and target content recommendation groups more convenient. Specifically, an inverted index can be created for each preset keyword. The key of the inverted index can be the preset keyword, and the value can be the group identifier of each content recommendation group that includes the preset keyword. The inverted index has one key and multiple values. In some examples, multiple values ​​for the same inverted index can be stored in a linked list.

[0097] In some examples, when building an inverted index, each preset content recommendation group can be traversed to determine whether each preset keyword included in the content recommendation group has been indexed. If so, the group identifier of the content recommendation group is used as the new value of the corresponding inverted index and inserted into the linked list (where the linked list is used to store each value of the inverted index); otherwise, a new inverted index is created and its key is set to the corresponding preset keyword.

[0098] In this embodiment, the preset keywords include two categories: first preset keywords and second preset keywords. Correspondingly, the target keywords matching the search term can include at least one of the first and second target keywords. Specifically, the first preset keyword is determined to match the search term when it is completely identical to it, and the second preset keyword is determined to match the search term when it is contained within it. Furthermore, when establishing association relationships, separate association relationships are established for the first and second preset keywords. That is, the association relationship can include a first association relationship between the first preset keyword and the content recommendation group, and a second association relationship between the second preset keyword and the content recommendation group. For example... Figure 3 The diagram shown is a schematic of the inverted index established in this embodiment, and, in Figure 3 In the example shown, a content recommendation group is an ad group that includes ads.

[0099] In some examples, the processing in step 201 above can be completed offline in advance to save time in online retrieval. Furthermore, the associations established in step 201 can be adaptively updated based on changes in at least one of the preset keywords and preset content recommendation groups.

[0100] Step 202: In response to the content search initiated using the search term, search for a first target keyword that is exactly the same as the search term in the first preset keywords.

[0101] For the query in this step, for example, all the first preset keywords can be grouped into a hash set, and the first preset keyword that is exactly the same as the search term can be found in the set and used as the first target keyword; or, a string comparison method can be used for the query. This disclosure does not limit the specific query method.

[0102] Step 203: For the first target keyword found, determine the first content recommendation group set associated with all the first target keywords based on the first association relationship.

[0103] In some examples, the values ​​of the inverted index, which is the first target keyword, are found. If the values ​​of the inverted index are stored in a linked list, the linked list associated with the first target keyword is found, and the group identifiers of all content recommendation groups included in the linked list are combined into a set. This set of groups representing the corresponding content recommendation groups is called the third content recommendation group set, denoted as set 3.

[0104] Step 204: In response to the content search initiated using the search term, query the second target keyword that matches the search term from all the second preset keywords using a multi-modal matching method.

[0105] In this embodiment, a multi-modal matching method is used to match the second preset keyword. This method can employ various existing multi-modal matching algorithms, such as the Wumanber algorithm. The second preset keyword contained within the search term is found among all the second preset keywords and used as the second target keyword. Here, all the second preset keywords are those for which an inverted index was built in step 201.

[0106] Step 205: For the queried second target keyword, determine the set of second content recommendation groups associated with all second target keywords based on the second association relationship.

[0107] In some examples, for each second target keyword, the inverted index of that second target keyword is determined, and the values ​​of that inverted index are found. If the values ​​of the inverted index are stored in a linked list, the linked list associated with each second keyword is found, and the group identifiers of all content recommendation groups included in each linked list are combined into a set, representing the set of the corresponding content recommendation group, called the fourth content recommendation group set, denoted as set 4. When constructing the fourth content recommendation group set, duplicate content recommendation groups can be directly deduplicated.

[0108] Step 206: Determine the target content recommendation group by taking the union of the third content recommendation group set and the fourth content recommendation group set. That is, determine the content recommendation groups included in the union set as the target content recommendation group.

[0109] To prevent duplicate content recommendation groups between set 3 and set 4, the union of sets 3 and 4 is taken, and the result of the union is used as the search result for keyword matching. Specifically, the content recommendation groups included in the union are used as the target content recommendation groups.

[0110] Step 207: Divide all content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are included in the second content recommendation group set; take all the matching results of the search term for all content recommendation groups in the first content recommendation group set as the search results for the content search.

[0111] Based on the search results of the target recommendation group, all content recommendation groups are divided into a first content recommendation group set and a second content recommendation group set. All target content recommendation groups are placed in the second content recommendation group set, while other content recommendation groups are placed in the first content recommendation group set to distinguish whether a content recommendation group is associated with the target keyword. For the first content recommendation group set, all matching results of the search term across all content recommendation groups in that set are used as the content search results. For the second content recommendation group set, all matching results of the search term across all content recommendation groups in that set are not used as the content search results.

[0112] The above describes the specific implementation of the content search method in this disclosure.

[0113] This disclosure also provides a content search apparatus that can be used to implement the above-described content search method. Figure 4 This is a schematic diagram of the basic structure of a content search device. (Example) Figure 4 As shown, the device includes:

[0114] The storage unit is used to store a thesaurus containing several preset keywords; wherein, the thesaurus consists of keywords included in all content recommendation groups;

[0115] The query matching unit is used to respond to a content search initiated using a search term by querying the thesaurus for target keywords that match the search term;

[0116] The content determination unit is used to determine the target content recommendation group associated with each target keyword based on the association established between each preset keyword and the content recommendation group.

[0117] The content search unit is used to divide all content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are included in the second content recommendation group set; it is also used to take all the matching results of the search term for all content recommendation groups in the first content recommendation set as the search results for the content search.

[0118] exist Figure 4The content search device shown provides an association relationship between each keyword and all content recommendation groups containing the same keyword for all keywords included in all preset content recommendation groups. Based on this, in response to a content search initiated using a search term, the device retrieves the target keyword matching the search term all at once from all preset keywords, and determines the content recommendation group associated with the target keyword based on the provided association relationship. This eliminates the need to query the target keyword within each content recommendation group, avoids duplicate matching of the same keyword, reduces search time, and improves keyword matching efficiency and content search efficiency.

[0119] In some examples, to provide the association between each keyword and a group of all recommended content containing the same keyword, the search device may also include:

[0120] The relationship building unit is used to establish an association between each preset keyword and all content recommendation groups that include the same keyword.

[0121] Furthermore, as the content search continues, if at least one of the preset keywords and preset content recommendation groups is updated, the association construction unit is also used to update the corresponding association. That is, the association can be updated in response to a change in at least one of the preset keywords and preset content recommendation groups. The established association can be one-to-one or one-to-many.

[0122] In some examples, to facilitate the establishment of relationships and subsequent queries, the relationship building unit may establish relationships between preset keywords and all content recommendation groups containing the same keywords in the following ways:

[0123] An inverted index is built for each preset keyword. The inverted index represents the relationship between the preset keyword and all content recommendation groups that include the same keyword. The keywords of the inverted index are the preset keywords, and the values ​​of the inverted index are the group identifiers of each content recommendation group that includes the preset keyword. Moreover, the values ​​of the inverted index can be stored in the form of a linked list.

[0124] In some examples, to support richer matching requirements, the preset keywords include a first preset keyword and a second preset keyword. Accordingly, the query matching unit is specifically configured to: query a first target keyword that matches the search term among all the first preset keywords, and query a first target keyword that matches the search term among all the first preset keywords; wherein the target keyword includes at least one of the first target keyword and the second target keyword.

[0125] Furthermore, for cases where the preset keywords include a first preset keyword and a second preset keyword, the association established between the preset keywords and the content recommendation group includes a first association between the first preset keyword and the content recommendation group, and a second association between the second preset keyword and the content recommendation group; the content determination unit is specifically configured to: determine a third set of content recommendation groups associated with the first target keyword based on the first association; determine a fourth set of content recommendation groups associated with all second target keywords based on the second association; and determine the target content recommendation group by taking the union of the third set of content recommendation groups and the fourth set of content recommendation groups.

[0126] In some examples, for cases where the preset keywords include the second preset keywords, in order to support multi-modal matching queries, the content determination unit is specifically configured to: query the second target keywords that match the search term among all the second preset keywords using multi-modal matching, that is, in the pre-established multi-modal matching set, query the second target keywords included in the search term using multi-modal matching as the target keywords.

[0127] This disclosure also provides an electronic device, Figure 5 This is a schematic diagram illustrating the basic structure of an electronic device in this disclosure according to an exemplary embodiment, wherein the electronic device may be a server. Figure 5 As shown, the server 500 can vary considerably due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 501 and one or more memories 502. The memories 502 store at least one line of program code, which is loaded and executed by the processor 501 to implement the content search methods provided in the various embodiments described above. Of course, the server 500 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 500 may also include other components for implementing device functions, which will not be elaborated upon here.

[0128] In an exemplary embodiment, a computer-readable storage medium including at least one instruction is also provided, such as a memory including at least one instruction, which can be executed by a processor in a computer device to perform the content search method provided in this disclosure.

[0129] Optionally, the aforementioned computer-readable storage medium may be a non-transitory computer-readable storage medium, such as ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage devices.

[0130] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0131] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A content search method, characterized in that, include: Establish a thesaurus that includes several preset keywords; wherein, the thesaurus consists of keywords included in all content recommendation groups; In response to a content search initiated using a search term, the target keyword matching the search term is queried in the thesaurus. Based on the association established between each preset keyword and content recommendation group in the thesaurus, the target content recommendation group associated with each target keyword is determined; All content recommendation groups are divided into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are assigned to the second content recommendation group set; The search results for the content search are the total number of matches between the search term and all content recommendation groups in the first content recommendation group set.

2. The content search method according to claim 1, characterized in that, Before determining the target content recommendation group associated with each target keyword based on the established association between each preset keyword and the content recommendation group in the thesaurus, the content search method further includes: For each preset keyword, establish an association between the preset keyword and all content recommendation groups that include the same keyword; The association is updated in response to a change in at least one of the preset keywords and preset content recommendation groups.

3. The content search method according to claim 2, characterized in that, The step of establishing an association between each preset keyword and all content recommendation groups containing the same keyword includes: An inverted index is built for each of the preset keywords, and the inverted index is used to characterize the association between the preset keyword and all content recommendation groups that include the same keyword; The keywords of the inverted index are the preset keywords, and the values ​​of the inverted index are the group identifiers of each content recommendation group that includes the preset keywords.

4. The content search method according to claim 3, characterized in that, The values ​​of the inverted index are stored in a linked list.

5. The content search method according to claim 1, characterized in that, The preset keywords include a first preset keyword and a second preset keyword; wherein, the first preset keyword is a preset keyword that is determined to match the search term when it is completely consistent with the search term, and the second preset keyword is a preset keyword that is determined to match the search term when it is contained in the search term; The query for target keywords that match the search term includes: querying for first target keywords that match the search term among all first preset keywords, and querying for second target keywords that match the search term among all second preset keywords; The target keywords include at least one of the first target keywords and the second target keywords.

6. The content search method according to claim 5, characterized in that, The association established between the preset keywords and the content recommendation group includes a first association between the first preset keywords and the content recommendation group, and a second association between the second preset keywords and the content recommendation group. The step of determining the target content recommendation group associated with each target keyword includes: Based on the first association relationship, a third set of content recommendation groups associated with the first target keyword is determined; Based on the second association relationship, a fourth set of content recommendation groups associated with all the second target keywords is determined; The target content recommendation group is determined by taking the union of the third content recommendation group set and the fourth content recommendation group set.

7. The content search method according to claim 1, characterized in that, The preset keywords include the second preset keywords; The step of querying the target keyword that matches the search term in the terminology database includes: querying the second target keyword that matches the search term from all the second preset keywords using a multi-modal matching method, and using it as the target keyword.

8. A content search device, characterized in that, include: A storage unit is used to store a thesaurus containing several preset keywords; wherein the thesaurus consists of keywords included in all content recommendation groups; A query matching unit is used to query the thesaurus for target keywords that match the search terms in response to a content search initiated using search terms; The content determination unit is used to determine the target content recommendation group associated with each target keyword based on the association relationship established between each preset keyword and the content recommendation group; The content search unit is configured to divide all content recommendation groups into a first content recommendation group set and a second content recommendation group set, wherein all target content recommendation groups are assigned to the second content recommendation group set; and to use all hit results of the search term for all content recommendation groups in the first content recommendation group set as the search results of the content search.

9. An electronic device, characterized in that, include: processor; Memory for storing the executable instructions of the processor; The processor is configured to execute the executable instructions to implement the content search method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, When at least one instruction in the computer-readable storage medium is executed by the processor of the electronic device, the electronic device is able to implement the content search method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Search method, device and equipment and storage medium

    CN110674365A

  • Content search method, device and equipment and storage medium

    CN111582967A