Search reordering method and apparatus, electronic device, and storage medium

CN122862399APending Publication Date: 2026-10-02JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610903278.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-22
Publication Date
2026-10-02

AI Technical Summary

Technical Problem

[0005]本发明提供一种搜索重排序方法、装置、电子设备和存储介质,用以解决现有技术中降低搜索准确性的缺陷

Benefits of technology

[0017]本发明提供的搜索重排序方法、装置、电子设备和存储介质,获取基于目标用户输入的关键信息搜索到的候选人列表,针对候选人列表中的各候选人,基于候选人与目标用户之间的关联特征,确定候选人的特征向量,将各候选人的特征向量输入重排序模型中,得到重排序模型输出的各候选人对应的相关性分数,最后基于各相关性分数对候选人列表进行重排序,得到重排序结果。可知,本发明预先基于正样本候选人的特征向量和负样本候选人的特征向量训练得到重排序模型,将基于候选人与目标用户之间的关联特征确定的特征向量输入重排序模型,最终基于重排序模型输出的各相关性分数对候选人列表进行重排序,考虑了目标用户与候选人之间的关联,使得重排序结果中候选人的排序更加符合用户搜索需求,从而提高了搜索准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122862399A_ABST
    Figure CN122862399A_ABST
Patent Text Reader

Abstract

This invention provides a search re-ranking method, apparatus, electronic device, and storage medium, relating to the field of information retrieval technology. The method includes: for each candidate, determining a feature vector based on the association features between the candidate and the target user; inputting the feature vectors of each candidate into a re-ranking model to obtain a relevance score for each candidate, wherein the re-ranking model is trained based on the feature vectors of positive sample candidates and negative sample candidates, where positive sample candidates are those selected by the user from the sample candidate list, and negative sample candidates are those not selected by the user from the sample candidate list; and re-ranking the candidate list based on the relevance scores to obtain a re-ranking result. This invention considers the association between the target user and the candidates, making the ranking of candidates in the re-ranking result more consistent with the user's search needs, thereby improving search accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information retrieval technology, and in particular to a search reordering method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the acceleration of digitalization, collaborative work has become a core infrastructure for daily office work. In collaborative work scenarios, the address book is an important tool for staff to communicate and carry out work. As the office system continues to improve, departments increase, and staff size expands, the number of contacts in the address book increases dramatically. Staff often start by searching for people, so optimizing the search experience is particularly important.

[0003] In related technologies, simple keyword matching techniques are usually used. For example, fuzzy matching is performed based on information such as the contact person's name, department name, or initials of the name. Then, the searched candidates are sorted according to alphabetical order or fixed rules defined by the business, and the sorting results are returned.

[0004] However, the aforementioned technologies rely solely on keyword searches. If multiple candidates with the same name are found, users are required to continuously search for the person they are actually looking for in the sorted results, which reduces search accuracy. Summary of the Invention

[0005] This invention provides a search reordering method, apparatus, electronic device, and storage medium to address the shortcomings of existing technologies that reduce search accuracy.

[0006] This invention provides a search reordering method, comprising the following steps.

[0007] Obtain a candidate list, which is searched based on key information input by the target user; For each candidate in the candidate list, a feature vector of the candidate is determined based on the association features between the candidate and the target user; The feature vectors of each candidate are input into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The candidate list is reordered based on the relevance scores to obtain the reordering result.

[0008] According to a search reordering method provided by the present invention, the associated features include at least one of the following: organizational closeness, keyword matching degree, relationship tightness, attention degree, historical common matter association degree, and future common matter association degree; The organizational closeness is determined based on the similarity and / or path distance between the target user's full department path and the candidate's full department path; The keyword matching degree is determined based on the matching score between the key information and the candidate's attribute information; The degree of relationship closeness is determined based on at least one of the following: whether the target user and the candidate are friends, the frequency of chat between the target user and the candidate, the frequency of mutual mentions between the target user and the candidate, and whether there are any collaborative matters between the target user and the candidate. The level of attention is determined based on whether the target user has set the candidate as a pinned chat contact and / or a person to pay special attention to; The correlation of historical common events is determined based on the chat time and / or the time of participation in common events between the target user and the candidate within a historical time period; The relevance of future joint matters is determined based on whether the target user and the candidate will participate in joint matters within a future time period.

[0009] According to a search re-ranking method provided by the present invention, the re-ranking of the candidate list based on each of the relevance scores to obtain the re-ranking result includes: The candidate list is sorted in descending order based on the relevance scores to obtain the reordering result.

