Search and grouping methods, apparatus, devices and storage media
By constructing a full graph and using community discovery algorithms, the grouping of multiple versions of content such as movies and TV series is determined, and related entities are displayed. This solves the problem of incomplete search results in existing technologies and enables a richer display of search results.
Patent Information
- Application Number
- CN202111375820.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2041-11-19
AI Technical Summary
Existing technologies struggle to meet users' needs for complete and rich information in multi-version content searches, especially in cases involving multiple versions of movies and TV series, where search results often lack relevant information.
By constructing a full graph, based on the mapping relationship between entities and groups, the group to which the main demand entity belongs is determined, and all related entities within that group are displayed as search results. Community detection algorithms and multimodal semantic features are used for grouping, and keyword weights and similarity calculations are combined to construct and divide the full graph.
It improves the completeness and richness of search results, meets users' information needs for multiple versions of content, and enhances search performance.
Smart Images

Figure CN114281963B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, specifically to technologies such as intelligent search and knowledge graphs, and in particular to a search and grouping method, apparatus, device, and storage medium. Background Technology
[0002] With the development of internet technology, people can obtain information through search engines. Users can enter search terms into the search box of a search engine, and the search engine will retrieve the search results based on the search terms and display the results on the search results page. Summary of the Invention
[0003] This disclosure provides a search method, apparatus, device, and storage medium.
[0004] According to one aspect of this disclosure, a search method is provided, comprising: determining a primary demand entity corresponding to a search term, the primary demand entity being used to satisfy the primary demand of the search term; determining a group to which the primary demand entity belongs, and obtaining entities within the group; and displaying the entities within the group.
[0005] According to another aspect of this disclosure, a grouping method is provided, comprising: obtaining at least one entity; dividing the at least one entity into at least one group, each group comprising at least one entity, the group being used to determine the group to which the main demand entity belongs based on a main demand entity, the main demand entity being determined based on a search term, and the entity within the group to which the main demand entity belongs being used as the search result corresponding to the search term.
[0006] According to another aspect of this disclosure, a search device is provided, comprising: a first determining module, configured to determine a primary demand entity corresponding to a search term, the primary demand entity being used to satisfy the primary demand of the search term; a second determining module, configured to determine the group to which the primary demand entity belongs, and obtain entities within the group; and a display module, configured to display the entities within the group.
[0007] According to another aspect of this disclosure, a grouping apparatus is provided, comprising: an acquisition module for acquiring at least one entity; and a grouping module for dividing the at least one entity into at least one group, each group comprising at least one entity, each group being configured to determine the group to which the primary demand entity belongs based on a primary demand entity, the primary demand entity being determined based on a search term, and entities within the group to which the primary demand entity belongs serving as search results corresponding to the search term.
[0008] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to said at least one processor; wherein the memory stores instructions executable by said at least one processor, said instructions being executed by said at least one processor to enable said at least one processor to perform the method as described in any of the foregoing aspects.
[0009] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are configured to cause the computer to perform the method according to any of the preceding aspects.
[0010] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the method according to any of the preceding aspects.
[0011] The technical solution disclosed herein can improve search results.
[0012] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0013] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0014] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;
[0015] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;
[0016] Figure 3 This is a schematic diagram according to the third embodiment of the present disclosure;
[0017] Figure 4 This is a schematic diagram according to the fourth embodiment of the present disclosure;
[0018] Figure 5 This is a schematic diagram according to the fifth embodiment of the present disclosure;
[0019] Figure 6 This is a schematic diagram according to the sixth embodiment of the present disclosure;
[0020] Figure 7 This is a schematic diagram according to the seventh embodiment of the present disclosure;
[0021] Figure 8 This is a schematic diagram according to the eighth embodiment of the present disclosure;
[0022] Figure 9 This is a schematic diagram according to the ninth embodiment of the present disclosure;
[0023] Figure 10 This is a schematic diagram of an electronic device used to implement the search method or grouping method of the embodiments of this disclosure. Detailed Implementation
[0024] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0025] In related technologies, search results generally satisfy the primary need of the search term. For example, if the search term is "Season 1 of A," where A is the name of a film or television series, the search results will be information about Season 1 of A, such as online streaming links, cast information, plot details, etc. However, users may want richer information, such as Season 2 of A, Season 3 of A, etc. The way these technologies satisfy the primary need can lead to a poor experience in terms of content completeness and richness, especially when there are multiple versions of a film or television series or video work. Multiple versions, such as those containing keywords like "of," "season," or "series" in the title, may not adequately meet user needs.
[0026] To improve search results, this disclosure provides the following embodiments.
[0027] Figure 1 Based on a schematic diagram of the first embodiment of this disclosure, this embodiment provides a search method, the method comprising:
[0028] 101. Determine the main demand entity corresponding to the search term, wherein the main demand entity is used to satisfy the main demand of the search term.
[0029] 102. Determine the group to which the main demand entity belongs, and obtain the entities within the group.
[0030] 103. Display the entities within the group.
[0031] The execution entity in this embodiment can be referred to as a search device. The search device can be software, hardware, or a combination of both, and it can be located in an electronic device. The electronic device can be located on a server or a user terminal. The server can be a local server or a cloud-based system, and the user terminal can include mobile devices (such as mobile phones and tablets), in-vehicle terminals (such as in-vehicle infotainment systems), wearable devices (such as smartwatches and smart bracelets), and smart home devices (such as smart TVs and smart speakers).
[0032] Search can be applied to a variety of scenarios, such as inference engines, question-answering platforms, reading comprehension, and intelligent search.
[0033] Taking the interaction between a user terminal and the cloud as an example, a client can be installed on the user terminal, such as a search engine client. The user enters a search term (query) into the search engine client, and the client sends the search term to the cloud. The cloud can obtain the search results based on the search term and send the search results to the client, which then displays them to the user.
[0034] Users can input questions in the form of voice or text. For voice input, the user terminal or the cloud can perform voice recognition to obtain the corresponding text.
[0035] A search term is the basic unit for expressing information needs and search content. It can generally be specified by the user; for example, a user might enter "Season 1 of A," where A is the name of a TV series or movie.
[0036] An entity can include concrete things and abstract things. Concrete things include people, place names, companies, telephone numbers, animals, etc., while abstract things include concepts.
[0037] Taking a user's search for movies and TV shows as an example, the entity can be any movie or TV show, such as various versions of a movie or TV show in a multi-version search. It's understandable that "multi-version" isn't limited to movies and TV shows; it can also refer to novels, etc. Therefore, it can also be applied to scenarios such as searching for novels.
[0038] Unless otherwise specified, this disclosure uses searching for movies and TV dramas as an example.
[0039] The primary demand entity refers to the entity that satisfies the primary demand of the user's search terms. For example, when a user searches for multiple versions of movies or TV series, the name of the primary demand entity can be the same as the user's search terms.
[0040] Multiple versions of film and television dramas refer to film and television dramas that are part of a series. The names of these dramas can generally be composed of a common name plus a version, such as "Season 1.0", "Part 1.0", or "of 1.0".
[0041] For example, if a user enters the search term "A Season 1", then the name of the main demand entity corresponding to that search term will be "A Season 1".
[0042] After identifying the primary demand entity, the group to which the primary demand entity belongs can be determined, and the entities within that group can be obtained.
[0043] In this process, groups can be pre-built, and a mapping relationship can be established between groups and entities within groups. Based on this mapping relationship, the group to which an entity belongs can be determined, and each entity within a group can be obtained.
[0044] Taking multiple versions of a film or television series as an example, entities within the same group can include content from multiple versions of the same film or television series. For example, A Season 1, A Season 2, and A Season 3 constitute the first group; B Part 1, B Part 2, and B Part 3 constitute the second group; and C c1, C c2, and C c3 constitute the third group. A, B, and C are the names of different film or television series, and c1, c2, and c3 are the names of different versions.
[0045] Therefore, if the name of the primary demand entity is "A First Quarter", then the primary demand entity belongs to the first group, and the entities in the first group include: A First Quarter, A Second Quarter, and A Third Quarter.
[0046] After retrieving the entities within the group to which the main demand entity belongs, the entities within that group can be used as search results, which are then displayed.
[0047] For example, show the first season of A, the second season of A, and the third season of A mentioned above.
[0048] like Figure 2 As shown, taking the search term "Season 1 of A" as an example, the differences between the related technology and the embodiments of this disclosure are illustrated, wherein, Figure 2 The upper part is an illustration of search results for related technologies. Figure 2 The lower part is a schematic diagram of the search results of an embodiment of this disclosure.
[0049] from Figure 2 It can be seen that the search results for related technologies are results that meet the main needs; for example, the search results are all about "Season 1 of A".
[0050] Using the method described in this embodiment, the search results are the content of entities in the group to which the main demand entity belongs, for example... Figure 2 The section below shows "Season 1 of A", ..., "Season 6 of A", which means that search results can be returned in groups.
[0051] In this embodiment of the disclosure, by determining the group to which the main demand entity belongs and displaying the entities within that group as search results, all entities related to the main demand entity can be used as search results, rather than only the main demand entity. This can improve the completeness and richness of search results and enhance search effectiveness.
[0052] In some embodiments, determining the group to which the primary demand entity belongs includes:
[0053] Based on the pre-established mapping relationship between entities and groups, the group to which the main demand entity belongs is determined. The group is obtained by dividing the pre-built full graph. The full graph includes at least one group, and each group in the at least one group includes at least one node. Each node in the at least one node corresponds to an entity.
[0054] In this context, a full graph refers to a graph built upon all existing entities. For example, if all existing entities include entities 1 through 10, then a graph can be built based on entities 1 through 10, such as... Figure 3 The full graph shown.
[0055] like Figure 3 As shown, the nodes of the full graph are represented by circles, and each node corresponds to an entity. Figure 3 The identifiers (1, 2, 3... 10) of each entity in the code identify each node.
[0056] Figure 3 In the example, the full graph is divided into 3 groups. The nodes (or entities) in each group are represented by different colors. For example, the first group includes entity 1, entity 2, and entity 3; the second group includes entity 4, entity 5, and entity 6; and the third group includes entity 7, entity 8, entity 9, and entity 10.
[0057] Therefore, based on Figure 3 As shown in the example, if the main demand entity is entity 2, then the group to which the main demand entity belongs is the first group; if the main demand entity is entity 4, then the group to which the main demand entity belongs is the second group.
[0058] Since the full map can accurately reflect the relationships between entities, determining the group to which the main demand entity belongs based on the full map can improve accuracy.
[0059] The above describes the process of obtaining search results based on search terms, which can be called an online process. This process requires determining the group to which the main demand belongs. Each group can be pre-built, and the process of building each group can be called an offline process. The grouping process is described below.
[0060] Figure 4This is a schematic diagram based on the fourth embodiment of the present disclosure. This embodiment provides a grouping method, which includes:
[0061] 401. Obtain at least one entity.
[0062] 402. Divide the at least one entity into at least one group, each group in the at least one group including at least one entity, each group being used to determine the group to which the main demand entity belongs based on the main demand entity, the main demand entity being determined based on the search term, and the entity in the group to which the main demand entity belongs being the search result corresponding to the search term.
[0063] Wherein, at least one entity is the entity to be grouped, combined with Figure 3 For example, at least one entity includes entities 1 through 10. Specifically, the entities to be grouped can be obtained from an existing dataset; more specifically, this could be the names of multiple versions of movies or TV series.
[0064] After obtaining at least one entity, it can be divided into at least one group, for example, by combining... Figure 3 Entities 1 through 10 can be divided into three groups.
[0065] Once the various groups are obtained, when searching online, the main demand entity can be determined based on the search terms, and the group to which the main demand entity belongs can be determined based on each group, with the entities within that group serving as the search results.
[0066] In this embodiment of the disclosure, by dividing entities into groups, the group to which the main demand entity belongs can be determined during the search, and the entities within that group can be used as search results. This allows all entities related to the main demand entity to be used as search results, rather than only the main demand entity, thereby improving the completeness and richness of search results and enhancing search effectiveness.
[0067] In some embodiments, dividing the at least one entity into at least one group includes: determining the weights between any two entities in the at least one entity; constructing a full graph based on the at least one entity and the weights between any two entities, the full graph including at least one node, each node in the at least one node corresponding to each entity in the at least one entity, the weights of the edges between any two nodes in the at least one node being the weights between any two entities; and dividing the full graph into at least one group.
[0068] Among them, combined Figure 3 A full graph is a graph built on all existing entities. This graph can be a knowledge graph for a certain domain. For example, when the entities are multiple versions of film and television dramas, the full graph can be a knowledge graph for the domain of multiple versions of film and television dramas.
[0069] A full graph can include nodes and edges, such as Figure 3 As shown, nodes are represented by circles, and edges are represented by line segments between two circles. Each node in the full graph corresponds to an entity.
[0070] The full graph is a weighted graph, meaning that the edges between two nodes have weights, which can be determined based on the content corresponding to the entities. The process of determining the edge weights will be described later.
[0071] After constructing the full graph, it can be divided into at least one group, for example, see [link to full graph]. Figure 3 The full graph is divided into 3 groups, and the entities in each group are the entities corresponding to the nodes in the corresponding group.
[0072] By constructing a full graph and dividing it, the various groups can be easily obtained.
[0073] In some embodiments, determining the weights between pairs of entities in at least one entity includes:
[0074] For each entity among the at least one entity, keywords are extracted from the description information of each entity, and the weight of the keywords is determined. The weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong. The similarity between the pairs of entities is determined. Based on the weight of the common keywords of the pairs of entities and / or the similarity between the pairs of entities, the weight between the pairs of entities is determined.
[0075] Taking two entities as the first entity and the second entity as an example, the weight between the first entity and the second entity can be determined based on the weight of the common keywords of the first entity and the second entity, and / or the similarity between the first entity and the second entity.
[0076] The common keywords of the first entity and the second entity refer to the keywords included in both the description information of the first entity and the description information of the second entity.
[0077] For example, if an entity is the name of a film or television series with multiple versions, the entity's descriptive information may include: the actors, director, release date, and plot synopsis of the version of the film or television series corresponding to that name.
[0078] Keywords can be specific content in the description information, such as the character's name, the actor who plays a certain role, the director's name, the release date, etc.
[0079] For each entity, a forward index can be created between the entity and keywords, and event summaries. Keywords can also be called features.
[0080] A forward index refers to the relationship between entities, features / keywords, and event summaries, as shown in Table 1:
[0081] Table 1
[0082]
[0083] Inverted indexes can be created based on forward indexes.
[0084] An inverted index refers to the relationship between features / keywords and entities, as shown in Table 2:
[0085] Table 2
[0086] Features / Keywords entity X1 {Season 1 of A, Season 2 of A, ...} Y1 {B Part 1, ..., C Season 1, ...} comedy {A Season 1, ... B Season 1, ...}
[0087] The weight of each keyword is inversely proportional to the frequency of its occurrence and directly proportional to the weight of the domain to which the keyword belongs.
[0088] For example, keyword weight is represented by `weight(freq, field_imp)`, where `freq` is the frequency of the keyword's occurrence, and `field_imp` is the weight of the keyword's domain. The frequency of a keyword can be represented by the total number of occurrences of that keyword in the entire dataset. For example, if the keyword is "comedy," then the total number of occurrences of "comedy" in the entire dataset can be used as the frequency of the keyword "comedy." The domain of a keyword refers to the field corresponding to that keyword. For example, if X1 is a character name, then "character" is the domain of the keyword "X1"; if Y1 is an actor name, then "actor" is the domain of the keyword "Y1"; and "country X" is the domain of the country. The weights of each domain can be preset. Generally speaking, the weight of "country" is greater than that of "actor," "director," etc.
[0089] Keyword weight is calculated using weight(freq, field_imp), which is inversely proportional to freq (the larger freq is, the smaller the keyword weight) and directly proportional to field_imp (the larger field_imp is, the larger the keyword weight). The specific expression can be set according to actual needs; for example, weight(freq, field_imp) = field_imp / freq.
[0090] The weights are generally values between 0 and 1.
[0091] The similarity between pairs of entities can be determined based on event summaries in the descriptive information. For example, if two entities can be referred to as Entity 1 and Entity 2, then the event summaries of Entity 1 and Entity 2 can be used as input to a deep learning model. The output of the deep learning model is the similarity between Entity 1 and Entity 2. A deep learning model is a model used to calculate similarity, such as ErnieSim.
[0092] Similarity is generally a value between 0 and 1.
[0093] The weight between the first entity and the second entity can be calculated based on the weight of the shared keywords between the two entities and the similarity between the two entities. Specifically, the weight of the shared keywords between the two entities and the similarity between the two entities can be added together to obtain the weight between the first entity and the second entity.
[0094] For example, the keywords of the first entity include: X1, X2, X3, and the keywords of the second entity include: X1, X2, Y1, Y2. Since X1 and X2 are common keywords of the first and second entities, the weight between the first and second entities is equal to the weight of X1 plus the weight of X2 plus the similarity between the first and second entities.
[0095] Determining the weights between entities by using the weights of keywords in their descriptions and the similarity between entities allows for the consideration of more dimensions of information, improving the accuracy of weight determination. Furthermore, for keyword weights, different weights can be assigned based on the domain to which the keywords belong, enhancing the expressive power of keyword weights.
[0096] After obtaining at least one entity and determining the weights between any two entities, a full graph can be constructed. A full graph consists of nodes and edges; each node corresponds to one entity, and the weight of an edge between two nodes is the weight between the two entities corresponding to those nodes.
[0097] Furthermore, if the weight between two entities is less than a preset value, then no edge needs to be built between the nodes corresponding to these two entities. For example, if the weight between the first entity and the second entity is less than the preset value, then there is no connection between the node corresponding to the first entity and the node corresponding to the second entity, that is, there is no edge.
[0098] Taking the physical entity as the title of a film or television drama as an example, it is possible to construct such as Figure 5The graph shown is a full graph. For example, if the weight between A (Season 1) and B (Part 1) is less than a preset value, then there is no edge between the node corresponding to A (Season 1) and the node corresponding to B (Part 1). If the weight between two entities is greater than or equal to the preset value, then there is an edge between the nodes corresponding to these two entities. For example, there is an edge between the node corresponding to A (Season 4) and the node corresponding to B (Part 1).
[0099] After constructing the full graph, it can be divided into at least one group.
[0100] One approach is to use a community detection algorithm to partition the entire graph.
[0101] After processing by the community detection algorithm, for example... Figure 5 After the full graph shown is divided, it can be divided into: Figure 6 The diagram shows multiple groups, with different groups represented by different filling methods.
[0102] In some embodiments, dividing the full graph into at least one group includes:
[0103] Determine a variable matrix, wherein each element value in the variable matrix is used to indicate whether any two entities belong to the same group;
[0104] Construct constraints, which include: constraints on the semantic similarity between pairs of entities, and / or, constraints with specific settings;
[0105] Based on the constraints, and with maximizing modularity as the objective function, the optimal matrix of the variable matrix is determined;
[0106] Based on the element values in the optimal matrix, the full graph is divided into at least one group.
[0107] The variable matrix can also be called the Kronecker function matrix. Assuming there are N entities when constructing the full graph, the variable matrix can be an N*N matrix. Let Aij represent the element in the i-th row and j-th column of this matrix, where Aij = 0 or 1. Aij = 0 indicates that the i-th entity and the j-th entity do not belong to the same group, and Aij = 1 indicates that the i-th entity and the j-th entity belong to the same group. i and j are both positive integers between 1 and N.
[0108] Modularity is an evaluation metric used in community detection (or community analysis) to assess the quality of community partitioning. It is related to the total number of edges within each community and the total number of edges in the entire graph.
[0109] In this embodiment, each group can be considered as a community in the community detection algorithm. Since the variable matrix can reflect whether entities are in the same group, that is, it is related to the number of edges in each community. Therefore, the modularity is a function of the variable matrix.
[0110] Furthermore, we can take maximizing modularity as the objective function, determine the optimal matrix of the variable matrix, and divide the full graph based on the optimal matrix. For example, if Aij = 1 in the optimal matrix, then the i-th entity and the j-th entity are divided into the same group.
[0111] When solving the objective function, constraints can also be set. In this embodiment, constraints may include: semantic similarity constraints between pairs of entities, and / or, specifically set constraints.
[0112] For example, if the semantic similarity between the i-th entity and the j-th entity is less than the preset semantic similarity, then the constraint condition can be determined as Aij = 0. That is, based on semantic similarity, one or more Aij values can be forcibly limited.
[0113] Specific constraints refer to constraints that can be set manually according to special circumstances. For example, if the i-th entity and the j-th entity are the names of two movies or TV series, and the countries in which these two movies or TV series are released are different, then Aij corresponding to these two entities can be forcibly set to 0.
[0114] After determining the variable matrix, constraints, and objective function, the objective function can be summed based on the constraints to obtain the optimal matrix of the variable matrix.
[0115] Various optimization algorithms can be used to solve this problem, such as greedy algorithms, simulated annealing, or open-source solvers to obtain the optimal solution to the objective function, i.e., the optimal matrix corresponding to the variable moments. This optimal matrix can then be used to obtain the grouping results for the entire graph. For example, if the optimal matrix is A*, and the element Aij = 0 in A*, it indicates that the i-th entity and the j-th entity belong to the same group.
[0116] Maximizing modularity yields higher-quality segmentation results, resulting in better grouping. Constructing constraints based on semantic similarity allows for consideration of the semantic information of the content corresponding to entities during grouping, leading to a better understanding of each entity and further improving grouping effectiveness. Specific constraint settings can also meet users' personalized constraint requirements.
[0117] In some embodiments, the semantic similarity between the pairs of entities is determined based on the semantic features of each entity in the at least one entity. The method further includes: extracting semantic features of each entity in the at least one entity, the semantic features including semantic features of multiple modalities.
[0118] That is, when extracting semantic features of entities, semantic features of multiple modalities can be extracted.
[0119] Modality refers to the form in which information is represented, which can specifically include text, audio, video, images, etc.
[0120] Multimodal semantic features refer to the ability to extract semantic features from at least two modalities, such as extracting text semantic features and image semantic features.
[0121] Specifically, taking the title of a film or television series as an example, semantic features of multiple modalities can be obtained from the plot descriptions, videos, and other information corresponding to each entity. For instance, by using a fine-tuned ERNIE pre-trained language model to process the plot description information, the textual semantic features f_text(e) corresponding to the entity can be obtained. Image semantic features f_image(e) can be obtained from the images in the video using image feature extractors such as ResNet. Therefore, for each entity, semantic features of multiple modalities, such as textual semantic features and image semantic features, can be obtained.
[0122] Semantic features are generally in vector form. Therefore, we can use the method of calculating the similarity between vectors to calculate the similarity between two semantic features of the same modality of two entities, which can be used as the similarity of two entities in one modality. For semantic features of multiple modalities, the average of the similarity of the semantic features of each modality can be used as the semantic similarity between pairs of entities.
[0123] By acquiring semantic features of entities across multiple modalities, the expressive power of semantic features can be improved, thereby enhancing grouping effectiveness.
[0124] Figure 7 This is a schematic diagram based on the seventh embodiment of the present disclosure. This embodiment provides a search method, which includes:
[0125] 701. Obtain at least one entity.
[0126] in, Figure 7 In Chinese, the full entity set is used to represent the dataset. The full entity set is an existing dataset that can include a large number of entities, such as multiple versions of movies and TV series.
[0127] Therefore, at least one entity can be obtained from the full set of entities.
[0128] 702. Construct an inverted index between keywords and entities.
[0129] in, Figure 7 The representation is constructed using keywords and entity IDs.
[0130] Keywords can be extracted from the entity's description information, and different entities can be identified with different entity IDs, thereby constructing an inverted index between keywords and entities.
[0131] 703. Calculate the weight of keywords.
[0132] The weight of a keyword can be inversely proportional to its frequency of occurrence and directly proportional to the weight of the domain to which it belongs.
[0133] Furthermore, the similarity between two entities can be determined based on their descriptive information.
[0134] Furthermore, the weight between two entities can be calculated based on the weight of their shared keywords and their similarity.
[0135] 704. Construct the full graph.
[0136] In this approach, each entity in at least one entity can be associated with a node. If the weight between two entities is less than a preset value, there is no edge between the nodes corresponding to these two entities. If the weight between two entities is greater than or equal to the preset value, there is an edge between the nodes corresponding to these two entities.
[0137] A full graph can be constructed based on nodes and edges.
[0138] 705. For each entity in at least one entity, obtain the semantic features of each entity.
[0139] Semantic features can include semantic features from multiple modalities, such as textual semantic features and image semantic features.
[0140] 706. Employ a community detection optimization algorithm to partition the entire graph based on the semantic features of each entity, thereby obtaining at least one group.
[0141] At least one group is in Figure 7 The results of the community division are represented in the Chinese. Different groups can correspond to different tasks. For example, task-1 corresponds to the first group, task-2 corresponds to the second group, ..., task-N corresponds to the Nth group, where N is a positive integer.
[0142] The semantic features of each entity can serve as constraints. In addition, constraints can also include specific constraints, which are constraints set according to requirements.
[0143] 701-706 can be offline processes.
[0144] 707. Receive search terms.
[0145] For example, a search engine can receive search terms (queries) entered by the user.
[0146] 708. Determine the main demand entity corresponding to the search term.
[0147] When the search term is the name of a specific version of a TV series or movie, the name of the main demand entity can be the same as the name of the search term, i.e., the name of the specific version of the TV series or movie that the user is searching for.
[0148] 709. Determine the group to which the main demand entity belongs, obtain the entities within the group, and display the entities within the group as search results to the user.
[0149] in, Figure 7 The Chinese version uses task recognition and community information acquisition.
[0150] During the offline process, a mapping relationship can be established between entities and groups. Based on this mapping relationship, the group to which the main requested entity belongs can be determined, and the entities within that group can be retrieved. Subsequently, the entities within that group can be displayed to the user as search results.
[0151] 707-709 can be online processes.
[0152] It is understood that for any content not described in detail in this embodiment, please refer to the relevant descriptions in other embodiments.
[0153] It is understandable that, unless there is a necessary timing constraint, the timing relationship between the above steps is not constrained.
[0154] In this embodiment, keyword weights can be determined in an unsupervised manner. During grouping, explicit features (weights between entities) and implicit features (semantic features) can be fused. The semantic features can be multimodal, thereby improving the grouping effect. For specific tasks, specific constraints can be set, thus enabling task customization within a general task framework, further improving performance, and ultimately achieving intelligent and diversified satisfaction of user search needs.
[0155] Figure 8 The diagram is based on the eighth embodiment of the present disclosure. This embodiment provides a search device 800, which includes: a first determining module 801, a second determining module 802, and a display module 803.
[0156] The first determining module 801 is used to determine the main demand entity corresponding to the search term, and the main demand entity is used to satisfy the main demand of the search term; the second determining module 802 is used to determine the group to which the main demand entity belongs, and obtain the entities within the group; the display module 803 is used to display the entities within the group.
[0157] In some embodiments, the second determining module 802 is further configured to: determine the group to which the main demand entity belongs based on a pre-established mapping relationship between entities and groups, wherein the group is obtained by dividing a pre-constructed full graph, the full graph includes at least one group, each group in the at least one group includes at least one node, and each node in the at least one node corresponds to an entity.
[0158] In this embodiment of the disclosure, by determining the group to which the main demand entity belongs and using the entities within that group as search results, all entities related to the main demand entity can be used as search results, rather than only the main demand entity. This can improve the completeness and richness of search results and enhance search effectiveness.
[0159] Figure 9 This is a schematic diagram according to the ninth embodiment of the present disclosure. This embodiment provides a grouping device 900, which includes: an acquisition module 901 and a grouping module 902.
[0160] The acquisition module 901 is used to acquire at least one entity; the grouping module 902 is used to divide the at least one entity into at least one group, each group including at least one entity, each group being used to determine the group to which the main demand entity belongs based on the main demand entity, the main demand entity being determined based on the search term, and the entity within the group to which the main demand entity belongs being the search result corresponding to the search term.
[0161] In some embodiments, the grouping module includes: a determining unit for determining the weights between any two entities in the at least one entity; a constructing unit for constructing a full graph based on the at least one entity and the weights between any two entities, the full graph including at least one node, each node in the at least one node corresponding to each entity in the at least one entity, and the weights of the edges between any two nodes in the at least one node being the weights between any two entities; and a partitioning unit for partitioning the full graph into at least one group.
[0162] In some embodiments, the determining unit is further configured to: extract keywords from the description information of each entity among the at least one entity, and determine the weight of the keywords, wherein the weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong; determine the similarity between the pairs of entities; and determine the weight between the pairs of entities based on the weight of the common keywords of the pairs of entities and / or the similarity between the pairs of entities.
[0163] In some embodiments, the partitioning unit is further configured to: determine a variable matrix, wherein each element value in the variable matrix indicates whether any pair of entities belong to the same group; construct constraints, including: constraints on the semantic similarity between pairs of entities, and / or, specifically configured constraints; determine an optimal matrix of the variable matrix based on the constraints, with maximizing modularity as the objective function; and partition the full graph into at least one group based on the element values in the optimal matrix.
[0164] In some embodiments, the semantic similarity between the pairs of entities is determined based on the semantic features of each entity in the at least one entity. The apparatus further includes an extraction module for extracting semantic features of each entity in the at least one entity, the semantic features including semantic features of multiple modalities.
[0165] In this embodiment of the disclosure, by dividing entities into groups, the group to which the main demand entity belongs can be determined during the search, and the entities within that group can be used as search results. This allows all entities related to the main demand entity to be used as search results, rather than only the main demand entity, thereby improving the completeness and richness of search results and enhancing search effectiveness.
[0166] It is understood that the same or similar content in different embodiments of this disclosure can be referred to each other.
[0167] It is understood that the terms "first" and "second" in the embodiments of this disclosure are only used for distinction and do not indicate the degree of importance or the order of events.
[0168] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0169] Figure 10A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0170] like Figure 10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. The RAM 1003 may also store various programs and data required for the operation of the electronic device 1000. The computing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0171] Multiple components in electronic device 1000 are connected to I / O interface 1005, including: input unit 1006, such as keyboard, mouse, etc.; output unit 1007, such as various types of displays, speakers, etc.; storage unit 1008, such as disk, optical disk, etc.; and communication unit 1009, such as network card, modem, wireless transceiver, etc. Communication unit 1009 allows electronic device 1000 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0172] The computing unit 1001 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as search methods or grouping methods. For example, in some embodiments, the search method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via ROM 1002 and / or communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the search method or grouping method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to perform a search method or a grouping method by any other suitable means (e.g., by means of firmware).
[0173] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0174] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0175] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0176] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0177] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0178] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0179] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0180] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A search method, comprising: Determine the primary demand entity corresponding to the search term, wherein the primary demand entity is used to satisfy the primary demand of the search term; Determine the group to which the main demand entity belongs, and obtain the entities within the group; Display the entities within the group; Determining the group to which the main demand entity belongs includes: Based on the pre-established mapping relationship between entities and groups, the group to which the main demand entity belongs is determined. The group is obtained by dividing a pre-constructed full graph. The full graph includes at least one group, and each group in the at least one group includes at least one node. Each node in the at least one node corresponds to an entity. Each entity has multiple modal semantic features. The at least one group is divided in the following manner: Determine the weights between any two entities in the at least one entity; Based on the at least one entity and the weights between each pair of entities, a full graph is constructed. The full graph includes at least one node, each node in the at least one node corresponds to each entity in the at least one entity, and the weight of the edge between each pair of nodes in the at least one node is the weight between each pair of entities. Using the semantic features of multiple modalities of each entity as constraints, and based on the constraints and the weights between each pair of entities, the full graph is divided into at least one group. The weights between each pair of entities are determined in the following manner: For each entity among the at least one entity, keywords are extracted from the description information of each entity, and the weight of the keywords is determined. The weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong. Based on the event summary in the description information, the similarity between the pairs of entities is determined; The weights of the common keywords of the two pairs of entities are added together with the similarity between the two pairs of entities to determine the weight between the two pairs of entities.
2. A grouping method, comprising: Obtain at least one entity; The at least one entity is divided into at least one group, each group including at least one entity, each group being used to determine the group to which the main demand entity belongs based on the main demand entity, the main demand entity being determined based on the search term, and the entity within the group to which the main demand entity belongs being the search result corresponding to the search term. The step of dividing the at least one entity into at least one group includes: Determine the weights between any two entities in the at least one entity; Based on the at least one entity and the weights between each pair of entities, a full graph is constructed. The full graph includes at least one node, each node in the at least one node corresponds to each entity in the at least one entity, and the weight of the edge between each pair of nodes in the at least one node is the weight between each pair of entities. Each entity has semantic features of multiple modalities. Using the semantic features of various modalities of each entity as constraints, and based on the constraints and the weights between each pair of entities, the full graph is divided into at least one group; determining the weights between each pair of entities within at least one entity includes: For each entity among the at least one entity, keywords are extracted from the description information of each entity, and the weight of the keywords is determined. The weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong. Based on the event summary in the description information, the similarity between the pairs of entities is determined; The weights of the common keywords of the two pairs of entities are added together with the similarity between the two pairs of entities to determine the weight between the two pairs of entities.
3. The method according to claim 2, wherein, The step of dividing the full graph into at least one group includes: Determine a variable matrix, wherein each element value in the variable matrix is used to indicate whether any two entities belong to the same group; Construct constraints, which include: constraints on the semantic similarity between pairs of entities; or, the constraints include: constraints on the semantic similarity and constraints with specific settings. Based on the constraints, and with maximizing modularity as the objective function, the optimal matrix of the variable matrix is determined; Based on the element values in the optimal matrix, the full graph is divided into at least one group.
4. A search device, comprising: The first determining module is used to determine the main demand entity corresponding to the search term, wherein the main demand entity is used to satisfy the main demand of the search term; The second determining module is used to determine the group to which the main demand entity belongs, and to obtain the entities within the group; The display module is used to display the entities within the group; The second determining module is further used for: Based on the pre-established mapping relationship between entities and groups, the group to which the main demand entity belongs is determined. The group is obtained by dividing the pre-constructed full graph. The full graph includes at least one group. Each group in the at least one group includes at least one node. Each node in the at least one node corresponds to an entity. Each entity has multiple modal semantic features. The at least one group is divided in the following manner: Determine the weights between any two entities in the at least one entity; Based on the at least one entity and the weights between each pair of entities, a full graph is constructed. The full graph includes at least one node, each node in the at least one node corresponds to each entity in the at least one entity, and the weight of the edge between each pair of nodes in the at least one node is the weight between each pair of entities. Using the semantic features of multiple modalities of each entity as constraints, and based on the constraints and the weights between each pair of entities, the full graph is divided into at least one group. The weights between each pair of entities are determined in the following manner: For each entity among the at least one entity, keywords are extracted from the description information of each entity, and the weight of the keywords is determined. The weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong. Based on the event summary in the description information, the similarity between the pairs of entities is determined; The weights of the common keywords of the two pairs of entities are added together with the similarity between the two pairs of entities to determine the weight between the two pairs of entities.
5. A grouping device, comprising: The acquisition module is used to acquire at least one entity; A grouping module is used to divide the at least one entity into at least one group, each group including at least one entity, each group being used to determine the group to which the main demand entity belongs based on the main demand entity, the main demand entity being determined based on a search term, and the entity within the group to which the main demand entity belongs being the search result corresponding to the search term. The grouping module includes: A determining unit is used to determine the weights between any two entities in the at least one entity; A construction unit is used to construct a full graph based on the at least one entity and the weights between each pair of entities. The full graph includes at least one node, each node in the at least one node corresponds to each entity in the at least one entity, and the weights of the edges between each pair of nodes in the at least one node are the weights between each pair of entities. Each entity has semantic features of multiple modalities. A partitioning unit is used to divide the full graph into at least one group based on the semantic features of multiple modalities of each entity as constraints and the weights between each pair of entities. The determining unit is further configured to: For each entity among the at least one entity, keywords are extracted from the description information of each entity, and the weight of the keywords is determined. The weight of the keywords is inversely proportional to the frequency of occurrence of the keywords and directly proportional to the weight of the domain to which the keywords belong. Based on the event summary in the description information, the similarity between the pairs of entities is determined; The weights of the common keywords of the two pairs of entities are added together with the similarity between the two pairs of entities to determine the weight between the two pairs of entities.
6. The apparatus according to claim 5, wherein, The partitioning unit is further used for: Determine a variable matrix, wherein each element value in the variable matrix is used to indicate whether any two entities belong to the same group; Construct constraints, which include: constraints on the semantic similarity between pairs of entities; or, the constraints include: constraints on the semantic similarity and constraints with specific settings. Based on the constraints, and with maximizing modularity as the objective function, the optimal matrix of the variable matrix is determined; Based on the element values in the optimal matrix, the full graph is divided into at least one group.
7. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-3.
8. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-3.
9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-3.
Citation Information
Patent Citations
Method for auto constructing classified catalogue and relevant system
CN101364239A
Search result display method and search result display device
CN103914566A
Method for calculating short text semantic similarity
CN106844350A