Search method and apparatus, and electronic device

CN122986158APending Publication Date: 2026-10-27HANGZHOU ALIBABA INT NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611142905.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

在中长尾Query场景下,由于搜索词信息存在稀疏长尾的特点,其历史行为信号弱,从而导致难以召回有效的数据对象;

Benefits of technology

[0025]本说明书实施例,提供了一种搜索方案,打破了传统搜索系统中召回结果向精排模型单向流动的壁垒,通过将精排模型输出的精排结果转化为可回流到召回阶段使用的精排日志,从而使得搜索系统在召回阶段,即使依赖搜索词信息无法搜索到相关数据对象时,依然可以复用历史转化的精排日志以查询与当前的搜索方信息和/或搜索词信息相关的目标精排日志,并将目标精排日志中记录的目标数据对象作为最终搜索结果。这种全新的搜索方式,能够充分利用精排模型已验证的历史精排结果包含的高质量搜索结果,以解决特定场景(如中长尾Query场景、新用户冷启动场景)存在无搜索结果或搜索结果不准确而出现搜索失败的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986158A_ABST
    Figure CN122986158A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a search method and device and electronic equipment. The method comprises: obtaining search party information and search word information carried in a search request, and performing preliminary search based on the search word information; if the preliminary search is successful, performing fine sorting on a plurality of data objects in the preliminary search result, converting each data object after fine sorting into a corresponding fine sorting log, and writing the fine sorting log into a log pool; if the preliminary search fails, searching a target fine sorting log related to the search party information and / or search word information and a target data object recorded in the target fine sorting log from the log pool; and returning a final search result composed of the target data object to the search party.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and more particularly to a search method, apparatus, and electronic device. Background Technology

[0002] Current search systems primarily rely on search term information (Query) for search retrieval, but this approach has significant drawbacks in certain scenarios: In mid-to-long-tail query scenarios, due to the sparse long-tail characteristics of search term information, its historical behavior signals are weak, making it difficult to recall effective data objects. In the scenario of new user cold start, the lack of historical behavior data by the search party results in strong generalization of recall results but insufficient accuracy.

[0003] In summary, in the specific scenarios described above, existing search methods that rely on search term information suffer from problems such as no search results or inaccurate search results, leading to search failures. Summary of the Invention

[0004] This specification provides a search method, apparatus, and electronic device through its embodiments.

[0005] According to a first aspect of the embodiments of this specification, a search method is provided, the method comprising: Obtain the searcher information and search term information carried in the search request, and perform a preliminary search based on the search term information; If the initial search is successful, the multiple data objects in the initial search results are finely sorted, and each data object after fine sorting is converted into a corresponding fine sorting log, and the fine sorting log is written to the log pool. If the initial search fails, the target ranking log related to the searcher information and / or search term information, as well as the target data object recorded in the target ranking log, are searched from the log pool. The final search results, composed of the target data objects, are returned to the searcher.

[0006] Optionally, the step of searching the log pool for target ranking logs related to the searcher information and / or search term information, and the target data objects recorded in the target ranking logs, includes: Determine the search intent; Using a search strategy corresponding to the search intent, target fine-ranking logs related to the searcher information and / or search term information are searched from the log pool.

[0007] Optionally, the search intent includes a strong search intent; the search strategy corresponding to the strong search intent includes a first search strategy that prioritizes search term information; The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the first search strategy, a first set of logs related to the search term information is searched from the log pool; The finely ranked logs in the first log set are used as the target finely ranked logs for the search.

[0008] Optionally, after adopting the first search strategy, the method further includes: If the number of fine-ranked logs in the first log set is less than a preset number, then a second log set related to the search party information is searched from the log pool, and fine-ranked logs are selected from the second log set to supplement the target fine-ranked logs missing from the first log set.

[0009] Optionally, the search intent includes a general search intent; the search strategy corresponding to the general search intent includes a second search strategy that combines search term information and searcher information. The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the second search strategy, a first log set related to the search term information and a second log set related to the search party information are searched from the log pool; The finely sorted logs in the first log set and the second log set are merged and deduplicated to obtain the third log set; Select a preset number of finely ranked logs from the third log set as target finely ranked logs.

[0010] Optionally, selecting a preset number of fine-ranking logs from the third log set as target fine-ranking logs includes: Each fine-ranking log in the third log set is scored, and a preset number of fine-ranking logs with the highest scores are selected as target fine-ranking logs. The scoring dimensions include the semantic relevance of the fine-ranking logs to the search terms, the ranking decay weight of the fine-ranking logs in the same search engine, the timeliness of the fine-ranking logs after fine-ranking, and the position weight of the fine-ranking logs in fine-ranking.

[0011] Optionally, the search intent includes a personalized search intent; the search strategy corresponding to the personalized search intent includes a third search strategy that prioritizes the searcher's information. The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the third search strategy, a second set of logs related to the searcher's information is searched from the log pool; The fine-ranked logs in the second log set are used as the target fine-ranked logs for the search.

[0012] Optionally, after searching the log pool for a second set of logs related to the searcher's information, the method further includes: If the number of fine-ranking logs in the second log set is less than a preset number, then a first log set related to the search term information is searched from the log pool, and fine-ranking logs are selected from the first log set to supplement the target fine-ranking logs missing in the second log set.

