Resource query method and device, server and storage medium

By constructing a comprehensive attribute connectivity graph and filtering target resources that match reference features, the problem of low resource query efficiency is solved, and an efficient and orderly resource query process is achieved.

CN116932841BActive Publication Date: 2026-05-12TSINGHUA UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2023-07-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

The efficiency of resource query in existing technologies is relatively low, mainly due to the large amount of computation required by the large resource database.

Method used

By constructing a comprehensive attribute connectivity graph and using the fusion of the full attribute connectivity graph and the same attribute connectivity graph, target resources that match the reference features are filtered and selected, reducing the number of query resources. The target resources are then used as new initial resources for repeated queries until no new target resources can be selected.

Benefits of technology

It effectively reduces the computational load of resource queries, improves query efficiency and speed, and ensures the orderliness and convenience of queries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932841B_ABST
    Figure CN116932841B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a resource query method and device, a server, a storage medium and a computer program product. The method comprises: in response to a resource query request, obtaining a reference feature and an attribute condition of a resource to be queried; filtering, according to the attribute condition, a resource to be filtered in associated resources of an initial resource in a comprehensive attribute connected graph, and screening a target resource matching the reference feature from the filtered associated resources; taking the target resource as a new initial resource, and jumping to the step of filtering, according to the attribute condition, a resource to be filtered in associated resources of an initial resource in a comprehensive attribute connected graph, and screening a target resource matching the reference feature from the filtered associated resources, until no new target resource can be screened; and obtaining a resource query result corresponding to the resource query request according to each target resource screened. The method can improve resource query efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a resource query method, apparatus, server, storage medium, and computer program product. Background Technology

[0002] With the development of computer technology, resource search technology has emerged; for example, using search algorithms to filter out resources that meet given conditions from a large number of resources.

[0003] In related technologies, when searching for resources, the final resource query result is usually determined by calculating the similarity between the representation vector of each resource in the resource library and the input target vector. However, the number of resources in the resource library is very large, resulting in a large amount of computation and thus low resource query efficiency. Summary of the Invention

[0004] This disclosure provides a resource query method, apparatus, server, storage medium, and computer program product to at least solve the problem of low resource query efficiency in related technologies. The technical solution of this disclosure is as follows:

[0005] According to a first aspect of the present disclosure, a resource query method is provided, comprising:

[0006] In response to a resource query request, obtain the reference characteristics and attribute conditions of the resource to be queried;

[0007] Based on the attribute conditions, the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph are filtered, and target resources matching the reference features are selected from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing a full attribute connectivity graph and a connectivity graph of the same attribute for each resource attribute. The full attribute connectivity graph describes the association relationships between resources of each resource attribute, and the connectivity graph of the same attribute describes the association relationships between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that satisfies the attribute conditions, and the resource to be filtered is the resource among the associated resources that does not satisfy the attribute conditions.

[0008] The target resource is used as a new initial resource, and the process jumps to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference feature from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph.

[0009] Based on the selected target resources, the resource query results corresponding to the resource query request are obtained.

[0010] In one exemplary embodiment, before obtaining the reference features and attribute conditions of the resource to be queried in response to a resource query request, the method further includes:

[0011] Obtain a preset resource set; the preset resource set includes resource sets for each resource attribute;

[0012] Based on the similarity between resources in the resource sets of each resource attribute, construct the same-attribute connected graph of each resource attribute, and based on the similarity between resources in the preset resource set, construct the full-attribute connected graph;

[0013] The comprehensive attribute connected graph is obtained by fusing the full-attribute connected graph and the same-attribute connected graphs of each resource attribute.

[0014] In an exemplary embodiment, filtering the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions includes:

[0015] Based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph, determine the filtering parameters of the resources to be filtered in the associated resources of the initial resources in the comprehensive attribute connectivity graph.

[0016] Based on the filtering parameters, the resources to be filtered in the associated resources are filtered to obtain the filtered associated resources.

[0017] In an exemplary embodiment, before filtering the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, the method further includes:

[0018] From the resources in the comprehensive attribute connectivity graph that satisfy the attribute conditions, the initial resources in the comprehensive attribute connectivity graph are determined;

[0019] From the comprehensive attribute connectivity graph, the associated resources of the initial resource are determined;

[0020] From the associated resources, resources that do not meet the attribute conditions are selected as the resources to be filtered.

[0021] In an exemplary embodiment, the step of filtering target resources that match the reference features from the filtered associated resources includes:

[0022] For each resource in the filtered associated resources, determine the similarity between the resource features of the resource and the reference features;

[0023] From the filtered associated resources, resources whose similarity satisfies the first similarity condition are selected as target resources that match the reference features.

[0024] In an exemplary embodiment, obtaining the resource query result corresponding to the resource query request based on the selected target resources includes:

[0025] From the selected target resources, resources whose similarity to the reference features satisfies the second similarity condition are selected;

[0026] Based on the resources selected that satisfy the second similarity condition with the reference features, the resource query result corresponding to the resource query request is determined.

[0027] In an exemplary embodiment, the step of obtaining reference features and attribute conditions of the resource to be queried in response to a resource query request includes:

[0028] The resource query request is parsed to obtain the requesting account and the attribute conditions selected by the requesting account.

[0029] The account characteristics of the requesting account are obtained as reference characteristics of the resource to be queried, and the attribute conditions selected by the requesting account are used as attribute conditions of the resource to be queried.

[0030] According to a second aspect of the present disclosure, a resource query apparatus is provided, comprising:

[0031] The request processing unit is configured to respond to a resource query request and obtain reference characteristics and attribute conditions of the resource to be queried.

[0032] The resource filtering unit is configured to filter resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and to select target resources that match the reference features from the filtered associated resources; wherein, the comprehensive attribute connectivity graph is obtained by fusing the full attribute connectivity graph and the same attribute connectivity graph of each resource attribute, the full attribute connectivity graph is used to describe the association relationship between resources of each resource attribute, and the same attribute connectivity graph is used to describe the association relationship between resources of the same resource attribute; the initial resource is any one of the resources in the comprehensive attribute connectivity graph that satisfies the attribute conditions, and the resource to be filtered is the resource in the associated resources that does not satisfy the attribute conditions;

[0033] The resource filtering unit is configured to perform the step of taking the target resource as a new initial resource and jumping to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference feature from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph.

[0034] The result determination unit is configured to perform resource query results corresponding to the resource query request based on each of the selected target resources.

[0035] In an exemplary embodiment, the apparatus further includes a graph construction unit configured to perform the following operations: acquiring a preset resource set; the preset resource set includes resource sets for each resource attribute; constructing a connected graph of the same attribute for each resource attribute based on the similarity between resources in the resource sets of each resource attribute, and constructing a connected graph of all attributes based on the similarity between resources in the preset resource set; and performing a fusion process on the connected graph of all attributes and the connected graph of the same attribute for each resource attribute to obtain the comprehensive connected graph of attributes.

[0036] In an exemplary embodiment, the resource filtering unit is further configured to perform the following: determine the filtering parameters of the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph; and filter the resources to be filtered in the associated resources according to the filtering parameters to obtain the filtered associated resources.

[0037] In one exemplary embodiment, the apparatus further includes a resource determination unit configured to perform the following operations: determining an initial resource in the comprehensive attribute connectivity graph from resources that satisfy the attribute conditions; determining associated resources of the initial resource from the comprehensive attribute connectivity graph; and filtering out resources that do not satisfy the attribute conditions from the associated resources as the resources to be filtered.

