Search methods, devices, electronic equipment and storage media

By combining multi-level caching with a search engine, the problem of low search efficiency under high concurrency requests was solved, and personalized information push with low latency and high efficiency was achieved.

CN114969536BActive Publication Date: 2025-10-31BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210633388.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-06
Publication Date
2025-10-31
Estimated Expiration
2042-06-06

AI Technical Summary

Technical Problem

Existing technologies suffer from low search efficiency and long latency when determining the category of target objects, especially in high-concurrency request scenarios, making it difficult to achieve the accuracy and efficiency of personalized information push.

Method used

A search approach combining multi-level caching and a search engine is adopted. Initial matching is achieved through multi-level caching, and a deeper search is performed using the search engine when no match is found. In conjunction with mechanisms such as Bloom filters and rate limiters, the search process is optimized to cope with high concurrency requests.

Benefits of technology

It can still guarantee low latency feedback under high concurrency requests, improving search performance and efficiency, and achieving accuracy and efficiency in personalized information push.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969536B_ABST
    Figure CN114969536B_ABST
Patent Text Reader

Abstract

This disclosure provides search methods, apparatus, electronic devices, and storage media, relating to the field of computer technology, and particularly to the fields of cloud computing, big data, and intelligent search technology. The specific implementation scheme is as follows: based on the identifier information of the target object and the identifier information of the target category in the target request, a matching relationship between the target object and the target category is searched in a multi-level cache; if no matching relationship is found in the multi-level cache, a matching relationship between the target object and the target category is searched in a search engine based on the identifier information of the target object and the identifier information of the target category. The scheme according to the embodiments of this disclosure can improve search efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to the fields of cloud computing, big data, and intelligent search technology. Background Technology

[0002] To accurately deliver personalized information to a target audience, it's typically necessary to know the target audience's category. This allows for the determination and selection of specific personalized content based on the target audience's category. Determining the target audience's category requires performing a category search based on their information to identify their category. Summary of the Invention

[0003] This disclosure provides a search method, apparatus, device, and storage medium.

[0004] According to one aspect of this disclosure, a search method is provided, comprising:

[0005] Based on the identifiers of the target object and the target category in the target request, search for matching relationships between the target object and the target category in the multi-level cache; and

[0006] If no matching relationship between the target object and the target category is found in the multi-level cache, a matching relationship between the target object and the target category is searched in the search engine based on the identifier information of the target object and the identifier information of the target category.

[0007] According to another aspect of this disclosure, a search apparatus is provided, comprising:

[0008] The first search module is used to search for matching relationships between target objects and target categories in a multi-level cache based on the identifier information of the target object and the identifier information of the target category in the target request; and

[0009] The second search module is used to search for a matching relationship between the target object and the target category in the search engine, based on the identification information of the target object and the identification information of the target category, when no matching relationship between the target object and the target category is found in the multi-level cache.

[0010] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0011] At least one processor; and

[0012] The memory is communicatively connected to the at least one processor; wherein,

[0013] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods of any embodiment of the present disclosure.

[0014] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform a method according to any embodiment of this disclosure.

[0015] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a method according to any embodiment of this disclosure.

[0016] The solution according to the embodiments of this disclosure can improve search efficiency.

[0017] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0018] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0019] Figure 1 This is a flowchart illustrating the search method according to an embodiment of the present disclosure;

[0020] Figure 2 This is a schematic diagram illustrating an application scenario of the search method according to an embodiment of the present disclosure;

[0021] Figure 3 This is a flowchart illustrating a search method according to another embodiment of the present disclosure;

[0022] Figure 4 This is a flowchart illustrating a search method according to another embodiment of the present disclosure;

[0023] Figure 5 This is a flowchart illustrating a search method according to another embodiment of the present disclosure;

[0024] Figure 6 This is a schematic diagram of the structure of a search device according to an embodiment of the present disclosure;

[0025] Figure 7 This is a block diagram of an electronic device used to implement the search method of the embodiments of this disclosure. Detailed Implementation

[0026] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0027] Embodiments of this disclosure provide a search method, such as Figure 1 The diagram shown is a flowchart of the search method in this embodiment, which may include the following steps:

[0028] S101: Based on the identifier information of the target object and the identifier information of the target category in the target request, search for a matching relationship between the target object and the target category in the multi-level cache.

[0029] S102: If no matching relationship between the target object and the target category is found in the multi-level cache, search for a matching relationship between the target object and the target category in the search engine based on the identification information of the target object and the identification information of the target category.

[0030] It should be noted that the target category can be understood as any defined category, and the definition rules of this category can be adjusted as needed. The target object can be understood as a person, thing, or event that conforms to a certain category rule. For example, the target object can be consumers, and the target category can be high-spending groups, low-spending groups, members, non-members, youth, the elderly, etc. As another example, if the target object is a smart terminal, the target category can be a high-performance smart terminal, a high-capacity smart terminal, or a smart terminal equipped with a certain function, etc.

[0031] The identification information for a target object may include id (Identity document) or uid (User Identification). The identification information for a target category may include id or package_id (Package Identification Number). Identification information is used to characterize the target object and target category. As long as the corresponding target object and target category can be identified through the identification information, the specific identification information used can be adjusted as needed and is not specifically limited here.

[0032] The matching relationship between a target object and a target category can be understood as whether a target object can be classified into that target category.

