Object matching method and device, computer device and computer readable storage medium

By nesting various filtering levels within the object filtering criteria and matching them layer by layer, the inefficiency problem of traditional object matching methods is solved, achieving a more efficient object filtering process.

CN118035269BActive Publication Date: 2026-08-25SHENZHEN TENCENT COMP SYST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211361122.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2026-08-25
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

Traditional object matching methods require calculating the degree of matching between each candidate object and the object selection criteria, resulting in low work efficiency.

Method used

By identifying the nested filtering levels in the object filtering conditions and performing object matching layer by layer according to the nesting relationship, the number of candidate objects in the next filtering level is reduced, and the hierarchical conditions are simplified to improve efficiency.

Benefits of technology

It effectively reduces the amount of computation in the matching process and improves the efficiency of object matching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118035269B_ABST
    Figure CN118035269B_ABST
Patent Text Reader

Abstract

The application relates to an object matching method and device, computer equipment, a computer readable storage medium and a computer program product, which can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and auxiliary driving. The method comprises the following steps: acquiring an object screening condition comprising a plurality of sub-screening conditions, determining each screening level nested in the object screening condition, and determining the level condition of each screening level according to the nesting relationship between the screening levels; for each screening level with a subsequent screening level, adding a candidate object in a candidate object set of the screening level to a candidate object set of the subsequent screening level; the matching result of the candidate object and the level condition of the screening level meets the matching condition of the screening level; and screening a target object matching the object screening condition from the candidate object set of the last screening level. The above method can improve the work efficiency of the object matching process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an object matching method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of Internet technology and the explosive growth of online information, object matching methods for information filtering have emerged to address the problem of declining information utilization caused by information overload.

[0003] Traditional object matching methods obtain object filtering criteria, calculate the matching degree of each candidate object with each criterion, and then select the top-ranked candidates as the target objects for matching the filtering criteria, based on their matching degrees from highest to lowest. This traditional method requires calculating the matching degree of each candidate object with each criterion, making it time-consuming and inefficient. Summary of the Invention

[0004] Therefore, it is necessary to provide an object matching method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve work efficiency in response to the above-mentioned technical problems.

[0005] Firstly, this application provides an object matching method. The method includes:

[0006] Obtain object filtering conditions and determine the nested filtering levels within the object filtering conditions;

[0007] Based on the nesting relationship between the filtering levels, the level conditions of each filtering level are determined; the level conditions of the subsequent filtering level include the level conditions of the nested previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions.

[0008] For each of the filtering levels that has a subsequent filtering level, the candidate objects in the candidate object set of the filtering level are added to the candidate object set of the subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects and the level conditions of the filtering level satisfies the matching conditions of the filtering level.

[0009] From the candidate object set of the last filtering level, select the target objects that match the object filtering conditions.

[0010] Secondly, this application provides an object matching apparatus. The apparatus includes:

[0011] The filtering level determination module is used to obtain object filtering conditions and determine each filtering level nested in the object filtering conditions.

[0012] The hierarchical condition determination module is used to determine the hierarchical conditions of each of the filtering levels according to the nesting relationship between the filtering levels; the hierarchical conditions of the later filtering level include the hierarchical conditions of the nested earlier filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions.

[0013] A hierarchical matching module is used to add candidate objects from the candidate object set of each of the filtering levels to the candidate object set of the next filtering level for each filtering level that has a subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects with the hierarchical conditions of the filtering level satisfies the matching conditions of the filtering level.

[0014] The target object determination module is used to filter out target objects that match the object filtering conditions from the candidate object set of the last filtering level.

[0015] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0016] Obtain object filtering conditions and determine the nested filtering levels within the object filtering conditions;

[0017] Based on the nesting relationship between the filtering levels, the level conditions of each filtering level are determined; the level conditions of the subsequent filtering level include the level conditions of the nested previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions.

[0018] For each of the filtering levels that has a subsequent filtering level, the candidate objects in the candidate object set of the filtering level are added to the candidate object set of the subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects and the level conditions of the filtering level satisfies the matching conditions of the filtering level.

[0019] From the candidate object set of the last filtering level, select the target objects that match the object filtering conditions.

[0020] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0021] Obtain object filtering conditions and determine the nested filtering levels within the object filtering conditions;

[0022] Based on the nesting relationship between the filtering levels, the level conditions of each filtering level are determined; the level conditions of the subsequent filtering level include the level conditions of the nested previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions.

[0023] For each of the filtering levels that has a subsequent filtering level, the candidate objects in the candidate object set of the filtering level are added to the candidate object set of the subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects and the level conditions of the filtering level satisfies the matching conditions of the filtering level.

[0024] From the candidate object set of the last filtering level, select the target objects that match the object filtering conditions.

[0025] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0026] Obtain object filtering conditions and determine the nested filtering levels within the object filtering conditions;

[0027] Based on the nesting relationship between the filtering levels, the level conditions of each filtering level are determined; the level conditions of the subsequent filtering level include the level conditions of the nested previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions.

[0028] For each of the filtering levels that has a subsequent filtering level, the candidate objects in the candidate object set of the filtering level are added to the candidate object set of the subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects and the level conditions of the filtering level satisfies the matching conditions of the filtering level.

[0029] From the candidate object set of the last filtering level, select the target objects that match the object filtering conditions.

[0030] The aforementioned object matching method, apparatus, computer device, computer-readable storage medium, and computer program product determine the filtering levels and the respective level conditions for each filtering level based on object filtering conditions. Since the filtering levels are nested within each other, and the level conditions of a later filtering level contain nested level conditions from previous filtering levels, the level conditions become increasingly complex as the filtering level progresses. During the process of object matching layer by layer based on each level condition, using the objects retained after filtering by the previous level as candidate objects for the next filtering level reduces the number of candidate objects in the relatively complex subsequent filtering levels. This effectively reduces the computational load during the matching process, improving efficiency in object matching. Attached Figure Description

[0031] Figure 1 This is a diagram illustrating the application environment of the object matching method in some embodiments;

[0032] Figure 2 This is a flowchart illustrating the object matching method in some embodiments;

[0033] Figure 3 This is a schematic diagram showing the sorting results of target objects in some embodiments;

[0034] Figure 4 These are schematic diagrams of the display interface of the target object in some embodiments;

[0035] Figure 5 This is a schematic diagram of the structure of a Boolean abstract syntax tree in one embodiment;

[0036] Figure 6 for Figure 5 A diagram illustrating the various filtering levels corresponding to the object filtering conditions;

[0037] Figure 7 This is a schematic diagram of the structure of a Boolean abstract syntax tree in another embodiment;

[0038] Figure 8 This is a schematic diagram illustrating the hierarchical object matching process in some embodiments;

[0039] Figure 9 This is a flowchart illustrating the object matching method in other embodiments;

[0040] Figure 10 This is a schematic diagram of a document inverted index structure in one embodiment;

[0041] Figure 11 This is a structural block diagram of the object matching device in some embodiments;

[0042] Figure 12 This is a diagram showing the internal structure of a computer device in some embodiments. Detailed Implementation

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0044] The object matching method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other servers. Terminal 102 includes, but is not limited to, mobile phones, computers, smart voice interaction devices, smart home appliances, and in-vehicle terminals. Server 104 can be implemented using a standalone server or a server cluster composed of multiple servers. Terminal 102 and server 104 can be directly or indirectly connected via wired or wireless communication, which is not limited herein.

[0045] Specifically, during object matching, server 104 obtains object filtering conditions that include multiple sub-filtering conditions, determines the nested filtering levels within these conditions, and determines the level conditions for each filtering level based on the nesting relationship. The level conditions of a subsequent filtering level contain the level conditions of a nested preceding filtering level, and at least some filtering levels include at least some sub-filtering conditions within the object filtering conditions. Then, for each filtering level with a subsequent filtering level, candidate objects whose matching results with the level conditions of that filtering level are satisfied are added to the candidate object set of the subsequent filtering level. The candidate object set of a filtering level includes candidate objects that satisfy any sub-filtering condition included in that filtering level. Finally, target objects matching the object filtering conditions are filtered from the candidate object set of the last filtering level.

[0046] In some embodiments, when the data processing capability of terminal 102 meets the object matching requirements, the object matching method provided in this application embodiment may be applied only to terminal 102. Specifically, terminal 102 obtains object filtering conditions, determines each nested filtering level in the object filtering conditions, and the level conditions of each filtering level, then performs step-by-step matching based on the level conditions of each filtering level, and filters out target objects that match the object filtering conditions from the candidate object set of the last filtering level.

[0047] In some embodiments, such as Figure 2 As shown, an object matching method is provided, which can be executed by a terminal or a server, or by both a terminal and a server, to be applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0048] Step S202: Obtain object filtering conditions and determine the nested filtering levels in the object filtering conditions.

[0049] In this context, object filtering criteria refer to the conditions set when filtering multiple candidate objects. The object matching process is the process of selecting the target object from multiple candidate objects based on these criteria. A candidate object is an object that serves as a candidate in the object matching process. The specific object type of a candidate object is not unique; for example, it could be a document, image, audio, video, or application. A candidate object can include multiple object attributes, and the characteristics of a candidate object can be represented by the attribute features corresponding to each object attribute. These object attributes may include basic attributes such as object identifier, object type, creation time, and region, as well as content attributes such as object composition and semantics, and interactive attributes such as visit volume, access method, number of comments, and comment semantics. Correspondingly, these attribute features may include basic attribute features such as identifier features, type features, creation time features, and region features, as well as content attribute features such as composition features and semantic features, and interactive attribute features such as visit features and comment features.