[0038] In an exemplary embodiment, the resource filtering unit is further configured to perform the following: for each resource in the filtered associated resources, determine the similarity between the resource features of the resource and the reference features; and select resources from the filtered associated resources whose similarity satisfies a first similarity condition as target resources that match the reference features.

[0039] In an exemplary embodiment, the result determination unit is further configured to perform the following: from the selected target resources, select resources whose similarity to the reference feature satisfies a second similarity condition; and determine the resource query result corresponding to the resource query request based on the selected resources whose similarity to the reference feature satisfies the second similarity condition.

[0040] In an exemplary embodiment, the request processing unit is further configured to parse the resource query request to obtain the requesting account of the resource query request and the attribute conditions selected by the requesting account; obtain the account characteristics of the requesting account as reference characteristics of the resource to be queried; and use the attribute conditions selected by the requesting account as attribute conditions of the resource to be queried.

[0041] According to a third aspect of the present disclosure, a server is provided, comprising:

[0042] processor;

[0043] Memory used to store the processor's executable instructions;

[0044] The processor is configured to execute the instructions to implement the resource query method as described in any of the preceding claims. According to a fourth aspect of this disclosure, a computer-readable storage medium is provided that, when instructions in the computer-readable storage medium are executed by a processor of a server, enables the server to perform the resource query method as described in any of the preceding claims.

[0045] According to a fifth aspect of the present disclosure, a computer program product is provided, the computer program product including instructions that, when executed by a processor of a server, enable the server to perform the resource query method as described in any of the preceding claims.

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

[0047] In response to a resource query request, the system obtains reference features and attribute conditions for the resource to be queried. Then, based on these attribute conditions, it filters the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph, selecting target resources that match the reference features from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing the full attribute connectivity graph and the same-attribute connectivity graphs for each resource attribute. The full attribute connectivity graph describes the relationships between resources of different attributes, while the same-attribute connectivity graph describes the relationships between resources of the same attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that satisfies the attribute conditions, and the resources to be filtered are the associated resources that do not satisfy the attribute conditions. Next, the target resource is used as a new initial resource, and the system jumps to the step of filtering the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph based on the attribute conditions, selecting target resources that match the reference features from the filtered associated resources, until no new target resources can be selected from the comprehensive attribute connectivity graph. Finally, based on the selected target resources, the resource query results corresponding to the resource query request are obtained. In this way, when performing resource queries, the system first identifies the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph based on attribute conditions. These resources are then filtered, and target resources matching the reference features are selected from the filtered associated resources. This reduces the number of resources that need to be queried, avoiding the computational burden of querying all associated resources of the initial resource. This reduces the computational load of resource queries and improves efficiency. Simultaneously, the selected target resources are used as new initial resources, and the above resource query process is repeated until no new target resources can be selected from the comprehensive attribute connectivity graph. Furthermore, the connectivity between resources with the same attribute and between resources with different attributes in the comprehensive attribute connectivity graph ensures the orderliness and convenience of resource queries while reducing the computational load of each query, thus improving query speed and efficiency.

[0048] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0050] Figure 1 This is a flowchart illustrating a resource query method according to an exemplary embodiment.

[0051] Figure 2This is a schematic diagram illustrating various connected graphs according to an exemplary embodiment.

[0052] Figure 3 This is a schematic diagram illustrating a query for a target resource according to an exemplary embodiment.

[0053] Figure 4 This is a flowchart illustrating the steps for constructing a comprehensive attribute connectivity graph according to an exemplary embodiment.

[0054] Figure 5 This is a schematic diagram illustrating resource attribute pruning according to an exemplary embodiment.

[0055] Figure 6 This is a flowchart illustrating the steps for determining resources to be filtered according to an exemplary embodiment.

[0056] Figure 7 This is a flowchart illustrating another resource query method according to an exemplary embodiment.

[0057] Figure 8 This is a block diagram illustrating a resource query apparatus according to an exemplary embodiment.

[0058] Figure 9 This is a block diagram illustrating a server according to an exemplary embodiment. Detailed Implementation

[0059] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0060] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0061] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0062] Figure 1 This is a flowchart illustrating a resource query method according to an exemplary embodiment, such as... Figure 1 As shown, this resource query method is used in a server; it is understood that this method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc.; portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. The server can be implemented using a standalone server or a server cluster composed of multiple servers. Furthermore, it should be noted that this disclosure can be applied to scenarios such as machine learning, artificial intelligence, pattern recognition, computer vision, big data computing, resource recommendation, and resource search. In this exemplary embodiment, the method includes the following steps:

[0063] In step S110, in response to the resource query request, the reference features and attribute conditions of the resource to be queried are obtained.

[0064] The resources involved in this disclosure refer to videos, advertisements, text, images, etc., and are not specifically limited herein. The accounts involved in this disclosure specifically refer to authorized user accounts. It should be noted that each resource can be represented as a vector, and each resource corresponds to a resource attribute. For example, in the case of a video resource, the resource attribute can be (newly uploaded, high popularity), (not newly uploaded, high popularity), (newly uploaded, low popularity), and (not newly uploaded, low popularity).

[0065] A resource query request refers to the request corresponding to a resource query task, used to query the required resources. It can be triggered by an account or by the resource query system itself. It should be noted that the resource query request includes the reference characteristics and attribute conditions of the resource to be queried.

[0066] The resource to be queried refers to the resource that needs to be queried, such as newly uploaded and popular videos, or newly uploaded videos.

[0067] In this context, reference features refer to the features that help in finding the resource being queried, such as account features, which can be represented as a vector. In practical scenarios, reference features can be the account features of the requesting account in the resource query request, such as interest features.

[0068] Among them, attribute conditions refer to resource attributes used as query conditions, which are also used to help find the resource to be queried, such as (newly uploaded, high popularity) and (not newly uploaded, high popularity).

[0069] Specifically, the server first receives the resource query request sent by the terminal, and then parses the resource query request to obtain the reference characteristics and attribute conditions of the resource to be queried.

[0070] For example, when performing a resource query, an account selects one or more attribute conditions on the resource query interface of the terminal and clicks the query button, triggering the terminal to generate a resource query request, which is then sent to the corresponding server. The server parses the received resource query request to obtain the attribute conditions selected by the account as the attribute conditions of the resource to be queried, and at the same time obtains the account characteristics as reference characteristics of the resource to be queried.

[0071] For example, when making resource recommendations, an account opens the resource recommendation interface on the terminal, triggering the terminal to generate a resource query request, which is then sent to the corresponding server. The server parses the received resource query request to obtain the historical attribute conditions selected by the account to be recommended, which are used as the attribute conditions of the resource to be queried. At the same time, the server obtains the interest characteristics of the account to be recommended, which are used as reference characteristics of the resource to be queried.

[0072] In step S120, based on the attribute conditions, the resources to be filtered in the associated resources of the initial resources in the comprehensive attribute connectivity graph are filtered, and the target resources that match the reference features are selected from the filtered associated resources.

[0073] The comprehensive attribute connectivity graph is obtained by fusing the full attribute connectivity graph and the same attribute connectivity graph of each resource attribute. The full attribute connectivity graph is used to describe the relationship between resources of each resource attribute, and the same attribute connectivity graph is used to describe the relationship between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that meets the attribute conditions, and the resource to be filtered is the resource in the associated resources that does not meet the attribute conditions.