[0010] According to a search reordering method provided by the present invention, the key information is information in a search request sent by an office collaboration client; the method further includes: Based on the page display size of the office collaboration client, the reordering results are paginated to obtain at least one paginated reordering result; The pagination reordering results are sent to the office collaboration client for display.

[0011] According to a search re-ranking method provided by the present invention, the re-ranking model is trained based on the following method: The feature vectors of the positive sample candidates and the feature vectors of the negative sample candidates are input into the initial re-ranking model to obtain the first predicted relevance score corresponding to the positive sample candidates and the second predicted relevance score corresponding to the negative sample candidates output by the initial re-ranking model. The first predicted relevance score and the second predicted relevance score are compared to obtain the comparison result; Loss information is determined based on the comparison results; The model parameters of the initial re-ranking model are iteratively adjusted based on the loss information to obtain the re-ranking model.

[0012] According to a search reordering method provided by the present invention, the negative sample candidate is a sample candidate in the sample candidate list that is located before the positive sample candidate.

[0013] The present invention also provides a search reordering apparatus, comprising: The acquisition unit is used to acquire a candidate list, which is searched based on key information input by the target user; The determining unit is used to determine the feature vector of each candidate in the candidate list based on the association features between the candidate and the target user; The prediction unit is used to input the feature vectors of each candidate into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The second determining unit is used to reorder the candidate list based on each of the relevance scores to obtain a reordering result.

[0014] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the search reordering method as described above.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the search reordering method as described above.

[0016] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the search reordering method as described above.

[0017] The search re-ranking method, apparatus, electronic device, and storage medium provided by this invention acquire a candidate list searched based on key information input by a target user. For each candidate in the candidate list, a feature vector is determined based on the association features between the candidate and the target user. The feature vectors of each candidate are input into a re-ranking model to obtain a relevance score for each candidate output by the re-ranking model. Finally, the candidate list is re-ranked based on these relevance scores to obtain the re-ranking result. It can be seen that this invention pre-trains a re-ranking model based on the feature vectors of positive and negative sample candidates, inputs the feature vectors determined based on the association features between the candidate and the target user into the re-ranking model, and finally re-ranks the candidate list based on the relevance scores output by the re-ranking model. By considering the association between the target user and the candidates, the re-ranking results of the candidates are more in line with the user's search needs, thereby improving search accuracy. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the search reordering method provided in an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram of the training process of the reordering model provided in an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram illustrating the construction of training sample pairs provided in an embodiment of the present invention.

[0022] Figure 4 This is an overall architecture diagram of the search reordering method provided in the embodiments of the present invention.

[0023] Figure 5 This is a schematic diagram of the search reordering device provided in an embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram of the physical structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0026] The following is combined Figures 1 to 4 The present invention describes a search reordering method. The execution subject of this search reordering method can be an electronic device such as a terminal, tablet computer, computer, or server, or a search reordering device installed in such an electronic device. This search reordering device can be implemented through software, hardware, or a combination of both.

[0027] Figure 1 This is a flowchart illustrating the search reordering method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, this search reordering method includes the following steps: Step 101: Obtain the candidate list, which is searched based on the key information input by the target user.

[0028] For example, when a target user needs to search for a person, they can enter key information in the search bar of the relevant software. When the relevant software receives the key information entered by the user, it generates a query based on the key information, and searches the database based on the query and a multi-way recall strategy to obtain a list of candidates. The multi-way recall strategy includes fields such as keywords (e.g., name, position), the pinyin of the candidate's name, the full path of the department, tags (e.g., the candidate's status), and notes (e.g., Zhang San, Xiao Zhang San).

[0029] Step 102: For each candidate in the candidate list, determine the feature vector of the candidate based on the association features between the candidate and the target user.

[0030] For example, when the candidate list is obtained, for each candidate in the candidate list, the correlation features between the candidate and the target user are determined. The correlation features reflect the intersection between the candidate and the target user, and the set of correlation features is determined as the candidate's feature vector.

[0031] Step 103: Input the feature vectors of each candidate into the re-ranking model to obtain the relevance scores of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list.

[0032] Among them, the sample users are the users who initiate the search request. The feature vector of the positive sample candidate is determined based on the sample association features between the positive sample candidate and the sample user. The feature vector of the negative sample candidate is determined based on the sample association features between the negative sample candidate and the sample user. The sample association features include at least one of the following: sample organizational closeness, sample keyword matching degree, sample relationship tightness, sample attention degree, sample historical common matter association degree, and sample future common matter association degree.

