Recommendation result rearrangement method and device, electronic equipment and storage medium

By obtaining and encoding search content and query party preference information, generating rearranged reference features, and sorting them in the recommendation system, the problem of low accuracy of recommended results in the prior art is solved, and more accurate sorting of recommended results is achieved.

CN119149819APending Publication Date: 2024-12-17GUANGZHOU FANGZHOU INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411308010.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

The existing recommendation system only scores each result independently when sorting, and fails to fully consider the relationship between the search intention of the query party and the recommended result, resulting in low accuracy of the recommendation result.

Method used

By obtaining search content and query party preference information, reorder reference features are generated, and inputting them into the rearrangement model to recall together with the initial recommendation results, the recommended results are sorted and optimized using self-attention units and feedforward neural networks.

Benefits of technology

The accuracy of the recommended results is improved, the relationship between the search intention of the query party and the recommended results is taken into account, and the accuracy of the sorting results is optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149819A_ABST
    Figure CN119149819A_ABST
Patent Text Reader

Abstract

The invention discloses a recommendation result rearrangement method and device, electronic equipment and a storage medium, and relates to the technical field of data search. The method comprises the steps of obtaining search content and query party preference information; encoding the search content and the query party preference information to generate a rearrangement reference feature; and recalling an initial recommendation result, and inputting the rearrangement reference feature and the initial recommendation result into a rearrangement model to obtain a rearrangement recommendation result. According to the technical scheme of the embodiment of the invention, the sorting of the recommendation results is optimized, and the accuracy of the recommendation results is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data search technology, and in particular to a method, device, electronic device and storage medium for rearranging recommendation results. Background Art

[0002] Re-ranking is a core task in the recommendation system. The goal of re-ranking is to provide an ordered result for the query party. Usually, during the query party's search process, the recommendation system provides a ranking model, which uses a labeled data set to score the results corresponding to each search content from a global optimal perspective to obtain the recommended results.

[0003] However, since the scoring function usually only scores each result independently, the recommendation results obtained in this way are less accurate. Therefore, there is an urgent need for a method to re-rank the recommendation results to optimize the ranking of the recommendation results. Summary of the invention

[0004] The present invention provides a recommendation result rearrangement method, device, electronic device and storage medium, which optimize the recommendation result sorting and improve the accuracy of the recommendation result.

[0005] According to one aspect of the present invention, a method for rearranging recommendation results is provided, the method comprising:

[0006] Obtain search content and query party preference information;

[0007] Encoding the search content and the query party preference information to generate a rearrangement reference feature;

[0008] The initial recommendation result is recalled, and the rearrangement reference feature and the initial recommendation result are input into the rearrangement model to obtain the rearrangement recommendation result.

[0009] According to another aspect of the present invention, a device for rearranging recommendation results is provided, the device comprising:

[0010] An information acquisition module is used to obtain search content and query party preference information;

[0011] An information encoding module, used to encode the search content and the query party preference information to generate a rearrangement reference feature;

[0012] The recommendation result rearrangement module is used to recall the initial recommendation result, input the rearrangement reference feature and the initial recommendation result into the rearrangement model, and obtain the rearrangement recommendation result.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the recommendation result rearrangement method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the recommendation result rearrangement method described in any embodiment of the present invention when executed.