[0074] Among them, a connected graph with the same attribute is a connected graph constructed using the similarity between resources with the same resource attribute, ensuring the connectivity between resources with the same resource attribute in the graph, for example... Figure 2 The graphs a1, a2, a3, and a4 are connected by the same attribute. A connected graph with the same attribute includes multiple resources with the same resource attribute, and similar resources are connected by edges; that is, resources with a similarity greater than a preset similarity are connected by edges. Furthermore, each resource attribute corresponds to one connected graph with the same attribute, and resources within the same connected graph share the same resource attribute, such as (newly uploaded, high popularity).

[0075] It should be noted that this disclosure only builds graph indexes for each resource with the same resource attribute, rather than constructing graph indexes for resource sets composed of combinations of resource attributes. This effectively avoids the problem of excessive subgraphs and high overhead caused by the filtering-then-search method. Moreover, this disclosure uses this method to ensure good connectivity between resources with the same resource attribute, regardless of the number of resource attribute values. At the same time, it retains a query starting point in each connected graph with the same attribute, allowing the query phase to directly start the query from the corresponding connected graph with the same attribute based on attribute conditions.

[0076] Among them, a fully attribute-based connected graph is a connected graph constructed using the similarity between resources with different resource attributes (i.e., all resource attributes), ensuring the connectivity between resources with different resource attributes in the graph. For example... Figure 2 The fully connected graph b1 in the image is an example. This graph contains resources with multiple distinct attributes, and similar resources are connected by edges; that is, resources with a similarity greater than a preset similarity are connected. Furthermore, each resource attribute corresponds to a single fully connected graph, and the resources within these graphs possess different attributes, such as (newly uploaded, high popularity), (not newly uploaded, high popularity), (newly uploaded, low popularity), and (not newly uploaded, low popularity).

[0077] It should be noted that this disclosure establishes a fully connected graph for all resource attributes. On the one hand, the fully connected graph is beneficial for querying multiple attribute conditions. On the other hand, the fully connected graph connects various connected graphs with the same attribute, forming a subgraph containing any combination of attribute conditions. Therefore, this disclosure does not need to build more graphs and can support any combination of attribute conditions with lower construction overhead.

[0078] The comprehensive attribute connectivity graph is obtained by merging a full attribute connectivity graph and the same attribute connectivity graphs for each resource attribute. This ensures connectivity between resources with the same attribute, as well as connectivity between resources with different attributes. For example... Figure 2 The comprehensive attribute connected graph c1 in the graph.

[0079] It should be noted that the resource set formed by the resources involved in the same-attribute connected graph of each resource attribute is the same as the resource set formed by the resources involved in the full-attribute connected graph, and also the resource set formed by the resources involved in the comprehensive-attribute connected graph. For example, refer to... Figure 2 By summing up the resources included in the connected graphs a1, a2, a3, and a4 of the same attribute, we can obtain the resources included in the connected graph b1 of all attributes.

[0080] When performing the first resource query on the comprehensive attribute connectivity graph, it is necessary to determine an initial resource. This initial resource can be a pre-specified query resource in the same attribute connectivity graph corresponding to the attribute conditions, or it can be any one of the resources in the comprehensive attribute connectivity graph that meets the attribute conditions.

[0081] Among them, the associated resources of the initial resource refer to the resources that have a connection edge with the initial resource in the comprehensive attribute connected graph, specifically the resources that are similar to the initial resource in the comprehensive attribute connected graph.

[0082] In this context, the resources to be filtered are those among the associated resources of the initial resource in the comprehensive attribute connectivity graph that do not meet the attribute conditions. Specifically, these represent resources that may need to be filtered. For example, if the associated resources of the initial resource A1 are B1, B2, B3, B4, and B5, and the resource attributes and attribute conditions for B1, B2, and B3 are the same, while the resource attributes and attribute conditions for B4 and B5 are different, then B4 and B5 are resources to be filtered. Furthermore, if a resource is filtered out, the server will not access that resource; that is, distance calculation will not be performed for that resource. If a resource is not filtered out, it will be accessed normally using the greedy vector distance method.

[0083] It's important to note that different levels of filtering (such as pruning) are applied under varying numbers of attribute conditions; specifically, the more attribute conditions there are, the weaker the filtering intensity. This adaptive approach is because with fewer attribute conditions, a high search recall can be achieved simply by examining subgraphs that satisfy the conditions. Therefore, resources that don't meet the conditions are filtered more strongly to accelerate resource searching. Conversely, with more attribute conditions, resources that don't meet the conditions are filtered less strongly to maintain better connectivity.

[0084] Among them, the filtered associated resources include resources other than the resources to be filtered, as well as the resources remaining after filtering the resources to be filtered; for example, in the example above, the resource remaining after filtering the resources to be filtered (B4, B5) is B4, which means that the filtered associated resources are B1, B2, B3, and B4.

[0085] Among them, the target resource that matches the reference feature refers to the resource among the filtered associated resources whose corresponding resource feature (such as attribute feature) has the highest matching degree with the reference feature.

[0086] Specifically, the server randomly selects a resource from the resources that satisfy the attribute conditions in the comprehensive attribute connectivity graph as the initial resource in the graph. Based on the connection relationships between resources in the graph, it determines the associated resources of the initial resource and identifies resources that do not satisfy the attribute conditions from among the associated resources, which are then designated as the filtering resources. Next, based on the attribute conditions, the filtering processes are applied to the filtering resources in the associated resources to obtain the filtered associated resources. For example, the more attribute conditions there are, the lower the probability of filtering the filtering resources in the associated resources; the fewer attribute conditions there are, the higher the probability of filtering the filtering resources in the associated resources. Finally, from the filtered associated resources, the resource with the highest matching degree between its corresponding resource features and reference features is selected as the target resource for this selection.

[0087] For example, see reference. Figure 3 Suppose that in the comprehensive attribute connectivity graph, the initial resource is C1, and the resources connected to the initial resource C1 are D1, D2, D3, D4, D5, and D6. This indicates that resources similar to the initial resource C1 are D1, D2, D3, D4, D5, and D6, and further indicates that the associated resources of the initial resource are D1, D2, D3, D4, D5, and D6. Next, the server obtains the resource attributes of D1, D2, D3, D4, D5, and D6, and determines whether the resource attributes of D1, D2, D3, D4, D5, and D6 satisfy the attribute conditions. Among them, the resource attributes of D1, D2, and D3 are the same as the attribute conditions, while the resource attributes of D4, D5, and D6 are different from the attribute conditions, indicating that D1, D2, and D6 are similar to the initial resource C1. D3 satisfies the attribute conditions, while D4, D5, and D6 do not, indicating that D4, D5, and D6 are resources to be filtered. Next, the server filters these resources D4, D5, and D6 with a certain filtering probability. If D5 and D6 are filtered out from the remaining resources, the associated resources after filtering are D1, D2, D3, and D4. Finally, the server calculates the similarity between the resource features corresponding to D1, D2, D3, and D4 and the reference features. Assuming that among D1, D2, D3, and D4, D2 has the highest similarity to the reference features, it means that D2 matches the reference features, thus indicating that D2 is the target resource selected in this filtering process. It should be noted that... Figure 3 This is a partial schematic diagram of the comprehensive attribute connectivity graph.

[0088] In step S130, the target resource is used as a new initial resource, and the process jumps to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference features from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph.

[0089] In this context, "unable to find new target resources from the comprehensive attribute connectivity graph" means that the target resources selected from the comprehensive attribute connectivity graph are the same as the previously selected target resources. For example, if the already selected target resources are M1, M2, M3, M4, and M5, and the target resource selected this time is M4, which is the same as the previously selected target resources, then the query ends.