[0050] Object filtering criteria can be set by the initiator of object matching based on their expected requirements for the target object. These criteria can be associated with at least some of the multiple object attributes of the candidate object. For example, the object filtering criteria could be based on the object composition and semantics of the candidate object; or it could be based on the object type, object composition, and visit volume of the candidate object. Furthermore, object filtering criteria can contain multiple sub-filtering criteria, each corresponding to different object attributes. For example, object filtering criteria can include multiple sub-filtering criteria corresponding to object composition, such as "contains x1", "contains x2", etc.; object filtering criteria can also include sub-filtering criteria corresponding to the number of comments, such as "number of comments is greater than the number threshold", etc. It can be understood that the initiator of object matching can determine object filtering criteria containing multiple sub-filtering criteria based on their expected requirements for the target object and the object attributes.

[0051] Furthermore, since object filtering conditions contain multiple sub-filtering conditions, for each sub-filtering condition, there exist candidate objects that satisfy that sub-filtering condition. The set of objects that satisfy the sub-filtering condition is called the sub-candidate object set of that sub-filtering condition. The process of determining the target object that matches the object filtering condition from among the candidate objects is the process of determining the target object from the respective sub-candidate object set of each sub-filtering condition. In object filtering conditions, the relationship between each sub-filtering condition can be represented by connectors and separators. The connector is used to represent the filtering logic between each sub-filtering condition, and the separator is used to represent the filtering order between each sub-filtering condition. Taking the case where the connectors include "and" and "or", and the separator includes "()" as an example: "and" is used to represent finding the intersection of the sub-candidate object sets of two sub-filtering conditions, "or" is used to represent finding the union of the sub-candidate object sets of two sub-filtering conditions, and the filtering order of the sub-filtering conditions within "()" takes precedence over the filtering order of the sub-filtering conditions outside "()". In a specific application, the object filtering criteria could be: "'Contains x1' and 'Contains x2' and 'Contains x2' or ('Contains x4' or 'Contains x5')". The corresponding filtering order is: first, find the union of the sub-candidate object sets of x4 and x5, then find the intersection of the union result with the respective sub-candidate object sets of x1, x2, and x3. Here, x1, x2, x3, x4, and x5 represent the constituent content of the candidate objects, such as characters in a document object, syllables in an audio object, or images in an image object, etc.

[0052] Specifically, the server can obtain object filtering conditions and determine multiple nested filtering levels within the object filtering conditions based on the multiple sub-filtering conditions contained within them, as well as the filtering logic and order between these sub-filtering conditions. The filtering condition consisting of multiple sub-filtering conditions within a delimiter is called a comprehensive filtering condition. In a specific application, the level represented by the delimiter can be determined as a filtering level. For example, in the object filtering condition "'contains x1' and 'contains x2' and 'contains x2' or ('contains x4' or 'contains x5')", the level of "('contains x4' or 'contains x5')" can be determined as a filtering level. In a specific application, the comprehensive filtering condition within a delimiter, and the sub-filtering conditions connected to this comprehensive filtering condition by the same connector, can be grouped into the same filtering level. For example, in the object filter condition "('contains x1' or 'contains x2' or 'contains x3') and 'contains x4'", the sub-filter condition "contains x4" belongs to the same filter level as the comprehensive filter condition "'contains x1' or 'contains x2' or 'contains x3'". In a specific application, the comprehensive filter conditions within multiple delimiters connected by the same connector can be grouped into the same filter level. For example, in the object filter condition "('contains x1' and 'contains x2') or ('contains x3' and 'contains x4')", the comprehensive filter conditions "'contains x1' and 'contains x2'" and "'contains x3' and 'contains x4'" belong to the same filter level.

[0053] Furthermore, nesting refers to completely incorporating the preceding filter level into the following filter level; that is, the following filter level contains the preceding filter level. For example, the object filter condition "('contains x1' or 'contains x2' or 'contains x3') and 'contains x4'" includes two filter levels. The sub-filter conditions "contains x1", "contains x2", and "contains x3" belong to the preceding filter level, while the combined filter condition "'contains x1' or 'contains x2' or 'contains x3'" and the sub-filter condition "contains x4" belong to the following filter level, which contains the preceding filter level.

[0054] It should be noted that if the object filter criteria do not include separators to indicate the filtering order of each sub-filter criterion, the server can add separators based on the filtering logic between the sub-filter criteria without changing that logic, thus determining the nested filtering levels within the object filter criteria. For example, the object filter criterion "'Contains x1' and 'Contains x2' and 'Contains x3'" can be updated to "('Contains x1' and 'Contains x2') and 'Contains x3'" or "'Contains x1' and ('Contains x2' and 'Contains x3')" after adding separators. Furthermore, taking object retrieval as an example, users can define object filter criteria by entering search terms, where the spaces between search terms implicitly represent the "and" search logic. Based on the user's input search terms, the server can determine the object filter criteria corresponding to each search term, for example... Figure 3 The object filtering criteria for each search term are "'Location A' and 'Event B' and 'Year D Month E Day'".

[0055] Step S204: Determine the level conditions for each filtering level based on the nesting relationship between each filtering level.

[0056] Here, hierarchical conditions refer to the filtering conditions corresponding to a certain filtering level. These hierarchical conditions include at least one of the following: sub-filtering conditions and comprehensive filtering conditions containing multiple sub-filtering conditions. In a specific application, the hierarchical conditions of a later filtering level may contain nested hierarchical conditions of a previous filtering level. As mentioned earlier, the object filtering condition "('Contains x1' or 'Contains x2' or 'Contains x3') and 'Contains x4'" includes two filtering levels. The sub-filter conditions "Contains x1", "Contains x2", and "Contains x3" belong to the first filtering level. The combined filtering condition "'Contains x1' or 'Contains x2' or 'Contains x3'" and the sub-filter condition "Contains x4" belong to the second filtering level. Therefore, the first filtering level's condition is "'Contains x1' or 'Contains x2' or 'Contains x3'", and the second filtering level's condition is "('Contains x1' or 'Contains x2' or 'Contains x3') and 'Contains x4'". In other words, the second filtering level's condition contains nested conditions from the first filtering level.

[0057] Furthermore, at least some of the filtering levels include at least some of the sub-filtering conditions in the object filtering conditions. For example, the object filtering condition "('Contains x1' or 'Contains x2' or 'Contains x3') and 'Contains x4'" contains two filtering levels. Each filtering level in this object filtering condition includes at least some of the sub-filtering conditions in that object filtering condition. Correspondingly, the hierarchical conditions of each filtering level include independently existing sub-filtering conditions, wherein the latter filtering level includes the independently existing sub-filtering condition "Contains x4". As another example, the object filtering condition "('Contains x1' or 'Contains x2' or 'Contains x3') and ('Contains x4' and 'Contains x5')" contains two filtering levels. The first filtering level includes the sub-filtering conditions "Contains x1", "Contains x2", "Contains x3", "Contains x4", and "Contains x5", while the latter filtering level does not include any of the sub-filtering conditions. Correspondingly, the hierarchical conditions of the latter filtering level consist of two comprehensive filtering conditions and do not include independently existing sub-filtering conditions.

[0058] Specifically, the server can determine the hierarchical conditions for each filtering level based on the nesting relationship between them: for a filtering level with a preceding filtering level, the hierarchical conditions of the preceding filtering level are determined as part of the hierarchical conditions for this filtering level; for a filtering level with independent sub-filter conditions, the sub-filter conditions are determined as part of the hierarchical conditions for this filtering level. It can be understood that the hierarchical conditions of the first filtering level in the object filtering conditions consist of independent sub-filter conditions and do not include comprehensive filtering conditions; the hierarchical conditions of the last filtering level in the object filtering conditions include at least one comprehensive filtering condition.

[0059] Step S206: For each filtering level that has a subsequent filtering level, add the candidate objects from the candidate object set of that filtering level to the candidate object set of the subsequent filtering level.

[0060] The candidate object set for a screening level includes candidate objects that satisfy any sub-screening condition contained in that screening level. That is, for a screening level containing sub-screening conditions, the sub-candidate object set of that sub-screening condition is a subset of the candidate object set for that screening level. Further, a candidate object refers to a candidate object whose matching result with the screening level's tier conditions satisfies the screening level's matching conditions. This matching result can be a qualitative result represented by a matching level, or a quantitative result represented by a matching degree or matching score. The matching condition is the condition corresponding to the matching result. When the matching result is qualitative, the matching condition can refer to the matching result being a set level; when the matching result is quantitative, the matching condition can refer to the matching result being greater than a set value, or it can refer to the matching result being greater than or equal to a set value. For ease of understanding, the following explanation uses the case of a quantitative matching result. Furthermore, the matching conditions for each screening level can be the same or different. For example, when the matching result is a quantitative result, the matching condition for each screening level can be that the matching result is greater than a set threshold, or each screening level can correspond to a different set threshold, or at least some screening levels can correspond to the same set threshold.

[0061] It is understood that for a screening level with a preceding screening level, the candidate object set of that screening level includes the candidate objects determined by the preceding screening level, as well as candidate objects that satisfy any sub-screening condition included in that screening level. If the screening level's tier conditions include at least two comprehensive screening conditions, then the corresponding candidate objects are determined based on each comprehensive screening condition, and the candidate objects corresponding to each comprehensive screening condition are added to the candidate object set of the subsequent screening level.