[0013] Optionally, determining the search intent includes at least one of the following: When the length of the search term information is greater than the preset length, and the search term information contains preset words, the search intent is determined to be a strong search intent; When the search term information contains generic terms, trending search terms, and / or words with unclear meanings, the search intent is determined to be a generic search intent. When the number of finely ranked logs in the log pool corresponding to the search party information is greater than the threshold, the search intent is determined to be a personalized search intent; When the searcher information indicates that the searcher is a new user, the search intent is determined to be a strong search intent.

[0014] Optionally, the fine-ranking log includes a unique identifier for the searcher, search terms, a unique identifier for the data object, the position of the data object in the fine-ranking, and a timestamp of the search request.

[0015] Optionally, the method further includes: Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the nodes are data objects, and the link relationships are the same search term information or the same search party information between the data objects.

[0016] Optionally, returning the final search results composed of the target data objects to the searcher includes: For each target data object, query the N hop data objects starting from the target data object; where N is a positive integer greater than or equal to 2; The target data object and its corresponding N-hop data object are merged and deduplicated to obtain the final search result; The final search results are returned to the searcher.

[0017] Optionally, the query for N-hop data objects starting from the target data object includes: querying N-hop data objects starting from the target data object based on the Item-to-Item relationship constructed using the Swing algorithm.

[0018] Optionally, returning the final search results composed of the target data objects to the searcher includes: The final search results, consisting of the target data objects, are output to the terminal device of the searcher, so that the terminal device displays the final search results.

[0019] According to a second aspect of the embodiments of this specification, a search system is provided, the search system comprising: The search module is used to perform preliminary searches based on search term information; The fine-ranking model is used to perform fine-ranking of multiple data objects in the initial search results when the initial search is successful. The fine-sorting data engine is used to convert each data object after fine-sorting into a corresponding fine-sorting log, and to write the fine-sorting log into the log pool; The search module is further configured to, when the initial search fails, search the log pool for target ranking logs related to the searcher information and / or search term information, as well as target data objects recorded in the target ranking logs; and return the final search results composed of the target data objects to the searcher.

[0020] According to a third aspect of the embodiments of this specification, a search apparatus is provided, the apparatus comprising: The acquisition unit acquires the searcher information and search term information carried in the search request, and performs a preliminary search based on the search term information; If the initial search is successful, the fine-ranking unit performs fine-ranking on multiple data objects in the initial search results, converts each finely ranked data object into a corresponding fine-ranking log, and writes the fine-ranking log into the log pool. If the initial search fails, the search unit searches the log pool for target ranking logs related to the searcher information and / or search term information, as well as the target data objects recorded in the target ranking logs. The return unit returns the final search results, composed of the target data objects, to the searcher.

[0021] According to a fourth aspect of the embodiments of this specification, an electronic device is provided, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to use any of the search methods described above.

[0022] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-readable instructions thereon, which, when executed by a processor, implement any of the search methods described above.

[0023] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program or instructions that, when executed by a processor, implement any of the search methods described above.

[0024] According to a seventh aspect of the embodiments of this specification, a fine-ranking data engine is provided, the fine-ranking data engine being used for: Each data object after fine sorting is converted into a corresponding fine sorting log, and the fine sorting log is written to the log pool; Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the nodes are data objects, and the link relationships are the same search term information or the same search party information between the data objects.

[0025] This specification provides a search scheme that breaks down the barrier of unidirectional flow of recall results to the ranking model in traditional search systems. By converting the ranking results output by the ranking model into ranking logs that can be reused in the recall phase, the search system can reuse historically converted ranking logs to query target ranking logs related to the current searcher information and / or search term information, even when relevant data objects cannot be found by relying on search term information during the recall phase. The target data objects recorded in the target ranking logs are then used as the final search results. This novel search method can fully utilize the high-quality search results contained in the historical ranking results validated by the ranking model to solve the problem of search failures due to no search results or inaccurate search results in specific scenarios (such as mid-to-long-tail query scenarios and new user cold start scenarios). Attached Figure Description

[0026] Figure 1 This is a schematic diagram of an improved search system provided in one embodiment of this specification; Figure 2 This is a flowchart of a search method provided in one embodiment of this specification; Figure 3 This is a schematic diagram illustrating data processing performed by the fine-ranking data engine provided in one embodiment of this specification; Figure 4 This is a hardware structure diagram of a search device provided in one embodiment of this specification; Figure 5 This is a module of the search device provided in one embodiment of this specification. Detailed Implementation

[0027] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0028] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0029] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0030] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. The collection, use and processing of related data shall comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation portals shall be provided for users to choose to authorize or refuse.

[0031] To better understand this application, the following will be combined with... Figure 1 The existing search system and search process are shown on the left side of the page: Existing search systems typically include a recall module and a ranking model. The recall module is used to perform search recall based on the search term information provided by the searcher, and provides the multiple data objects found as recall results (also known as search results) to the ranking model. The refined ranking model is used to score multiple data objects in the search results in a refined manner, thereby outputting the most personalized and semantically relevant refined ranking results (referred to as refined ranking results). Refined ranking results can usually accurately reflect the searcher's true interests under their search intent, and have both strong semantic relevance and high conversion potential.