[0033] Taking positive sample candidates as an example, the sample organizational closeness is determined based on the similarity and / or path distance between the sample user's departmental full path and the sample candidate's departmental full path; the sample keyword matching degree is determined based on the matching score between the sample user's input sample key information and the positive sample candidate's attribute information; the sample relationship closeness is determined based on at least one of the following: whether the sample user and the positive sample candidate are friends, the chat frequency between the sample user and the positive sample candidate, the frequency of mutual mentions between the sample user and the positive sample candidate, and whether the sample user and the positive sample candidate have collaborative processing matters; the sample attention is determined based on whether the sample user has set the positive sample candidate as the top of the chat and / or a special follower; the sample historical common matter relevance is determined based on the chat duration and / or participation duration of the sample user and the positive sample candidate in common matters during the historical time period; and the sample future common matter relevance is determined based on whether the sample user and the positive sample candidate will participate in common matters in the future time period.

[0034] For example, the feature vectors of each candidate are input into a pre-trained re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The relevance score represents the degree of matching between the candidate and the key information. The higher the relevance score, the greater the degree of matching between the candidate and the key information, and the more likely the candidate is to be the person the target user wants to search for.

[0035] Step 104: Reorder the candidate list based on the relevance scores to obtain the reordering result.

[0036] For example, when the relevance scores of each candidate are obtained, the candidate list is reordered based on the relevance scores to obtain the reordered result.

[0037] The search re-ranking method provided by this invention obtains a candidate list searched based on key information input by the target user. For each candidate in the candidate list, a feature vector is determined based on the association features between the candidate and the target user. The feature vectors of each candidate are input into a re-ranking model to obtain a relevance score for each candidate output by the re-ranking model. Finally, the candidate list is re-ranked based on these relevance scores to obtain the re-ranking result. It can be seen that this invention pre-trains a re-ranking model based on the feature vectors of positive and negative sample candidates, inputs the feature vectors determined based on the association features between the candidate and the target user into the re-ranking model, and finally re-ranks the candidate list based on the relevance scores output by the re-ranking model. By considering the association between the target user and the candidates, the re-ranking results of the candidates are more in line with the user's search needs, thereby improving search accuracy.

[0038] In one embodiment, the association features include at least one of the following: organizational closeness, keyword matching degree, relationship tightness, attention degree, historical common affairs association degree, and future common affairs association degree.

[0039] The organizational closeness is determined based on the similarity and / or path distance between the target user's full department path and the candidate's full department path.

[0040] The keyword matching degree is determined based on the matching score between the key information and the candidate's attribute information.

[0041] The degree of relationship closeness is determined based on at least one of the following: whether the target user and the candidate are friends, the frequency of chat between the target user and the candidate, the frequency of mutual mentions between the target user and the candidate, and whether there are any collaborative matters between the target user and the candidate.

[0042] The level of attention is determined based on whether the target user has set the candidate as a pinned chat contact and / or a person to pay special attention to.

[0043] The correlation of historical common events is determined based on the chat time and / or participation time of the target user and the candidate in common events within a historical time period.

[0044] The relevance of future joint matters is determined based on whether the target user and the candidate will participate in joint matters within a future time period.

[0045] The full department path refers to the complete path from the highest level (such as the company or group) to the employee's department (such as the department or team), connected by hierarchical separators (such as ">" and " / ") to form a string representing the hierarchical relationship in the organizational structure; for example, the full department path is... Company > Technology Engineering Business Group > R&D Department 1 > Front-end Team.

[0046] For example, the full department paths of the target user and the candidate can be obtained from the acquired organizational structure data. The similarity and path distance between the target user's and the candidate's full department paths can be calculated. The closer the path distance and the higher the similarity, the stronger the organizational intimacy. Taking full department paths A: Company / Business Unit A / Department A1 / Group A1a and B: Company / Business Unit A / Department A1 / Group A1b as an example, starting from the root node (e.g., "Company"), the comparison is performed level by level until the last identical level is found. The path distance formula can be: Path distance = (dA - dLCA) + (dB - dLCA), where dA represents the total depth of path A (the number of levels from the root node to the department), dB represents the total depth of path B, and dLCA represents the depth of the nearest common ancestor. Following the example above, dA = 4, dB = 4, dLCA = 3, then the path distance = 2. If the two full department paths are completely identical, then dLCA = dA = dB, and the path distance is 0.