[0062] Specifically, the server starts matching hierarchical conditions sequentially, beginning with the first filtering level where the hierarchical conditions consist of independent sub-filtering conditions. Since the first filtering level's hierarchical conditions only include sub-filtering conditions, the union of the candidate object sets for each sub-filtering condition within the first filtering level's hierarchical conditions is taken as the candidate object set for the first filtering level. Then, the server calculates the matching results between each candidate object in the first filtering level and its hierarchical conditions. From the candidate object set of the first filtering level, it filters out candidate objects whose matching results satisfy the first filtering level's hierarchical conditions and adds these candidate objects to the candidate object set of the second filtering level. This process continues, for each filtering level with a subsequent filtering level, the server calculates the matching results between the candidate object set of that filtering level and its hierarchical conditions, and adds candidate objects whose matching results satisfy the current filtering level's conditions to the candidate object set of the next filtering level, until the matching of the second-to-last filtering level's hierarchical conditions is completed.

[0063] It should be noted that the specific algorithm used by the server to calculate the matching results between each candidate object at a filtering level and the filtering level's criteria is not unique. For example, it can be a matching algorithm determined based on at least one of the BM25 formula, cosine similarity formula, or Euler distance formula. Furthermore, the matching algorithms for each filtering level can be the same or different. Correspondingly, the matching results and matching criteria for each filtering level can be the same or different. In a specific application, the matching result for each filtering level is a matching degree, and the candidate objects in the filtering level refer to those with a matching degree greater than a matching degree threshold.

[0064] Step S208: Select target objects that match the object selection criteria from the candidate object set of the last selection level.

[0065] The candidate object set at the last filtering level includes the candidate objects added at the previous filtering level, as well as candidate objects that satisfy any sub-filtering condition included in the last filtering level. As mentioned earlier, the level conditions of the last filtering level are consistent with the object filtering conditions. Based on this, the server can calculate the matching results of each candidate object in the candidate object set of the last filtering level with the object filtering conditions, and then filter out the target objects whose matching results match the object matching conditions. Further, the server can filter out the preliminary selection objects that meet the matching conditions of the last filtering level based on the matching results of each candidate object with the object filtering conditions, and then determine the preliminary selection objects with a relatively high degree of matching with the object filtering conditions as the target objects. For example, preliminary selection objects with a matching degree ranking within a set number can be determined as target objects, or preliminary selection objects with a matching degree ranking within a set proportion can be determined as target objects. The set number can be, for example, 20 or 30, and the set proportion can be, for example, 1 / 3 or 1 / 2.

[0066] In a specific application, the matching result includes the matching degree. Step S208 includes: filtering out target objects whose matching degree with the object filtering conditions is satisfied from the candidate object set of the last filtering level; and outputting each target object in order of matching degree from high to low.

[0067] Here, the object matching condition refers to the matching condition at the last filtering level. Specific limitations of the matching condition are detailed above and will not be repeated here. Specifically, the server, based on the matching algorithm, calculates the matching degree between each candidate object in the candidate object set at the last filtering level and the object filtering condition, and then selects the target object whose matching degree meets the object matching condition from among the candidate objects. Then, as... Figure 3As shown, the server then sorts the target objects according to their matching degree with the object matching conditions, from highest to lowest, and outputs the target objects based on the sorting results for the initiator of object matching to choose from. Further, as... Figure 4 As shown, while outputting each target object, the search terms contained in the target object can be highlighted. Specific highlighting methods include, for example, bolding, adding color, or adding a background. In this embodiment, the matching degree between each candidate document and the object filtering conditions is quantitatively determined, and each target object is output in descending order of matching degree. This ensures that target objects with higher matching degrees correspond to higher output priority, which is beneficial for further improving the efficiency of the object matching method.

[0068] The object matching method described above determines the filtering levels and the specific conditions for each filtering level based on the object selection criteria. Since the filtering levels are nested within each other, and the conditions of a later filtering level contain nested conditions from the previous filtering level, the conditions become increasingly complex as the filtering level progresses. During the object matching process, using objects retained from the previous filtering level as candidates for the next filtering level reduces the number of candidates for the more complex filtering levels. This effectively results in simpler conditions for filtering levels with a relatively large number of candidates, and a smaller number of candidates for the more complex filtering levels, thus reducing computational complexity and improving efficiency in the object matching process.

[0069] In some embodiments, step S202 includes: obtaining object filtering conditions containing multiple sub-filtering conditions, constructing a multi-level syntax tree that matches the object filtering conditions; determining the target level corresponding to the child node or root node in the multi-level syntax tree as the filtering level, and obtaining each filtering level nested in the object filtering conditions.

[0070] The multi-level syntax tree is an abstract representation of object filtering conditions containing multiple sub-filter conditions. It represents the syntactic structure of object filtering conditions in a tree-like form, where each node represents a corresponding filtering condition. This filtering condition can include either sub-filter conditions or comprehensive filtering conditions. Since this multi-level syntax tree does not represent every detail of the actual syntax, it is an abstract tree distinct from concrete syntax trees (such as parse trees). Furthermore, the leaf nodes of the multi-level syntax tree matching the object filtering condition correspond one-to-one with each sub-filter condition contained in that object filtering condition, the child nodes of the multi-level syntax tree correspond to at least some of the sub-filter conditions, and the root node of the multi-level syntax tree corresponds to the object filtering condition.

[0071] Specifically, the server can obtain object filtering conditions containing multiple sub-filtering conditions, determine the leaf nodes corresponding to each sub-filtering condition, determine the child nodes corresponding to each comprehensive filtering condition, and determine the root node corresponding to the object candidate condition, thus obtaining a multi-level syntax tree matching the object filtering condition. Then, the target level corresponding to the child node or root node in the multi-level syntax tree is determined as the filtering level, resulting in the nested filtering levels within the object filtering condition. The target level corresponding to a child node includes the child node itself and all nodes connected to it in the direction away from the root node. It can be understood that the nodes connected to the child node in the direction away from the root node can be either child nodes or leaf nodes.

[0072] In a specific application, the multi-level syntax tree is a Boolean abstract syntax tree. The server can first determine the Boolean expression corresponding to the object filtering condition, and then parse the Boolean expression to obtain the Boolean abstract syntax tree. Taking the object filtering condition "'contains x1' and 'contains x2' and 'contains x3' or ('contains x4' or 'contains x5')" as an example, the Boolean expression h(x1, x2, x3, x4, x5) corresponding to this object filtering condition can be represented as:

[0073] h(x1,x2,x3,x4,x5)=x1∩x2∩x3∩(x4∪x5)

[0074] Here, x1 to x5 are abstract representations of each sub-filter condition. For example, x1 is the abstract representation of the sub-filter condition "contains x1", and so on. The multi-level syntax tree corresponding to this Boolean expression can be represented as follows: Figure 5 As shown, the child node J1 of this multi-level syntax tree corresponds to the comprehensive filtering condition "'contains x4' or 'contains x5'", with the corresponding Boolean expression "x4∪x5". Each leaf node corresponds to a sub-filter condition, and the root node J2 corresponds to the object filtering condition. Furthermore, based on the determined multi-level syntax tree, the nested filtering levels within the object filtering condition can be determined. For example... Figure 6 As shown, Figure 5 The multi-level syntax tree in the code can be divided into two filtering levels. The first filtering level is the level corresponding to child node J1, including child node J1 and all leaf nodes connected to it. The second filtering level is the level corresponding to root node J2, including root node J2 and all nodes connected to it. The level conditions of the first filtering level include sub-filter conditions x4 and x5; the level conditions of the second filtering level include the comprehensive filtering condition "x4∪x5" and sub-filter conditions x1, x2, and x3.

[0075] It should be noted that the multi-level syntax tree corresponding to the same object filtering condition is not unique. For example, the object filtering condition "'contains x1' and 'contains x2' and 'contains x3' or ('contains x4' or 'contains x5')" can be updated to "('contains x1' and 'contains x2' and 'contains x3') or ('contains x4' or 'contains x5')". The filtering logic between the sub-filtering conditions represented by "('contains x1' and 'contains x2' and 'contains x3') or ('contains x4' or 'contains x5')" is the same, and the corresponding multi-level syntax tree can also be as follows. Figure 7 As shown, the tree includes child nodes J3 and J4, and the root node J5. This multi-level syntax tree can also be divided into two filtering levels. The first filtering level is the level corresponding to child nodes J3 and J4, including child node J3, the leaf nodes connected to child node J3, and child node J4, the leaf nodes connected to child node J4. The second filtering level is the level corresponding to the root node J5, including the root node J5 and the child nodes J3 and J4 connected to the root node J5. The level conditions of the first filtering level include sub-filter conditions x1, x2, x3, x4, and x5. The level conditions of the second filtering level do not include sub-filter conditions, but include the comprehensive filter condition "x4∪x5" and the comprehensive filter condition "x1∩x2∩x3".

[0076] In the above embodiments, by constructing a multi-level syntax tree that matches the object filtering conditions, the nested filtering levels in the object filtering conditions are determined. The algorithm is simple and helps to further improve the efficiency of object matching.

[0077] As mentioned above, the matching algorithms for each filtering level can be the same or different. In some embodiments, the object matching method further includes: determining the matching algorithm for each filtering level based on the nesting relationship between the filtering levels; and calculating the matching result between the attribute features of the candidate objects of each filtering level and the level conditions of that filtering level based on the matching algorithm of each filtering level.