[0032] In the specific scenarios described above, such as the mid-to-long-tail query scenario and the new user cold start scenario, the recall module will fail to search. Since the recall module cannot provide search results, the subsequent process, namely the fine ranking model, cannot be executed to obtain the final search results.

[0033] In view of the problems existing in existing search systems, this application aims to improve existing search systems and search methods to obtain, for example... Figure 1 The right side of the image shows a completely new search system and search process.

[0034] For example, a search system provided in this application may include: The search module is used to perform preliminary searches based on search term information; The fine-ranking model is used to perform fine-ranking of multiple data objects in the initial search results when the initial search is successful. The fine-sorting data engine is used to convert each data object after fine-sorting into a corresponding fine-sorting log, and to write the fine-sorting log into the log pool; The search module is further configured to, when the initial search fails, search the log pool for target ranking logs related to the searcher information and / or search term information, as well as target data objects recorded in the target ranking logs; and return the final search results composed of the target data objects to the searcher.

[0035] Continue to refer to Figure 1 As shown, the improved search system differs from the existing search system in that: In existing search systems, the recall module and the ranking model are connected in a one-way manner. The search results obtained by the recall module based on the search term information (Query) are provided to the ranking model in a one-way manner, while the ranking results output by the ranking model do not flow back to the recall module. Therefore, it has not fully and effectively utilized the high-quality search results verified by the ranking model.

[0036] To address this, a fine-ranking data engine is added to the existing search system, breaking down the barrier of the unidirectional flow of recall results to the fine-ranking model. Specifically, through... Figure 1 The process connected by the dotted line involves converting the refined ranking results output by the refined ranking model into refined ranking logs that can be reused in the recall phase. This allows the search system to reuse historically transformed refined ranking logs to query target refined ranking logs related to the current searcher information and / or search term information, even when relevant data objects cannot be found relying on search term information during the recall phase. The target data objects recorded in the target refined ranking logs are then used as the final search results. This novel search method fully utilizes the high-quality search results contained in the historical refined ranking results validated by the refined ranking model to solve the problem of search failures due to no search results or inaccurate search results in specific scenarios (such as long-tail query scenarios and new user cold start scenarios).

[0037] Please refer to the following: Figure 2 This specification introduces an embodiment of the search method, which can be applied to the aforementioned improved search system. The method includes: Step 210: Obtain the searcher information and search term information carried in the search request, and perform a preliminary search based on the search term information.

[0038] In this application, the search request can be initiated by the searcher, i.e., the user. The searcher information can be information that identifies the searcher, such as a unique user identifier (UserID), a bound mobile phone number, an email address, etc. The search term information can refer to the search terms (Query) entered by the searcher. In some examples, the search term information can refer to text information used for the search. This text information can be entered by the searcher or extracted from an image uploaded by the searcher (e.g., descriptive text of a product image identified from a photo containing a product image).

[0039] For search term information, the search system can perform real-time retrieval according to the traditional search process, that is, perform a preliminary search using search term information as search conditions. If the preliminary search is successful, proceed to step 220; if the preliminary search fails, proceed to step 230.

[0040] Step 220: If the initial search is successful, perform fine sorting on the multiple data objects in the initial search results, convert each finely sorted data object into a corresponding fine sorting log, and write the fine sorting log into the log pool.

[0041] If the initial search is successful, meaning the recall module can output the initial search results, the search system can perform fine ranking according to the traditional search process. This involves using a fine ranking model to score the multiple data objects included in the initial search results, sorting them from largest to smallest score, and taking the top N (e.g., 100) data objects with the most personalized and semantic relevance (referred to as fine ranking results). The fine ranking results will then be returned to the searcher as the current search results.

[0042] In addition, unlike the traditional search process, the fine ranking results output by the fine ranking model can be converted into fine ranking logs by the fine ranking data engine and stored in the log pool.

[0043] In order for the fine-ranking logs to be queried and used by subsequent search requests, a structured fine-ranking log needs to be configured when converting fine-ranking results into fine-ranking logs, that is, a unified field structure for fine-ranking logs.

[0044] In one exemplary embodiment, the fine-grained ranking log may include a unique identifier for the searcher, search terms, a unique identifier for the data object, the position of the data object in the fine-grained ranking, and a timestamp of the search request. In the actual transformation of the fine-grained ranking log, the unique identifier for the searcher can be stored as the content of a User field, the search terms as the content of a Query field, the unique identifier for the data object as the content of an ItemID field, the position of the data object in the fine-grained ranking as the content of a Position field, and the timestamp of the search request as the content of a Timestamp field.

[0045] By unifying the field structure of the fine-ranking logs (i.e., the User, Query, ItemID, Position, and Timestamp fields mentioned above), these structured fine-ranking logs can be queried. Thus, as the number of successful search requests increases, the fine-ranking logs generated by each search request gradually accumulate to form a considerable amount of historical fine-ranking logs. These historical fine-ranking logs can be fed back into the real-time retrieval stage of subsequent search requests, so that when the initial search of a subsequent request fails, high-quality search results can be retrieved based on the historical fine-ranking logs output by the fine-ranking model.

[0046] In addition, to improve the processing efficiency of fine-grained sorting logs, the method may further include: Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the nodes are data objects, and the link relationships are the same search term information or the same search party information between the data objects.