[0033] Multi-level caching can include at least two levels of cache. Each level can use the same or different cache structures. Each level of a multi-level cache stores data on the matching relationships between different objects and categories. Depending on the caching needs, each level can also store timestamps of data storage. Each level of a multi-level cache can perform search tasks sequentially. For example, in a multi-level cache including a first-level cache, a second-level cache, and a third-level cache, the search begins in the first-level cache to find a match between the target object and the target category. If no match is found, the search continues in the second-level cache, and so on, until a match is found in the third-level cache. Each level of a multi-level cache can also perform search tasks in parallel. For example, in a multi-level cache including a first-level cache and a second-level cache, the first and second caches perform search tasks simultaneously. If a match between the target object and the target category is found in any of the caches, the search in the remaining caches stops.

[0034] Searching for a match between a target object and a target category in a multi-level cache can be understood as: checking the cached data at each level of the cache to see if it contains cached data that associates the target object and the target category. If it does, then a match exists between the target object and the target category, meaning the target object can belong to the target category. If it does not, then a match cannot be determined.

[0035] The search engine can be any existing search engine, without any specific restrictions, as long as it can be used to determine that the target object and the target category have a matching relationship.

[0036] According to the solution of this disclosure embodiment, the search method that combines multi-level caching and search engine can meet the application needs of high-concurrency request scenarios. When there are multiple target requests that need to be searched, low-latency feedback can still be guaranteed, thereby improving search performance and search efficiency.

[0037] In one embodiment, the search method provided by the embodiments of this disclosure, including steps S101 and S102, may further include:

[0038] If a match is found between the target object and the target category in the multi-level cache, the target object is confirmed to match the target category, and the search result is returned.

[0039] It should be noted that if the matching relationship between the target object and the target category can be determined by using multi-level caching, then step S102 will not be executed.

[0040] According to embodiments of this disclosure, Figure 2This is a schematic diagram of a distributed cluster processing scenario according to an embodiment of the present disclosure. The distributed cluster system is an example of a cluster system, exemplarily describing the search method of any embodiment of the present disclosure that can be performed using this distributed cluster system. The present disclosure is not limited to search methods on a single machine or multiple machines; distributed processing can further improve the search efficiency and performance of the search method. The distributed cluster system includes multiple nodes (such as server cluster 101, server 102, server cluster 103, server 104, and server 105; server 105 can also connect to electronic devices, such as mobile phone 1051 and desktop computer 1052). Multiple nodes, and multiple nodes and connected electronic devices, can jointly execute one or more search tasks. The multi-level cache and the search engine can each correspond to a node in the distributed cluster system, or they can share a single node. Each level of the multi-level cache can implement search and storage functions through a single server or a server cluster. The search engine can implement search and storage functions through a single server or a server cluster.

[0041] The search method disclosed in this embodiment can be applied to a rule engine. A rule engine is an engine that processes complex sets of rules. By inputting some basic events, it obtains the final execution result through deduction or induction. The core function of a rule engine is to extract complex and volatile rules from the system and use flexible and variable rules to describe business requirements. Through this method, the rule engine can determine whether the target object is an object that matches the target category. When the target object matches the target category, personalized content is pushed to the target object according to the target category to achieve personalized delivery.

[0042] Whether considering the consumer experience or the user experience, personalized push notifications are crucial. For example, when accessing an app, users often expect personalized recommendations, displays, functions, and activities, which enhance user experience and increase user stickiness. From an operational perspective, certain activities have higher CTRs (Click-Through-Rate) among certain groups, and certain products are more suitable for certain groups. Different groups have different needs, and refined, personalized operations and push notifications can effectively increase revenue and user activity. The method to achieve the above-mentioned personalized operational goals is personalized outreach. Personalized outreach involves operations setting target groups through rules. When a user browses the app in real time, the rule engine parses the rules to determine whether the user is the target user. If so, push notification A is executed; otherwise, push notification B is executed, thereby achieving refined operations for different groups. Furthermore, the rule engine using the search method of this disclosure can overcome the shortcomings of existing rule engines. Specifically, it can solve the problems of high learning barriers, high usage barriers, slow response times, and long request latency under high concurrency in existing rule engines.

[0043] In one example, the search method of this disclosure embodiment can be applied to the commercial business scenario of cloud storage. When it is necessary to push activities and products to users of cloud storage, the search method of this disclosure embodiment can be used to determine whether the target object (user) is a user who can be matched with the target category of pushing specific activities and specific products.

[0044] In one example, the search method of this disclosure can be applied to online shopping business scenarios. When it is necessary to push activities and products to users of a shopping platform, the search method of this disclosure can be used to determine whether the target object (user) is a user who can be matched with the target category of pushing specific activities and specific products.

[0045] In one embodiment, the search method provided by this disclosure includes steps S101 and S102, wherein the multi-level cache includes at least two levels of cache. Based on this, step S101: searching for a matching relationship between the target object and the target category in the multi-level cache according to the identifier information of the target object and the identifier information of the target category in the target request, may include:

[0046] S1011: Based on the identifier information of the target object and the identifier information of the target category in the target request, search for the matching relationship between the target object and the target category in the first-level cache.

[0047] S1012: If no matching relationship between the target object and the target category is found in the first-level cache, search for the matching relationship between the target object and the target category in the second-level cache based on the identification information of the target object and the identification information of the target category.

[0048] It's important to note that the first-level cache and the second-level cache can use the same or different cache structures. Both can be configured locally or in the cloud. The first-level cache can be a single cache or a clustered cache. Similarly, the second-level cache can also be a single cache or a clustered cache. For example, the first-level cache can use an LRU (Least Recently Used) cache, while the second-level cache can use a REDIS (Remote Dictionary Server) cache. The LRU cache can be configured locally, while the REDIS cache can be a clustered cache.