[0078] The attribute feature matching granularity of the matching algorithm at each filtering level is smaller than that of the matching algorithm at the previous filtering level. As mentioned earlier, candidate objects can include multiple object attributes, and the characteristics of a candidate object can be represented by the attribute features corresponding to each object attribute. The process of matching candidate objects with the level conditions is the process of matching at least a portion of the attribute features of the candidate object with the level conditions. Attribute feature matching granularity refers to the granularity of the attribute features used to determine the matching result between the candidate object and the level conditions. For example, the granularity of the comprehensive attribute features used to characterize the overall features of a candidate object is larger than that of the content attribute features of the candidate object; similarly, the interaction attribute features of a candidate object are larger than that of the comment features of the candidate object.

[0079] Specifically, the server determines the attribute features applied in the object matching process of each filtering level according to the nesting relationship between each filtering level and the order of matching granularity from coarse to fine, and then determines the matching algorithm for each filtering level. Then, based on the matching algorithm of each filtering level, the server calculates the matching result of the attribute features of the candidate objects of each filtering level with the level conditions of that filtering level.

[0080] In the above embodiments, the matching algorithm for each filtering level is different, and according to the nesting relationship, the granularity of the attribute features ranges from coarse to fine, which is equivalent to achieving multi-granularity matching. This can improve the efficiency of object matching while ensuring the accuracy of the matching results determined by the last filtering level.

[0081] In some embodiments, step S206 includes: determining the screening cutoff threshold for each screening level; and, if there is a subsequent screening level in the current screening level, adding the candidate objects in the candidate object set of the current screening level to the candidate object set of the subsequent screening level, until the number of added candidate objects reaches the screening cutoff threshold of the current screening level.

[0082] The specific limitations regarding the candidate objects are detailed above and will not be repeated here. The cutoff threshold for each filtering level is less than the cutoff threshold of the preceding filtering level; that is, starting from the first filtering level, the cutoff threshold decreases sequentially for each level. In a specific application, the cutoff threshold of the preceding filtering level is an integer multiple of the cutoff threshold of the following filtering level. For example, the cutoff threshold for each filtering level can be expressed as N. 1+z·0.5 Where N is a constant, z represents the level number, with the level number of the last filtering level being 1, the level number of the second-to-last filtering level nested within the last filtering level being 2, and so on. It should be noted that in a sharded retrieval scenario, for a given filtering level, the sum of the sharding cutoff thresholds for each shard at that filtering level equals the filtering cutoff threshold for that filtering level. Based on this, the server can determine the sharding cutoff threshold for each shard within that filtering level. The values ​​of the sharding thresholds can be the same or different. For example, the server can multiply the filtering cutoff threshold by the sharding coefficient 1 / d to obtain the sharding cutoff threshold for each shard, where d is the number of shards. For example, the server can determine the sharding coefficient of a shard as the ratio of the number of candidate objects contained in a shard to the sum of the number of candidate objects in all shards, and then multiply the filtering cutoff threshold by the sharding coefficient to obtain the sharding filtering cutoff threshold of the shard.

[0083] In a specific application, such as Figure 8As shown, the object matching method includes steps S801 to S806:

[0084] Step S801: Determine the screening cutoff threshold for each screening level based on the nesting relationship of each screening level.

[0085] Step S802: Determine whether there is a next filtering level for the current filtering level; if not, proceed to step S803; if yes, proceed to step S804.

[0086] Step S803: From the candidate object set of the last filtering level, filter out the target objects that match the object filtering conditions;

[0087] Step S804: Add the candidate objects from the current filtering level's candidate object set to the candidate object set of the next filtering level.

[0088] Step S805: Determine whether the number of added candidate objects has reached the filtering cutoff threshold of the current filtering level; if not, return to step S804; if yes, proceed to step S806.

[0089] Step S806: Determine the next filtering level after the current filtering level as the new current filtering level.

[0090] Specifically, such as Figure 8 As shown, the server can determine the cutoff threshold for each filtering level based on the nesting relationship between the filtering levels. The cutoff threshold for each filtering level is less than the cutoff threshold of the previous filtering level. Then, the server determines whether a subsequent filtering level exists. If not, it means the current filtering level is the last filtering level. In this case, the server filters out target objects matching the object filtering criteria from the candidate object set of the last filtering level. It can be understood that the number of target objects is consistent with the cutoff threshold of the last filtering level.

[0091] Furthermore, if a subsequent filtering level exists in the current filtering level, the candidate objects from the current filtering level's candidate object set are added to the candidate object set of the subsequent filtering level. It is then determined whether the number of added candidate objects reaches the filtering cutoff threshold of the current filtering level. If not, the process returns to the step of adding candidate objects from the current filtering level's candidate object set to the candidate object set of the subsequent filtering level. If the number of added candidate objects reaches the filtering cutoff threshold of the current filtering level, the current loop ends, the subsequent filtering level of the current filtering level is determined as the new current filtering level, and the process returns to the step of determining whether a subsequent filtering level exists in the current filtering level, thus entering the loop for the next filtering level.

[0092] In the above embodiments, based on the nesting relationship of each screening level, a screening cutoff threshold is determined for each screening level. The screening cutoff threshold of a screening level is less than the screening cutoff threshold of the previous screening level nested within that screening level. The screening termination time of the current screening level is determined based on the screening cutoff threshold, so that the number of candidate objects determined by each screening level gradually decreases. This can further ensure that the number of candidate objects in the subsequent screening level with relatively complex conditions is relatively small, thereby improving the efficiency of object matching.

[0093] In a specific application, the matching result includes the matching degree. The object matching method also includes: taking the next filtering level after the current filtering level as the target filtering level, and retrieving the target candidate objects from the candidate object set of the target filtering level; if the target candidate objects meet the target level conditions of the target filtering level, calculating the target matching degree between the target candidate objects and the target level conditions; if the target matching degree meets the target matching conditions of the target filtering level, returning to the step of retrieving the target candidate objects from the candidate object set of the target filtering level, until the number of target candidate objects that meet the target matching conditions reaches the filtering cutoff threshold of the target filtering level.

[0094] In this process, the target candidate is the candidate object with the highest matching degree to the level conditions of the current filtering level. Specifically, after completing the object matching at the current filtering level, the server takes the next filtering level as the target filtering level, removes the target candidate from the candidate set of the target filtering level, and determines whether the target candidate meets the target level conditions of the target filtering level. If not, the target candidate is discarded. If the target candidate meets the target level conditions of the target filtering level, the target matching degree between the target candidate and the target level conditions is calculated. If the target matching degree meets the target matching conditions of the target filtering level, it is determined whether the number of target candidate objects that meet the target matching conditions has reached the filtering cutoff threshold of the target filtering level. If not, the process returns to the step of removing the target candidate from the candidate set of the target filtering level, until the number of target candidate objects that meet the target matching conditions reaches the filtering cutoff threshold of the target filtering level, at which point the object matching at the target filtering level ends.

[0095] It should be noted that if, after removing all target candidates from the candidate set of the target filtering level, the number of target candidates that meet the target matching conditions still cannot reach the filtering cutoff threshold of the target filtering level, then target candidate objects that meet the target sub-filtering conditions included in the target filtering level are removed from the candidate set. If the target candidate object meets the target level conditions of the target filtering level, the target matching degree between the target candidate object and the target level conditions is calculated. If the target matching degree meets the target matching conditions of the target filtering level, the step of removing the target candidate object from the candidate set of the target filtering level is returned. This process continues until the number of target candidates and target candidates that meet the target matching conditions reaches the filtering cutoff threshold of the target filtering level.

[0096] In this embodiment, during the object matching process of the next filtering level, the target candidate objects with the highest matching degree are sequentially selected for object matching according to the matching degree of the previous filtering level. This ensures that candidate objects with a high matching degree from the previous level are matched first. Furthermore, the target matching degree between the target candidate object and the target level condition is only calculated if the target candidate object meets the target level condition of the target filtering level. This avoids redundant calculations and further improves the efficiency of the object matching process.

[0097] In some embodiments, the object matching method further includes: calculating the initial matching result of each candidate object in the candidate object set of each filtering level with the level conditions of the filtering level; and combining the initial matching result with the correction term determined based on the attribute filtering conditions to obtain the matching result corresponding to the initial matching result.

[0098] The attribute filtering criteria are the conditions that the target object's attribute characteristics must meet. These criteria can be determined by the responder matching the object as needed. Similar to object filtering criteria, these attribute filtering criteria can also be associated with at least some of the multiple object attributes of the candidate object. It should be noted that the object attributes associated with the attribute filtering criteria are usually basic attributes and interactive attributes. For example, attribute filtering criteria could be "creation time within a set time range" or "access volume reaches an access threshold," etc.