[0047] In this embodiment, such as Figure 3 The fine-ranking data engine shown can transform the fine-ranking results into fine-ranking logs and then use Apache Flink to build a streaming processing channel to consume and process the transformed fine-ranking logs in seconds. Query-based aggregation: Aggregates all data objects under the same query to form...<Query, ItemID,Position, Timestamp> The first data object table is denoted as the Query table. User-based aggregation: Aggregates all data objects under the same User to form...<User, ItemID,Position, Timestamp> The second data object table is denoted as the User table.

[0048] Additionally, the fine-ranking data engine stores fine-ranking logs in the log pool, which includes writing the Query and User tables to a graph database (such as IGraph). Graph databases typically support millisecond-level online queries, thus improving the speed of subsequent steps 230 in searching the target fine-ranking logs in the log pool, achieving real-time or near real-time search results.

[0049] It should be noted that a graph database, also known as a graph model, has a data structure containing several nodes (vertices) and the links between them (edges). In this application, nodes are data objects, and the links are information about the same search terms or the same searchers that exist between the data objects.

[0050] It is understood that the log pool or graph database in this application can be maintained by the search system based on its own storage resources, or by a third-party log system with log maintenance capabilities that the search system interfaces with. This application does not impose any restrictions on this, and it can be flexibly configured according to actual needs.

[0051] Step 230: If the initial search fails, then search the log pool for target ranking logs related to the searcher information and / or search term information, as well as the target data objects recorded in the target ranking logs; If the initial search fails (the recall module fails to output initial search results), the search system will perform a "secondary search," which is completely absent in traditional search processes: searching the historical ranking logs stored in the log pool for target ranking logs related to the searcher information and / or search term information of this search request. The target data objects recorded in these target ranking logs can then be used as the search results for this search request. In this way, high-quality historical search results validated by the ranking model can be effectively utilized, and even if the initial search fails, high-quality search results (i.e., target data objects recorded in the target ranking logs related to the searcher information and / or search term information of this search request) can be obtained through the "secondary search."

[0052] In practical applications, different searchers have different search intentions and needs. Therefore, this application also provides the following embodiments to take into account the search needs of different search intentions: In an exemplary embodiment, step 230 above, which involves searching the log pool for target ranking logs related to the searcher information and / or search term information, and the target data objects recorded in the target ranking logs, may include: Determine the search intent; Using a search strategy corresponding to the search intent, target fine-ranking logs related to the searcher information and / or search term information are searched from the log pool.

[0053] This embodiment adopts a configurable, multi-search strategy design. Different search strategies can be configured according to different search intentions. Different search strategies can support different combinations of searcher information and search term information, thereby taking into account different search needs.

[0054] In one implementation, the search intent may include a strong search intent; the search strategy corresponding to the strong search intent may include a first search strategy that prioritizes search term information. Based on this, the above-mentioned search strategy corresponding to the search intent, which searches the log pool for target ranking logs related to the searcher information and / or search term information, may include: Using the first search strategy, a first set of logs related to the search term information is searched from the log pool; The finely ranked logs in the first log set are used as the target finely ranked logs for the search.