[0047] Candidate attribute information may include fields such as candidate's name, full department path, job title, and name pinyin. The matching score between the name in the key information and the candidate's name, the matching score between the key information and the candidate's full department path, the matching score between the job title in the key information and the candidate's job title, and the matching score between the name pinyin determined based on the key information and the candidate's name pinyin are calculated. Then, the matching scores are weighted and summed to obtain the keyword matching degree.

[0048] Based on the acquired friend data, it can be determined whether the target user and the candidate are friends. If they are friends, a value of 1 is assigned; if they are not friends, a value of 0 is assigned. Based on the acquired chat history data, the chat frequency between the target user and the candidate is counted, as well as the frequency of mutual mentions between them, i.e., the frequency of mutual mentions. Based on the acquired meeting data, it can be determined whether the target user and the candidate have any collaborative matters. If there are collaborative matters, a value of 1 is assigned; if there are no collaborative matters, a value of 0 is assigned. Finally, the values ​​of each item are quantified and added together to obtain the relationship tightness.

[0049] Based on the acquired attention data, determine whether the target user has set the candidate as a special follower. If the candidate is set as a special follower, assign a value of 1; otherwise, assign a value of 0. Based on the acquired chat pinning data, determine whether the target user has pinned the candidate to the top of the chat. If the candidate is pinned to the top of the chat, assign a value of 1; otherwise, assign a value of 0. The attention level is then obtained.

[0050] Based on the acquired chat data, determine the chat time of the target user and the candidate in each historical time period. Based on the acquired meeting data, determine the time of the target user and the candidate's participation in common matters in each historical time period. The closer the time is to the current time, the higher the correlation of the historical common matters, reflecting that the target user and the candidate have a recent work relationship. For example, the historical time period is 10 days.

[0051] Based on the acquired schedule data, it is determined whether the target user and the candidate will participate in a common matter in the future. If they participate in a common matter, the correlation of the common matter in the future is assigned a value of 1. If they do not participate in a common matter, the correlation of the common matter in the future is assigned a value of 0. For example, the future time period is the next 7 days.

[0052] For example, when calculating organizational closeness, keyword matching degree, relationship tightness, attention, correlation of historical common matters, and correlation of future common matters, these factors can be quantified. The set of quantified correlation features is then used as the feature vector of the candidate. The feature vectors of all candidates can be obtained using the same method.

[0053] In this embodiment, the feature vector of a candidate is determined by combining at least one of organizational closeness, keyword matching degree, relationship closeness, attention degree, correlation of historical common matters and correlation of future common matters, which improves the accuracy of feature vector determination.

[0054] In one embodiment, step 104 above reorders the candidate list based on each of the relevance scores to obtain a reordering result, which can be implemented in the following way: The candidate list is sorted in descending order based on the relevance scores to obtain the reordering result.

[0055] For example, when the relevance scores of each candidate are obtained, all relevance scores are sorted from largest to smallest. Then, each candidate in the candidate list is sorted according to the relevance score, resulting in a reordering of the candidates.

[0056] In this embodiment, the re-sorting result is obtained based on the relevance scores of each candidate, realizing intelligent optimization of the candidate list. This ensures that the contact the user wants to search for is at the top, making it easier for the user to quickly select the contact they need from the re-sorted results, thereby improving user experience and office collaboration efficiency.

[0057] In one embodiment, the key information is information from a search request sent by an office collaboration client; the search reordering method further includes the following steps: Based on the page display size of the office collaboration client, the reordering results are paginated to obtain at least one paginated reordering result; each paginated reordering result is sent to the office collaboration client for display.

[0058] For example, after obtaining the reordering results, the search request needs to be parsed to determine the identifier of the office collaboration client that sent the search request. Then, based on the identifier of the office collaboration client, the corresponding page display size is obtained. If the page display size cannot display the entire reordering result, the reordering result needs to be paginated to obtain at least one paginated reordering result. Finally, each paginated reordering result is sent to the office collaboration client for display. Of course, when displaying each paginated reordering result, the office collaboration client will first display the paginated reordering result that appears first in the sorted list.

[0059] It should be noted that the information of each candidate in the re-sorting results includes fields such as keywords (e.g., name, position), the pinyin of the candidate's name, the full path of the department, and tags. Based on the fields that the office collaboration client needs to display, the fields of each candidate in the re-sorting results can be reassembled and sent to the office collaboration client for display. This invention does not limit this.