[0099] In a specific application, attribute filtering conditions include at least one of the following: a first condition of filtering by sub-target features, a second condition of retaining by sub-target features, and a third condition of retaining by interval range. Here, filtering by sub-target features can be referred to as a 'not equal to' filtering condition, and the corresponding filtering semantics could be filtering out b. iY =b i0 object, b i0 b is the sub-target feature corresponding to the first condition. iY For objects Y and b i0The corresponding sub-attribute features. Retaining features based on sub-target features can be considered an equal filtering condition; the corresponding filtering semantics could be retaining b. jY =b j0 object, b j0 b is the sub-target feature corresponding to the second condition. jY For objects Y and b j0 The corresponding sub-attribute features. Retaining based on an interval range can be called an interval filtering condition, and the corresponding filtering semantics could be retaining b. kY ∈[b k1 b k2 The object of ], b k1 and b k2 b represents the two sub-target features corresponding to the third condition. kY For objects Y and b k1 and b k2 The corresponding sub-attribute features. It should be noted that for sub-attribute filtering conditions that retain a range, if there are multiple ranges to be retained, the sub-attribute filtering condition can be split into multiple third conditions that retain a range, so that each third condition corresponds to a range.

[0100] Specifically, the server can calculate the initial matching results of each candidate object in the candidate object set of each filtering level with the level conditions of that filtering level. Then, by combining the initial matching results with the correction terms determined based on the attribute filtering conditions, the matching result corresponding to the initial matching results can be obtained. The specific method for determining the correction terms based on attribute filtering conditions is not unique. For example, the influence weight of the attribute filtering conditions can be determined based on the association between the attribute filtering conditions and the object filtering conditions, and the corrected matching degree between the candidate object and the attribute filtering conditions can be calculated. This corrected matching degree can then be multiplied by the influence weight to obtain the correction term corresponding to the attribute filtering conditions. As another example, when the attribute filtering conditions include multiple sub-attribute filtering conditions, the sub-corrected matching degree corresponding to each sub-attribute filtering condition can be calculated, and after statistical calculation of each sub-corrected matching degree, the correction term corresponding to the attribute filtering conditions can be determined.

[0101] In the above embodiments, based on the initial matching results determined by the hierarchical conditions of the filtering level, the final matching results are obtained by combining the correction items determined by the attribute filtering conditions. This can ensure the adaptability of the matching results to the actual application scenario, thereby ensuring the accuracy of the target object determined based on the matching results.

[0102] In some embodiments, the attribute features include multiple sub-attribute features; the attribute filtering conditions include sub-attribute filtering conditions that correspond one-to-one with at least a portion of the sub-attribute features. In this embodiment, the object matching method further includes: for each sub-attribute filtering condition, calculating the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition; and performing statistical calculations on the feature differences corresponding to each sub-attribute filtering condition to obtain a correction term determined based on the attribute filtering conditions.

[0103] Here, a sub-attribute feature can be one of the attributes of each object. The feature boundary of a sub-attribute filtering condition refers to the value boundary of the sub-attribute feature represented by that sub-attribute filtering condition, and this feature boundary can be represented by sub-target features. The number of sub-target features used to represent the feature boundary can be one or more. For example, the feature boundaries of the first and second conditions mentioned above can be represented by one sub-target feature, and the feature boundary of the third condition can be represented by two sub-target features.

[0104] Specifically, for each sub-attribute filtering condition, the server can calculate the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition. Then, the server performs statistical calculations on the feature differences corresponding to each sub-attribute filtering condition to obtain the correction term determined based on the attribute filtering condition. The specific algorithm for the statistical calculation can include at least one of addition, subtraction, and multiplication.

[0105] In the above embodiments, by statistically calculating the feature difference corresponding to each sub-attribute filtering condition, the correction term determined based on the attribute filtering condition is obtained. This can comprehensively consider the influence of multiple sub-attribute filtering conditions, which is beneficial to expanding the application scenarios of the object matching method.

[0106] In one embodiment, calculating the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition includes: for a sub-attribute filtering condition that uses a single sub-target feature to represent the feature boundary, calculating the difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the single sub-target feature to obtain the feature difference; for a sub-attribute filtering condition that uses two sub-target features to represent the feature boundary, calculating the difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the two sub-target features respectively to obtain two difference values, and statistically calculating the two difference values ​​to obtain the feature difference.

[0107] The specific limitations regarding feature boundaries are detailed above and will not be repeated here. Specifically, for sub-attribute filtering conditions that use a single sub-target feature to represent the feature boundary, the server calculates the feature difference by subtracting the sub-attribute feature corresponding to the pair of sub-attribute filtering conditions from the single sub-target feature. For example, both the first condition for filtering by sub-target feature and the second condition for retaining by sub-target feature use a single sub-target feature to represent their feature boundaries; therefore, the feature difference d for the first condition is... i (Y) can be represented as d i (Y)=b iY -b i0 The characteristic difference a of the second condition j (Y) can be represented as a j (Y)=b jY -b j0 For sub-attribute filtering conditions that use two sub-target features to represent feature boundaries, the server calculates the difference between the sub-attribute feature corresponding to the filtering condition and the two sub-target features, obtaining two difference values. These two differences are then statistically calculated to obtain the feature difference. The specific algorithm for this statistical calculation can be at least one of addition, multiplication, or subtraction. For example, if the feature boundary of the third condition, which is retained according to the interval range, is represented by two sub-target features, then the feature difference r of the third condition is... k (Y) can be represented as containing "b" kY -b k1 " and "b kY -b k2 The function of r, for example k (Y)=(b kY -b k1 (b) kY -b k2 ).

[0108] Furthermore, for sub-attribute filtering conditions that use two or more sub-target features to represent feature boundaries, the sub-attribute filtering conditions can be broken down into multiple third conditions that retain interval ranges, resulting in multiple third conditions that use two sub-target features to represent feature boundaries, and then feature differences can be calculated based on these conditions.

[0109] In the above embodiments, the feature difference is calculated according to the number of sub-target features used to characterize the feature boundary in the sub-attribute filtering conditions. This helps to improve the accuracy of the feature difference calculation results, and thus improves the accuracy of the correction term determined based on the feature difference.

[0110] In a specific application, the attribute filtering conditions include a first condition for filtering by sub-target features, a second condition for retaining by sub-target features, and a third condition for retaining by interval range; the correction terms include a first condition correction term corresponding to each first condition, a second condition correction term corresponding to each second condition, and a third condition correction term corresponding to each third condition. In this embodiment, combining the initial matching result and the correction terms determined based on the attribute filtering conditions, the matching result corresponding to the initial matching result is obtained, including: multiplying the first condition correction term by the initial matching result to obtain the correction result corresponding to the initial matching result; and superimposing the correction result, the second condition correction term, and the third condition correction term to obtain the matching result corresponding to the initial matching result.

[0111] The specific limitations regarding the first, second, and third conditions are detailed above and will not be repeated here. The first condition correction term refers to the correction term determined by statistical calculation of the characteristic difference corresponding to each first condition; the second condition correction term refers to the correction term determined by statistical calculation of the characteristic difference corresponding to each second condition; and the third condition correction term refers to the correction term determined by statistical calculation of the characteristic difference corresponding to each third condition.

[0112] In a specific application, the first conditional correction term can be obtained by taking the absolute value of the product of the feature differences of each first condition; that is, the first conditional correction term can be expressed as: Where p represents the number of first conditions in the attribute filtering criteria.

[0113] In a specific application, the second conditional correction term can be obtained by weighted summation of the eigenvalues ​​of each second condition; that is, the second conditional correction term can be expressed as: Where m is the number of second conditions in the attribute filtering criteria, and λ j For a j The weighting coefficient of (Y) is determined by the object matching responder based on the actual situation.

[0114] In a specific application, the third condition correction term can be obtained by weighted summation of the eigenvalues ​​of each third condition; that is, the third condition correction term can be expressed as: Where q represents the number of third conditions in the attribute filtering criteria, and μ k For r k The weighting coefficient of (Y) is determined by the object matching responder based on the actual situation.

[0115] Specifically, after determining the first, second, and third conditional correction terms, the server multiplies the first conditional correction term by the initial matching result to obtain the corrected result corresponding to the initial matching result. Then, the corrected result, the second conditional correction term, and the third conditional correction term are summed to obtain the matching result corresponding to the initial matching result. In a specific application, the matching result can be represented by a Lagrange function:

[0116]

[0117] Where, L(Y, {λ j},{μ k}) represents the matching result of object Y, X represents the level condition of the current filtering level, S(X, Y) represents the initial matching result of object Y at the current filtering level, and λ j and μ k The Lagrange multiplier is less than zero. Based on the above function, it can be seen that the matching score of a candidate object that satisfies all sub-attribute filtering conditions is always higher than the matching score of a candidate object that does not satisfy the sub-attribute filtering conditions. In this way, solving the object matching problem can be transformed into solving the extreme points of the Lagrange function, which can simplify the calculation process of the matching results and improve efficiency.

[0118] It should be noted that when the attribute filtering conditions include at least some of the first, second, and third conditions, the corresponding condition modification terms can be omitted from the above Lagrange function to obtain a Lagrange function that matches the attribute filtering conditions. For example, when the attribute filtering conditions do not include the first condition, the Lagrange function that matches the attribute filtering conditions can be expressed as:

[0119]

[0120] In this embodiment, the initial matching result is corrected according to the correction items corresponding to the three different conditions. This ensures that the matching result that meets the attribute filtering conditions is more likely to meet the filtering level conditions than the matching result that does not meet the attribute filtering conditions. This ensures the accuracy of the matching result after correction, thereby improving the accuracy of the target object determined based on the matching result.

[0121] In some embodiments, obtaining the matching result corresponding to the initial matching result by combining the initial matching result and the correction terms determined based on the attribute filtering conditions includes: performing normalization processing on the initial matching result to obtain a normalized result with a positive value; and combining the normalized result and the correction terms determined based on the attribute filtering conditions to obtain the matching result corresponding to the initial matching result.