[0055] This implementation is suitable for strong search intent (meaning the user's search intent is clear and the search terms are clearly expressed). In this case, the first search strategy prioritizes using search term information to ensure the generalization and semantic relevance of the target fine-ranking logs. For example, query fine-ranking logs related to search term information and sort them according to the primary sorting key: Timestamp (descending, newer is better) and the secondary sorting key: Position (ascending, higher ranking is better). The top A fine-ranking logs are then used to form the first log set.

[0056] In addition, after using the first search strategy to retrieve the first log set, it may also include: If the number of fine-ranked logs in the first log set is less than a preset number, then a second log set related to the search party information is searched from the log pool, and fine-ranked logs are selected from the second log set to supplement the target fine-ranked logs missing from the first log set.

[0057] When using the first search strategy, there may be a situation where the finely ranked logs in the first log set are insufficient. In this case, in addition to prioritizing search term information, searcher information is further used to supplement the first log set: the searcher information is used to search the second log set, and the finely ranked logs in the second log set are sorted according to the primary sort key: Timestamp (descending, the newer the better) and the secondary sort key: Position (ascending, the higher the ranking, the better). The top B finely ranked logs are taken to supplement the first log set; where the number B supplemented from the second log set is the difference between the maximum number A in the first log set and the number C of finely ranked logs in the first log set, that is, B=AC.

[0058] In another implementation, the search intent may include a general search intent; the search strategy corresponding to the general search intent may include a second search strategy that combines search term information and searcher information. Based on this, the above-mentioned search strategy corresponding to the search intent, which searches the log pool for target ranking logs related to the searcher information and / or search term information, may include: Using the second search strategy, a first log set related to the search term information and a second log set related to the search party information are searched from the log pool; The finely sorted logs in the first log set and the second log set are merged and deduplicated to obtain the third log set; Select a preset number of finely ranked logs from the third log set as target finely ranked logs.

[0059] This implementation is suitable for broad search intents (which can be understood as when the user's search intent is vague, the search term information is relatively broad, or it is a short word). In this case, the second search strategy uses both search term information and searcher information to search. The first log set is denoted as the Trigger_Query set, and the second log set is denoted as the Trigger_User set. Then, these two sets are merged and deduplicated to obtain a third log set denoted as the Trigger set. Then, the target fine-ranking logs are selected from the third log set Trigger through the specific selection mechanism provided in this application.

[0060] For example, using the selection mechanism described above, selecting a preset number of fine-ranking logs as target fine-ranking logs from the third log set may include: Each fine-ranking log in the third log set is scored, and a preset number of fine-ranking logs with the highest scores are selected as target fine-ranking logs. The scoring dimensions include the semantic relevance of the fine-ranking log to the search term information (denoted as Query_Sim), the ranking decay weight of the fine-ranking log in the same search engine (denoted as User_Pref), the timeliness of the fine-ranking log after fine-ranking (denoted as Time_Freshness), and the position weight of the fine-ranking log in fine-ranking (denoted as Time_Freshness).

[0061] The scoring process can refer to the following formula: Score =α×Query_Sim+β×User_Pref +γ×Time_Freshness+δ×Pos_Quality Specifically, the semantic relevance value between the data object recorded in the fine-ranking log (the data object corresponding to the log field ItemID) and the search term information (the Query entered in this search) is normalized to 0~1, and the normalized value is the Query_Sim value; the higher the ranking of the fine-ranking log in the same search engine, the higher its ranking decay weight User_Pref value (positive correlation); the earlier the timestamp of the fine-ranking log (log field Timestamp), the lower its timeliness Time_Freshness value (negative correlation); the higher the position of the fine-ranking log (log field Position), the higher its position weight (positive correlation). In addition, α, β, γ, and δ are hyperparameters that can be configured according to the business scenario, satisfying α+β+γ+δ=1.

[0062] Taking Query_Sim as an example, similarity calculation algorithms can be used. For instance, cosine similarity can be calculated, which involves determining the cosine similarity between the data object and the search term information, and then using the calculated cosine similarity value as the value of Query_Sim. Another example is vector similarity calculation, which involves extracting the first feature vector of the data object and the second feature vector of the search term information, and then calculating the vector similarity value between the first and second feature vectors as the value of Query_Sim.

[0063] The selection mechanism provided in the above embodiments comprehensively considers the Query, ItemID, Position, and Timestamp contained in each fine-ranking log, and introduces a multi-dimensional weighted scoring formula (integrating four dimensions: Query semantic relevance, user preference decay, time freshness, and fine-ranking position quality), thereby taking into account the dynamic balance between group generalization, personalized accuracy, and timeliness, so as to ultimately select high-quality target ranking logs.

[0064] In another implementation, the search intent may include a personalized search intent; the search strategy corresponding to the personalized search intent may include a third search strategy that prioritizes the searcher's information. Based on this, the above-mentioned search strategy corresponding to the search intent, which searches the log pool for target ranking logs related to the searcher information and / or search term information, may include: Using the third search strategy, a second set of logs related to the searcher's information is searched from the log pool; The fine-ranked logs in the second log set are used as the target fine-ranked logs for the search.

[0065] This implementation is suitable for personalized search intents (which can be understood as search needs with clear user profiles, sufficient historical behavior data, and a focus on personalized expression). In this case, the third search strategy prioritizes using the searcher's information to ensure that the target refined ranking logs match the searcher's search preferences. For example, it queries refined ranking logs related to the searcher's information and sorts them according to the primary sorting key: Timestamp (descending, newer is better) and the secondary sorting key: Position (ascending, higher ranking is better). The top A refined ranking logs are then used to form the second log set.

[0066] In addition, after employing the third search strategy to retrieve the second log set, it may also include: If the number of fine-ranking logs in the second log set is less than a preset number, then a first log set related to the search term information is searched from the log pool, and fine-ranking logs are selected from the first log set to supplement the target fine-ranking logs missing in the second log set.

[0067] When employing the third search strategy, there may be a situation where the finely ranked logs in the second log set are insufficient. In this case, in addition to prioritizing the searcher's information, further supplementation using search term information is carried out: the first log set is searched using search term information, and the finely ranked logs in the first log set are sorted according to the primary sorting key: Timestamp (descending order, the newer the better) and the secondary sorting key: Position (ascending order, the higher the ranking, the better). The top B finely ranked logs are then added to the second log set. The number B added to the first log set is the difference between the maximum number A in the second log set and the number C of finely ranked logs in the second log set, i.e., B=AC.

[0068] In one exemplary embodiment, determining the search intent includes at least one of the following: When the length of the search term information is greater than the preset length, and the search term information contains preset words, the search intent is determined to be a strong search intent; When the search term information contains generic terms, trending search terms, and / or words with unclear meanings, the search intent is determined to be a generic search intent. When the number of finely ranked logs in the log pool corresponding to the search party information is greater than the threshold, the search intent is determined to be a personalized search intent; When the searcher information indicates that the searcher is a new user, the search intent is determined to be a strong search intent.

[0069] Through the above embodiments, differentiated needs of different search intentions can be automatically identified, and search strategies can be dynamically switched, significantly improving search flexibility and generalization ability.

[0070] Step 240: Return the final search results composed of the target data objects to the searcher.

[0071] After obtaining the target data object from the "secondary search", the target data object can be returned to the searcher as the final search result, thus ending the search request.

[0072] For example, the final search results composed of the target data objects can be output to the searcher's terminal device. In this way, the terminal device can display the final search results after receiving them so that the searcher can view and browse them.

[0073] Considering that the target data object is a data object that is highly relevant to the searcher's information and / or search term information in this search request, such target data objects may not cover the search results expected by the searcher. Therefore, in order to avoid the problem of insufficient coverage of target data objects, it is necessary to expand the data objects that make up the final search results.

[0074] However, expanding the data object cannot be done blindly. Therefore, in step 240 above, returning the final search results composed of the target data objects to the searcher may, in an exemplary embodiment, include: For each target data object, query the N hop data objects starting from the target data object; where N is a positive integer greater than or equal to 2; The target data object and its corresponding N-hop data object are merged and deduplicated to obtain the final search result; The final search results are returned to the searcher.

[0075] In one implementation, an N-hop data object originating from the target data object can be queried from the aforementioned graph database.

[0076] By utilizing the link relationships between nodes in a graph database, the first node directly linked to any target node (with one hop relative to the target node) is the node with the highest relevance to the target node, while the second node directly linked to the first node (with two hops relative to the target node) is the node with the next highest relevance to the target node, and so on. The closer a node is to the target node (the smaller the hop count), the higher its relevance to the target node; the farther away a node is from the target node (the larger the hop count), the lower its relevance to the target node. Based on this property, this application uses the target node corresponding to the target data object as the starting point to query the N-hop data objects linked to that starting point. Since these N-hop data objects are all data objects with a certain relevance to the target data object, they can also be returned to the searcher as part of the final search results.

[0077] In another implementation, an item-to-item relationship can be built based on the Swing algorithm to query N hop data objects starting from the target data object.

[0078] The Swing algorithm is an item collaborative filtering algorithm used to calculate the similarity between data objects. The core idea of ​​the Swing algorithm is that "if a large number of users simultaneously like two data objects, and the overlap between these users is low, then these two data objects are strongly related." Compared to traditional similarity algorithms (such as ItemCF), which only consider the number of users who clicked on both data objects, easily misjudging popular data objects and those that only occasionally co-occur within a small circle as similar, the Swing algorithm introduces a user overlap penalty. If users who jointly clicked on two data objects also jointly clicked on many other data objects (indicating they come from the same small circle), the weight of this "vote" is reduced. This application uses the Swing algorithm to query N-hop data objects, avoiding the aforementioned misjudgments and improving the accuracy of N data objects.

[0079] After introducing the methods of exemplary embodiments of this specification, the following description will describe the fine sorting data engine, apparatus, electronic device, computer-readable storage medium, and computer program product of exemplary embodiments of this specification.

[0080] In an exemplary embodiment of this specification, a fine-ranking data engine is provided, which can refer to the steps in the foregoing system and method embodiments.

[0081] For example, a fine-ranking data engine can be used for: Each data object after fine sorting is converted into a corresponding fine sorting log, and the fine sorting log is written to the log pool; Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the nodes are data objects, and the link relationships are the same search term information or the same search party information between the data objects.

[0082] In an exemplary embodiment of this specification, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor implements the method described above by executing the executable instructions.

[0083] Figure 4 An exemplary embodiment provides a schematic structural diagram of an electronic device. Please refer to... Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other necessary hardware. One or more embodiments of this specification can be implemented in software, such as by the processor reading the corresponding computer program from non-volatile memory into memory and then running it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0084] Please see Figure 5 This is a block diagram of a search device provided in one embodiment of this specification, the device corresponding to... Figure 2 The illustrated embodiment includes: The acquisition unit 510 acquires the searcher information and search term information carried in the search request, and performs a preliminary search based on the search term information; If the initial search is successful, the fine-sorting unit 520 performs fine-sorting on multiple data objects in the initial search results, converts each finely sorted data object into a corresponding fine-sorting log, and writes the fine-sorting log into the log pool. If the initial search fails, the search unit 530 searches the log pool for target ranking logs related to the searcher information and / or search term information, as well as the target data objects recorded in the target ranking logs. The return unit 540 returns the final search results composed of the target data objects to the searcher.

[0085] Optionally, the search unit 530 further includes: Intent is used to identify sub-units and determine the search intent; The dynamic search subunit employs a search strategy corresponding to the search intent to search the log pool for target fine-ranking logs related to the searcher information and / or search term information.

[0086] Optionally, the search intent includes a strong search intent; the search strategy corresponding to the strong search intent includes a first search strategy that prioritizes search term information; The dynamic search subunit includes: The first search subunit uses the first search strategy to search the log pool for a first log set related to the search term information; and uses the fine-ranked logs in the first log set as the target fine-ranked logs found.

[0087] Optionally, the first search subunit is further configured to, if the number of finely ranked logs in the first log set is less than a preset number, search for a second log set related to the search party information from the log pool, and select finely ranked logs from the second log set to supplement the target finely ranked logs missing in the first log set.

[0088] Optionally, the search intent includes a general search intent; the search strategy corresponding to the general search intent includes a second search strategy that combines search term information and searcher information. The dynamic search subunit includes: The second search subunit employs the second search strategy to search the log pool for a first log set related to the search term information and a second log set related to the search party information; it merges and deduplicates the fine-ranking logs in the first log set and the second log set to obtain a third log set; and it selects a preset number of fine-ranking logs from the third log set as target fine-ranking logs.

[0089] Optionally, the second search subunit selects a preset number of finely ranked logs from the third log set as target finely ranked logs, further including scoring each finely ranked log in the third log set, and selecting a preset number of finely ranked logs with the highest scores as target finely ranked logs; wherein, the scoring dimensions include the semantic relevance between the finely ranked log and the search term information, the ranking decay weight of the finely ranked log in the same search, the timeliness of the finely ranked log after fine-grained ranking, and the position weight of the finely ranked log in fine-grained ranking.

[0090] Optionally, the search intent includes a personalized search intent; the search strategy corresponding to the personalized search intent includes a third search strategy that prioritizes the searcher's information. The dynamic search subunit includes: The third search subunit uses the third search strategy to search for a second log set related to the searcher's information from the log pool; and uses the fine-ranked logs in the second log set as the target fine-ranked logs found in the search.

[0091] Optionally, the first search subunit is further configured to, if the number of fine-ranked logs in the second log set is less than a preset number, search the log pool for a first log set related to the search term information, and select fine-ranked logs from the first log set to supplement the target fine-ranked logs missing in the second log set.

[0092] Optionally, the intent-determining subunit includes at least one of the following: When the length of the search term information is greater than the preset length, and the search term information contains preset words, the search intent is determined to be a strong search intent; When the search term information contains generic terms, trending search terms, and / or words with unclear meanings, the search intent is determined to be a generic search intent. When the number of finely ranked logs in the log pool corresponding to the search party information is greater than the threshold, the search intent is determined to be a personalized search intent; When the searcher information indicates that the searcher is a new user, the search intent is determined to be a strong search intent.

[0093] Optionally, the fine-ranking log includes a unique identifier for the searcher, search terms, a unique identifier for the data object, the position of the data object in the fine-ranking, and a timestamp of the search request.

[0094] Optionally, the device further includes: The stream processing unit constructs a streaming processing channel and, based on the second-level data processing capability provided by the streaming processing channel, performs the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form a first data object table; aggregate all data objects with the same searcher information in the ranking log to form a second data object table; write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the node is a data object, and the link relationship is the existence of the same search term information or the same searcher information between the data objects.

[0095] Optionally, the return unit 540 includes: The extended subunit queries N hop data objects starting from the target data object for each target data object; where N is a positive integer greater than or equal to 2. Return to the sub-unit, merge and deduplicate the target data object and the corresponding N-hop data object to obtain the final search result; return the final search result to the searcher.

[0096] Optionally, the extended subunit is further used to query N-hop data objects starting from the target data object based on the Item-to-Item relationship constructed based on the Swing algorithm.

[0097] Optionally, the return unit is further configured to output the final search results composed of the target data objects to the searcher's terminal device, so that the terminal device displays the final search results.

[0098] The specific implementation process of the functions and roles of each unit in the above-mentioned device can be found in the implementation process of the corresponding steps in the above-mentioned method. For relevant details, please refer to the description of the method implementation method. It will not be repeated here.

[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the units or modules can be selected to achieve the purpose of the solution described in this specification, depending on actual needs. Those skilled in the art can understand and implement this without any inventive effort.

[0100] The systems, devices, modules, or units described in the above embodiments can be implemented by a computer or entity, or by a product with a certain function. A typical implementation device is a computer, which can be a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email sending and receiving device, game console, tablet computer, wearable device, or any combination of these devices.

[0101] In exemplary embodiments of this specification, a computer-readable storage medium is also provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the aforementioned method embodiments.

[0102] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0103] Program code contained on a computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RE, or any suitable combination thereof.

[0104] Program code for performing the operations described herein can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0105] In exemplary embodiments of this specification, a computer program product is also provided, including a computer program or instructions that, when executed by a processor, implement the method embodiments described above.