[0090] Specifically, the server uses the target resource selected in the first screening as the new initial resource and continues to execute step S120 until the target resource selected from the comprehensive attribute connectivity graph is the same as the previously selected target resource, at which point the query ends. For example, after determining the new initial resource, the server determines the associated resources of the new initial resource from the comprehensive attribute connectivity graph based on the connection relationships between resources. Then, it identifies resources from the associated resources of the new initial resource that do not meet the attribute conditions and uses them as the filtering resources in the associated resources of the new initial resource. Next, based on the attribute conditions, it performs corresponding filtering processing on the filtering resources in the associated resources of the new initial resource to obtain the filtered associated resources. Finally, from the filtered associated resources, it selects the resource with the highest matching degree between the corresponding resource feature and the reference feature, as the target resource selected in the second screening. If the target resource selected in the second screening is different from the target resource selected in the first screening, the target resource selected in the second screening is used as the new initial resource, and step S120 continues to execute until the target resource selected from the comprehensive attribute connectivity graph is the same as the previously selected target resource, at which point the query ends.

[0091] For example, refer to Figure 3Following the example above, D2 is the target resource selected in the first round of filtering. Next, the server uses D2 as the new initial resource for a second resource query. Specifically, the server determines from the comprehensive attribute connectivity graph that the resources connected to D2 are E1, E2, E3, E4, E5, E6, and C1. This indicates that resources similar to D2 are E1, E2, E3, E4, E5, E6, and C1, thus indicating that the associated resources of D2 are E1, E2, E3, E4, E5, E6, and C1. Next, the server obtains the resource attributes of E1, E2, E3, E4, E5, E6, and C1 and determines whether their resource attributes satisfy the attribute conditions. Since the resource attributes of E1, E2, E3, and C1 are the same as the attribute conditions, while the resource attributes of E4, E5, and E6 are different, this indicates that E1, E2, E3, and C1 satisfy the attribute conditions. E4, E5, and E6 do not meet the attribute conditions, thus indicating that E4, E5, and E6 are the resources to be filtered in this step. Next, the server filters the resources to be filtered (E4, E5, E6) in the associated resources (E1, E2, E3, E4, E5, E6, C1) of D2 with a certain filtering probability. E5 and E6 are filtered out, indicating that the associated resources after filtering are E1, E2, E3, E4, and C1. Finally, the server calculates the similarity between the resource features corresponding to E1, E2, E3, E4, and C1 and the reference features. Assuming that among E1, E2, E3, E4, and C1, the resource feature corresponding to E3 has the highest similarity to the reference feature, it means that E3 matches the reference feature, thus indicating that E3 is the target resource selected in the second screening.

[0092] Further, refer to Figure 3E3 is the target resource selected in the second screening. Next, the server uses E3 as the new initial resource and performs a third resource query. Specifically, the server determines from the comprehensive attribute connectivity graph that the resources connected to E3 are F1, F2, F3, F4, F5, F6, and D2. This indicates that resources similar to E3 are F1, F2, F3, F4, F5, F6, and D2, thus indicating that the associated resources of E3 are F1, F2, F3, F4, F5, F6, and D2. Next, the server obtains the resource attributes of F1, F2, F3, F4, F5, F6, and D2 and determines whether their resource attributes satisfy the attribute conditions. If the resource attributes of F1, F2, F3, and D2 are the same as the attribute conditions, while the resource attributes of F4, F5, and F6 are different, then F1, F2, F3, and D2 satisfy the attribute conditions. F4, F5, and F6 do not meet the attribute conditions, thus indicating that F4, F5, and F6 are the resources to be filtered in this step. Next, the server filters the resources to be filtered (F4, F5, F6) in the associated resources (F1, F2, F3, F4, F5, F6, D2) of E3 with a certain filtering probability. F5 and F6 are filtered out, indicating that the associated resources after filtering are F1, F2, F3, F4, and D2. Finally, the server calculates the similarity between the resource features corresponding to F1, F2, F3, F4, and D2 and the reference features. Assuming that among F1, F2, F3, F4, and D2, F4 has the highest similarity between its resource features and the reference features, it means that F4 matches the reference features, thus indicating that F4 is the target resource selected in the third screening.

[0093] Furthermore, refer to Figure 3F4 is the target resource selected in the third screening. Next, the server uses F4 as the new initial resource and performs a fourth resource query. Specifically, from the comprehensive attribute connectivity graph, the server determines that the resources connected to F4 are G1, G2, G3, G4, G5, G6, E3, and D2. This indicates that the resources similar to F4 are G1, G2, G3, G4, G5, G6, E3, and D2, further indicating that the associated resources of F4 are G1, G2, G3, G4, G5, G6, E3, and D2. Then, the server retrieves G1, G2, G3, G4, and G5... Determine the resource attributes of G1, G2, G3, G4, G5, G6, E3, and D2, and determine whether the resource attributes of G1, G2, G3, G4, G5, G6, E3, and D2 satisfy the attribute conditions. If the resource attributes of G1, G2, G3, E3, and D2 are the same as the attribute conditions, while the resource attributes of G4, G5, and G6 are different, then G1, G2, G3, E3, and D2 satisfy the attribute conditions, while G4, G5, and G6 do not. This further indicates that... G4, G5, and G6 are the resources to be filtered in this step. Next, the server filters the resources to be filtered (G4, G5, G6) from the associated resources (G1, G2, G3, G4, G5, G6, E3, D2) of F4 with a certain filtering probability. G4 and G5 are filtered out, indicating that the associated resources after filtering are G1, G2, G3, G6, E3, and D2. Finally, the server calculates the similarity between the resource features and reference features corresponding to G1, G2, G3, G6, E3, and D2 respectively. Assuming that among G1, G2, G3, G6, E3, and D2, the resource feature corresponding to D2 has the highest similarity to the reference feature, it means that D2 matches the reference feature, and thus D2 is the target resource selected in the fourth filtering step. However, since D2 is the same as the target resource selected in the first filtering step, the query ends, indicating that the final target resources obtained are D2, E3, and F4.

[0094] In step S140, resource query results corresponding to resource query requests are obtained based on the selected target resources.

[0095] Specifically, the server selects the top N target resources (N is a positive integer) based on the similarity between the resource characteristics and reference characteristics of each selected target resource, and uses these as the resource query results corresponding to the resource query request.

[0096] For example, the server may use the target resource with the highest similarity as the resource query result corresponding to the resource query request; or, the server may use the target resource with a similarity greater than a certain threshold as the resource query result corresponding to the resource query request.

[0097] In the above resource query method, in response to a resource query request, reference features and attribute conditions of the resource to be queried are obtained. Then, based on the attribute conditions, the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph are filtered, and target resources matching the reference features are selected from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing the full attribute connectivity graph and the same attribute connectivity graph of each resource attribute. The full attribute connectivity graph is used to describe the association relationship between resources of each resource attribute, and the same attribute connectivity graph is used to describe the association relationship between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that meets the attribute conditions, and the resources to be filtered are the resources in the associated resources that do not meet the attribute conditions. Next, the target resource is used as a new initial resource, and the process jumps to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph based on the attribute conditions, and selecting target resources matching the reference features from the filtered associated resources, until no new target resources can be selected from the comprehensive attribute connectivity graph. Finally, based on the selected target resources, the resource query result corresponding to the resource query request is obtained. In this way, when performing resource queries, the system first identifies the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph based on attribute conditions. These resources are then filtered, and target resources matching the reference features are selected from the filtered associated resources. This reduces the number of resources that need to be queried, avoiding the computational burden of querying all associated resources of the initial resource. This reduces the computational load of resource queries and improves efficiency. Simultaneously, the selected target resources are used as new initial resources, and the above resource query process is repeated until no new target resources can be selected from the comprehensive attribute connectivity graph. Furthermore, the connectivity between resources with the same attribute and between resources with different attributes in the comprehensive attribute connectivity graph ensures the orderliness and convenience of resource queries while reducing the computational load of each query, thus improving query speed and efficiency.