[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for rearranging recommendation results described in any embodiment of the present invention is implemented.

[0019] The technical solution of the embodiment of the present invention obtains search content and query party preference information, encodes the search content and query party preference information, generates re-ranking reference features, recalls initial recommendation results, inputs the re-ranking reference features and the initial recommendation results into the re-ranking model, and obtains re-ranking recommendation results. The re-ranking recommendation results are obtained by taking into account the search intent of the query party, the query preference, and the relationship between the recommendation results in the initial recommendation results, thereby optimizing the ranking of the recommendation results and improving the accuracy of the recommendation results.

[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 is a flowchart of a method for rearranging recommendation results provided according to Embodiment 1 of the present invention;

[0023] Figure 2 is a flow chart of a method for rearranging recommendation results provided according to Embodiment 2 of the present invention;

[0024] Figure 3is a schematic diagram of the principle of re-arranging the recommendation results applicable to the second embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of the structure of a rearrangement model applicable to the second embodiment of the present invention;

[0026] Figure 5 is a structural schematic diagram of a recommendation result rearrangement device provided according to Embodiment 3 of the present invention;

[0027] Figure 6 It is a structural schematic diagram of an electronic device for implementing the recommendation result rearrangement method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 This is a flowchart of a method for rearranging recommendation results provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the case of rearranging recommendation results obtained based on a recommendation system query. The method can be performed by a recommendation result rearranging device, which can be implemented in the form of hardware and / or software. The recommendation result rearranging device can be configured in an electronic device that carries the recommendation result rearranging function, such as a client or a server.

[0032] See also Figure 1 The recommended result rearrangement method shown includes:

[0033] S110: Obtain search content and query party preference information.

[0034] The search content may be the content entered by the query party when searching in the recommendation system. The search content may be used to characterize the search intention of the query party. The query party preference information may be used to characterize the query party's query preference. The query party preference information may be obtained with the authorization of the query party. Exemplarily, the query party preference information may include the query party attribute information and the query party's historical query records. Among them, the query party attribute information may characterize the query party's query preference from the perspective of the query party's own characteristics. For example, the query party attribute information may include the query party identification, the query party location, and the query party category. Among them, the query party identification may be used to uniquely identify the query party, such as the query party name and the query party unique code. The query party location may be used to identify the query party's location. The query party category may be used to characterize the query party's classification, such as the query party's gender classification or age classification. The query party's historical query record may characterize the query party's query preference from the perspective of the query party's historical query behavior. For example, the query party's historical query record may include the query party's historical search content, historical recommendation results, and historical click results.

[0035] In an optional embodiment of the present invention, the search content may include drug information search content and medication instruction search content.

[0036] Drug information search content can be used to query drug information. For example, the specifications of cold medicine. Medication guidance search content can be used to query medication guidance. For example, the usage and dosage of cold medicine. Compared with other text knowledge, the content of drug information and medication guidance is more complicated, and accurate recommendation results are more important.

[0037] This solution further improves the applicability of the rearrangement of recommendation results by concretizing the search content into drug information search content and medication guidance search content.

[0038] Specifically, the search content entered by the querying party in the recommendation system may be obtained. The querying party's preference information may be obtained with the querying party's authorization.

[0039] S120: Encode the search content and the query party preference information to generate a rearrangement reference feature.

[0040] The re-ranking reference feature can be a reference feature for re-ranking the recommendation results. The re-ranking reference feature can include two dimensions: the search intent and the query preference of the query party. Optionally, the re-ranking reference feature can be in the form of a feature vector. It can be understood that the re-ranking reference feature is obtained by vectorized encoding, and the search content and the query party preference information are converted from text form to vector form, which is convenient for subsequent corresponding feature extraction and re-ranking scoring.

[0041] Optionally, the search content and the query party preference information may be directly combined, and the combined result may be vectorized and encoded to obtain a rearrangement reference feature.

[0042] S130 , recalling the initial recommendation results, inputting the rearrangement reference features and the initial recommendation results into the rearrangement model, and obtaining the rearrangement recommendation results.

[0043] For the recommendation system, the search content of the query party is usually input into the sorting model, and the sorting model queries the corresponding recommendation results based on its own text knowledge base and scores each recommendation result; based on the score of each recommendation result, each recommendation result is sorted to obtain the initial recommendation result. The initial recommendation result can be the result obtained after the recommendation system is sorted, which can be understood as the output result of the sorting model of the recommendation system. Exemplarily, the initial recommendation result can be a sorted list of recommendation results. Among them, the initial recommendation result can include each recommendation result output by the recommendation system (or sorting model) after matching the search content and the text knowledge base, the score of each recommendation result and the ranking of each recommendation result. Optionally, a similarity matching method can be adopted, and the result with a similarity greater than or equal to a preset similarity is used as the recommendation result, and the similarity is used as the score of the recommendation result, and each recommendation result is sorted according to the score of the recommendation result to obtain the initial recommendation result.

[0044] The re-ranking model can be used to re-rank the initial recommendation results of the recommendation system. The re-ranking model can be a pre-trained model. Exemplarily, the re-ranking model can be a deep learning model. For example, a Tansformer (converter) model. The re-ranking reference model can be used to extract features from the re-ranking reference features, that is, to analyze the search intent and query preference of the query party corresponding to the re-ranking reference features, and to re-determine the ranking of each recommendation result in the initial recommendation results.

[0045] The retake recommendation result may be a reordered result of the initial recommendation result. Exemplarily, the reordered recommendation result may be a reordered list of recommendation results. The reordered recommendation result may include the reordered recommendation results, the reordered scores of the recommendation results, and the reordered order of the recommendation results.

[0046] Specifically, the text knowledge base in the ranking model or recommendation system can be matched based on the search content to recall the initial recommendation results. The initial recommendation results and the rearrangement reference features can be input into the rearrangement model to obtain the rearrangement recommendation results.

[0047] In an optional embodiment of the present invention, the rearrangement reference features and the initial recommendation results are input into a rearrangement model to obtain a rearranged recommendation result, including: analyzing the global relationship between the recommendation results in the initial recommendation results through the self-attention unit of the rearrangement model, and analyzing the degree of association between the rearrangement reference features and each recommendation result to obtain a correlation score for each recommendation result; updating the correlation score of each recommendation result through the feedforward neural network unit of the rearrangement model to obtain a rearrangement score for each recommendation result; and rearranging each recommendation result according to the rearrangement score of each recommendation result to obtain a rearranged recommendation result.

[0048] The rearrangement model may include a self-attention unit and a feedforward neural network unit. Among them, the self-attention unit may be used to score each recommendation result included in the initial recommendation result. Specifically, the self-attention unit may analyze the global relationship between each recommendation result in the initial recommendation result, and analyze the degree of association between the rearrangement reference feature and each recommendation result. The association score may be used to characterize the degree of association between the recommendation result and the rearrangement reference feature, as well as the degree of association with other recommendation results. It can be understood that the higher the association score of the recommendation result, the higher the degree of association between the recommendation result and the rearrangement reference feature, and the higher the degree of association between the recommendation result and other recommendation results. The rearrangement score of the recommendation result may be used to characterize the update result of the association score of the recommendation result. The higher the rearrangement score of the recommendation result, the higher the ranking of the recommendation result, and the more the recommendation result conforms to the search intention and query preference of the query party. The rearranged recommendation result may be the reordered result of the initial recommendation result. The front and back neural network modules may be used to update the association score.

[0049] Specifically, the self-attention unit of the rearrangement model can be used to analyze the global relationship between the recommended results in the initial recommendation results, and the degree of association between the rearrangement reference features and the recommended results can be analyzed to obtain the association score of each recommended result. The feedforward neural network unit of the rearrangement model can be used to perform dimension upgrade, feature fusion and dimension reduction on the association score of each recommended result, and then update the association score of each recommended result to obtain the rearrangement score of each recommended result. According to the size of the rearrangement score of each recommended result, each recommended result is rearranged to obtain the rearranged recommendation result.

[0050] This scheme concretizes the structure of the rearrangement model into a self-attention unit and a feedforward neural network unit. Through the self-attention unit, the global relationship between each recommendation result in the initial recommendation result is analyzed, and the degree of correlation between the rearrangement reference feature and each recommendation result is analyzed to obtain the correlation score of each recommendation result. The global relationship between each recommendation result in the initial recommendation result and the degree of correlation between the rearrangement reference feature and each recommendation result are considered to achieve the initial score of each recommendation result in the initial recommendation result, which can improve the accuracy of the rearrangement of the recommendation results. Through the feedforward neural network unit of the rearrangement model, the correlation score of each recommendation result is updated to obtain the rearrangement score of each recommendation result. By rearranging each recommendation result according to the rearrangement score of each recommendation result, the rearranged recommendation result is obtained. By enhancing the features of the correlation score of each recommendation result, the accuracy of the rearrangement of the rearranged recommendation results is further improved.

[0051] In an optional embodiment of the present invention, the initial recommendation results are recalled, and the rearrangement reference features and the initial recommendation results are input into a rearrangement model to obtain a rearranged recommendation result, including: recalling the initial recommendation results in batches to obtain at least one batch of unit initial recommendation results; inputting the rearrangement reference features and the unit initial recommendation results into the rearrangement model to obtain unit rearrangement recommendation results; and rearranging each recommendation result according to the rearrangement score of each recommendation result in each unit rearrangement recommendation result to obtain a rearranged recommendation result.

[0052] The unit initial recommendation result can be used to characterize part of the initial recommendation results of a single batch recall. Optionally, the initial recommendation results can be recalled in batches according to the preset number of recommendation results. Among them, the preset number of recommendation results can be the preset number of recommendation results for a single batch recall. The preset number of recommendation results can be set and adjusted by technical personnel according to the computing resources of this device. The unit rearrangement recommendation result can be the rearrangement result of the unit initial recommendation result. The same rearrangement model can be used to rearrange the initial recommendation results of each unit to obtain the unit rearrangement recommendation result, thereby ensuring the consistency of the rearrangement process of the initial recommendation results of each unit, and finally ensuring the accuracy of the rearrangement of the initial recommendation results.

[0053] Specifically, the initial recommendation results may be recalled in batches using a preset number of recommendation results to obtain at least one batch of unit initial recommendation results. The rearrangement reference features and the unit initial recommendation results may be input into the rearrangement model to obtain the unit rearrangement recommendation results. The recommendation results may be rearranged in descending order according to the rearrangement scores of the recommendation results in each unit rearrangement recommendation result to obtain the rearrangement recommendation results.

[0054] This solution obtains unit rearrangement recommendation results by recalling and rearranging the initial recommendation results in batches, and rearranges the recommendation results according to the rearrangement scores of each recommendation result in each unit rearrangement recommendation result to obtain the rearrangement recommendation results. The computing resources of this device are taken into consideration, and the computing efficiency of this device is taken into account while rearranging the recommendation results.

[0055] The technical solution of the embodiment of the present invention obtains search content and query party preference information, encodes the search content and query party preference information, generates re-ranking reference features, recalls initial recommendation results, inputs the re-ranking reference features and the initial recommendation results into the re-ranking model, and obtains re-ranking recommendation results. The re-ranking recommendation results are obtained by taking into account the search intent of the query party, the query preference, and the relationship between the recommendation results in the initial recommendation results, thereby optimizing the ranking of the recommendation results and improving the accuracy of the recommendation results.

[0056] Embodiment 2

[0057] Figure 2 A flow chart of a method for rearranging recommendation results provided for the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention concretizes "encoding the search content and the query party preference information to generate a rearrangement reference feature" as "vectorizing the search content to obtain the search content feature; vectorizing the query party preference information to obtain the query party preference feature; splicing the search content feature and the query party preference feature to generate a rearrangement reference feature". By vectorizing the search content and the query party preference information respectively, and then splicing the search content feature and the query party preference feature, the integrity of the search content and the query party preference information is ensured, thereby improving the accuracy of the rearrangement of recommendation results. It should be noted that for the parts not described in detail in the embodiments of the present invention, please refer to the description of other embodiments.

[0058] See also Figure 2 The recommended result rearrangement method shown includes:

[0059] S210: Obtain search content and query party preference information.

[0060] S220: vectorize and encode the search content to obtain search content features.

[0061] The search content feature can be the vectorized encoding result of the search content. The search content feature can represent the search content from a vector perspective, that is, the search intent of the query party from a vector perspective. By vectorizing the search content separately, the information of the search content can be retained to the maximum extent.

[0062] Specifically, an encoder may be used to vectorize the search content to obtain search content features.

[0063] In an optional embodiment of the present invention, the search content is vectorized and encoded to obtain search content features, including: structurally splitting the search content to obtain at least one unit search content; vectorizing each unit search content and the unit position of each unit search content to obtain each unit search content feature and the corresponding unit position feature; superimposing each unit search content feature and the corresponding unit position feature to obtain the search content feature.

[0064] The unit search content may be the result of structural decomposition of the search content. By structurally decomposing the search content to obtain the unit search content, the information contained in the search content can be more finely characterized. The unit position can be used to characterize the position of the unit search content. The unit search content feature can be used to characterize the vectorized encoding result of the unit search content. The unit position feature can be used to characterize the vectorized result of the position of each unit search content. Superimposing the unit search content feature and the corresponding unit position feature can strengthen the structure of the search content, thereby further reflecting the key information of the search content.

[0065] Specifically, natural language processing technology can be used to decompose the search content structure to obtain at least one unit search content. Word vector encoding technology can be used to vectorize and encode each unit search content and the unit position of each unit search content to obtain each unit search content feature and the corresponding unit position feature. Each unit search content feature and the corresponding unit position feature are summed to obtain the search content feature.

[0066] This scheme obtains at least one unit search content by structurally splitting the search content, vectorizes each unit search content and the unit position of each unit search content to obtain each unit search content feature and the corresponding unit position feature, superimposes each unit search content feature and the corresponding unit position feature to obtain the search content feature, introduces a structural splitting process and a structural strengthening process for the search content, enhances the complete information of the search content, and extracts the structural key information of the search content, thereby further improving the accuracy of the rearrangement of the recommendation results.

[0067] S230: vectorize and encode the query party preference information to obtain the query party preference feature.

[0068] The query party preference feature may be a vectorized encoding result of the query party preference information. The query party preference feature may represent the query party's query preference from a vector perspective. By vectorizing the query party preference information separately, the query party preference information may be retained to the maximum extent.

[0069] Specifically, an encoder may be used to vectorize the query party preference information to obtain the query party preference features.

[0070] S240: Concatenate the search content features and the query party preference features to generate a rearrangement reference feature.

[0071] Specifically, the search content features and the query party preference features may be directly concatenated to obtain the rearrangement reference features.

[0072] S250: recall the initial recommendation results, input the rearrangement reference features and the initial recommendation results into the rearrangement model, and obtain the rearrangement recommendation results.

[0073] The technical solution of the embodiment of the present invention ensures the integrity of the search content and the query party preference information by vectorizing the search content and the query party preference information respectively, and then directly splicing the search content features and the query party preference features, thereby improving the accuracy of the re-ranking of the recommendation results.

[0074] Reranking is a core task in recommendation systems. The goal of reranking is to provide the query party with an ordered list of recommended results. Usually, a ranking model can use a labeled data set to give each result a score from a global optimal perspective, that is, the score of the recommendation result. However, because the scoring function only scores each result independently, it does not consider the mutual influence between results, and also does not consider the query preferences and search intentions of the query party. This approach may result in a suboptimal solution for the ranking of recommendation results, and it is difficult to obtain the optimal solution for the ranking of recommendation results. In particular, the ranking in the general recommendation system only considers the matching between the search content and the features in the text knowledge base, but does not consider the influence between the recommended results in the final recommendation result list (that is, the initial recommendation results), especially the influence between the recommended results with similar rankings. For example, the query party's search content can usually be used as the input data of the ranking model, but this method only focuses on using the search content to optimize the loss function of the ranking model, and does not explicitly model the mutual influence between the recommendation results.

[0075] This solution proposes a personalized rearrangement model, which can use Transformer as Encoder to directly optimize the recommendation result list (i.e., the initial recommendation result). One reason for using Transformer is that the Self-attention unit in it can directly model the global relationship between any pair of recommendation results in the entire recommendation result list. At the same time, this solution also proves that by introducing pre-trained embeddings and learning personalized Encoders, the model performance can be further improved. In the verification of offline datasets and online AB experiments, the rearrangement model has achieved significant improvements.

[0076] The query vector (i.e., search content feature) of the query party x i Input the sorting model, get the P() probability, and finally minimize the recommended result y i The error between the recommended results predicted by the ranking model and the initial ranking result is obtained.

[0077] Exemplarily, the objective function of the ranking model can be characterized by the following formula:

[0078] L1=∑ r∈R l({y i ,P(y i |x i ;θ)|i∈I r});

[0079] Where L1 is the score of the recommendation result; y i is the i-th recommended result in the initial recommendation results; x i is the search content feature; θ is the ranking model parameter; i is the ranking of the recommended results; I r The result of the text knowledge base.

[0080] However, this solution believes that it is not enough to just use the search content features of the query party. It is also necessary to consider the influence between the recommended results (i.e., the influence between the recommended results after recall sorting) and the interaction between the search content and the recommended results (i.e., the influence between the query vector and the recommended results). Among them, the influence between the recommended results can be directly learned by learning the ranked list of recommended results (i.e., the initial sorting results). This solution also introduces the query party preference information to learn the query party specific information, thereby modeling the mutual influence between the recommended results and the query party preferences.

[0081] Exemplarily, the objective function of the rearrangement model may be characterized by the following formula:

[0082]

[0083] Where L2 is the re-ranking score of the recommendation result; y i is the i-th re-ranked recommendation result; X is the search content feature; PV is the query party preference feature; is the rearrangement model parameter; i is the ranking of the rearranged recommendation results; r is the recall batch of the initial recommendation results; R is the total recall batch; S r Initial recommendation results.

[0084] The rearrangement model in this scheme may include an input layer, an encoding layer, and an output layer.

[0085] For the input layer, this solution introduces the query party's preference characteristics to optimize and re-rank the ranking results in the recommended result ranking list (i.e., the initial recommended results) given by the refined ranking. For example, Figure 3 As shown, the rearrangement reference features may include unit search content features X, unit position features PE, and query party preference features PV. Among them, the unit search content features may be features obtained by structurally splitting the search content input by the query party and performing vectorized encoding. The unit position features may be used to characterize the positions of each unit search content. The query party preference features may be the vectorized encoding results of the query party preference information. The query party preference features may be used to characterize the query party's query preferences. Exemplarily, the query party preference information may include the query party attribute information and the query party's historical query records. Although the recommended result ranking list (i.e., the initial recommended result) given by the refined ranking queue has given the ranking of the recommended results, it does not take into account the query party's query preferences. This solution may be used to sort the original feature vector (i.e., the search content feature) X i and the personalized vector (i.e., query preference feature) PV i In order to utilize the structural information of the search content in the refined sorting queue, this solution also introduces PE i (Position Embedding, position vector) (i.e., unit position feature). By combining the unit search content feature, the unit position feature, and the query party preference feature. Specifically, the unit search content feature, the unit position feature, and the query party preference feature can be combined in the form of [X; PV] + PE. It can be understood that the unit search content feature and the query party preference feature can be spliced, and the unit search content feature and the unit position feature can be superimposed to obtain the rearrangement reference feature.

[0086] The purpose of the encoding layer is to learn the interaction between recommendation result pairs (i.e., between recommendation results) and / or recommendation results and rearrangement reference features. For this solution, the input data of the rearrangement model may include a ranked list of recommendation results (i.e., initial recommendation results) in addition to unit search content features, unit position features, and query party preference features. This solution may use an N-layer Transformer for encoding, wherein each layer of encoder may process different input rearrangement reference features in parallel, and process each rearrangement reference feature to obtain rearrangement recommendation results with different rearrangement reference features. Therefore, the Self-Attention unit will not depend on factors such as the distance between recommendation results, and data processing efficiency may be improved.

[0087] The goal of the output layer is to give a re-ranking score for each recommended result. Here, the Softmax (activation) function can be used for output, and the output result (i.e., the re-ranking score) is the probability of each recommended result being clicked.

[0088] Exemplarily, the following formula can be used to characterize the Softmax (activation) function of the rearrangement model:

[0089]

[0090] Where L2 is the re-ranking score of the recommendation result; y i is the i-th re-ranked recommendation result; X is the search content feature; PV is the query party preference feature; is the rearrangement model parameter; i is the ranking of the rearranged recommendation results; r is the recall batch of the initial recommendation results; R is the total recall batch; S r Initial recommendation results.

[0091] This scheme uses a personalized rearrangement model to extract the global relationship of recommendation results and analyze the mutual influence between recommendation results and rearrangement reference features, thereby improving the accuracy of rearrangement of recommendation results. In addition, it also introduces unit search content features and query party preference features, takes into account the search intent and query preference of the query party, and further improves the accuracy of recommendation result rearrangement. In addition, it introduces unit position features to strengthen the structure of search content, thereby improving the accuracy of recommendation result ranking.

[0092] Embodiment 3

[0093] Figure 5 This is a schematic diagram of the structure of a recommendation result rearrangement device provided in Embodiment 3 of the present invention. The embodiment of the present invention can be applied to the case of rearranging recommendation results obtained based on a recommendation system query, the device can execute a recommendation result rearrangement method, the device can be implemented in the form of hardware and / or software, and the device can be configured in an electronic device that carries the recommendation result rearrangement function, such as a client or a server.

[0094] See also Figure 5 The recommended result rearrangement device shown includes: an information acquisition module 510, an information encoding module 520 and a recommended result rearrangement module 530. The information acquisition module 510 is used to acquire search content and query party preference information; the information encoding module 520 is used to encode the search content and query party preference information to generate rearrangement reference features; the recommended result rearrangement module 530 is used to recall the initial recommended result, input the rearrangement reference features and the initial recommended result into the rearrangement model, and obtain the rearranged recommended result.

[0095] The technical solution of the embodiment of the present invention obtains search content and query party preference information, encodes the search content and query party preference information, generates re-ranking reference features, recalls initial recommendation results, inputs the re-ranking reference features and the initial recommendation results into the re-ranking model, and obtains re-ranking recommendation results. The re-ranking recommendation results are obtained by taking into account the search intent of the query party, the query preference, and the relationship between the recommendation results in the initial recommendation results, thereby optimizing the ranking of the recommendation results and improving the accuracy of the recommendation results.

[0096] In an optional embodiment of the present invention, the information encoding module 520 includes: a search content encoding unit, used to vectorize the search content to obtain search content features; a query party preference information encoding unit, used to vectorize the query party preference information to obtain query party preference features; a rearrangement reference feature generation unit, used to splice the search content features and the query party preference features to generate a rearrangement reference feature.

[0097] In an optional embodiment of the present invention, the search content encoding unit includes: a search content structure decomposition subunit, used to perform structural decomposition on the search content to obtain at least one unit search content; a unit search content encoding subunit, used to perform vectorized encoding on each of the unit search contents and the unit position of each unit search content to obtain each unit search content feature and the corresponding unit position feature; a search content encoding subunit, used to superimpose each of the unit search content features and the corresponding unit position features to obtain a search content feature.

[0098] In an optional embodiment of the present invention, the recommendation result rearrangement module 530 includes: a self-attention unit, used to analyze the global relationship between each recommendation result in the initial recommendation result, and at the same time analyze the degree of association between the re-arrangement reference feature and each recommendation result to obtain a correlation score of each recommendation result; a feed-forward neural network unit, used to update the correlation score of each recommendation result to obtain a re-arrangement score of each recommendation result; a recommendation result re-arrangement unit, used to re-arrange each recommendation result according to the re-arrangement score of each recommendation result to obtain a re-arranged recommendation result.

[0099] In an optional embodiment of the present invention, the recommendation result rearrangement module 530 includes: an initial recommendation result batch recall unit, used to recall the initial recommendation results in batches to obtain at least one batch of unit initial recommendation results; a unit initial recommendation result rearrangement unit, used to input the rearrangement reference features and the unit initial recommendation results into a rearrangement model to obtain unit rearrangement recommendation results; a re-ranking recommendation result generation unit, used to rearrange each recommendation result according to the rearrangement score of each recommendation result in each unit rearrangement recommendation result to obtain a rearranged recommendation result.

[0100] In an optional embodiment of the present invention, the search content may include drug information search content and medication instruction search content.

[0101] The recommendation result rearrangement device provided in the embodiment of the present invention can execute the recommendation result rearrangement method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0102] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the search content, query party preference information and initial recommendation results involved all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0103] Embodiment 4