[0106] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0107] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0108] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” used in one or more embodiments of this specification and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0109] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. A search method, the method comprising: Obtain the searcher information and search term information carried in the search request, and perform a preliminary search based on the search term information; If the initial search is successful, the multiple data objects in the initial search results are finely sorted, and each data object after fine sorting is converted into a corresponding fine sorting log, and the fine sorting log is written to the log pool. If the initial search fails, the target ranking log related to the searcher information and / or search term information, as well as the target data object recorded in the target ranking log, are searched from the log pool. The final search results, composed of the target data objects, are returned to the searcher.

2. The method according to claim 1, wherein searching the log pool for target ranking logs related to the searcher information and / or search term information, and the target data objects recorded in the target ranking logs, comprises: Determine the search intent; Using a search strategy corresponding to the search intent, target fine-ranking logs related to the searcher information and / or search term information are searched from the log pool.

3. The method according to claim 2, wherein the search intent includes a strong search intent; and the search strategy corresponding to the strong search intent includes a first search strategy that prioritizes search term information; The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the first search strategy, a first set of logs related to the search term information is searched from the log pool; The finely ranked logs in the first log set are used as the target finely ranked logs for the search.

4. The method according to claim 3, further comprising, after employing the first search strategy: If the number of fine-ranked logs in the first log set is less than a preset number, then a second log set related to the search party information is searched from the log pool, and fine-ranked logs are selected from the second log set to supplement the target fine-ranked logs missing from the first log set.

