Method and device for training correlation evaluation model
By training the correlation evaluation model based on the converter model, using the self-attention mechanism and the multi-head self-attention mechanism, the problem of low efficiency of correlation evaluation in the existing technology is solved, and the accurate capture of user behavior and item characteristics is achieved. Improved the accuracy and relevance estimation of item recommendations.
Patent Information
- Application Number
- CN202410719389.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-08-30
AI Technical Summary
The correlation evaluation efficiency of existing item search platforms in the item retrieval and recall stage is low, and it is difficult to accurately capture the long-term dependence between user behavior and item characteristics, which affects the effectiveness of the recommendation system.
Use a converter-based model to train the correlation evaluation model, use the self-attention mechanism and the multi-head self-attention mechanism to focus on all words in the input sequence when estimating a single word, and improve the prediction effect of the model through residual connections. .
It achieves accurate correlation assessment of search keywords and item information, improves the accuracy and correlation estimation effect of item recommendation, and meets the deployment needs of a time-consuming item retrieval system.
Smart Images

Figure CN118569408A
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a training method and device for a correlation evaluation model. Background Art
[0002] The item search platform is mainly used to combine platform strategies based on user preferences and intentions, filter out items that are closest to the user's intentions and most interesting from a large number of candidate items, and display them to the user.
[0003] At present, the traditional item retrieval process is mainly divided into three stages: item retrieval and recall, sorting and filtering, and display. The relevance evaluation of items mainly acts on the item retrieval and recall stage, and the relevance score is used as the basis for recall retrieval. Summary of the invention
[0004] The embodiments of the present disclosure provide a method and device for training a correlation evaluation model.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for training a relevance evaluation model, the method comprising: obtaining historical click behavior data of users on an item search platform, wherein the historical click behavior data includes historical search keywords and historical clicked item information; generating a training sample set based on the historical click behavior data; using the training sample set to train a converter-based model to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search results, and the relevance prediction model is completely based on a self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
[0006] In a second aspect, an embodiment of the present disclosure provides a relevance evaluation method, the method comprising: obtaining search keywords and corresponding search results; inputting the search keywords and corresponding search results into a pre-trained relevance evaluation model to obtain a relevance probability between the search keywords and each item information in the corresponding search results, wherein the relevance evaluation model is trained using the method described in the first aspect.
[0007] In a third aspect, an embodiment of the present disclosure provides a training device for a relevance evaluation model, the device comprising: an acquisition unit, configured to acquire historical click behavior data of users on an item search platform, wherein the historical click behavior data comprises historical search keywords and historical click item information; a generation unit, configured to generate a training sample set based on the historical click behavior data; a training unit, configured to train a converter-based model using the training sample set to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search results, and the relevance prediction model is completely based on a self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
[0008] In a fourth aspect, an embodiment of the present disclosure provides a relevance evaluation device, comprising: an acquisition unit, configured to acquire search keywords and corresponding search results; an evaluation unit, configured to input the search keywords and corresponding search results into a pre-trained relevance evaluation model to obtain a relevance probability between the search keywords and each item information in the corresponding search results, wherein the relevance evaluation model is trained using the device described in the third aspect.
[0009] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs; when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation manner in the first aspect or the second aspect.
[0010] In a sixth aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any implementation manner in the first aspect or the second aspect.
[0011] The method provided by the above embodiment of the present disclosure uses a transformer-based model to train a relevance evaluation model. The transformer-based model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word. The transformer-based model is used to accurately capture the long-range dependencies of the corpus. In addition, a multi-head self-attention mechanism and residual connections are used to improve the estimation effect of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Other features, objects and advantages of the present disclosure will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0013] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0014] Figure 2 is a flowchart of an embodiment of a method for training a relevance assessment model according to the present disclosure;
[0015] Figure 3 It is a schematic diagram of GPU computing;
[0016] Figure 4 It is a schematic diagram of operator fusion;
[0017] Figure 5 is a flow chart of an embodiment of a correlation evaluation method according to the present disclosure;
[0018] Figure 6 This is a schematic diagram of the model estimation message queue;
[0019] Figure 7 This is a schematic diagram of the parameter cache;
[0020] Figure 8 is a schematic diagram of an application scenario of a correlation evaluation method according to an embodiment of the present disclosure;
[0021] Fig. 9 is a structural schematic diagram of an embodiment of a training device for a correlation evaluation model according to the present disclosure;
[0022] Fig.10 is a structural schematic diagram of an embodiment of a correlation evaluation device according to the present disclosure;
[0023] Fig.11 It is a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. DETAILED DESCRIPTION
[0024] The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.
[0025] It should be noted that in the technical solution of the present invention, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0026] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] Figure 1 An exemplary architecture 100 of an embodiment of a method for training a relevance assessment model or an apparatus for training a relevance assessment model of the present disclosure is shown.
[0028] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102 and server 103. Network 102 is used to provide a medium for a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.
[0029] The terminal device 101 interacts with the server 103 through the network 102 to receive or send messages, etc. Various client applications may be installed on the terminal device 101, such as shopping applications, browser applications, and search applications.
[0030] The terminal device 101 can be hardware or software. When the terminal device 101 is hardware, it can be various electronic devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. When the terminal device 101 is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0031] The server 103 may be a server that provides various services, such as a backend server that provides support for the client application installed on the terminal device 101. The server 103 may obtain the user's historical click behavior data, and train a relevance evaluation model based on the historical click behavior data. In addition, the server 103 may also obtain search keywords from the terminal device 101, search for search results based on the search keywords, and evaluate the probability of relevance between the search keywords and each item information in the search results. Furthermore, the server 103 may also sort the item information in the search results based on the relevance probability, and send it to the terminal device 101 for display.
[0032] It should be noted that the training method of the correlation evaluation model provided in the embodiments of the present disclosure is generally executed by the server 103 , and accordingly, the training device of the correlation evaluation model is generally arranged in the server 103 .
[0033] It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server 103 is software, it can be implemented as multiple software or software modules (for example, multiple software or software modules for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0034] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0035] Continue to refer Figure 2 , which shows a process 200 of an embodiment of a training method for a relevance evaluation model according to the present disclosure. The training method for a relevance evaluation model comprises the following steps:
[0036] Step 201, obtaining the user's historical click behavior data on the item search platform.
[0037] In this embodiment, the execution subject of the training method of the correlation evaluation model (such as Figure 1 The server 103 shown in the figure can obtain the historical click behavior data of the user on the item search platform. The historical click behavior data may include historical search keywords and historical click item information.
[0038] Usually, the user's terminal equipment (such as Figure 1 The terminal device 101 shown in the figure has shopping applications, browser applications, search applications, etc. installed on it.
[0039] Among them, shopping applications can directly provide an item search platform. Specifically, a user can open a shopping application and enter a search keyword in its search box to initiate a search request. The backend server of the shopping application can (e.g. Figure 1 The server 103 shown in the figure can search for relevant item information based on the search keyword and push it to the user. The item information can be displayed on the user's terminal device. If the user clicks on the item information, click behavior data will be generated. In order to facilitate acquisition, the click behavior data can be distributed and stored in the log system in the form of logs.
[0040] Among them, browser applications and search applications can indirectly provide item search platforms. Specifically, users can open browser applications or search applications, and enter the name or URL of the item search platform in the search box to search for the web version of the item search platform. Searching and clicking on item information in the web version of the item search platform is similar to searching and clicking on item information in shopping applications, and will not be repeated here.
[0041] Step 202: Generate a training sample set based on historical click behavior data.
[0042] In this embodiment, the execution entity may generate a training sample set based on historical click behavior data.
[0043] In some embodiments, historical click behavior data may be directly used as a training sample set.
[0044] In some embodiments, in order to enrich the sample content, after obtaining the historical click behavior data, the relevant information of the items corresponding to the historical click behavior data can be obtained. For example, the subsequent behavior data such as adding to the shopping cart and placing an order are matched as relevant information. The historical click behavior data is associated with the relevant information to generate a candidate sample set; at least part of the candidate samples are selected from the candidate sample set to generate a training sample set. For example, the candidate sample set can be directly used as a training sample set. For another example, the dirty data in the candidate sample set can be filtered out; the filtered candidate sample set is sampled to generate a training sample set.
[0045] Step 203: Train the converter-based model using the training sample set to obtain a correlation evaluation model.
[0046] In this embodiment, the execution entity may use the training sample set to train a transformer-based model to obtain a correlation evaluation model.
[0047] Among them, the relevance evaluation model can be used to evaluate the relevance of the search keyword and each item information in the corresponding search results. Here, the relevance evaluation model is trained using a transformer-based model. The transformer-based model is a neural network module that calculates the attention mechanism and is used to build a model that can automatically learn user behavior and product features to achieve item recommendation. Its main function in the recommendation system is to extract information about user behavior and item features and predict items that the user may be interested in. The main structure includes an encoder and a decoder. The encoder is used to encode user behavior and item features into a context vector, and the decoder uses a self-attention mechanism and a feedforward neural network to generate a recommendation sequence. The main feature of the transformer-based model is that it is completely based on the self-attention mechanism and focuses on all words in the input sequence when estimating a single word. The transformer-based model takes advantage of accurately capturing the long-range dependencies of the corpus. In addition, multi-head self-attention mechanisms and residual connections are used to improve the estimation effect of the model.
[0048] In some embodiments, the converter-based model can be trained in a self-supervised manner. Specifically, the search keywords of the training samples in the training sample set are shielded; the shielded training samples are input into the converter-based model to obtain estimated keywords; based on the difference between the estimated keywords and the search keywords, the parameters of the converter-based model are adjusted. The difference between the estimated keywords and the search keywords is adjusted to be small enough, and the model converges, and a relevance evaluation model can be obtained.
[0049] In some embodiments, the transformer-based model may be, for example, BERT (Bidirectional Encoder Representation from Transformers). BERT has a large computational load and is difficult to deploy in a recommendation system in real time. In order to meet the time-consuming system requirements and complete the real-time deployment of BERT, model optimization may be performed. Among them, model calculation graph optimization may include but is not limited to operator fusion, model compression, and the like.
[0050] BERT is suitable for parallel computing on GPU (Graphics Processing Unit). Figure 3 Figure 1 shows a schematic diagram of GPU computing. When the GPU starts a computing subtask, it needs to first allocate memory on the GPU memory, pass parameters, and set the computing task. This step is called kernel launch. After that, the GPU computing subtask will start on the GPU. After the calculation is completed, the calculation results need to be copied back to the CPU (Central Processing Unit). Figure 4The diagram of operator fusion is shown in Figure 1. The calculation process of each layer of BERT may include but is not limited to at least one of the following calculation subtasks: normalization calculation, multi-head self-attention calculation, and forward full connection calculation, etc. Each calculation subtask needs to go through Figure 3 In the process shown, each computing subtask is normally performed independently. Operator fusion can combine at least some computing subtasks in each layer into one computing process without affecting the model effect. For example, the two computing subtasks of forward full connection calculation and normalization calculation are combined into one computing subtask. In this way, the two steps that originally required kernel launch and result copying are reduced to one time, thus reducing the time consumption.
[0051] The calculation process of BERT includes input token mapping, the multi-head attention calculation mechanism unique to the transformer algorithm, and the fully connected layer, which constitutes the BERT calculation process. In order to improve the calculation performance of the model, we perform hash mapping on the search request and obtain its vector representation by looking up the cache, thereby reducing the amount of calculation. In addition, the normalization calculation and the forward full connection calculation are fused by operators, thereby reducing the scheduling time.
[0052] There is room for optimization in the amount of computation required by BERT. Originally, BERT included the calculation process of the first preset number of layers (such as N layers), and each layer needed to go through Figure 4 Model compression can reduce the number of layers in BERT's calculation process from the first preset number of layers to the second preset number of layers (less than N layers), which can reduce the amount of calculation. For example, through experimental adjustment and evaluation, the calculation process of 12 layers is reduced to 6 layers, which can reduce the amount of calculation by 50%, and the estimated effect is basically lossless.
[0053] The method provided by the above embodiment of the present disclosure uses a transformer-based model to train a relevance evaluation model. The transformer-based model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word. The transformer-based model is used to accurately capture the long-range dependencies of the corpus. In addition, a multi-head self-attention mechanism and residual connections are used to improve the estimation effect of the model.
[0054] Further references Figure 5 , which shows a process 500 of an embodiment of a correlation evaluation method. The process 500 of the correlation evaluation method includes the following steps:
[0055] Step 501, obtaining search keywords and corresponding search results.
[0056] In this embodiment, the execution subject of the correlation evaluation method (eg Figure 1The server 103 shown can obtain search keywords and corresponding search results.
[0057] Usually, the user's terminal equipment (such as Figure 1 The terminal device 101 shown in the figure has shopping applications, browser applications, search applications, etc. installed on it.
[0058] Among them, shopping applications can directly provide an item search platform. Specifically, a user can open a shopping application and enter a search keyword in its search box to initiate a search request. The backend server of the shopping application can (e.g. Figure 1 The server 103 shown in the figure can search for corresponding search results based on the search keywords. The search results may include item information related to the search keywords.
[0059] Among them, browser applications and search applications can indirectly provide item search platforms. Specifically, users can open browser applications or search applications, and enter the name or URL of the item search platform in the search box to search for the web version of the item search platform. Searching for item information in the web version of the item search platform is similar to searching for item information in shopping applications, and will not be repeated here.
[0060] Step 502: input the search keyword and the corresponding search results into a pre-trained relevance evaluation model to obtain the relevance probability between the search keyword and each item information in the corresponding search results.
[0061] In this embodiment, the execution entity may input the search keyword and the corresponding search results into a pre-trained relevance evaluation model to obtain the relevance probability between the search keyword and each item information in the corresponding search results.
[0062] Among them, the relevance evaluation model can be used Figure 2 The trained relevance evaluation model can be pushed to the online service module, which will switch between the old and new models to ensure normal routine service functions.
[0063] In some embodiments, the converter-based model may be, for example, BERT. BERT has a large amount of computation and is difficult to deploy in a recommendation system in real time. In order to meet the system requirements with high time-consuming requirements and complete the real-time deployment of BERT, message queue technology may be used. Specifically, due to the high computational complexity of BERT, model reasoning is mainly performed on the GPU, and a single estimated reasoning usually takes up a large amount of model resources. Therefore, in order to reduce the performance loss caused by resource competition due to thread switching, multiple relevance evaluation models may be deployed, and the acquired search keywords and corresponding search results may be inserted from the end of the message queue; the search keywords and corresponding search results may be taken out from the head of the message queue, and distributed to multiple relevance evaluation models in sequence. Figure 6 The figure shows a schematic diagram of the model estimation message queue. Request 1, Request 2, and Request 3 are inserted from the end of the message queue in turn, and the requests are taken from the head of the message queue. Bert1, Bert2, Bert3, and Bert4 are evaluated in turn.
[0064] In some embodiments, the converter-based model can be, for example, BERT. BERT has a large amount of computation and is difficult to deploy in a recommendation system in real time. In order to meet the system requirements with high time consumption and complete the real-time deployment of BERT, hardware acceleration can be performed. Specifically, during the BERT estimation process, relevant item data will be frequently accessed based on the historical items browsed and purchased by the user. In order to improve indexing performance, the online model estimation service can add a cache strategy to improve parameter search efficiency. Figure 7 A schematic diagram of the parameter cache is shown. If there is item information that needs to be updated in the cache, the item information that needs to be updated will be locked and updated, avoiding locking the entire cache and causing the overall search speed to decrease, while ensuring the accuracy of the update.
[0065] In some embodiments, the trained relevance evaluation model can be pushed to the online service module, and the online service module will switch between the old and new models to ensure normal routine service functions. Afterwards, the online service module can load the relevance evaluation model and the CTR (Click-Through-Rate) estimation model. By inputting the search keyword and the corresponding search result into the relevance evaluation model, the probability of relevance between the search keyword and each item information in the corresponding search result can be obtained. By inputting the search keyword and the corresponding search result, as well as the relevance probability into the CTR estimation model, the estimated click-through rate of each item information in the search result can be obtained. Based on the estimated click-through rate, the item information in the search results can be sorted and pushed to the user. The item information can be displayed on the user's terminal device according to the sorting. Among them. The CTR estimation model can use the relevance probability output by the relevance evaluation model as an important reference to estimate the user's click-through rate on the item information.
[0066] The method provided by the above embodiment of the present disclosure upgrades the search real-time retrieval model from the multi-layer perceptron model to the BERT pre-trained model when performing relevance evaluation, thereby improving the relevance accuracy of real-time search. In addition, a variety of comprehensive strategies including model calculation graph optimization, caching, and index optimization are adopted to improve the real-time performance of the BERT pre-trained model and complete the deployment and launch in the item retrieval system with strict time requirements.
[0067] For ease of understanding, Figure 8 A schematic diagram showing an application scenario of the correlation evaluation method according to an embodiment of the present disclosure is shown.
[0068] Step 1: Based on the click history on the item search platform, collect the user's historical click behavior data in the log system, including general item information and aggregated page item information, and store this data in a distributed manner in the log system. At the same time, process the acquired data and match it with the item-related attribute information and time information.
[0069] Step 2: User exposure and click logs are routinely processed offline to filter and clean "dirty data". At the same time, this part of the data will also go through data production and processing, and generate data that can be directly used by the model through cutting, bucketing, sampling, etc.
[0070] Step 3: Use the data collected in step 2 to train the model, and push the trained model to the online service module. The online service module will switch between the old and new models to ensure normal routine service functions.
[0071] Step 4: The online service module loads the relevance evaluation module and the CTR estimation model. The relevance evaluation model outputs a relevance score, which is provided to the CTR estimation model as an important reference data for click-through rate estimation.
[0072] Step 5: Sort the item information according to the click-through rate produced by the CTR estimation model and push it to the user. The user's terminal device can display the item information in the order.
[0073] Further references Fig. 9 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a training device for a correlation evaluation model. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic equipment.
[0074] like Fig. 9As shown, the training device 900 of the relevance evaluation model provided in this embodiment includes an acquisition unit 901, a generation unit 902 and a training unit 903. Among them, the acquisition unit 901 is configured to acquire a target image. Among them, the acquisition unit 901 is configured to acquire the historical click behavior data of the user on the item search platform, wherein the historical click behavior data includes historical search keywords and historical click item information; the generation unit 902 is configured to generate a training sample set based on the historical click behavior data; the training unit 903 is configured to use the training sample set to train the converter-based model to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search result, and the relevance estimation model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
[0075] In the training device 900 of the correlation evaluation model in this embodiment, the specific processing of the acquisition unit 901, the generation unit 902 and the training unit 903 and the technical effects thereof can be referred to respectively. Figure 2 The relevant descriptions of step 201, step 202 and step 203 in the corresponding embodiment are not repeated here.
[0076] In some optional implementations of this embodiment, the generation unit 902 includes: an acquisition subunit, configured to acquire relevant information of items corresponding to the historical click behavior data; an association subunit, configured to associate the historical click behavior data with the relevant information to generate a candidate sample set; and a selection subunit, configured to select at least part of the candidate samples from the candidate sample set to generate a training sample set.
[0077] In some optional implementations of this embodiment, the selection subunit is further configured to: filter out dirty data in the candidate sample set; and sample the filtered candidate sample set to generate a training sample set.
[0078] In some optional implementations of the present embodiment, the training unit 903 is further configured to: mask out the search keywords of the training samples in the training sample set; input the masked training samples into the converter-based model to obtain estimated keywords; and adjust the parameters of the converter-based model based on the difference between the estimated keywords and the search keywords.
[0079] In some optional implementations of the present embodiment, the training device 900 for the correlation prediction model further includes: a merging unit, configured to merge the calculation processes of at least some of the calculation subtasks in each layer of the calculation process of the correlation evaluation model into one calculation process, wherein each layer of the calculation process of the correlation evaluation model includes at least one of the following calculation subtasks: normalization calculation, multi-head self-attention calculation, and forward full connection calculation.
[0080] In some optional implementations of the present embodiment, the training device 900 for the correlation prediction model also includes: a reduction unit, configured to reduce the number of layers of the calculation process of the correlation evaluation model from a first preset number of layers to a second preset number of layers, wherein the second preset number of layers is smaller than the first preset number of layers.
[0081] The apparatus provided by the above-mentioned embodiment of the present disclosure uses a transformer-based model to train a correlation evaluation model. The transformer-based model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word. The transformer-based model is used to accurately capture the long-range dependencies of the corpus. In addition, a multi-head self-attention mechanism and residual connection are used to improve the estimation effect of the model.
[0082] Further references Fig.10 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a correlation evaluation device. Figure 5 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic equipment.
[0083] like Fig.10 As shown, the relevance evaluation device 1000 provided in this embodiment includes an acquisition unit 1001 and an evaluation unit 1002. The acquisition unit 1001 is configured to acquire a search keyword and a corresponding search result; the evaluation unit 1002 is configured to input the search keyword and the corresponding search result into a pre-trained relevance evaluation model to obtain the relevance probability between the search keyword and each item information in the corresponding search result, wherein the relevance evaluation model is based on Fig. 9 The described device was trained.
[0084] In this embodiment, in the correlation evaluation device 1000, the specific processing of the acquisition unit 1001 and the evaluation unit 1002 and the technical effects thereof can be referred to in Figure 5 The relevant descriptions of steps 501-502 in the corresponding embodiment are not repeated here.
[0085] In some optional implementations of this embodiment, the number of correlation evaluation models is multiple; and the correlation evaluation device 1000 also includes: an insertion unit, configured to insert the acquired search keywords and corresponding search results from the tail of the message queue; an allocation unit, configured to take out the search keywords and corresponding search results from the head of the message queue, and allocate them to multiple correlation evaluation models in sequence.
[0086] In some optional implementations of this embodiment, the correlation evaluation device 1000 further includes: an updating unit configured to lock and update the item information to be updated if there is item information to be updated in the cache, wherein the item information is pre-stored in the cache.
[0087] In some optional implementations of the present embodiment, the relevance evaluation device 1000 further includes: an estimation unit, configured to input the search keywords and the corresponding search results, as well as the relevance probability into a pre-trained click-through rate estimation model to obtain an estimated click-through rate for each item information in the search results; and a sorting unit, configured to sort the item information in the search results based on the estimated click-through rate.
[0088] The device provided by the above embodiment of the present disclosure upgrades the search real-time retrieval model from the multi-layer perceptron model to the BERT pre-trained model when performing relevance evaluation, thereby improving the relevance accuracy of real-time search. In addition, a variety of comprehensive strategies including model calculation graph optimization, caching, index optimization, etc. are adopted to improve the real-time performance of the BERT pre-trained model and complete the deployment and launch in the item retrieval system with strict time requirements.
[0089] Reference below Fig.11 , which shows an electronic device (eg, Figure 1 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0090] like Fig.11 As shown, the electronic device 1100 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage device 1108 to a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are also stored. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0091] Typically, the following devices may be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication device 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 The electronic device 1100 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Fig.11 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0092] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 1109, or installed from a storage device 1108, or installed from a ROM 1102. When the computer program is executed by the processing device 1101, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0093] It should be noted that the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0094] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains the user's historical click behavior data on the item search platform, wherein the historical click behavior data includes historical search keywords and historical clicked item information; generates a training sample set based on the historical click behavior data; uses the training sample set to train the converter-based model to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search results, and the relevance estimation model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
[0095] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0096] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0097] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes an acquisition unit, a generation unit, and a training unit. The names of these units do not constitute a limitation on the units themselves in some cases. For example, the acquisition unit may also be described as "a unit for acquiring historical click behavior data of users on the item search platform."
[0098] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.
Claims
1. A training method for a relevance assessment model, comprising: Acquire historical click behavior data of users on the item search platform, wherein the historical click behavior data includes historical search keywords and historical click item information; Based on the historical click behavior data, generate a training sample set; The transformer-based model is trained using the training sample set to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search results, and the relevance estimation model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
2. The method according to claim 1, wherein: The generating of a training sample set based on the historical click behavior data includes: Obtain relevant information of the item corresponding to the historical click behavior data; Associating the historical click behavior data with the relevant information to generate a candidate sample set; At least some candidate samples are selected from the candidate sample set to generate the training sample set.
3. The method according to claim 2, wherein: The step of selecting at least some candidate samples from the candidate sample set to generate the training sample set includes: Filter out dirty data in the candidate sample set; The filtered candidate sample set is sampled to generate the training sample set.
4. The method according to claim 1, wherein: The step of training the converter-based model using the training sample set comprises: shielding search keywords of the training samples in the training sample set; Inputting the masked training samples into the transformer-based model to obtain estimated keywords; Based on the difference between the estimated keyword and the search keyword, parameters of the converter-based model are adjusted.
5. The method according to claim 4, wherein: The method further comprises: The calculation process of at least part of the calculation subtasks in each layer of the calculation process of the relevance evaluation model is merged into one calculation process, wherein the calculation process of each layer of the relevance evaluation model includes at least one of the following calculation subtasks: normalization calculation, multi-head self-attention calculation and forward full connection calculation.
6. The method according to claim 4, wherein: The method further comprises: The number of layers of the calculation process of the correlation evaluation model is reduced from a first preset number of layers to a second preset number of layers, wherein the second preset number of layers is smaller than the first preset number of layers.
7. A relevance assessment method, comprising: Get search keywords and corresponding search results; The search keyword and the corresponding search results are input into a pre-trained relevance evaluation model to obtain the relevance probability between the search keyword and each item information in the corresponding search results, wherein the relevance evaluation model is trained using the method described in any one of claims 1-6.
8. The method according to claim 7, wherein: The number of the relevance evaluation models is multiple; and the method further includes: Insert the acquired search keywords and corresponding search results from the end of the message queue; The search keyword and the corresponding search result are taken from the head of the message queue and are sequentially distributed to a plurality of relevance evaluation models.
9. The method according to claim 7, wherein: The method further comprises: If there is item information that needs to be updated in the cache, the item information that needs to be updated is locked and updated, wherein the item information is pre-stored in the cache.
10. The method according to any one of claims 7 to 9, wherein: The method further comprises: Inputting the search keyword, the corresponding search result, and the relevance probability into a pre-trained click rate prediction model to obtain an estimated click rate for each item information in the search result; The item information in the search results is sorted based on the estimated click-through rate.
11. A training device for a correlation evaluation model, comprising: An acquisition unit is configured to acquire historical click behavior data of a user on an item search platform, wherein the historical click behavior data includes historical search keywords and historical click item information; A generating unit, configured to generate a training sample set based on the historical click behavior data; The training unit is configured to train the converter-based model using the training sample set to obtain a relevance evaluation model, wherein the relevance evaluation model is used to evaluate the relevance between the search keyword and each item information in the corresponding search results, and the relevance estimation model is completely based on the self-attention mechanism, focusing on all words in the input sequence when estimating a single word.
12. A correlation evaluation device, comprising: An acquisition unit, configured to acquire a search keyword and a corresponding search result; The evaluation unit is configured to input the search keyword and the corresponding search results into a pre-trained relevance evaluation model to obtain the relevance probability between the search keyword and each item information in the corresponding search results, wherein the relevance evaluation model is trained using the device described in claim 11.
13. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 10.
14. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Searching and sorting method and device based on click rate
CN103514178A
Commodity information recall method, device and equipment and computer storage medium
CN114820134A
Pre-training method and device for cross-language language model
CN115204408A