[0049] According to the scheme of this disclosure embodiment, the search method with multi-level caching can meet the application needs of high-concurrency request scenarios. When there are multiple target requests that need to be searched, low-latency feedback can still be guaranteed, thereby improving search performance and search efficiency.

[0050] In one implementation, the search engine includes an ELASTICSEARCH cluster, and the multi-level cache includes an LRU cache and a REDIS cluster cache. In the search method provided by the embodiments of this disclosure, step S101: searching for a matching relationship between the target object and the target category in the multi-level cache based on the identifier information of the target object and the identifier information of the target category in the target request, may include:

[0051] Based on the target object's identifier and target category identifier in the target request, a search is performed in the LRU cache for a match between the target object and target category. If no match is found in the LRU cache, a search is then performed in the Redis cluster cache based on the target object's identifier and target category identifier.

[0052] Step S102: If no matching relationship between the target object and the target category is found in the multi-level cache, search for a matching relationship between the target object and the target category in the search engine based on the identifier information of the target object and the identifier information of the target category. This may include:

[0053] If no matching relationship between the target object and the target category is found in either the LRU cache or the REDIS cluster cache, a matching relationship between the target object and the target category is searched in the ELASTICSEARCH cluster based on the identification information of the target object and the identification information of the target category.

[0054] According to the embodiments of this disclosure, the search method can adapt to high-concurrency request processing and low-latency feedback. Multi-level caching improves search performance and accelerates query efficiency. By caching the association between objects and categories in the REDIS cluster cache, query performance can be greatly improved. The time for a single query can be controlled within 20ms. Using the REDIS cluster cache can adapt to application scenarios with a large number of objects but a small number of categories. For example, when there are more than 1 billion target objects and hundreds of categories.

[0055] In one example, upon receiving a target request, the local LRU cache is first checked. The cache searches for a match between the target object and its category. If a match is found, the timestamp of the cached result is checked for expiration (expiration is defined as exceeding a threshold storage time). If not expired, the search result is returned. If expired or not found, the Bloom filter is queried to check for the existence of the uid and package_id. If not found, the result is returned directly. If a match is found, it indicates that the uid might be in the package_id, and the Redis cluster cache needs to be queried further.

[0056] Introducing cache expiration can improve the accuracy of matching target objects and target categories. If the cache expires, the original cached results may have become invalid or been updated. Even if a cached result matching the target object and target category is found in the cache, it cannot be used because the cached result has no value. Using it would only lead to inaccurate feedback results.

[0057] Data in a Redis cluster cache can use a hash mapping structure. The object's identifier information serves as the key, the cache entry time as the value, and the category identifier information as the field. An object's identifier information can belong to multiple categories simultaneously; that is, a single identifier information can form a hash mapping structure with multiple different categories.

[0058] In one embodiment, the search method provided by this disclosure includes steps S101 and S102. Step S102: If no matching relationship between the target object and the target category is found in the multi-level cache, a matching relationship between the target object and the target category is searched in the search engine based on the identifier information of the target object and the identifier information of the target category, including:

[0059] If a cached result containing a matching relationship between the target object and the target category is found in the multi-level cache, but the timestamp of the cached result has expired (the cached result's storage time exceeds a threshold time), it is determined that no matching relationship between the target object and the target category was found in the multi-level cache; and

[0060] Based on the identifiers of the target object and the target category, search for matching relationships between the target object and the target category in the search engine.

[0061] In one example, upon receiving a target request, the local LRU cache is first checked. The cache searches for a match between the target object and its category. If a match is found, the timestamp of the cached result is checked for expiration (expiration is defined as exceeding a threshold storage time). If not expired, the search result is returned. If expired or not found, the Bloom filter is queried to check for the existence of the uid and package_id. If not found, the result is returned directly. If a match is found, it indicates that the uid might be in the package_id, and the Redis cluster cache needs to be queried further.

[0062] In one embodiment, the search method provided by the present disclosure includes steps S101 and S102, wherein step S1012: if no matching relationship between the target object and the target category is found in the first-level cache, the matching relationship between the target object and the target category is searched in the second-level cache based on the identification information of the target object and the identification information of the target category, which may include:

[0063] If no matching relationship between the target object and the target category is found in the first-level cache, the mapping relationship between the target object and the target category is searched in the Bloom filter based on the identification information of the target object and the identification information of the target category.

[0064] If a mapping relationship between the target object and the target category is found, the matching relationship between the target object and the target category is searched in the second-level cache based on the identification information of the target object and the identification information of the target category.

[0065] According to the solution of this disclosure, a Bloom filter can solve the cache penetration problem and prevent sudden surges in concurrency or malicious attacks. For example, if the target object and target category in a request do not exist, even querying multiple levels of cache will not result in a cache hit. This would cause all requests to reach the search engine, leading to search engine crashes or high latency, and ultimately, cluster downtime. A Bloom filter can solve the aforementioned cache penetration problem. A Bloom filter can determine whether the target object and target category are in subsequent caches. If not, it directly returns the search result that did not match the target object and target category, without continuing to request subsequent caches for further searching, thus preventing the aforementioned risks.

[0066] In a specific example, a Bloom filter can be implemented using the REDIS SETBIT and GETBIT commands. For a certain category (or object), the entire identifier information of that category (or object) is hashed and mapped to a numerical value, then SETBITed into a REDIS string structure and set to 1. In this way, when querying, the data can be GETBITed through the hash mapping value. If it is 0, it means that the data is definitely not in that category (or object).

[0067] In one example, the search method of this disclosure embodiment includes: after receiving a target request, searching the local LRU cache for a match between the target object and the target category. If a match is found, checking if the timestamp of the cached result has expired (expired if it exceeds a threshold storage time). If not expired, returning the search result. If expired or not found, continuing to query the Bloom filter to check if the target object's uid and the target category's package_id exist. If not, directly returning the result confirming no match. If a match is found, it indicates that the target object's uid and the target category's package_id may exist in the REDIS cluster cache, and further querying of the REDIS cluster cache is required. The REDIS cluster cache uses a HASH structure, with uid as the key, package_id as the field, and timestamp as the value. When querying using uid and package_id, the timestamp is retrieved. If the timestamp has not expired, a match is directly returned; if the timestamp has expired, the search continues in the lowest-level ELASTICSEARCH cluster.

[0068] In one embodiment, the search method provided by the present disclosure includes steps S101 and S102, wherein step S102: when no matching relationship between the target object and the target category is found in the multi-level cache, searching for the matching relationship between the target object and the target category in the search engine based on the identification information of the target object and the identification information of the target category, may include:

[0069] If no matching relationship between the target object and the target category is found in the multi-level cache, a rate limiter is used to determine the request concurrency of the search engine.

[0070] If the request concurrency does not meet the concurrency threshold, the search engine searches for matching relationships between the target object and the target category based on the target object's identifier information and the target category's identifier information.

[0071] It should be noted that the rate limiter is used to limit the number of requests. When the number of requests exceeds the threshold, no more requests will be processed.

[0072] According to the solutions in this disclosure, multi-level cache failure or simultaneous expiration of cached results can cause a sudden surge of requests to directly impact the search engine. These extreme cases can lead to excessive pressure on the search engine. A rate limiter can restrict the concurrency of simultaneous access to the search engine, thereby protecting it and implementing service rate limiting, automatic degradation, and random expiration to resolve the cache avalanche problem.

[0073] In one example, the rate limiter can be a global rate limiter. A global rate limiter is implemented using `REDIS INCR(increment)`. When the `INCR` value reaches the concurrency threshold within a specified time, the global rate limiter returns a failure result and stops requesting the search engine to continue searching for matches between the target object and the target category. When the `INCR` value is less than the concurrency threshold, it continues to request the search engine to continue searching for matches between the target object and the target category. For example, if the concurrency threshold is set to 2000, it will return failure when it reaches 2000, otherwise it will return success. The expiration time of this concurrency threshold is set to one second, so it will be reset to zero and the count will restart at the next second, thus achieving the purpose of global rate limiting. The initial setting is to set the value to 1 and set the expiration time. Subsequent accesses will retrieve the value, check if it exceeds the threshold, return success if it does not, and increment the `INCR` value; otherwise, return failure.

[0074] In one example, such as Figure 3 As shown, the search method also includes:

[0075] Before using any level of cache in a multi-level cache to search for a match between the target object and the target category, query the running status of that level of cache.

[0076] When an exception such as a crash occurs in this level of cache, the search service for the target request is downgraded, and a no-hit result is directly returned (i.e. no matching relationship was found between the target object and the target category), and the search engine is no longer used for searching.

[0077] If no abnormalities occur at this level of cache and no matching relationship is found in the cache (or a matching relationship is found but the timestamp has expired), the rate limiter is used to determine the concurrent requests of the search engine.

[0078] If the number of concurrent requests does not exceed the concurrency threshold, the search engine is used to search for matching relationships between users and demographic rules. If the number of concurrent requests exceeds the concurrency threshold, a no-match result is directly returned, and the search engine search is stopped.

[0079] According to the solutions in this disclosure, multi-level cache failure or simultaneous expiration of cached results can cause a surge of requests to directly impact the search engine. These extreme cases can overwhelm the search engine. Establishing a rate limiter restricts the concurrency of simultaneous access to the search engine, thereby protecting it and implementing service rate limiting, automatic degradation, and random expiration to resolve the cache avalanche problem.

[0080] In one embodiment, the search method provided by the present disclosure includes steps S101 and S102, wherein step S102: when no matching relationship between the target object and the target category is found in the multi-level cache, searching for the matching relationship between the target object and the target category in the search engine based on the identification information of the target object and the identification information of the target category, may include:

[0081] If no matching relationship between the target object and the target category is found in the multi-level cache, the first pre-stored matching category is searched in the search engine based on the identification information of the target category.

[0082] Based on the target object's identification information, determine the target object's user profile information.

[0083] If the first pre-stored category is found in the search engine, the matching relationship between the first pre-stored category and the target object is determined based on the target object's identifier information and user profile information.

[0084] It should be noted that the first pre-stored category can be understood as a category stored in the search engine that is the same as the target category. The first pre-stored category is stored in the search engine in advance.

[0085] Determining the matching relationship between the first pre-stored category and the target object based on the target object's identifier information and user profile information can be understood as follows: if the target object's user profile information matches the user profile information contained in the first pre-stored category, then the first pre-stored category is determined to match the target object. Alternatively, it can be understood as: identifying the first matching object corresponding to the first pre-stored category in the search engine's stored results; if the identifier information and user profile information of the first matching object match the identifier information and user profile information of the target object, then the first pre-stored category is determined to match the target object.

[0086] According to the scheme of this disclosure embodiment, by using the identification information of the target object and the user profile information of the target object, the matching relationship between the target object and the target category can be accurately determined from the search engine.

[0087] In one embodiment, the search method provided by the embodiments of this disclosure, including steps S101 and S102, may further include:

[0088] If the search engine determines that the target object and the target category have a matching relationship, the target object and the target category are associated and stored in a multi-level cache.

[0089] According to the solution of this disclosure embodiment, the effectiveness of the multi-level cache can be guaranteed by updating the search results of the search engine to the multi-level cache. When a request is received again that determines that the target object and the target category have a matching relationship, the search task can be completed while the request passes through the multi-level cache, thus improving search efficiency.

[0090] In one embodiment, the search method provided by the embodiments of this disclosure, including steps S101 and S102, may further include:

[0091] The pre-defined category configuration page is stored in the search engine to generate the first pre-stored category. The category configuration page includes configuration items for multiple user profiles, and the object collection includes multiple objects and their corresponding user profile information.

[0092] Using the first pre-stored category, determine the first matching object from the object set that has a matching relationship with the first pre-stored category.

[0093] Associate the first pre-stored category with the first matching object and store them in a multi-level cache.

[0094] It should be noted that the types, number, and specific content of configuration items on the category configuration page can be selected and adjusted as needed, and no specific limitations are imposed here. For example, configuration items may include: user membership type, membership level, user gender, user age, user identity, etc.

[0095] The generated first pre-stored category contains information corresponding to the configuration items. The generated first pre-stored category can be understood as a transcoded category configuration page.

[0096] Using the first pre-stored category, the first matching object that has a matching relationship with the first pre-stored category is determined from the object set. This can be understood as: if the user profile information of an object matches the information corresponding to the configuration item, the object is determined to be the first matching object. The first matching object can include one object or multiple objects.

[0097] According to the solution of this disclosure embodiment, the category configuration page can be directly stored in the search engine and a first pre-stored category can be generated, which reduces the difficulty and threshold of creating categories in the search engine.

[0098] In one example, the category configuration page can be a visual page that can be dragged and dropped to generate the first pre-stored category in the search engine. Generating the first pre-stored category in the search engine via drag-and-drop significantly lowers the barrier to category creation. Because the visual page can directly generate the first pre-stored category in the search engine, the correlation between code and category creation is decoupled through the search engine, reducing the operational and learning barriers for users who need to create the first pre-stored category in the search engine.

[0099] In one example, before determining the first matching object from the object set that matches the first pre-stored category using the first pre-stored category, the process includes: encapsulating the first pre-stored category into an ELASTICSEARCHDSL (domain-specific language) protocol using a rule protocol. This ELASTICSEARCH DSL protocol is used to determine the first matching object from the object set that matches the first pre-stored category. This ELASTICSEARCH DSL possesses all the capabilities of ELASTICSEARCH rules while significantly simplifying the protocol, making it simple and usable. This ELASTICSEARCH DSL protocol can be adapted to a visual drag-and-drop category configuration page, making it easy to integrate with search engines. ELASTICSEARCH search mainly uses the following methods: range (range search), terms (exact match), match (fuzzy match), and exist (field exists), with some exceptions (must_not). Using this protocol to encapsulate the ELASTICSEARCH DSL significantly lowers the barrier to entry for protocol usage while implementing the functionality. The process of translating the first pre-stored category into the Elasticsearch DSL includes: converting the `range_number`, `range_string`, and `range_string_last_days` of the first pre-stored category into Elasticsearch range searches; converting the `terms_string` and `not_terms_string` of the first pre-stored category into Elasticsearch terms exact match searches; converting the `match` and `not_match` of the first pre-stored category into Elasticsearch match fuzzy match searches; and converting the `exist_labels` and `not_exist_labels` of the first pre-stored category into Elasticsearch exist searches.

[0100] In one example, the first pre-stored category is serialized into a JSON (JavaScript Object Notation) string and stored in the corresponding search engine's index. This index uses identification information as the route ID and uses `crowd_rules_agreement` to store the rule protocol JSON string. When used, the rule JSON needs to be deserialized to obtain the original rule, then translated into an ELASTICSEARCH DSL, and the first matching object is determined from the object collection and cached in the cache cluster. When storing the first pre-stored category in the index content, the index structure of the first pre-stored category can include: identification information, category name, category description, string, category type, creator, creation time, and specific rule protocol content. One or more of this information can be used to navigate to the first pre-stored category.

[0101] In one embodiment, the search method provided by the present disclosure includes steps S101 and S102, wherein determining a first matching object that has a matching relationship with the first pre-stored category from the object set using a first pre-stored category includes:

[0102] If the first pre-stored category is determined to be unlocked based on the distributed lock, the first matching object with a matching relationship with the first pre-stored category is determined from the object set using the first pre-stored category.

[0103] According to the scheme of this disclosure, distributed locks can prevent the same pre-stored category from being created multiple times at the same time, thus avoiding the problem of duplicate pre-stored categories and data chaos in the search engine, resulting in dirty data.

[0104] In one instance, such as Figure 4 As shown, when the search method is applied to a rule engine for audience search, the target category can be understood as the target audience rule, and the first pre-stored category can be understood as the audience rule newly created and stored in the search engine (ELASTICSEARCH cluster). Specific methods include:

[0105] Send the request to create a new audience rule to the personalized reach rule engine.

[0106] The personalized outreach rule engine acquires the lock for the rules of the target audience based on a REDIS cluster configured with a distributed lock (which may not be the same REDIS cluster used for multi-level caching).

[0107] If the lock is acquired, rules for that group can be created and stored in the search engine.

[0108] Since all rules in the engine are reusable, concurrency safety issues may arise, such as simultaneous updates to the same user group or one party updating a user group while another deletes one. Without restrictions, this could lead to chaotic rule usage and dirty data. This distributed lock ensures that rules for the same user group are concurrently safe at any given time. The distributed lock is implemented using a Redis cluster, specifically through the `REDIS SET PX NX` (Setnx setexpsetex) command, combined with a LUA script. The logic uses an identifier as the key in the Redis string and the process ID that created the user group rule as the value. This identifies that the process holds the lock for that user group rule, preventing other processes from acquiring it. If no process is found to be holding the lock during a preemptive attempt, the value can be set to the current process ID, along with an expiration time. The lock is automatically released after the expiration time. Alternatively, the process can actively release the lock after completing its task. Requesting the locking script allows locking; after completion, unlocking is required. Unlocking checks if the lock was acquired by the process that created the user group rule. If so, the corresponding key and value are deleted, indicating lock release; otherwise, unlocking fails.

[0109] In one embodiment, the search method provided by the embodiments of this disclosure, including steps S101 and S102, may further include:

[0110] When the object set is updated, a second matching object that matches the first pre-stored category is determined from the updated object set.

[0111] Associate the first pre-stored category and the second matching object and store them in a multi-level cache.

[0112] According to the solution of this disclosure embodiment, by periodically updating the multi-level cache, the validity and timeliness of the caching results of objects and categories in the multi-level cache can be guaranteed.

[0113] In one embodiment, the search method provided by the embodiments of this disclosure, including steps S101 and S102, may further include:

[0114] Using machine learning, a third matching object that matches the second pre-stored category is identified.

[0115] Associate the second pre-stored category and the third matching object and store them in a multi-level cache.

[0116] Using a knowledge graph approach, a fourth matching object that has a matching relationship with the third pre-stored category is identified.

[0117] Associate the third pre-stored category with the fourth matching object and store them in a multi-level cache.

[0118] It should be noted that the second, third, and first pre-stored categories can be the same or different categories. If they are in the same category, the first, third, and fourth matching objects may differ because they are determined using different methods. Machine learning and knowledge graphs may identify different matching objects. If they are in different categories, machine learning and knowledge graphs can be used to fill in any categories not covered by the first pre-stored category.

[0119] According to the scheme of the embodiments of this disclosure, by storing the matching relationship between categories and objects determined in different ways into a multi-level cache, the search effect of the multi-level cache can be improved, so that the target request can find the required result through the multi-level cache as much as possible, and the search pressure of the search engine can be reduced.

[0120] In one implementation, such as Figure 5 As shown, the search methods include:

[0121] Upon receiving a personalized outreach determination request (target request), determine the identifier information of the target object and the identifier information of the target category in the personalized outreach determination request.

[0122] Based on the identifiers of the target object and the target category, a search is performed using the local LRU cache. If the local LRU cache contains a matching relationship between the target object and the target category, the search result is returned.

[0123] If the local LRU cache does not contain a matching relationship between the target object and the target category, then a Bloom filter is used to perform a query based on the identifier information of the target object and the identifier information of the target category. If a match is found, the search continues using the Redis cluster cache.

[0124] If the Redis cluster cache does not contain a match between the target object and the target category, a global rate limiter is used to determine the request concurrency. If the request concurrency exceeds the concurrency threshold, the request is considered to have failed and a no-match search result is reported. If the request concurrency does not exceed the concurrency threshold, the ELASTICSEARCH cluster is used to continue the search.

[0125] Based on the identifier information of the target category, search for the first pre-stored matching category in the ELASTICSEARCH cluster.

[0126] Based on the target object's identification information, determine the target object's user profile information.

[0127] If a first pre-stored category is found in the ELASTICSEARCH cluster, the matching relationship between the first pre-stored category and the target object is determined based on the target object's identifier information and user profile information. Based on the search results from the ELASTICSEARCH cluster, the local LRU cache, the REDISS cluster cache, and the Bloom filter are updated.

[0128] The first pre-stored category involves storing a pre-defined, drag-and-drop visual page (category configuration page) into the search engine's generated database. This category configuration page includes configuration items for multiple user profiles, and the object collection contains multiple objects and their corresponding user profile information.

[0129] Embodiments of this disclosure provide a search device, such as Figure 6 The diagram shown is a structural block diagram of the search device in this embodiment. The device may include:

[0130] The first search module 610 is used to search for matching relationships between target objects and target categories in a multi-level cache based on the identifier information of the target object and the identifier information of the target category in the target request.

[0131] The second search module 620 is used to search for a matching relationship between the target object and the target category in the search engine, based on the identification information of the target object and the identification information of the target category, when no matching relationship between the target object and the target category is found in the multi-level cache.

[0132] In one implementation, the first search module 610 includes:

[0133] The first search submodule is used to search for matching relationships between target objects and target categories in the first-level cache based on the identification information of the target object and the identification information of the target category in the target request.

[0134] The second search submodule is used to search for a matching relationship between the target object and the target category in the second-level cache if no matching relationship is found in the first-level cache. This is based on the identifier information of the target object and the identifier information of the target category.

[0135] In one implementation, the second search submodule is further configured to, if no matching relationship between the target object and the target category is found in the first-level cache, search for a mapping relationship between the target object and the target category in a Bloom filter based on the identifier information of the target object and the identifier information of the target category. If a mapping relationship between the target object and the target category is found, search for a matching relationship between the target object and the target category in the second-level cache based on the identifier information of the target object and the identifier information of the target category.

[0136] In one implementation, the second search module 620 includes:

[0137] The first determination submodule is used to determine the search engine's request concurrency by using a rate limiter when no matching relationship between the target object and the target category is found in the multi-level cache.

[0138] The third search submodule is used to search for matching relationships between target objects and target categories in the search engine when the request concurrency does not meet the concurrency threshold, based on the identification information of the target object and the identification information of the target category.

[0139] In one implementation, the second search module 620 includes:

[0140] The fourth search submodule is used to search for the first pre-stored category that matches the target object and target category in the search engine, based on the identification information of the target category, when no matching relationship between the target object and the target category is found in the multi-level cache.

[0141] The second determination submodule is used to determine the user profile information of the target object based on the target object's identification information.

[0142] The third determination submodule is used to determine the matching relationship between the first pre-stored category and the target object based on the target object's identifier information and user profile information when the first pre-stored category is found in the search engine.

[0143] In one embodiment, the search device further includes:

[0144] The first storage module is used to associate the target object and the target category and store them in a multi-level cache when the search engine determines that there is a matching relationship between the target object and the target category.

[0145] In one embodiment, the search device further includes:

[0146] The generation module is used to store the preset category configuration page into the search engine and generate the first pre-stored category. The category configuration page includes configuration items for multiple user profiles, and the object collection includes multiple objects and their corresponding user profile information.

[0147] The fourth determination module is used to determine the first matching object that has a matching relationship with the first pre-stored category from the object set using the first pre-stored category.

[0148] The second storage module is used to associate the first pre-stored category and the first matching object and store them in a multi-level cache.

[0149] In one implementation, the fourth determining module is further configured to, if it is determined from the object set that the first pre-stored category is not locked according to the distributed lock, use the first pre-stored category to determine the first matching object that has a matching relationship with the first pre-stored category.

[0150] In one embodiment, the search device further includes:

[0151] The third storage module is used to determine, when the object set is updated, a second matching object that matches the first pre-stored category from the updated object set. The first pre-stored category and the second matching object are then associated and stored in a multi-level cache.

[0152] In one embodiment, the search device further includes:

[0153] The fourth storage module uses machine learning to identify a third matching object that is related to the second pre-stored category. The second pre-stored category and the third matching object are then associated and stored in a multi-level cache.

[0154] The fifth storage module is used to identify fourth matching objects that have a matching relationship with the third pre-stored category using a knowledge graph approach. The third pre-stored category and the fourth matching object are then associated and stored in a multi-level cache.

[0155] In one implementation, the search engine includes an ELASTICSEARCH cluster, and / or, the multi-level cache includes an LRU cache and a REDIS cluster cache.

[0156] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.

[0157] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0158] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0159] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0160] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 702 or a computer program loaded from storage unit 708 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.