[0122] The specific limitations regarding attribute filtering conditions and correction terms are detailed above and will not be repeated here. Specifically, the server performs normalization on the initial matching results to obtain normalized results with positive values. Then, it combines the normalized results with the correction terms determined based on the attribute filtering conditions to obtain the matching results corresponding to the initial matching results. Furthermore, the specific method of normalization is not unique; for example, it can be achieved using absolute value calculation functions or power functions to normalize the initial matching results.

[0123] In a specific application, the reduction result θ(Y) can be expressed as: θ(Y) = e S(X,Y) Correspondingly, when the attribute filtering conditions include the first condition, the second condition, and the third condition, the Lagrange function matching the attribute filtering conditions is updated as follows:

[0124]

[0125] In the above embodiments, normalization processing of the initial matching results can be performed to correct the results based on the normalization results with positive values, which helps to improve the scientific nature of the matching algorithm.

[0126] In some embodiments, such as Figure 9 As shown, object matching methods include:

[0127] Step S901: Obtain the object filtering condition containing multiple sub-filter conditions, and construct a multi-level syntax tree that matches the object filtering condition;

[0128] In this system, the leaf nodes of the multi-level syntax tree correspond one-to-one with the sub-filter conditions, and the child nodes of the multi-level syntax tree correspond to at least some of the sub-filter conditions; the root node of the multi-level syntax tree corresponds to the object filter conditions.

[0129] Step S902: Determine the target level corresponding to the child node or root node in the multi-level syntax tree as the filtering level to obtain the nested filtering levels in the object filtering conditions.

[0130] Step S903: Based on the nesting relationship between each filtering level, determine the level conditions, matching algorithm, matching conditions and filtering cutoff threshold for each filtering level.

[0131] Among them, the hierarchical conditions of the subsequent filtering level include the hierarchical conditions of the nested previous filtering level; at least a part of the filtering levels include at least a part of the sub-filtering conditions in the object filtering conditions; the attribute feature matching granularity of the matching algorithm of the filtering level is smaller than the attribute feature matching granularity of the matching algorithm of the nested previous filtering level; the filtering cutoff threshold of the filtering level is smaller than the filtering cutoff threshold of the nested previous filtering level.

[0132] Step S904: Obtain the attribute filtering conditions including multiple sub-attribute filtering conditions. For each sub-attribute filtering condition, calculate the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition.

[0133] Among them, the attribute filtering conditions are the conditions that the attribute features of the target object need to meet; the sub-attribute filtering conditions include the first condition of filtering by sub-target features, the second condition of retaining by sub-target features, and the third condition of retaining by interval range;

[0134] Step S905: Statistically calculate the feature difference corresponding to each sub-attribute filtering condition to obtain the correction term determined based on the attribute filtering conditions.

[0135] The correction terms include a first condition correction term obtained by statistically calculating the feature difference corresponding to each first condition, a second condition correction term obtained by statistically calculating the feature difference corresponding to each second condition, and a third condition correction term obtained by statistically calculating the feature difference corresponding to each third condition.

[0136] Step S906: Extract the target candidate object from the candidate object set of the current filtering level. If the target candidate object meets the level conditions of the current filtering level, calculate the initial matching result of the attribute features of the target candidate object with the level conditions of the current filtering level based on the matching algorithm of the current filtering level.

[0137] Among them, for the current filtering level that has a previous filtering level, the target candidate object is the candidate object with the highest matching degree with the level conditions of the previous filtering level of the current filtering level.

[0138] Step S907: Normalize the initial matching result to obtain a normalized result with a positive value;

[0139] Step S908: The correction result obtained by multiplying the first condition correction term by the initial matching result, as well as the second condition correction term and the third condition correction term, are superimposed to calculate the matching result corresponding to the initial matching result.

[0140] Step S909: Determine whether the current filtering level is the last filtering level; if not, proceed to step S910; if yes, proceed to step S913.

[0141] Step S910: Add the candidate objects whose matching results meet the matching conditions of the current filtering level to the candidate object set of the next filtering level after the current filtering level.

[0142] The candidate object set of the current filtering level includes candidate objects that satisfy any sub-filtering condition contained in the current filtering level;

[0143] Step S911: Determine whether the number of added candidate objects has reached the filtering cutoff threshold of the current filtering level; if not, return to step S906; if yes, execute step S912.

[0144] Step S912: Take the next filter level after the current filter level as the new current filter level, and return to step S906.

[0145] Step S913: From the candidate object set of the last filtering level, filter out the target objects whose matching degree with the object filtering conditions meets the object matching conditions.

[0146] Step S914: Output each target object in descending order of matching degree.

[0147] In some embodiments, the object matching method provided in this application can be applied to video recommendation scenarios. In this video recommendation scenario, the server obtains the video filtering conditions input by the user through a terminal, determines the nested filtering levels within these conditions, and determines the level conditions for each filtering level based on the nesting relationship between them. Specifically, the level conditions of a later filtering level include the level conditions of a nested earlier filtering level; at least some filtering levels include at least some sub-filtering conditions within the video filtering conditions. Then, the server performs video filtering based on the level conditions corresponding to each filtering level: for each filtering level with a later filtering level, candidate objects whose matching results with the level conditions of that filtering level satisfy the matching conditions of that filtering level are added to the candidate object set of the later filtering level; from the candidate object set of the last filtering level, target objects matching the video filtering conditions are selected. The candidate object set of a filtering level includes candidate objects that satisfy any sub-filtering condition included in that filtering level. Finally, the server outputs the target objects to the terminal in descending order of their match with the video filtering criteria.

[0148] In some embodiments, the object matching method provided in this application can be applied to document retrieval scenarios. Specifically, let x1, x2, x3, ..., x M Let M be the search terms in the search query. Then the document filtering condition X can be represented as: X(x1, x2, x3, ..., x...). M ), where x1 represents the sub-filter condition corresponding to search term x1, x2 represents the sub-filter condition corresponding to search term x2, and x M Indicates the relationship with the search term x M The corresponding sub-filtering conditions. Let Y1, Y2, Y3, ..., Y n This represents the n documents in the index. N represents the expected number of documents to be retrieved. Document Yn The specific attribute can be represented as b n1 b n2 b n3 , ..., b nf The document Y has f attributes, that is, the document Y has f attributes. n It can be represented as Y n =[b n1 b n2 b n3 , ..., b nf Let h(x1, x2, x3, ..., x) M ) represents a Boolean expression between M search terms given by the user.

[0149] Specifically, after the server obtains the user's input search query, it can determine the Boolean expression that matches the search query, and then determine the Boolean abstract syntax tree corresponding to the Boolean expression. Taking the document filtering condition "'contains x1' and 'contains x2' and 'contains x3' or ('contains x4' or 'contains x5')" as an example, the Boolean expression h(x1, x2, x3, x4, x5) corresponding to this object filtering condition can be expressed as:

[0150] h(x1,x2,x3,x4,x5)=x1∩x2∩x3∩(x4∪x5)

[0151] Here, x1 to x5 are abstract representations of each sub-filter condition. For example, x1 is the abstract representation of the sub-filter condition "contains x1", and so on. The multi-level syntax tree corresponding to this Boolean expression can be represented as follows: Figure 5 As shown, the child node J1 of this multi-level syntax tree corresponds to the comprehensive filtering condition "'contains x4' or 'contains x5'", and the corresponding Boolean expression is "x4∪x5"; each leaf node corresponds to each sub-filter condition, and the root node J2 corresponds to the document filtering condition.

[0152] After obtaining the Boolean abstract syntax tree, the server can determine the level corresponding to the root node or child nodes in the Boolean abstract syntax tree as the filtering level, and thus obtain the nested filtering levels in the document filtering conditions. For example... Figure 6 and Figure 7 Each includes two filtering levels.

[0153] In one embodiment, the server determines the corresponding level conditions, matching algorithm, matching criteria, and filtering cutoff threshold for each filtering level. Specifically, the level conditions of a later filtering level include nested level conditions of a previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering criteria in the object filtering conditions; the attribute feature matching granularity of the matching algorithm of a filtering level is smaller than the attribute feature matching granularity of the matching algorithm of the nested previous filtering level; and the filtering cutoff threshold of a filtering level is smaller than the filtering cutoff threshold of the nested previous filtering level. For example, in a document retrieval scenario with three filtering levels, the filtering cutoff threshold of the first level can be set to N. 2 The BM25 formula is used as the matching algorithm; the second-layer filtering cutoff threshold is set to N. 1.5 The matching algorithm uses the distance between the second-level hierarchical conditions and the comprehensive attributes of the document; the filtering threshold of the last level is set to N, and the matching algorithm uses the distance between the document filtering conditions and the target attributes in the document, where the target attributes are the attributes in the document that are related to the document filtering conditions.

[0154] Furthermore, after determining the level conditions, matching algorithm, matching criteria, and filtering truncation thresholds for each filtering level, the server performs document matching layer by layer, starting from the first filtering level, and truncates documents according to the filtering truncation threshold corresponding to the current filtering level. Below, we use h(x1, x2, x3, ... x...) as an example. i x M )=x1∩x2∩x3∩…(x i ∪x M Taking the case of ) as an example, the document matching process of the first filtering level will be explained in detail.