[0104] Figure 6 A schematic diagram of the structure of an electronic device 600 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0105] like Figure 6 As shown, the electronic device 600 includes at least one processor 601, and a memory connected to the at least one processor 601, such as a read-only memory (ROM) 602, a random access memory (RAM) 603, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 601 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 602 or the computer program loaded from the storage unit 608 to the random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 can also be stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0106] Multiple components in the electronic device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0107] The processor 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 601 executes the various methods and processes described above, such as the recommendation result rearrangement method.

[0108] In some embodiments, the recommendation result rearrangement method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the processor 601, one or more steps of the recommendation result rearrangement method described above may be performed. Alternatively, in other embodiments, the processor 601 may be configured to perform the recommendation result rearrangement method in any other appropriate manner (e.g., by means of firmware).

[0109] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0110] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0111] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

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

[0113] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0114] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.

[0115] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0116] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for rearranging recommendation results, characterized in that: The method comprises: Obtain search content and query party preference information; Encoding the search content and the query party preference information to generate a rearrangement reference feature; The initial recommendation result is recalled, and the rearrangement reference feature and the initial recommendation result are input into the rearrangement model to obtain the rearrangement recommendation result.

2. The method according to claim 1, characterized in that The step of encoding the search content and the query party preference information to generate a rearrangement reference feature includes: Vectorizing and encoding the search content to obtain search content features; Vectorizing and encoding the query party preference information to obtain a query party preference feature; The search content feature and the query party preference feature are concatenated to generate a rearrangement reference feature.