[0060] In this embodiment, the re-sorting results are paginated based on the page display size of the office collaboration client to obtain at least one paginated re-sorting result. Each paginated re-sorting result is sent to the office collaboration client for display, which makes it easier for the target user to quickly select the required contact from all the paginated re-sorting results, thereby improving user experience and office collaboration efficiency.

[0061] In one embodiment, Figure 2 This is a schematic diagram of the training process of the reordering model provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the reordering model is trained in the following way: Step 201: Input the feature vectors of the positive sample candidates and the feature vectors of the negative sample candidates into the initial re-ranking model to obtain the first predicted relevance score corresponding to the positive sample candidates and the second predicted relevance score corresponding to the negative sample candidates output by the initial re-ranking model.

[0062] For example, collect user historical search records reported by the office collaboration client. Each user's historical search record includes the sample user's input key information, the resulting list of sample candidates [C1, C2, C3, ..., Cn], and the sample candidate Ck ultimately selected by the sample user from the list. The sample candidate Ck selected by the sample user is designated as a positive sample candidate, and any sample candidate not selected by the sample user is designated as a negative sample candidate Cj. Then, a training sample pair (Q, Ck, Cj) is constructed, where Q represents the sample query Query generated based on the sample user's input key information. The same method can be used to construct corresponding training sample pairs based on other users' historical search records. Since the training sample pairs are determined based on the sample user's click behavior (i.e., selection behavior) on the sample candidates, training based on positive and negative sample candidates can also be considered as partial order pair training based on click behavior.

[0063] For each training sample pair, the feature vector of the positive sample candidate is determined based on the association features between the positive sample candidate and the sample user; and the feature vector of the negative sample candidate is determined based on the association features between the negative sample candidate and the sample user. Then, the feature vectors of the positive sample candidate and the negative sample candidate are input into the initial re-ranking model to obtain the first predicted relevance score of the positive sample candidate and the second predicted relevance score of the negative sample candidate output by the initial re-ranking model.

[0064] It should be noted that the initial reordering model can be a deep neural network model, etc., and this invention does not limit it.

[0065] Step 202: Compare the first predicted relevance score and the second predicted relevance score to obtain the comparison result.

[0066] For example, the goal of the initial re-ranking model is to learn a scoring function F(Q, U, Ci), where Ci represents any sample candidate such that for most samples, F(Q, U, C_pos) > F(Q, U, C_neg), where C_pos represents a positive sample candidate and C_neg represents a negative sample candidate. In other words, the initial re-ranking model learns to determine that, in a specific sample query and sample user U context, a positive sample candidate should receive a higher relevance score than a negative sample candidate. The relevance score can be represented as Score_i = F(Q, U, Ci). Therefore, when the initial re-ranking model outputs the first predicted relevance score for a positive sample candidate and the second predicted relevance score for a negative sample candidate, the two scores are compared. If the comparison result indicates that the first predicted relevance score is greater than the second predicted relevance score, the initial re-ranking model's prediction is correct; if the comparison result indicates that the first predicted relevance score is less than the second predicted relevance score, the initial re-ranking model's prediction is incorrect.

[0067] Step 203: Determine the loss information based on the comparison results.

[0068] For example, a comparison result can be obtained for each user's historical search records, and then loss information can be determined based on each comparison result.

[0069] Step 204: Iteratively adjust the model parameters of the initial re-ranking model based on the loss information to obtain the re-ranking model.

[0070] For example, in each training iteration, the initial re-ranking model calculates the first and second predicted relevance scores based on the feature vectors of the input positive and negative sample candidates using the current model parameters. Then, it determines the loss information based on the comparison between these scores. This loss information quantifies the gap between the initial re-ranking model's current prediction and the ideal ranking. Subsequently, the loss information is propagated back from the output layer to the input layer of the initial re-ranking model using backpropagation, calculating the gradient of the loss information with respect to each model parameter. Finally, the optimizer updates the model parameters in the opposite direction of the gradient to reduce the loss. After multiple iterations with a large number of samples, the parameters of the initial re-ranking model are gradually optimized, and its ranking prediction ability continuously improves until convergence is reached, ultimately resulting in a successfully trained re-ranking model.