[0161] Multiple components in device 700 are connected to I / O interface 705, including: input unit 706, such as keyboard, mouse, etc.; output unit 707, such as various types of monitors, speakers, etc.; storage unit 708, such as disk, optical disk, etc.; and communication unit 709, such as network card, modem, wireless transceiver, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0162] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the search method. For example, in some embodiments, the search method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the search method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the search method by any other suitable means (e.g., by means of firmware).

[0163] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0164] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0165] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0166] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0167] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0168] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0169] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0170] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A search method, comprising: Based on the identifiers of the target object and the target category in the target request, a matching relationship between the target object and the target category is searched in a multi-level cache; wherein, the multi-level cache includes a Least Recently Used (LRU) cache and a remote dictionary service (REDIS) cluster cache; and If no matching relationship between the target object and the target category is found in the multi-level cache, a matching relationship between the target object and the target category is searched in the search engine based on the identification information of the target object and the identification information of the target category. Wherein, if no matching relationship between the target object and the target category is found in the multi-level cache, searching for a matching relationship between the target object and the target category in the search engine based on the identifier information of the target object and the identifier information of the target category includes: If no matching relationship between the target object and the target category is found in the multi-level cache, a first pre-stored matching category is searched in the search engine based on the identification information of the target category. Based on the identification information of the target object, determine the user profile information of the target object; If the first pre-stored category is found in the search engine, the matching relationship between the first pre-stored category and the target object is determined based on the identification information of the target object and the user profile information of the target object; The method further includes: The preset category configuration page is stored in the search engine to generate the first pre-stored category; wherein, the category configuration page includes configuration items for multiple user profiles; Using the first pre-stored category, a first matching object that has a matching relationship with the first pre-stored category is determined from the object set, wherein the object set includes multiple objects and user profile information corresponding to the multiple objects; The first pre-stored category and the first matching object are associated and stored in the multi-level cache.