3. The method according to claim 2, characterized in that The vectorized encoding of the search content to obtain search content features includes: Structurally splitting the search content to obtain at least one unit search content; Vectorized encoding is performed on each of the unit search contents and the unit position of each unit search content to obtain each unit search content feature and a corresponding unit position feature; The unit search content feature and the corresponding unit position feature are superimposed to obtain the search content feature.

4. The method according to claim 1, characterized in that: The step of inputting the rearrangement reference feature and the initial recommendation result into a rearrangement model to obtain a rearrangement recommendation result includes: The global relationship between the recommended results in the initial recommendation results is analyzed through the self-attention unit of the rearrangement model, and the correlation degree between the rearrangement reference feature and each of the recommended results is analyzed to obtain the correlation score of each of the recommended results; The relevance score of each of the recommendation results is updated through the feedforward neural network unit of the rearrangement model to obtain a rearrangement score of each of the recommendation results; The recommendation results are rearranged according to the rearrangement scores of the recommendation results to obtain rearranged recommendation results.

5. The method according to claim 1, characterized in that The recalling of the initial recommendation result, inputting the rearrangement reference feature and the initial recommendation result into the rearrangement model to obtain the rearrangement recommendation result, includes: Recalling the initial recommendation results in batches to obtain at least one batch of unit initial recommendation results; Inputting the rearrangement reference feature and the initial unit recommendation result into a rearrangement model to obtain a unit rearrangement recommendation result; According to the rearrangement score of each recommendation result in each of the unit rearrangement recommendation results, each recommendation result is rearranged to obtain a rearranged recommendation result.

6. The method according to claim 1, characterized in that The search content may include drug information search content and medication instruction search content.

7. A device for rearranging recommendation results, characterized in that: The device comprises: An information acquisition module is used to obtain search content and query party preference information; An information encoding module, used to encode the search content and the query party preference information to generate a rearrangement reference feature; The recommendation result rearrangement module is used to recall the initial recommendation result, input the rearrangement reference feature and the initial recommendation result into the rearrangement model, and obtain the rearrangement recommendation result.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the recommendation result rearrangement method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the recommendation result rearrangement method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the recommendation result rearrangement method according to any one of claims 1 to 6.