[0071] In this embodiment, the first predicted relevance score corresponding to the positive sample candidate and the second predicted relevance score corresponding to the negative sample candidate are compared to obtain the comparison result. Based on the comparison result, loss information is determined, and finally, the model parameters of the initial re-ranking model are iteratively adjusted based on the loss information to obtain the re-ranking model. It can be seen that when training the re-ranking model, the association features between positive sample candidates and sample users are considered, as well as the association features between negative sample candidates and sample users, thereby improving the accuracy of the finally trained re-ranking model.

[0072] In one embodiment, the negative sample candidate is a sample candidate in the sample candidate list that precedes the positive sample candidate.

[0073] For example, when selecting negative sample candidates, it is preferable to select sample candidates that are listed before positive sample candidates in the sample candidate list. This is because the sample candidate list is determined based on the degree of matching with the sample key information entered by the sample user. The system believes that the earlier the sample candidate is, the more likely the sample user is to search for the person. Therefore, it is more representative to identify the sample candidate that is listed before the positive sample candidate as a negative sample candidate. Figure 3 This is a schematic diagram illustrating the construction of training sample pairs provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the key information of the sample is... Taking Zhang San as an example, the order of the sample candidates in the searched sample candidate list is as follows: Zhang San A, Zhang San B, Zhang San C, and Zhang San D. If the sample user selects Zhang San C in the sample candidate list, then Zhang San C is determined as a positive sample candidate. Zhang San A and Zhang San B are randomly selected as negative sample candidates. For example, if Zhang San A is selected, then the positive sample includes Zhang San C, Zhang San C's feature vector and click behavior, and the negative sample includes Zhang San A, Zhang San A's feature vector and non-click behavior. The final training sample pair can be represented as (Q, positive sample, negative sample).

[0074] In this embodiment, sample candidates that are located before positive sample candidates in the sample candidate list are selected to improve the accuracy of negative samples and further improve the accuracy of the re-ranking model obtained from training.

[0075] Figure 4 This is an overall architecture diagram of the search reordering method provided in the embodiments of the present invention, as shown below. Figure 4 As shown, it mainly includes the following four modules: data source module, feature calculation engine module, re-ranking model training module, and online search service module.

[0076] The data source module collects organizational structure data through the collaborative office management backend, and collects users' historical search records in the office collaboration client's address book (e.g., key information, candidate list, click behavior), user interaction data with contacts (chat data, meeting data, schedule data, etc.), and user personalized settings data (pinned settings, special attention people, etc.) through client-side tracking. The collected data is then stored in the data warehouse.

[0077] The feature calculation engine module cleans the collected data (invalid data, missing fields, etc.); based on the cleaned data, it calculates the values ​​of each associated feature, including a closeness calculation submodule, a keyword matching degree calculation submodule, a relationship tightness calculation submodule, an attention calculation submodule, a historical common matter association degree calculation submodule, and a future common matter association degree calculation submodule. The closeness calculation submodule calculates organizational closeness, the keyword matching degree calculation submodule calculates keyword matching degree, the relationship tightness calculation submodule calculates relationship tightness, the attention calculation submodule calculates attention degree, the historical common matter association degree calculation submodule calculates historical common matter association degree, and the future common matter association degree calculation submodule calculates future common matter association degree. The specific calculation method is as described above, and will not be repeated here.

[0078] The re-ranking model training module includes a dataset construction submodule (constructing training data pairs) and a model training and optimization submodule (completing model training, model parameter tuning, and performance evaluation), and stores the trained re-ranking model in a model repository. During actual training, the training dataset, composed of training data pairs, is divided into a training set and a validation set. The performance of the re-ranking model is then evaluated using the validation set.

[0079] The online search service module receives search requests from target users, calls the basic retrieval module to obtain a candidate list, and for each candidate in the candidate list, determines the candidate's feature vector based on the association features between the candidate and the target user. The feature vector of each candidate is then input into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. Finally, the candidate list is re-ranked based on each relevance score to obtain the re-ranking result, which is then returned to the office collaboration client for display.

[0080] The search reordering method provided by this invention has the following beneficial effects: Adapting to the specific characteristics of the office environment: Given the distinct departmental hierarchies and close collaboration, this approach incorporates association features such as organizational closeness, keyword matching, relationship tightness, attention level, relevance of past shared matters, and relevance of future shared matters. This aligns with actual office needs and is more targeted and practical compared to general address book search and sorting methods.