5. The method according to claim 2, wherein the search intent includes a general search intent; and the search strategy corresponding to the general search intent includes a second search strategy that combines search term information and searcher information. The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the second search strategy, a first log set related to the search term information and a second log set related to the search party information are searched from the log pool; The finely sorted logs in the first log set and the second log set are merged and deduplicated to obtain the third log set; Select a preset number of finely ranked logs from the third log set as target finely ranked logs.

6. The method according to claim 5, wherein selecting a preset number of fine-ranking logs from the third log set as target fine-ranking logs includes: Each fine-ranking log in the third log set is scored, and a preset number of fine-ranking logs with the highest scores are selected as target fine-ranking logs. The scoring dimensions include the semantic relevance of the fine-ranking logs to the search terms, the ranking decay weight of the fine-ranking logs in the same search engine, the timeliness of the fine-ranking logs after fine-ranking, and the position weight of the fine-ranking logs in fine-ranking.

7. The method according to claim 2, wherein the search intent includes a personalized search intent; and the search strategy corresponding to the personalized search intent includes a third search strategy that prioritizes the searcher's information. The step of employing a search strategy corresponding to the search intent to search the log pool for target ranking logs related to the searcher information and / or search term information includes: Using the third search strategy, a second set of logs related to the searcher's information is searched from the log pool; The fine-ranked logs in the second log set are used as the target fine-ranked logs for the search.