[0155] Specifically, the first filtering level's criteria is "x" i ∪x M The semantic meaning of "" is: the document contains x. i Or the document contains x M .like Figure 10 As shown, for each search term, documents containing that term can be identified, forming a sub-candidate set for that term, thus obtaining the inverted index corresponding to each search term. For example... Figure 10 In the search term x i The inverted index includes document Y1, document Y2, document Y3, and document Y4; the search term x M The inverted index includes document Y2, document Y4, document Y8, and document Y... j And document Y n wait.

[0156] First, the server allocates an access pointer to the inverted index of each search term at the current filtering level, pointing to the initial position of the inverted index. For example... Figure 10 In the middle, is the search term x i and search term x M Each inverted index is assigned an access pointer, pointing to its initial position. The server then performs a Boolean calculation on the document pointed to by each access pointer to determine if it meets the level criteria for the current filtering level. If the document does not meet the level criteria, the access pointer is moved to the right until the document it points to meets the level criteria. If the level criteria are met, the matching algorithm for the current filtering level is used to calculate the matching score between the document and the level criteria. If the matching score meets the current filtering level's matching criteria, the document is added to a heap, and the documents in the heap are sorted in descending order of matching score. If the heap size is less than the current filtering level's truncation threshold, the access pointer is moved to the right, and a Boolean calculation is performed on the document pointed to by the access pointer. If the heap size is greater than or equal to the truncation threshold of the current filtering level, document matching at the current filtering level ends, and the process moves to the next filtering level. At this point, the heap becomes the inverted index corresponding to the next filtering level, and an access pointer is allocated to the first document in the heap (the document with the highest matching score in the previous filtering level). Matching at the next filtering level is performed in the same way until document matching at the last filtering level is completed. The target documents matching the document filtering conditions are then identified as documents to be recalled. The number of target documents is consistent with the truncation threshold of the last filtering level.

[0157] It should be noted that you can search for the keyword x i If the access pointer can no longer move to the right, then for the search term x M Boolean calculations are performed on the documents pointed to by the access pointers, or the two processes can be performed alternately until the heap size reaches the filtering truncation threshold or all access pointers can no longer move to the right. In the case of multi-shard recall, the above steps can be repeated in each shard, and when setting the filtering truncation threshold, the filtering truncation threshold is multiplied by the shard coefficient to obtain the filtering truncation threshold corresponding to each shard. If there are d shards, it can be multiplied by 1 / d.

[0158] In a specific application, the document retrieval process also defines filtering conditions. The process of calculating the matching score includes: calculating the initial matching score of the document based on the matching algorithm of the current filtering level, and correcting the initial matching score using correction terms determined based on the filtering conditions to obtain the final matching score.

[0159] Specifically, let g(b1, b2, b3, ..., b GLet ) represent the filtering conditions for document attributes. The filtering conditions include a first condition filtering by p sub-target features, a second condition retaining documents based on m sub-target features, and a third condition retaining documents based on q interval ranges. The sum of p, m, and q equals G. The entire document retrieval process can then be expressed as an optimization problem, which, under the filtering conditions, finds the document with the highest matching score to the document selection criteria. The formal expression of this optimization problem is:

[0160] max S(X, Y)

[0161] stb iY ≠b i0 ,

[0162] b jY =b j0 ,

[0163] b kY ≥b k1 ,

[0164] b kY ≤b k2 ,

[0165] i=1, 2,..., p; j=1, 2,..., m; k=1, 2,..., q.

[0166] Where S(X, Y) is the matching score between document Y and document filtering condition X, b i0 b is the sub-target feature corresponding to the i-th first condition. j0 For the sub-target feature corresponding to the j-th second condition, b k1 and b k2 For the two sub-target features corresponding to the kth third condition, [b k1 b k2 Let d be the interval range corresponding to the k-th third condition. i (Y)=b iY -b i0 ≠0 indicates that the filtering condition is not equal to the class (i.e., the first condition), a j (Y)=b jY -b j0 =0 indicates the filtering condition for the class (i.e., the second condition), let r k (Y)=(b kY -b k1 (b) kY -b k2 If ≤ 0 represents the filtering condition for the range class (i.e., the third condition), then the optimization problem can be described as:

[0167] max S(X, Y)

[0168] std i (Y)≠0, i=1,…,p;

[0169] a j (Y) = 0, j = 1, ..., m;

[0170] r k (Y)≤0, l=1,...,q.

[0171] This will yield the Lagrange function that matches the document filtering criteria:

[0172]

[0173] Where, L(Y, {λ j},{μ k}) represents the matching result of object Y, X represents the level condition of the current filtering level, S(X) z λ(Y) represents the initial matching result of object Y at the current filtering level z. j and μ k The Lagrange multiplier is less than zero. Based on the above function, it can be seen that the matching score of a candidate object that satisfies all sub-attribute filtering conditions is always higher than the matching score of a candidate object that does not satisfy the sub-attribute filtering conditions. In this way, solving the object matching problem can be transformed into solving the extreme points of the Lagrange function, which can simplify the calculation process of the matching results and improve efficiency.

[0174] Furthermore, the scoring formula corresponding to the matching algorithm can be reduced to ensure that the matching score determined by the matching algorithm is positive. In a specific application, the reduced scoring formula can be expressed as: The Lagrange function matching the document filtering criteria is then updated as follows:

[0175]

[0176] In the above embodiments, a novel multi-stage document scoring and retrieval method was designed. This method divides the document retrieval process into multiple stages based on a Boolean syntax tree, integrates matching functions with filtering conditions, and sets matching functions and truncation thresholds at multiple stages. This effectively reduces redundant calculations in document scoring, while also improving the relevance of document recall. In multi-shard retrieval scenarios with large-scale data, multi-stage scoring and shard recall can also be combined to reduce shard fan-out.

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

[0178] Based on the same inventive concept, this application also provides an object matching apparatus for implementing the object matching method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more object matching apparatus embodiments provided below can be found in the limitations of the object matching method described above, and will not be repeated here.

[0179] In some embodiments, such as Figure 11 As shown, an object matching device 1100 is provided, including: a filtering level determination module 1102, a level condition determination module 1104, a hierarchical matching module 1106, and a target object determination module 1108, wherein:

[0180] The filtering level determination module 1102 is used to obtain the object filtering conditions and determine the nested filtering levels in the object filtering conditions;

[0181] The hierarchical condition determination module 1104 is used to determine the hierarchical conditions of each filtering level according to the nesting relationship between each filtering level; the hierarchical conditions of the later filtering level include the hierarchical conditions of the nested earlier filtering level; at least some filtering levels include at least some sub-filtering conditions in the object filtering conditions.

[0182] The hierarchical matching module 1106 is used to add the candidate objects from the candidate object set of the next filtering level to the candidate object set of the next filtering level for each filtering level that has a subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result between the candidate objects and the hierarchical conditions of the filtering level satisfies the matching conditions of the filtering level.

[0183] The target object determination module 1108 is used to filter out target objects that match the object filtering conditions from the candidate object set of the last filtering level.

[0184] In some embodiments, the object matching device 1100 further includes a matching algorithm determination module, configured to determine the matching algorithm for each filtering level based on the nesting relationship between the filtering levels; the attribute feature matching granularity of the matching algorithm of the filtering level is smaller than the attribute feature matching granularity of the matching algorithm of the previous filtering level nested within that filtering level. In this embodiment, the hierarchical matching module 1106 is specifically configured to: calculate the matching result between the attribute features of the candidate objects of each filtering level and the hierarchical conditions of that filtering level, based on the matching algorithm of each filtering level.

[0185] In some embodiments, the hierarchical matching module 1106 includes: a screening cutoff threshold determination unit, configured to determine the screening cutoff threshold for each screening level; the screening cutoff threshold of a screening level is less than the screening cutoff threshold of the previous screening level nested within that screening level; and a hierarchical matching unit, configured to add candidate objects from the candidate object set of the current screening level to the candidate object set of the next screening level when there is a next screening level in the current screening level, until the number of added candidate objects reaches the screening cutoff threshold of the current screening level.

[0186] In some embodiments, the matching result includes a matching degree. In this embodiment, the hierarchical matching module 1106 is further configured to: take the next filtering level after the current filtering level as the target filtering level, extract the target candidate objects from the candidate object set of the target filtering level, wherein the target candidate objects are the candidate objects with the highest matching degree with the level conditions of the current filtering level; if the target candidate objects meet the target level conditions of the target filtering level, calculate the target matching degree between the target candidate objects and the target level conditions; if the target matching degree meets the target matching conditions of the target filtering level, return to the step of extracting the target candidate objects from the candidate object set of the target filtering level, until the number of target candidate objects that meet the target matching conditions reaches the filtering cutoff threshold of the target filtering level.

[0187] In some embodiments, the hierarchical matching module 1106 includes: an initial matching result calculation unit, used to calculate the initial matching result of each candidate object in the candidate object set of each screening level with the hierarchical conditions of the screening level; a matching result determination unit, used to combine the initial matching result and the correction item determined based on the attribute screening conditions to obtain the matching result corresponding to the initial matching result; the attribute screening conditions are the conditions that the attribute features of the target object need to satisfy.

[0188] In some embodiments, the attribute features include multiple sub-attribute features; the attribute filtering conditions include sub-attribute filtering conditions that correspond one-to-one with at least a portion of the sub-attribute features. In this embodiment, the hierarchical matching module 1106 further includes: a feature difference calculation unit, used to calculate, for each sub-attribute filtering condition, the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition; and a correction term determination unit, used to perform statistical calculation on the feature difference corresponding to each sub-attribute filtering condition to obtain a correction term determined based on the attribute filtering conditions.

[0189] In some embodiments, the feature difference calculation unit is specifically used to: for a sub-attribute screening condition that uses a single sub-target feature to characterize the feature boundary, calculate the difference between the sub-attribute feature corresponding to the sub-attribute screening condition and the single sub-target feature to obtain the feature difference; for a sub-attribute screening condition that uses two sub-target features to characterize the feature boundary, calculate the difference between the sub-attribute feature corresponding to the sub-attribute screening condition and the two sub-target features respectively to obtain two difference values, and perform statistical calculation on these two difference values ​​to obtain the feature difference.

[0190] In some embodiments, the attribute filtering conditions include a first condition for filtering by sub-target features, a second condition for retaining by sub-target features, and a third condition for retaining by interval range; the correction terms include a first condition correction term corresponding to each first condition, a second condition correction term corresponding to each second condition, and a third condition correction term corresponding to each third condition. In this embodiment, the matching result determination unit is specifically used to: multiply the first condition correction term by the initial matching result to obtain the correction result corresponding to the initial matching result; and perform superposition calculation on the correction result, the second condition correction term, and the third condition correction term to obtain the matching result corresponding to the initial matching result.

[0191] In some embodiments, the matching result determination unit is specifically used to: perform normalization processing on the initial matching result to obtain a normalized result with a positive value; and combine the normalized result with the correction term determined based on the attribute filtering conditions to obtain the matching result corresponding to the initial matching result.

[0192] In some embodiments, the filtering level determination module 1102 is specifically used to: obtain object filtering conditions containing multiple sub-filtering conditions, construct a multi-level syntax tree that matches the object filtering conditions; the leaf nodes of the multi-level syntax tree correspond one-to-one with the sub-filtering conditions, and the child nodes of the multi-level syntax tree correspond to at least a portion of the sub-filtering conditions; the root node of the multi-level syntax tree corresponds to the object filtering conditions; determine the target level corresponding to the child node or root node in the multi-level syntax tree as the filtering level, and obtain each filtering level nested in the object filtering conditions.

[0193] In some embodiments, the matching result includes the matching degree; the target object determination module 1108 is specifically used to: filter out target objects whose matching degree with the object filtering conditions meets the object matching conditions from the candidate object set of the last filtering level; and output each target object in descending order of matching degree.

[0194] Each module in the aforementioned object matching 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.

[0195] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data involved in the object matching method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an object matching method.

[0196] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0197] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the object matching method described above.

[0198] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the object matching method described above.

[0199] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the object matching method described above.

[0200] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0201] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based object matching logic devices, etc., and are not limited to these.