[0081] Improving search accuracy and efficiency: This invention combines multi-dimensional association features and uses a specially trained re-ranking model to re-rank the candidate list, accurately matching users' actual needs, reducing users' search time in search results, and improving office efficiency. For example, when a user searches for "Zhang San," the system will prioritize displaying "Zhang San"s who have similar departmental connections, shared meetings, and are of particular interest to the user, rather than other "Zhang San"s ranked solely by key information.

[0082] Personalization and intelligence: By capturing user click behavior (the behavior of selecting sample candidates in the sample candidate list), personalized settings (pinning, special attention people) and historical interaction data, the re-ranking model can continuously learn user usage habits, realize personalized search result ranking, and improve the user's office experience.

[0083] The search reordering apparatus provided by the present invention is described below. The search reordering apparatus described below can be referred to in correspondence with the search reordering method described above.

[0084] Figure 5 This is a schematic diagram of the search reordering device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the search reordering device 500 includes an acquisition unit 501, a determination unit 502, a prediction unit 503, and a reordering unit 504; wherein: The acquisition unit 501 is used to acquire a candidate list, which is searched based on key information input by the target user; The determining unit 502 is used to determine the feature vector of each candidate in the candidate list based on the association features between the candidate and the target user; The prediction unit 503 is used to input the feature vectors of each candidate into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The reordering unit 504 is used to reorder the candidate list based on each of the relevance scores to obtain the reordering result.

[0085] The search re-ranking device provided by this invention acquires a candidate list searched based on key information input by a target user. For each candidate in the candidate list, a feature vector is determined based on the association features between the candidate and the target user. The feature vectors of each candidate are input into a re-ranking model to obtain a relevance score for each candidate output by the re-ranking model. Finally, the candidate list is re-ranked based on these relevance scores to obtain the re-ranking result. It can be seen that this invention pre-trains a re-ranking model based on the feature vectors of positive and negative sample candidates, inputs the feature vectors determined based on the association features between the candidate and the target user into the re-ranking model, and finally re-ranks the candidate list based on the relevance scores output by the re-ranking model. By considering the association between the target user and the candidates, the re-ranking results of the candidates are more in line with the user's search needs, thereby improving search accuracy.

[0086] Based on any of the above embodiments, the association features include at least one of the following: organizational closeness, keyword matching degree, relationship tightness, attention degree, historical common matter association degree, and future common matter association degree; The organizational closeness is determined based on the similarity and / or path distance between the target user's full department path and the candidate's full department path; The keyword matching degree is determined based on the matching score between the key information and the candidate's attribute information; The degree of relationship closeness is determined based on at least one of the following: whether the target user and the candidate are friends, the frequency of chat between the target user and the candidate, the frequency of mutual mentions between the target user and the candidate, and whether there are any collaborative matters between the target user and the candidate. The level of attention is determined based on whether the target user has set the candidate as a pinned chat contact and / or a person to pay special attention to; The correlation of historical common events is determined based on the chat time and / or the time of participation in common events between the target user and the candidate within a historical time period; The relevance of future joint matters is determined based on whether the target user and the candidate will participate in joint matters within a future time period.

[0087] Based on any of the above embodiments, the reordering unit 504 is specifically used for: The candidate list is sorted in descending order based on the relevance scores to obtain the reordering result.

[0088] Based on any of the above embodiments, the key information is information in the search request sent by the office collaboration client; the search reordering device 500 further includes: A pagination unit is used to paginate the reordering results based on the page display size of the office collaboration client, so as to obtain at least one pagination reordering result; The display unit is used to send the pagination reordering results to the office collaboration client for display.

[0089] Based on any of the above embodiments, the reordering model is trained in the following manner: The feature vectors of the positive sample candidates and the feature vectors of the negative sample candidates are input into the initial re-ranking model to obtain the first predicted relevance score corresponding to the positive sample candidates and the second predicted relevance score corresponding to the negative sample candidates output by the initial re-ranking model. The first predicted relevance score and the second predicted relevance score are compared to obtain the comparison result; Loss information is determined based on the comparison results; The model parameters of the initial re-ranking model are iteratively adjusted based on the loss information to obtain the re-ranking model.

[0090] Based on any of the above embodiments, the negative sample candidate is the sample candidate in the sample candidate list that precedes the positive sample candidate.

[0091] Figure 6 This is a schematic diagram of the physical structure of the electronic device provided in the embodiments of the present invention, such as... Figure 6 As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can invoke logical instructions in the memory 630 to execute a search reordering method, which includes: obtaining a candidate list, the candidate list being searched based on key information input by the target user; For each candidate in the candidate list, a feature vector of the candidate is determined based on the association features between the candidate and the target user; The feature vectors of each candidate are input into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The candidate list is reordered based on the relevance scores to obtain the reordering result.