[0098] In one exemplary embodiment, such as Figure 4 As shown, step S120 above, before obtaining the reference features and attribute conditions of the resource to be queried in response to the resource query request, also includes a step of constructing a comprehensive attribute connectivity graph, which can be implemented through the following steps:

[0099] In step S410, a preset resource set is obtained; the preset resource set includes resource sets for each resource attribute.

[0100] In step S420, a connected graph of the same attribute is constructed based on the similarity between resources in the resource set of each resource attribute, and a connected graph of all attributes is constructed based on the similarity between resources in the preset resource set.

[0101] In step S430, the full-attribute connected graph and the same-attribute connected graphs of each resource attribute are fused to obtain a comprehensive attribute connected graph.

[0102] The similarity between resources refers to the similarity between resource characteristics (such as the characteristics of resources in multimodal environments).

[0103] When merging the full-attribute connected graph and the same-attribute connected graph for each resource attribute, from the perspective of nodes, since each resource... Figure 2 In the graph, both 'a' and 'b' correspond to a node. The merging method is to take the union of the neighbor lists of the two nodes corresponding to the resource. From the perspective of the entire graph, merging means... Figure 2 Take the union of the edges in a and b in the equation.

[0104] Specifically, in response to the request to construct a comprehensive attribute connectivity graph, the server retrieves a preset resource set from the database and categorizes the resources in the preset resource set according to resource attributes, obtaining resource sets for each resource attribute. For each resource set, the server obtains the resource features of each resource in that set and inputs these features into a similarity statistical model to obtain the similarity between the resource features, thus obtaining the similarity between the resources. For any two resources, if the similarity between them is greater than a preset similarity, a connection edge is established between them. This process continues until a shared-attribute connectivity graph representing the association between resources with the same resource attribute is obtained, thus obtaining the shared-attribute connectivity graph for each resource attribute. Figure 2 The graphs shown are a1, a2, a3, and a4, all sharing the same attribute. Similarly, the server inputs the resource features of each resource in the preset resource set into the similarity statistics model to obtain the similarity between each resource. For any two resources, if the similarity between them is greater than a preset similarity, a connection edge is established between them. This process continues until a fully attributed connected graph representing the relationships between resources with different resource attributes is obtained, for example... Figure 2 The full-attribute connected graph b1 is shown. Finally, the server merges the full-attribute connected graph with the connected graphs of the same attribute for each resource attribute to obtain a comprehensive attribute connected graph. For example, the full-attribute connected graph can be updated using the connected graphs of the same attribute for each resource attribute to obtain an updated full-attribute connected graph, which serves as the comprehensive attribute connected graph.

[0105] For example, see reference. Figure 2 The server constructs corresponding connected graphs with the same attributes for resource sets with resource attributes (newly uploaded, high popularity), (not newly uploaded, high popularity), (newly uploaded, low popularity), and (not newly uploaded, low popularity), for example... Figure 2The graphs shown are connected graphs with the same attribute, a1, a2, a3, and a4; simultaneously, for resource sets with all resource attributes, a fully connected graph is constructed, for example... Figure 2 The fully connected graph b1 shown; finally, the server will... Figure 2 The connected graphs a1, a2, a3, a4 with the same attribute and b1 with all attributes are merged to obtain the comprehensive attribute connected graph c.

[0106] The technical solution provided in this disclosure involves obtaining a preset resource set including resource sets with various resource attributes, then constructing a connected graph of the same attribute for each resource attribute based on the similarity between resources in the resource sets of each resource attribute, and constructing a connected graph of all attributes based on the similarity between resources in the preset resource set. Finally, the connected graph of all attributes and the connected graph of the same attribute for each resource attribute are fused to obtain a comprehensive connected graph. In this way, the comprehensive connected graph can maintain connectivity between resources with the same resource attribute and between resources with different resource attributes, while supporting any number of attribute conditions and resource attributes, ensuring the orderliness and convenience of resource query, and thus improving the efficiency of resource query.

[0107] In an exemplary embodiment, step S120 above, filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to attribute conditions, specifically includes the following: determining the filtering parameters of the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph; filtering the resources to be filtered in the associated resources according to the filtering parameters to obtain the filtered associated resources.

[0108] The magnitude of the filtering parameters determines the filtering intensity of the resources to be filtered in the associated resources, such as the pruning intensity.

[0109] In real-world scenarios, the filtering parameter refers to the filtering probability, which is determined by the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph. For example, given a fixed number of resource attributes involved in the comprehensive attribute connectivity graph, a smaller number of attribute conditions results in a higher filtering probability, indicating a greater likelihood that the corresponding resource will be filtered. Conversely, a larger number of attribute conditions results in a lower filtering probability, indicating a lower likelihood that the corresponding resource will be filtered.

[0110] It should be noted that the filtering probability is fixed for the same resource query request; this filtering probability is adaptively adjusted by the number of attribute conditions in different queries; at the same time, the higher the filtering probability, the more resources are cut off.

[0111] Specifically, the server inputs the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph into the filter parameter statistical model to obtain the filter parameters of the resources to be filtered in the associated resources of the initial resources in the comprehensive attribute connectivity graph; according to the filter parameters, the resources to be filtered in the associated resources are filtered accordingly to obtain the remaining resources in the resources to be filtered; according to the resources in the associated resources other than the resources to be filtered, and the remaining resources in the resources to be filtered, the filtered associated resources are obtained.

[0112] For example, the server calculates the filtering probability of the resource to be filtered among the associated resources of the initial resource in the comprehensive attribute connectivity graph using the following formula:

[0113] Filtering probability = 1 - [(number of attribute conditions - 1) / number of resource attributes involved in the comprehensive attribute connectivity graph];

[0114] Next, for cases where pruning is performed based on probability, please refer to... Figure 5 Among them, (a) and (b) show the case where all pruning targets (i.e. resources to be filtered) are pruned, which has the advantage of low computational cost; (c) shows the case where some pruning targets are not pruned with a certain probability, which has the advantage of good connectivity.

[0115] The technical solution provided in this disclosure first determines the filtering parameters of the resources to be filtered in the associated resources of the initial resources in the comprehensive attribute connectivity graph based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph. Then, the resources to be filtered in the associated resources are filtered according to the filtering parameters to obtain the filtered associated resources. In this way, when performing resource queries, only the target resources that match the reference features are selected from the filtered associated resources, thereby reducing the number of resources that need to be queried, avoiding redundant calculations, reducing the amount of computation, and improving the efficiency of resource query.

[0116] In one exemplary embodiment, such as Figure 6 As shown, step S120 above, before filtering the resources to be filtered from the associated resources of the initial resources in the comprehensive attribute connectivity graph according to the attribute conditions, also includes a step of determining the resources to be filtered. This can be achieved through the following steps:

[0117] In step S610, the initial resources in the comprehensive attribute connectivity graph are determined from the resources that satisfy the attribute conditions in the comprehensive attribute connectivity graph.

[0118] In step S620, the associated resources of the initial resource are determined from the comprehensive attribute connectivity graph.

[0119] In step S630, resources that do not meet the attribute conditions are filtered out from the associated resources and designated as resources to be filtered.