2. The method according to claim 1, wherein, The multi-level cache includes at least two levels of cache. The step of searching the multi-level cache for a matching relationship between the target object and the target category based on the target object's identifier information and the target category's identifier information in the target request includes: Based on the identifier information of the target object and the identifier information of the target category in the target request, search for the matching relationship between the target object and the target category in the first-level cache; If no matching relationship between the target object and the target category is found in the first-level cache, the matching relationship between the target object and the target category is searched in the second-level cache based on the identification information of the target object and the identification information of the target category.

3. The method according to claim 2, wherein, If no matching relationship between the target object and the target category is found in the first-level cache, the method of searching for a matching relationship between the target object and the target category in the second-level cache based on the identifier information of the target object and the identifier information of the target category includes: If no matching relationship between the target object and the target category is found in the first-level cache, the mapping relationship between the target object and the target category is searched in the Bloom filter based on the identification information of the target object and the identification information of the target category. If a mapping relationship between the target object and the target category is found, the matching relationship between the target object and the target category is searched in the second-level cache based on the identification information of the target object and the identification information of the target category.

4. The method according to claim 1, wherein, If no matching relationship between the target object and the target category is found in the multi-level cache, the search for a matching relationship between the target object and the target category in the search engine is performed based on the identifier information of the target object and the identifier information of the target category, including: If no matching relationship between the target object and the target category is found in the multi-level cache, the rate limiter is used to determine the request concurrency of the search engine. If the request concurrency does not meet the concurrency threshold, the matching relationship between the target object and the target category is searched in the search engine based on the identification information of the target object and the identification information of the target category.