[0092] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0093] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, the computer program being able to be stored on a non-transitory computer-readable storage medium, the computer program being executed by a processor, the computer being able to execute the search reordering method provided by the above methods, the method including: obtaining a candidate list, the candidate list being searched based on key information input by a target user; For each candidate in the candidate list, a feature vector of the candidate is determined based on the association features between the candidate and the target user; The feature vectors of each candidate are input into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The candidate list is reordered based on the relevance scores to obtain the reordering result.

[0094] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the search reordering method provided by the above methods, the method comprising: obtaining a candidate list, the candidate list being searched based on key information input by a target user; For each candidate in the candidate list, a feature vector of the candidate is determined based on the association features between the candidate and the target user; The feature vectors of each candidate are input into the re-ranking model to obtain the relevance scores of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The candidate list is reordered based on the relevance scores to obtain the reordering result.

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

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A search reordering method, characterized in that, include: Obtain a candidate list, which is searched based on key information input by the target user; For each candidate in the candidate list, a feature vector of the candidate is determined based on the association features between the candidate and the target user; The feature vectors of each candidate are input into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The candidate list is reordered based on the relevance scores to obtain the reordering result.

2. The search reordering method according to claim 1, characterized in that, The association features include at least one of the following: organizational closeness, keyword matching degree, relationship tightness, attention degree, association degree of historical common matters, and association degree of future common matters; The organizational closeness is determined based on the similarity and / or path distance between the target user's full department path and the candidate's full department path; The keyword matching degree is determined based on the matching score between the key information and the candidate's attribute information; The degree of relationship closeness is determined based on at least one of the following: whether the target user and the candidate are friends, the frequency of chat between the target user and the candidate, the frequency of mutual mentions between the target user and the candidate, and whether there are any collaborative matters between the target user and the candidate. The level of attention is determined based on whether the target user has set the candidate as a pinned chat contact and / or a person to pay special attention to; The correlation of historical common events is determined based on the chat time and / or the time of participation in common events between the target user and the candidate within a historical time period; The relevance of future joint matters is determined based on whether the target user and the candidate will participate in joint matters within a future time period.

3. The search reordering method according to claim 1, characterized in that, The reordering of the candidate list based on each of the aforementioned relevance scores to obtain the reordering result includes: The candidate list is sorted in descending order based on the relevance scores to obtain the reordering result.

4. The search reordering method according to claim 1, characterized in that, The key information is the information in the search request sent by the office collaboration client; the method also includes: Based on the page display size of the office collaboration client, the reordering results are paginated to obtain at least one paginated reordering result; The pagination reordering results are sent to the office collaboration client for display.

5. The search reordering method according to any one of claims 1-4, characterized in that, The reordering model was trained in the following manner: The feature vectors of the positive sample candidates and the feature vectors of the negative sample candidates are input into the initial re-ranking model to obtain the first predicted relevance score corresponding to the positive sample candidates and the second predicted relevance score corresponding to the negative sample candidates output by the initial re-ranking model. The first predicted relevance score and the second predicted relevance score are compared to obtain the comparison result; Loss information is determined based on the comparison results; The model parameters of the initial re-ranking model are iteratively adjusted based on the loss information to obtain the re-ranking model.

6. The search reordering method according to any one of claims 1-4, characterized in that, The negative sample candidate is the sample candidate in the sample candidate list that is located before the positive sample candidate.

7. A search reordering apparatus, characterized in that, include: The acquisition unit is used to acquire a candidate list, which is searched based on key information input by the target user; The determining unit is used to determine the feature vector of each candidate in the candidate list based on the association features between the candidate and the target user; The prediction unit is used to input the feature vectors of each candidate into the re-ranking model to obtain the relevance score of each candidate output by the re-ranking model. The re-ranking model is trained based on the feature vectors of positive sample candidates and the feature vectors of negative sample candidates. The positive sample candidates are the sample candidates selected by the sample user in the sample candidate list, and the negative sample candidates are the sample candidates not selected by the sample user in the sample candidate list. The reordering unit is used to reorder the candidate list based on each of the relevance scores to obtain the reordering result.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the search reordering method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the search reordering method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the search reordering method as described in any one of claims 1 to 6.