[0120] Specifically, the server determines resources that satisfy the attribute conditions from the comprehensive attribute connectivity graph; from the resources that satisfy the attribute conditions, it randomly selects one resource as the initial resource in the comprehensive attribute connectivity graph; then, based on the association relationships between resources in the comprehensive attribute connectivity graph, it determines resources that have connecting edges with the initial resource from the comprehensive attribute connectivity graph, as associated resources of the initial resource; finally, from the associated resources of the initial resource, it filters out resources that do not satisfy the attribute conditions, as resources to be filtered, such as possible pruning targets.

[0121] The technical solution provided in this disclosure first determines the initial resources in the comprehensive attribute connectivity graph based on attribute conditions, and then filters out the resources that do not meet the attribute conditions from the associated resources of the initial resources in the comprehensive attribute connectivity graph based on the attribute conditions. In this way, during the resource query process, the resources to be filtered are determined by attribute conditions, which facilitates the subsequent targeted filtering of the resources to be filtered, thereby reducing the number of resources that need to be accessed, reducing latency, and improving the efficiency of resource query.

[0122] In an exemplary embodiment, step S120, which selects target resources that match the reference features from the filtered associated resources, specifically includes the following: for each resource in the filtered associated resources, determining the similarity between the resource features of the resource and the reference features; selecting resources whose similarity satisfies the first similarity condition from the filtered associated resources as target resources that match the reference features.

[0123] The first similarity condition refers to the highest similarity.

[0124] Specifically, the server obtains the resource features of each resource in the filtered associated resources and performs vector representation processing on the resource features of each resource to obtain the feature vector of each resource; at the same time, the reference features are also processed into vector representation to obtain the reference feature vector; through a similarity statistical model, the similarity between the feature vector of each resource and the reference feature vector is calculated, which is taken as the similarity between the resource features of each resource and the reference features; finally, the resource with the highest similarity is selected from the filtered associated resources as the target resource that matches the reference features.

[0125] For example, among the filtered associated resources (I1, I2, I3, I4, I5, I6, I7), resource I1 has the highest similarity to the reference features, so resource I1 is identified as the target resource that matches the reference features.

[0126] The technical solution provided in this disclosure selects resources whose similarity meets the first similarity condition from the filtered associated resources as target resources to match the reference features. In this way, by selecting target resources whose similarity meets the first similarity condition, the accuracy of the retrieved resources is improved, thereby improving the accuracy of resource retrieval.

[0127] In an exemplary embodiment, step S140 above, which obtains the resource query result corresponding to the resource query request based on the selected target resources, specifically includes the following: selecting resources from the selected target resources whose similarity to the reference feature satisfies the second similarity condition; and determining the resource query result corresponding to the resource query request based on the selected resources whose similarity to the reference feature satisfies the second similarity condition.

[0128] The second similarity condition refers to a similarity threshold. A similarity score that satisfies the second similarity condition means that the similarity score is greater than the similarity threshold. Alternatively, the second similarity condition can also refer to the top N similarity scores, where N is a positive integer.

[0129] Specifically, the server further filters from the selected target resources, choosing those with a similarity greater than a similarity threshold, and uses these as the resource query results corresponding to the resource query request. Alternatively, the server further filters from the selected target resources, choosing the top N target resources with the highest similarity, and uses these as the resource query results corresponding to the resource query request.

[0130] For example, among the selected target resources (M1, M2, M3, M4, M5, M6, M7), if the similarity between the resource features of target resources M1, M2, and M3 and the reference features is greater than the similarity threshold, then target resources M1, M2, and M3 will all be used as the resource query results corresponding to the resource query request.

[0131] The technical solution provided in this disclosure further filters out resources from the selected target resources that meet the second similarity condition with reference features, and uses these resources as the resource query results corresponding to the resource query request. This helps to further improve the accuracy of the queried resources, thereby improving the accuracy of resource queries.

[0132] In an exemplary embodiment, step S110 above, in response to a resource query request, obtains reference features and attribute conditions of the resource to be queried, specifically including the following: parsing the resource query request to obtain the requesting account and the attribute conditions selected by the requesting account; obtaining the account features of the requesting account as reference features of the resource to be queried, and using the attribute conditions selected by the requesting account as attribute conditions of the resource to be queried.

[0133] The requesting account for a resource query request refers to the authorized account that triggers the resource query request. The account characteristics of the requesting account refer to its behavioral characteristics, such as interests.

[0134] The attribute conditions selected by the requesting account refer to the resource attributes selected by the requesting account when querying resources, such as (newly uploaded, high popularity).

[0135] Specifically, the server parses the resource query request sent by the terminal to obtain the requesting account and the attribute conditions selected by the requesting account; it queries a database storing multiple account characteristics based on the requesting account to obtain the account characteristics of the requesting account, which serve as reference characteristics for the resource to be queried; at the same time, it uses the attribute conditions selected by the requesting account as the attribute conditions for the resource to be queried.

[0136] The technical solution provided in this disclosure parses a resource query request to obtain the requesting account and the attribute conditions selected by the requesting account. Then, it obtains the account characteristics of the requesting account as reference characteristics of the resource to be queried, and the attribute conditions selected by the requesting account as attribute conditions of the resource to be queried. By obtaining the reference characteristics and attribute conditions of the resource to be queried, it is beneficial to use these characteristics and attribute conditions as auxiliary information for subsequent resource querying. This allows for the rapid retrieval of the required target resource from the comprehensive attribute connectivity graph based on the auxiliary information, thereby improving resource query efficiency.

[0137] Figure 7 This is a flowchart illustrating another resource query method according to an exemplary embodiment, such as... Figure 7 As shown, this resource query method is used in the server and specifically includes the following steps:

[0138] In step S701, a preset resource set is obtained; the preset resource set includes resource sets of each resource attribute; based on the similarity between resources in the resource sets of each resource attribute, a connected graph of the same attribute is constructed for each resource attribute, and based on the similarity between resources in the preset resource set, a connected graph of all attributes is constructed.

[0139] In step S702, the full-attribute connected graph and the same-attribute connected graphs of each resource attribute are fused to obtain a comprehensive attribute connected graph.

[0140] In step S703, the resource query request is parsed to obtain the requesting account and the attribute conditions selected by the requesting account.

[0141] In step S704, the account characteristics of the requesting account are obtained as reference characteristics of the resource to be queried, and the attribute conditions selected by the requesting account are used as attribute conditions of the resource to be queried.

[0142] In step S705, the initial resources in the comprehensive attribute connectivity graph are determined from the resources that satisfy the attribute conditions in the comprehensive attribute connectivity graph.

[0143] In step S706, the associated resources of the initial resource are determined from the comprehensive attribute connectivity graph; from the associated resources, resources that do not meet the attribute conditions are selected as resources to be filtered.

[0144] In step S707, based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph, the filtering parameters of the resources to be filtered in the associated resources of the initial resources in the comprehensive attribute connectivity graph are determined; based on the filtering parameters, the resources to be filtered in the associated resources are filtered to obtain the filtered associated resources.

[0145] In step S708, for each resource in the filtered associated resources, the similarity between the resource features and the reference features is determined; from the filtered associated resources, resources whose similarity meets the first similarity condition are selected as target resources that match the reference features.

[0146] In step S709, the target resource is used as the new initial resource, and the process jumps to steps S706 to S708 until no new target resource can be filtered out from the comprehensive attribute connectivity graph.

[0147] In step S710, from the selected target resources, resources whose similarity to the reference features meets the second similarity condition are selected; based on the selected resources whose similarity to the reference features meets the second similarity condition, the resource query result corresponding to the resource query request is determined.