5. The method according to claim 1, further comprising: If the search engine determines that the target object and the target category have a matching relationship, the target object and the target category are associated and stored in the multi-level cache.

6. The method according to any one of claims 1 to 5, further comprising: In the event that the object set is updated, the first pre-stored category is used to determine a second matching object that has a matching relationship with the first pre-stored category from the updated object set; The first pre-stored category and the second matching object are associated and stored in the multi-level cache.

7. The method according to any one of claims 1 to 5, wherein determining a first matching object from the object set that has a matching relationship with the first pre-stored category using the first pre-stored category comprises: If the first pre-stored category is determined to be unlocked based on the distributed lock, the first matching object with a matching relationship with the first pre-stored category is determined from the object set using the first pre-stored category.

8. The method according to any one of claims 1 to 5, further comprising: Using machine learning, a third matching object that matches the second pre-stored category is identified; Associate the second pre-stored category and the third matching object and store them in the multi-level cache; Using a knowledge graph approach, a fourth matching object that has a matching relationship with the third pre-stored category is identified; The third pre-stored category and the fourth matching object are associated and stored in the multi-level cache.

9. The method according to any one of claims 1 to 5, wherein, The search engine includes the ELASTICSEARCH cluster.

10. A search device, comprising The first search module is used to search for a matching relationship between the target object and the target category in a multi-level cache based on the identifier information of the target object and the identifier information of the target category in the target request; wherein, The multi-level cache includes a Least Recently Used (LRU) cache and a remote dictionary service REDIS cluster cache; as well as The second search module is used to search for a matching relationship between the target object and the target category in a search engine, based on the identification information of the target object and the identification information of the target category, when no matching relationship between the target object and the target category is found in the multi-level cache. The second search module includes: The fourth search submodule is used to search for a matching first pre-stored category in the search engine based on the identification information of the target category when no matching relationship between the target object and the target category is found in the multi-level cache. The second determining submodule is used to determine the user profile information of the target object based on the identification information of the target object; The third determining submodule is used to determine the matching relationship between the first pre-stored category and the target object based on the identification information of the target object and the user profile information of the target object when the first pre-stored category is found in the search engine. The device further includes: The generation module is used to store a preset category configuration page into the search engine and generate a first pre-stored category; wherein, the category configuration page includes configuration items for multiple user profiles; The fourth determining module is used to determine a first matching object that has a matching relationship with the first pre-stored category from the object set using the first pre-stored category, wherein the object set includes multiple objects and user profile information corresponding to the multiple objects; The second storage module is used to associate the first pre-stored category and the first matching object and store them in the multi-level cache.