[0202] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0203] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An object matching method, characterized in that, The method includes: Obtain object filtering conditions and determine the nested filtering levels within the object filtering conditions; Based on the nesting relationship between the filtering levels, the level conditions of each filtering level are determined; the level conditions of the subsequent filtering level include the level conditions of the nested previous filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions. For each of the filtering levels that has a subsequent filtering level, the candidate objects in the candidate object set of the filtering level are added to the candidate object set of the subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects and the level conditions of the filtering level satisfies the matching conditions of the filtering level. From the candidate object set of the last filtering level, select the target objects that match the object filtering conditions.

2. The method according to claim 1, characterized in that, The method further includes: Based on the nesting relationship between the filtering levels, a matching algorithm is determined for each filtering level; the attribute feature matching granularity of the matching algorithm of the filtering level is smaller than the attribute feature matching granularity of the matching algorithm of the previous filtering level nested within the filtering level. Based on the matching algorithm of each of the filtering levels, the matching result of the attribute features of the candidate objects of each filtering level with the level conditions of the filtering level is calculated respectively.

3. The method according to claim 1, characterized in that, The step of adding candidate objects from the candidate object set of the current filtering level to the candidate object set of the next filtering level for each filtering level that has a subsequent filtering level includes: Determine the respective filter cutoff threshold for each of the filter levels; the filter cutoff threshold of the filter level is less than the filter cutoff threshold of the previous filter level nested within the filter level; If a subsequent filtering level exists in the current filtering level, the candidate objects in the candidate object set of the current filtering level are added to the candidate object set of the subsequent filtering level until the number of the added candidate objects reaches the filtering cutoff threshold of the current filtering level.

4. The method according to claim 3, characterized in that, The matching result includes a matching degree; the method further includes: Using the next filtering level after the current filtering level as the target filtering level, the target candidate objects are extracted from the candidate object set of the target filtering level. The target candidate objects are the candidate objects with the highest matching degree with the level conditions of the current filtering level. If the target candidate meets the target level conditions of the target screening level, calculate the target matching degree between the target candidate and the target level conditions; If the target matching degree meets the target matching condition of the target filtering level, return to the step of removing the target candidate object from the candidate object set of the target filtering level, until the number of the target candidate objects that meet the target matching condition reaches the filtering cutoff threshold of the target filtering level.

5. The method according to claim 1, characterized in that, The method further includes: Calculate the initial matching result between each candidate object in the candidate object set of each filtering level and the level condition of the filtering level; By combining the initial matching result and the correction terms determined based on the attribute filtering conditions, the matching result corresponding to the initial matching result is obtained; the attribute filtering conditions are the conditions that the attribute features of the target object need to satisfy.

6. The method according to claim 5, characterized in that, The attribute features include multiple sub-attribute features; The attribute filtering conditions include sub-attribute filtering conditions that correspond one-to-one with at least a portion of the sub-attribute features; The method further includes: For each of the sub-attribute filtering conditions, calculate the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition; Statistical calculations are performed on the feature differences corresponding to each of the sub-attribute filtering conditions to obtain the correction terms determined based on the attribute filtering conditions.

7. The method according to claim 6, characterized in that, The calculation of the feature difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the feature boundary of the sub-attribute filtering condition includes: For the sub-attribute filtering condition that uses a single sub-target feature to characterize the feature boundary, the feature difference is obtained by calculating the difference between the sub-attribute feature corresponding to the sub-attribute filtering condition and the single sub-target feature. For the sub-attribute filtering condition that uses two sub-target features to characterize the feature boundary, the sub-attribute feature corresponding to the sub-attribute filtering condition is subtracted from the two sub-target features respectively to obtain two difference values, and the feature difference is obtained by statistical calculation of the two difference values.

8. The method according to claim 5, characterized in that, The attribute filtering conditions include a first condition for filtering by sub-target features, a second condition for retaining by sub-target features, and a third condition for retaining by interval range; the correction items include a first condition correction item corresponding to each of the first conditions, a second condition correction item corresponding to each of the second conditions, and a third condition correction item corresponding to each of the third conditions. The step of combining the initial matching result with the correction terms determined based on the attribute filtering conditions to obtain the matching result corresponding to the initial matching result includes: Multiply the first condition correction term by the initial matching result to obtain the correction result corresponding to the initial matching result; The correction result, the second condition correction term, and the third condition correction term are superimposed to obtain the matching result corresponding to the initial matching result.

9. The method according to claim 5, characterized in that, The step of combining the initial matching result with the correction terms determined based on the attribute filtering conditions to obtain the matching result corresponding to the initial matching result includes: The initial matching result is reduced to obtain a reduced result with a positive value; By combining the specification results and the correction terms determined based on the attribute filtering conditions, the matching result corresponding to the initial matching result is obtained.

10. The method according to any one of claims 1 to 9, characterized in that, The step of obtaining object filtering conditions and determining the nested filtering levels within the object filtering conditions includes: Obtain object filtering conditions containing multiple sub-filtering conditions, and construct a multi-level syntax tree that matches the object filtering conditions; the leaf nodes of the multi-level syntax tree correspond one-to-one with the sub-filtering conditions, and the child nodes of the multi-level syntax tree correspond to at least a portion of the sub-filtering conditions; the root node of the multi-level syntax tree corresponds to the object filtering conditions. The target level corresponding to the child node or root node in the multi-level syntax tree is determined as the filtering level, thus obtaining each of the nested filtering levels in the object filtering conditions.

11. The method according to any one of claims 1 to 9, characterized in that, The matching result includes a matching degree; the step of filtering target objects that match the object filtering conditions from the candidate object set of the last filtering level includes: From the candidate object set of the last filtering level, select target objects whose matching degree with the object filtering conditions is satisfied; Output the target objects in descending order of matching degree.

12. An object matching device, characterized in that, The device includes: The filtering level determination module is used to obtain object filtering conditions and determine each filtering level nested in the object filtering conditions. The hierarchical condition determination module is used to determine the hierarchical conditions of each of the filtering levels according to the nesting relationship between the filtering levels; the hierarchical conditions of the later filtering level include the hierarchical conditions of the nested earlier filtering level; at least a portion of the filtering levels include at least a portion of the sub-filtering conditions in the object filtering conditions. A hierarchical matching module is used to add candidate objects from the candidate object set of each of the filtering levels to the candidate object set of the next filtering level for each filtering level that has a subsequent filtering level; the candidate object set of the filtering level includes candidate objects that satisfy any sub-filtering condition contained in the filtering level; the matching result of the candidate objects with the hierarchical conditions of the filtering level satisfies the matching conditions of the filtering level. The target object determination module is used to filter out target objects that match the object filtering conditions from the candidate object set of the last filtering level.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Word prompting method and device, electronic equipment and storage medium

    CN114722174A

  • Object extension method and device, computer equipment and storage medium

    CN115186676A