[0148] In the resource query method described above, during resource querying, the resources to be filtered are first determined from the associated resources of the initial resource in the comprehensive attribute connectivity graph based on attribute conditions. These associated resources are then filtered, and target resources matching the reference features are selected from the filtered associated resources. This reduces the number of resources that need to be queried, avoiding the computational burden of querying all associated resources of the initial resource one by one. This reduces the computational load of resource querying and improves resource query efficiency. Simultaneously, the selected target resources are used as new initial resources, and the above resource query process is repeated until no new target resources can be selected from the comprehensive attribute connectivity graph. Furthermore, the connectivity between resources with the same attribute and between resources with different attributes in the comprehensive attribute connectivity graph ensures the orderliness and convenience of resource querying, while reducing the computational load of each query, thus improving resource query speed and further enhancing resource query efficiency.

[0149] To more clearly illustrate the resource query method provided in this disclosure, a specific embodiment is used to describe the method in detail below. In an exemplary embodiment, to address the problem that graph-based hybrid search algorithms cannot support scenarios with arbitrary numbers of attribute values ​​and attribute conditions, this disclosure also provides a hybrid search method based on adaptive attribute connectivity graphs, specifically including an attribute connectivity graph indexing strategy and an adaptive attribute pruning search strategy. The core of the attribute connectivity graph indexing strategy is to establish a same-attribute connectivity graph using nodes with the same attribute to ensure connectivity between nodes with the same attribute in the graph; on the other hand, it uses nodes with different attribute to establish a full-attribute connectivity graph to ensure connectivity between nodes with different attribute in the graph. The core idea of ​​the adaptive attribute pruning search strategy is to prune some nodes that do not meet the attribute conditions during the search process, thereby avoiding a large amount of redundant computation, especially when the number of attribute conditions is small. In summary, the graph index constructed by this method has good connectivity, can support arbitrary numbers of attribute values ​​and attribute conditions, and achieves high recall and low latency. Specifically, it includes the following:

[0150] First, the attribute connectivity graph indexing strategy.

[0151] The attribute connectivity graph indexing strategy includes the construction of connected graphs with the same attribute and connected graphs with all attributes. Specifically, based on graph-based search algorithms, it utilizes different datasets to construct connected graphs with the same attribute and connected graphs with all attributes respectively; for example... Figure 2 As shown, graph indexes are created only for nodes with the same attribute, rather than constructing the graph index based on the set of attribute combinations, thus obtaining multiple connected graphs with the same attribute; simultaneously, a fully connected graph with all attributes is created for all nodes. This ensures that the final graph index has good connectivity between nodes with the same attribute and between nodes with different attributes. This approach adapts to varying numbers of attribute conditions and reduces the impact of the number of attribute values ​​on the graph index.

[0152] Second, an adaptive attribute pruning search strategy.

[0153] The adaptive attribute pruning search strategy includes attribute filtering and conditional adaptation. Attribute filtering refers to the use of attribute condition filtering nodes to select potential pruning targets during the search process. Conditional adaptation means that the disclosed method prunes the selected targets with a certain probability, and this probability is adaptively adjusted based on the number of attribute conditions in different queries. In this way, by selecting potential pruning targets and pruning according to probability, redundant calculations can be avoided as much as possible, thereby reducing search latency.

[0154] The above-mentioned hybrid search method based on adaptive attribute connectivity graph can achieve the following technical effects: (1) It can be compatible with various graph-based vector search algorithms to complete hybrid search tasks; (2) Without significantly increasing the construction overhead, it ensures connectivity through graph construction strategy and reduces the amount of computation through search strategy. Ultimately, under different numbers of attribute values ​​and attribute conditions, it has a search performance that exceeds that of traditional search algorithms. That is, under the same QPS (queries processed per second), this disclosure can achieve a higher recall rate; (3) It well supports scenarios with different numbers of attribute values ​​and different numbers of attribute conditions, meeting the requirements for hybrid search in the future big data era; In addition, for scenarios with a single number of attribute conditions that are currently widely used, this disclosure provides a more efficient hybrid search, meeting the hybrid search scenarios required in actual production.

[0155] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0156] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0157] Based on the same inventive concept, this disclosure also provides a resource query apparatus for implementing the resource query method described above.

[0158] Figure 8 This is a block diagram illustrating a resource query apparatus according to an exemplary embodiment. (Refer to...) Figure 8 The device includes a request processing unit 810, a resource filtering unit 820, a resource screening unit 830, and a result determination unit 840.

[0159] The request processing unit 810 is configured to respond to a resource query request and obtain reference characteristics and attribute conditions of the resource to be queried.

[0160] Resource filtering unit 820 is configured to filter resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph based on attribute conditions, and to select target resources that match reference features from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing the full attribute connectivity graph and the same attribute connectivity graph of each resource attribute. The full attribute connectivity graph is used to describe the association relationship between resources of each resource attribute, and the same attribute connectivity graph is used to describe the association relationship between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that meets the attribute conditions, and the resource to be filtered is the resource in the associated resources that does not meet the attribute conditions.

[0161] The resource filtering unit 830 is configured to perform the steps of taking the target resource as a new initial resource and jumping to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference features from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph.

[0162] The result determination unit 840 is configured to perform resource query results corresponding to the resource query request based on the selected target resources.

[0163] In an exemplary embodiment, the resource query apparatus further includes a graph construction unit configured to perform the following: obtaining a preset resource set; the preset resource set includes resource sets of each resource attribute; constructing a connected graph of the same attribute for each resource attribute based on the similarity between resources in the resource sets of each resource attribute, and constructing a connected graph of all attributes based on the similarity between resources in the preset resource set; and performing a fusion process on the connected graph of all attributes and the connected graph of the same attribute for each resource attribute to obtain a comprehensive connected graph of attributes.

[0164] In an exemplary embodiment, the resource filtering unit 820 is further configured to perform the following: determine the filtering parameters of the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph; and filter the resources to be filtered in the associated resources according to the filtering parameters to obtain the filtered associated resources.

[0165] In an exemplary embodiment, the resource query apparatus further includes a resource determination unit configured to perform the following operations: determining an initial resource in the comprehensive attribute connectivity graph from resources that satisfy the attribute conditions; determining associated resources of the initial resource from the comprehensive attribute connectivity graph; and filtering out resources that do not satisfy the attribute conditions from the associated resources as resources to be filtered.

[0166] In an exemplary embodiment, the resource filtering unit 820 is further configured to perform the following: for each resource in the filtered associated resources, determine the similarity between the resource features of the resource and the reference features; and select resources from the filtered associated resources whose similarity satisfies a first similarity condition as target resources that match the reference features.

[0167] In an exemplary embodiment, the result determination unit 840 is further configured to perform the following: from the selected target resources, select resources whose similarity to the reference feature satisfies a second similarity condition; and determine the resource query result corresponding to the resource query request based on the selected resources whose similarity to the reference feature satisfies the second similarity condition.

[0168] In an exemplary embodiment, the request processing unit 810 is further configured to parse the resource query request to obtain the requesting account and the attribute conditions selected by the requesting account; obtain the account characteristics of the requesting account as reference characteristics of the resource to be queried; and use the attribute conditions selected by the requesting account as attribute conditions of the resource to be queried.