11. The apparatus according to claim 10, wherein, The first search module includes: The first search submodule is used to search for the matching relationship between the target object and the target category in the first-level cache based on the identification information of the target object and the identification information of the target category in the target request; The second search submodule is used to search for a matching relationship between the target object and the target category in the second-level cache, based on the identification information of the target object and the identification information of the target category, if no matching relationship between the target object and the target category is found in the first-level cache.

12. The apparatus according to claim 11, wherein, The second search submodule is further configured to, when no matching relationship between the target object and the target category is found in the first-level cache, search for the mapping relationship between the target object and the target category in a Bloom filter based on the identification information of the target object and the identification information of the target category; If a mapping relationship between the target object and the target category is found, the matching relationship between the target object and the target category is searched in the second-level cache based on the identification information of the target object and the identification information of the target category.

13. The apparatus according to claim 10, wherein, The second search module includes: The first determining submodule is used to determine the request concurrency of the search engine by using a rate limiter when no matching relationship between the target object and the target category is found in the multi-level cache. The third search submodule is used to search for a matching relationship between the target object and the target category in the search engine, based on the identification information of the target object and the identification information of the target category, when the request concurrency does not meet the concurrency threshold.

14. The apparatus of claim 10, further comprising: The first storage module is used to associate the target object and the target category and store them in the multi-level cache when the search engine determines that the target object and the target category have a matching relationship.

15. The apparatus according to any one of claims 10 to 14, further comprising: The third storage module is used to determine, in the event that the object set is updated, a second matching object that has a matching relationship with the first pre-stored category from the updated object set; The first pre-stored category and the second matching object are associated and stored in the multi-level cache.

16. The apparatus according to any one of claims 10 to 14, wherein the fourth determining module is further configured to, when it is determined according to the distributed lock that the first pre-stored category is not locked, use the first pre-stored category to determine from the object set a first matching object that has a matching relationship with the first pre-stored category.

17. The apparatus according to any one of claims 10 to 14, further comprising: The fourth storage module is used to use machine learning to determine the third matching object that has a matching relationship with the second pre-stored category; Associate the second pre-stored category and the third matching object and store them in the multi-level cache; The fifth storage module is used to determine a fourth matching object that has a matching relationship with the third pre-stored category using a knowledge graph approach; and associate the third pre-stored category and the fourth matching object and store them in the multi-level cache.

18. An electronic device comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 9.

19. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 9.

20. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • A caching method and apparatus

    CN108228669B

  • Second level method and device and computer readable storage medium

    CN110674432A

  • Commodity category determination method and device, equipment and medium

    CN113420196A

  • Medical resource recommendation method and device based on artificial intelligence, server and medium

    CN113724848A