8. The method of claim 7, further comprising, after searching the log pool for a second set of logs related to the searcher's information: If the number of fine-ranking logs in the second log set is less than a preset number, then a first log set related to the search term information is searched from the log pool, and fine-ranking logs are selected from the first log set to supplement the target fine-ranking logs missing in the second log set.

9. The method according to claim 2, wherein determining the search intent comprises at least one of the following: When the length of the search term information is greater than the preset length, and the search term information contains preset words, the search intent is determined to be a strong search intent; When the search term information contains generic terms, trending search terms, and / or words with unclear meanings, the search intent is determined to be a generic search intent. When the number of finely ranked logs in the log pool corresponding to the search party information is greater than the threshold, the search intent is determined to be a personalized search intent; When the searcher information indicates that the searcher is a new user, the search intent is determined to be a strong search intent.

10. The method according to claim 1, wherein the fine-ranking log includes a unique identifier of the search party, a search term, a unique identifier of the data object, the position of the data object in the fine-ranking, and a timestamp of the search request.

11. The method according to claim 10, further comprising: Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into a graph database; wherein, the data structure of the graph database is nodes and the link relationships between nodes, the nodes are data objects, and the link relationships are the same search term information or the same search party information between the data objects.

12. The method according to claim 1, wherein returning the final search results composed of the target data objects to the searcher comprises: For each target data object, query the N hop data objects starting from the target data object; where N is a positive integer greater than or equal to 2; The target data object and its corresponding N-hop data object are merged and deduplicated to obtain the final search result; The final search results are returned to the searcher.

13. The method according to claim 12, wherein querying N hop data objects starting from the target data object comprises: Based on the Swing algorithm, an Item-to-Item relationship is constructed to query N hop data objects starting from the target data object.

14. The method according to claim 1, wherein returning the final search results composed of the target data objects to the searcher comprises: The final search results, consisting of the target data objects, are output to the terminal device of the searcher, so that the terminal device displays the final search results.

15. A search system, the search system comprising: The search module is used to perform preliminary searches based on search term information; The fine-ranking model is used to perform fine-ranking of multiple data objects in the initial search results when the initial search is successful. The fine-sorting data engine is used to convert each data object after fine-sorting into a corresponding fine-sorting log, and to write the fine-sorting log into the log pool; The search module is further configured to, when the initial search fails, search the log pool for target ranking logs related to the searcher information and / or search term information, as well as target data objects recorded in the target ranking logs; and return the final search results composed of the target data objects to the searcher.

16. A fine-grained ranking data engine, said fine-grained ranking data engine being used for: Each data object after fine sorting is converted into a corresponding fine sorting log, and the fine sorting log is written to the log pool; Construct a streaming processing channel, and based on the second-level data processing capability provided by the streaming processing channel, perform the following processing on the fine-sorted logs in the log pool: Aggregate all data objects with the same search term information in the ranking log to form the first data object table; Aggregate all data objects with the same searcher information in the ranking log to form a second data object table; Write the first data object table and the second data object table into the graph database; wherein... The data structure of the graph database consists of nodes and the links between them. The nodes are data objects, and the links are information about the same search terms or the same searchers that exist between the data objects.

17. A search device, the device comprising: The acquisition unit acquires the searcher information and search term information carried in the search request, and performs a preliminary search based on the search term information; The fine-ranking unit, if the initial search is successful, performs fine-ranking on multiple data objects in the initial search results, converts each finely ranked data object into a corresponding fine-ranking log, and writes the fine-ranking log into the log pool. If the initial search fails, the search unit searches the log pool for target ranking logs related to the searcher information and / or search term information, as well as the target data objects recorded in the target ranking logs. The return unit returns the final search results, composed of the target data objects, to the searcher.

18. An electronic device comprising: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method according to any one of claims 1-14.

19. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-14.

20. A computer program product comprising a computer program or instructions that, when executed by a processor, implement the method as described in any one of claims 1-14.