[0169] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0170] Each module in the aforementioned resource query device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0171] Figure 9 This is a block diagram illustrating a server 900 for implementing a resource query method according to an exemplary embodiment. (Refer to...) Figure 9 Server 900 includes processing component 920, which further includes one or more processors, and memory resources represented by memory 922 for storing instructions, such as applications, that can be executed by processing component 920. The applications stored in memory 922 may include one or more modules, each corresponding to a set of instructions. Furthermore, processing component 920 is configured to execute instructions to perform the methods described above.

[0172] Server 900 may also include: a power supply component 924 configured to perform power management of server 900, a wired or wireless network interface 926 configured to connect server 900 to a network, and an input / output (I / O) interface 928. Server 900 may operate on an operating system stored in memory 922, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or similar.

[0173] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 922 including instructions, which can be executed by the processor of server 900 to perform the above-described method. The storage medium may be a computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.

[0174] In an exemplary embodiment, a computer program product is also provided, the computer program product including instructions that can be executed by the processor of server 900 to perform the above method.

[0175] It should be noted that the above-mentioned apparatus, server, computer-readable storage medium, computer program product, etc., may also include other implementation methods according to the description of the method embodiments. For specific implementation methods, please refer to the description of the relevant method embodiments, which will not be elaborated here.

[0176] 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.

[0177] 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 resource query method, characterized in that, include: In response to a resource query request, the reference characteristics and attribute conditions of the resource to be queried are obtained; the reference characteristics refer to the account characteristics of the requesting account of the resource query request. The attribute conditions refer to the resource attributes used as query conditions, including newly uploaded and high popularity; newly uploaded and high popularity represent a resource attribute. Based on the attribute conditions, the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph are filtered, and target resources matching the reference features are selected from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing a full attribute connectivity graph and a same-attribute connectivity graph for each resource attribute. The full attribute connectivity graph describes the association relationships between resources of each resource attribute, and the same-attribute connectivity graph describes the association relationships between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that satisfies the attribute conditions, and the resource to be filtered is the resource among the associated resources that does not satisfy the attribute conditions. The filtered associated resources include the resources among the associated resources of the initial resource excluding the resource to be filtered, and the resources remaining after filtering the resource to be filtered. The target resource is used as a new initial resource, and the process jumps to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference feature from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph. Based on the selected target resources, the resource query results corresponding to the resource query request are obtained; The step of filtering the resources to be filtered from the associated resources of the initial resources in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resources that match the reference features from the filtered associated resources, includes: Based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph, determine the filtering probability of the resources to be filtered among the associated resources of the initial resources in the comprehensive attribute connectivity graph; based on the filtering probability, perform corresponding filtering processing on the resources to be filtered among the associated resources to obtain the remaining resources among the resources to be filtered; based on the resources in the associated resources other than the resources to be filtered, and the remaining resources among the resources to be filtered, obtain the filtered associated resources; select the target resources that match the reference features from the filtered associated resources.

2. The method according to claim 1, characterized in that, Before responding to a resource query request and obtaining the reference characteristics and attribute conditions of the resource to be queried, the process also includes: Obtain a preset resource set; the preset resource set includes resource sets for each resource attribute; Based on the similarity between resources in the resource sets of each resource attribute, construct the same-attribute connected graph of each resource attribute, and based on the similarity between resources in the preset resource set, construct the full-attribute connected graph; The comprehensive attribute connected graph is obtained by fusing the full-attribute connected graph and the same-attribute connected graphs of each resource attribute.

3. The method according to claim 1, characterized in that, Before filtering the resources to be filtered from the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, the process further includes: From the resources in the comprehensive attribute connectivity graph that satisfy the attribute conditions, the initial resources in the comprehensive attribute connectivity graph are determined; From the comprehensive attribute connectivity graph, the associated resources of the initial resource are determined; From the associated resources, resources that do not meet the attribute conditions are selected as the resources to be filtered.

4. The method according to claim 1, characterized in that, The step of selecting target resources that match the reference features from the filtered associated resources includes: For each resource in the filtered associated resources, determine the similarity between the resource features of the resource and the reference features; From the filtered associated resources, resources whose similarity satisfies the first similarity condition are selected as target resources that match the reference features.

5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the resource query results corresponding to the resource query request based on the selected target resources includes: From the selected target resources, resources whose similarity to the reference features satisfies the second similarity condition are selected; Based on the resources selected that satisfy the second similarity condition with the reference features, the resource query result corresponding to the resource query request is determined.

6. The method according to claim 5, characterized in that, The step of responding to a resource query request and obtaining reference features and attribute conditions of the resource to be queried includes: The resource query request is parsed to obtain the requesting account and the attribute conditions selected by the requesting account. The account characteristics of the requesting account are obtained as reference characteristics of the resource to be queried, and the attribute conditions selected by the requesting account are used as attribute conditions of the resource to be queried.

7. A resource query device, characterized in that, include: The request processing unit is configured to respond to a resource query request by obtaining reference features and attribute conditions of the resource to be queried; the reference features refer to the account features of the requesting account of the resource query request; the attribute conditions refer to the resource attributes used as query conditions, including newly uploaded and high popularity; newly uploaded and high popularity represent a resource attribute. A resource filtering unit is configured to filter resources to be filtered from the associated resources of the initial resource in a comprehensive attribute connectivity graph according to the attribute conditions, and to select target resources matching the reference features from the filtered associated resources. The comprehensive attribute connectivity graph is obtained by fusing a full attribute connectivity graph and a same-attribute connectivity graph for each resource attribute. The full attribute connectivity graph describes the association relationships between resources of each resource attribute, and the same-attribute connectivity graph describes the association relationships between resources of the same resource attribute. The initial resource is any one of the resources in the comprehensive attribute connectivity graph that satisfies the attribute conditions, and the resource to be filtered is the resource among the associated resources that does not satisfy the attribute conditions. The filtered associated resources include resources other than the resource to be filtered from the associated resources of the initial resource, and the remaining resources after filtering the resource to be filtered. The remaining resources are obtained by filtering the resource to be filtered using filtering parameters. The filtering parameters are determined based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph. The resource filtering unit is configured to perform the step of taking the target resource as a new initial resource and jumping to the step of filtering the resources to be filtered in the associated resources of the initial resource in the comprehensive attribute connectivity graph according to the attribute conditions, and selecting the target resource that matches the reference feature from the filtered associated resources, until no new target resource can be selected from the comprehensive attribute connectivity graph. The result determination unit is configured to perform resource query results corresponding to the resource query request based on each of the selected target resources. The resource filtering unit is further configured to: determine the filtering probability of the resource to be filtered among the associated resources of the initial resource in the comprehensive attribute connectivity graph based on the number of attribute conditions and the number of resource attributes involved in the comprehensive attribute connectivity graph; perform corresponding filtering processing on the resource to be filtered among the associated resources based on the filtering probability to obtain the remaining resources among the resource to be filtered; obtain the filtered associated resources based on the resources in the associated resources other than the resource to be filtered and the remaining resources among the resource to be filtered; and select the target resource that matches the reference feature from the filtered associated resources.

8. The apparatus according to claim 7, characterized in that, The device further includes a graph construction unit configured to perform the following operations: acquiring a preset resource set; the preset resource set includes resource sets for each resource attribute; constructing a connected graph of the same attribute for each resource attribute based on the similarity between resources in the resource sets of each resource attribute, and constructing a connected graph of all attributes based on the similarity between resources in the preset resource set; and performing a fusion process on the connected graph of all attributes and the connected graph of the same attribute for each resource attribute to obtain the comprehensive connected graph of attributes.

9. A server, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the resource query method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the server, the server is able to perform the resource query method as described in any one of claims 1 to 6.