Model updating method, model updating device, storage medium and electronic equipment
By constructing sample data pairs and updating the page evaluation model, the problem of insufficient update accuracy of page evaluation model in multi-page scenarios is solved, and more efficient and accurate page evaluation is achieved, ensuring the consistency of multi-page sorting and the optimal evaluation results.
Patent Information
- Application Number
- CN202510239212.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-05-30
AI Technical Summary
In multi-page scenarios, it is difficult for the existing technology to effectively update the page evaluation model, resulting in insufficient accuracy and effectiveness of model updates, and it is impossible to achieve the optimal overall page evaluation results on the basis of ensuring the consistency of the multi-page sorting.
By obtaining page request data, a sample data pair is constructed, and the page evaluation model is updated based on the sample data pair. The specific steps include obtaining page request data, forming sample data pairs, processing page data using the page evaluation model, comparing page evaluation data in the sample data pair, determining the loss function value and updating the model.
This method can deeply explore the information of different page data in the same page request, reasonably handle the differential impacts brought by different display pages, improve the update accuracy and effectiveness of the page evaluation model, and ensure that the model can achieve the optimal evaluation results in multiple page scenarios.
Smart Images

Figure CN120066663A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of model processing. More specifically, the embodiments of the present disclosure relate to a model updating method, a model updating device, a computer-readable storage medium, and an electronic device. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims, and no description herein is admitted to be prior art by inclusion in this section.
[0003] With the rapid development of computer technology, terminals can provide users with a variety of different content information in the form of pages. In some scenarios, terminals can also present multiple different display pages according to user needs. For example, in a music program, when a user searches for a song, the search content under the comprehensive page can appear, and the search content under the single page can also appear. In order to evaluate the content of a page, such as the interaction between the content in the page and the user, the quality of the page content, the accuracy of the page sorting, etc., the existing technology often evaluates the page through a page evaluation model. However, the existing technology can only update the model for the content data presented on a single page, ignoring the relationship between different pages, resulting in insufficient accuracy and effectiveness of the model update. Summary of the invention
[0004] However, the accuracy of model updates in multi-page scenarios needs to be improved.
[0005] In the related art, due to the existence of multiple page display scenarios, there are many problems in the model update process. Take the case of presenting multiple search pages according to the search content in a music program as an example. On the one hand, the user processing differences between different pages are large. For example, the average click-through rate of the first place in the single module of the comprehensive page and the average click-through rate of the first place on the single page may be more than 3 times. On the other hand, the data differences between different pages are large. For example, the comprehensive page as the first display page has greater traffic, but the display content is less, resulting in most of the content not being exposed. The single page has more exposed content and can be continuously refreshed according to user needs, but the traffic is small. Faced with the user processing differences caused by the display differences of different pages, how to achieve the best overall page evaluation results, such as evaluation click-through rate, on the basis of ensuring the consistency of multi-page sorting, is a difficult problem in updating the page evaluation model in a multi-page scenario.
[0006] To this end, a model updating method is highly needed that can mine the information between different page data to update the model effectively and accurately.
[0007] In this context, embodiments of the present disclosure are expected to provide a model update method, a model update device, a computer-readable storage medium, and an electronic device.
[0008] According to a first aspect of the present disclosure, there is provided a model update method, including: obtaining page request data; the page request data includes page data of a page provided in response to a page request and page interaction label data; the page interaction label data represents an interaction result between a user and the page; forming sample data pairs from page request data with different page interaction label data in the same page request; processing the page data by using a page evaluation model to obtain page evaluation data; determining a first loss function value by comparing the page evaluation data corresponding to two page data in the sample data pairs; and updating the page evaluation model based on the first loss function value.
[0009] In one embodiment, the forming sample data pairs from page request data with different page interaction label data in the same page request includes: determining a first mask according to the page interaction label data in each page request data, the first mask representing page request data pairs with different page interaction label data; determining a second mask according to the page request identifier corresponding to each page request data, the second mask representing page request data pairs corresponding to the same page request identifier; and determining, according to the first mask and the second mask, page request data pairs corresponding to the same page request identifier and having different page interaction label data as the sample data pairs.
[0010] In one embodiment, the determining, according to the first mask and the second mask, page request data pairs corresponding to the same page request identifier and having different page interaction label data as the sample data pairs includes: taking the intersection of the first mask and the second mask to obtain a third mask; constructing a sample identifier matrix according to the sample identifiers of each page request data; extracting sample identifier pairs from the sample identifier matrix according to the third mask; and determining, according to the sample identifier pairs, page request data pairs corresponding to the same page request identifier and having different page interaction label data as the sample data pairs.
[0011] In one implementation, constructing a sample identification matrix according to the sample identifications of respective page request data includes: expanding a vector formed by the sample identifications of respective page request data to form a first sample identification matrix, and transposing the first sample identification matrix to obtain a second sample identification matrix; extracting sample identification pairs from the sample identification matrix according to the third mask includes: determining one or more first sample identifications from the first sample identification matrix according to the third mask, and determining one or more second sample identifications from the second sample identification matrix according to the third mask; and sequentially combining the one or more first sample identifications and the one or more second sample identifications to obtain the sample identification pairs.
[0012] In one implementation, the method further includes: determining a second loss function value according to page evaluation data and page interaction label data of the same page; updating the page evaluation model based on the first loss function value includes: updating the page evaluation model based on the first loss function value and the second loss function value.
[0013] In one implementation, the page evaluation data includes a predicted interaction probability; determining the second loss function value according to page evaluation data and page interaction label data of the same page includes: counting the page interaction label data of the page to obtain a first interaction probability and a second interaction probability of the page, where the first interaction probability represents the probability that a user interacts with the content in the page, and the second interaction probability represents the probability that the user interacts with the page; determining a third interaction probability of the page according to the first interaction probability and the second interaction probability, where the third interaction probability represents the probability that the user interacts with the content in the page when interacting with the page; and determining the second loss function value according to the difference between the predicted interaction probability and the third interaction probability of the page.
[0014] In one implementation, determining the first loss function value by comparing the page evaluation data corresponding to two page data in the sample data pair includes: determining the difference between the page evaluation data corresponding to the two page data in the sample data pair, and calculating the function value corresponding to the difference using a Bayesian personalized ranking (BPR) loss function as the first loss function value.
[0015] According to a second aspect of the present disclosure, a model updating device is provided, comprising: a page request data acquisition module, used to acquire page request data; the page request data comprises page data and page interaction tag data of a page provided in response to the page request; the page interaction tag data represents the interaction result between the user and the page; a sample data pair forming module, used to form a sample data pair from page request data with different page interaction tag data in the same page request; a page evaluation data acquisition module, used to process the page data using a page evaluation model to obtain page evaluation data; a first loss function value determination module, used to determine a first loss function value by comparing the page evaluation data corresponding to the two page data in the sample data pair; and a page evaluation model updating module, used to update the page evaluation model based on the first loss function value.
[0016] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the model updating method of the first aspect and possible implementation methods thereof are implemented.
[0017] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the model updating method of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.
[0018] In the scheme disclosed in the present invention, on the one hand, the exemplary embodiment provides a new model updating method, which constructs a sample data pair and updates the model based on the sample data pair. Compared with the method of only using the data of a single page to update the model in the prior art, the exemplary embodiment takes into account the relationship between multiple pages, and can deeply mine the information of different page data in the same page request, ensuring that the page evaluation model can reasonably handle the different impacts brought by different display pages when updating the model, thereby improving the updating accuracy and effectiveness of the page evaluation model; on the other hand, in the exemplary embodiment, the sample data pair is constructed by forming a sample data pair with page request data with different page interaction tag data in the same page request, thereby ensuring the rationality of the sample data in the sample data pair, and using the sample data pair to update the model can enable the model to fully learn the partial order relationship of the user within the page; on the other hand, the model updating method proposed in the exemplary embodiment has a relatively simple process, and can effectively update the page evaluation model by simply processing the obtained page request data, and has a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment.
[0020] Figure 2 A flowchart showing a model update method in this exemplary embodiment.
[0021] Figure 3 A schematic diagram showing a page data in this exemplary embodiment.
[0022] Figure 4 A schematic diagram showing another page data in this exemplary embodiment.
[0023] Figure 5 A schematic architecture diagram showing a model update method in this exemplary embodiment.
[0024] Figure 6 A schematic structural diagram showing a model update device in this exemplary embodiment.
[0025] Figure 7 A schematic structural diagram showing an electronic device in this exemplary embodiment.
[0026] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. Detailed implementation manners
[0027] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and then implement the present disclosure, and do not limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to convey the scope of the present disclosure fully to those skilled in the art.
[0028] Embodiments of the present disclosure can be implemented as a system, a device, an apparatus, a method, or a computer program product. Therefore, the present disclosure can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0029] The principles and spirit of the present disclosure will be elaborated in detail below with reference to several representative embodiments of the present disclosure. Summary of the Invention
[0031] The present inventor has found that the accuracy of the current page evaluation model in terms of model update needs to be improved. Specifically, in the related art, due to the existence of multiple page display scenarios, there are many problems in the model update process. Taking the case of presenting multiple search pages according to the search content in a music program as an example, on the one hand, the processing differences among users on different pages are significant. For example, the average click-through rate of the first position in the single-song module on the comprehensive page and the average click-through rate of the first position on the single-song page may differ by more than three times. On the other hand, the data differences among different pages are large. For example, the comprehensive page, as the first displayed page, has a larger traffic volume but less displayed content, resulting in most content not being exposed. The single-song page has more exposed content and can be continuously refreshed according to user needs, but has less traffic. Facing the user processing differences brought about by the display differences of different pages, how to achieve the optimal overall page evaluation result, such as evaluating the click-through rate, while ensuring the consistency of multi-page sorting, is a difficult problem in the update of the page evaluation model in a multi-page scenario.
[0032] In view of the above, the present disclosure provides a model update method, a model update device, a computer-readable storage medium, and an electronic device. On the one hand, the present exemplary embodiment provides a new model update method. By constructing a sample data pair and updating the model based on this sample data pair, compared with the method of only using data from a single page for model update in the prior art, the present exemplary embodiment takes into account the relationships among multiple pages, can deeply mine the information of different page data in the same page request, ensures that when the page evaluation model is updated, it can reasonably handle the differential effects brought by different display pages, and improves the update accuracy and effectiveness of the page evaluation model. On the other hand, in the present exemplary embodiment, the sample data pair is constructed by forming a sample data pair from page request data with different page interaction label data in the same page request, which ensures the rationality of the sample data in the sample data pair. Using this sample data pair for model update can enable the model to fully learn the partial order relationship of users within the page. Furthermore, the model update method proposed in the present exemplary embodiment has a relatively simple process, can achieve effective update of the page evaluation model through simple processing of the obtained page request data, and has a wide range of applications.
[0033] The following specifically introduces various non-limiting embodiments of the present disclosure.
[0034] Overview of Application Scenarios
[0035] It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0036] Embodiments of the present disclosure can be applied to scenarios related to model updates of page evaluation models. The following provides a specific description of the application scenario in combination with the system architecture.
[0037] Figure 1 FIG. shows a schematic diagram of a system architecture for model updates. The system architecture includes a user device 110 and a server 120. The user device 110 can be an electronic device such as a mobile phone, a computer, or a wearable device, which can provide page displays in different application scenarios. For example, when a user searches for a certain piece of music in the music program on a smart phone, corresponding music search results can be displayed according to the search request. The user can interact with the search results, such as browsing or clicking to play. In this exemplary embodiment, the user device 110 can collect page request data input by the user and send it to the server 120. A page evaluation model is deployed in the server 120. After receiving the page request data, it can process the data and determine the first loss function value, and then update the page evaluation model.
[0038] Exemplary Method
[0039] An exemplary embodiment of the present disclosure provides a model update method. Refer to Figure 2 As shown, the method may include steps S210 to S250. The following provides a specific description of Figure 2 each step.
[0040] Refer to Figure 2 , in step S210, obtain page request data; the page request data includes page data of the page provided in response to the page request and page interaction label data; the page interaction label data represents the interaction result between the user and the page.
[0041] Among them, the page request data can be data when requesting to access a certain page. For example, in a music program, when searching for a certain piece of music in the search bar, the request to access the data of the page including the music is initiated. The page request data may include page data of the page provided in response to the page request and page interaction label data. For example, the page data of the page provided in response to the page request refers to the page data corresponding to the page that can satisfy the page request. For example, when the user searches for "Under the Sea" in the music program, a page under the comprehensive attribute as shown in Figure 3 may be provided, and the page data is then Figure 3 the corresponding data. When the user searches for "Under the Sea" in the music program, a page under the playlist attribute as shown in Figure 4 may also be provided, and the page data is then Figure 4 the corresponding data. Figure 3 and Figure 4They can be different page data corresponding to the same page request and can be regarded as page request data for two page requests. Page interaction label data refers to data used to reflect the type of page interaction. For example, page interaction label data can include various types such as clicking on a song, sharing a song, forwarding a song, and no interaction.
[0042] In step S220, page request data with different page interaction label data in the same page request are formed into sample data pairs.
[0043] In this exemplary embodiment, the same page request can include various different page request data. For example, when a user searches for "Under the Sea" in a music program, the corresponding page request can include page request data for a comprehensive page as shown in Figure 3 the page request data for a single-song page as shown in Figure 4 and page request data for a playlist page, a video page, a singer page, etc. Different page request data can have their corresponding page data and page interaction label data. For example, the page data for the comprehensive page and the single-song page are different.
[0044] Different page request data can include different page interaction label data. For example, when a user searches for "Under the Sea", there appears a comprehensive page as shown in Figure 3 and a single-song page as shown in Figure 4 The user interacts in the comprehensive page as shown in Figure 3 such as clicking to play a certain song, but does not perform any operations in the single-song page as shown in Figure 4 This is page request data with different page interaction label data in the same page request.
[0045] This exemplary embodiment can form page request data with different page interaction label data in the same page request into sample data pairs for subsequent steps. Specifically, forming page request data with different page interaction label data in the same page request into sample data pairs can be to regard page request data with different page interaction label data as positive sample page request data and negative sample page request data. The sample data pair can be a sample data pair including positive sample page request data and negative sample page request data. In this exemplary embodiment, the sample data pair can be constructed in various ways. For example, first obtain multiple sample data, and according to a certain rule or randomly, construct two sample data with different interaction label data into a sample data pair. Or, in order to reduce resource consumption and reuse ability, the sample data pair can be constructed during the training process. The sample data pair needs to be constructed pairwise within the same request of the user. Therefore, when constructing the sample, try to put the sample data of the same request in one batch. After obtaining the sample data, through matrix transformation, screen out the positive and negative samples of the same request of the user and construct the sample data pair, etc.
[0046] In a multi-page scenario, for example, in a scenario where a single page request corresponds to the display of multiple pages, although the content is displayed on different pages, the user's preferences across different pages are consistent. Therefore, in this exemplary embodiment, the constructed sample data can be used to learn the partial order relationship of the user within the page, ensuring the stability of content sorting.
[0047] In step S230, the page evaluation model is used to process the page data to obtain page evaluation data.
[0048] The page evaluation model refers to a model trained in this exemplary embodiment for evaluating and processing pages. It can process page data to obtain page evaluation data. The page evaluation data refers to data for evaluating page content, which may include the predicted interaction probability of page content. A higher page evaluation result indicates that the user is more likely to interact with the content within the page, such as a higher click-through rate. The page evaluation data may also include scoring data for the page. A higher page evaluation indicates a higher score for the page, which can reflect the quality or rationality of the page content, etc. A page with a higher score can provide a better user experience or better meet the user's needs.
[0049] In step S240, by comparing the page evaluation data corresponding to the two page data in the sample data pair, the first loss function value is determined.
[0050] The first loss function value refers to the loss function used to optimize or update the page evaluation model. In this exemplary embodiment, the page evaluation data corresponding to the two page data in the sample data pair can be compared to determine the first loss function value. For example, the first loss function value can be determined based on the difference between the page data corresponding to the two sample data in the sample data pair.
[0051] In an exemplary embodiment, determining the first loss function value by comparing the page evaluation data corresponding to the two page data in the sample data pair may include:
[0052] Determine the difference between the page evaluation data corresponding to the two page data in the sample data pair, and use the Bayesian Personalized Ranking (BPR) loss function to calculate the function value corresponding to the difference as the first loss function value.
[0053] Among them, the core idea of the BPR loss function is to optimize the model by maximizing the difference between positive samples and negative samples based on the preference ranking of users. In this exemplary embodiment, after forming sample data pairs from page request data with different page interaction label data in the same page request, the difference in page evaluation data corresponding to the positive sample data and negative sample data in the sample data pair can be determined first. Then, the Bayesian Personalized Ranking (BPR) loss function is used to calculate the function value corresponding to the difference as the first loss function value. The positive sample data and negative sample data in the sample data pair can refer to sample data with different page interaction label data. For example, sample data with interaction behavior and sample data without interaction behavior. The page evaluation data can include the probability of the user performing an interaction behavior under the sample data, such as predicted click-through rate, etc.
[0054] In step S250, update the page evaluation model based on the first loss function value.
[0055] Finally, after obtaining the first loss function value, the page evaluation model can be updated using the first loss function value. For example, update the model parameters using the first loss function value until the model converges or reaches a preset training condition, such as reaching the maximum number of training rounds or the loss no longer decreases, etc., to determine the updated page evaluation model.
[0056] In an exemplary embodiment, forming sample data pairs from page request data with different page interaction label data in the same page request may include the following steps:
[0057] Determine a first mask according to the page interaction label data in each page request data, where the first mask represents page request data pairs with different page interaction label data;
[0058] Determine a second mask according to the page request identifier corresponding to each page request data, where the second mask represents page request data pairs corresponding to the same page request identifier;
[0059] Determine page request data pairs corresponding to the same page request identifier and with different page interaction label data according to the first mask and the second mask as the sample data pairs.
[0060] In this exemplary embodiment, the page request data may include page interaction label data, and the interaction label data may be identified by a digital identifier. For example, "1" may indicate the existence of page interaction, and "0" indicates the non-existence of page interaction. In this exemplary embodiment, the first mask may be determined according to the page label data in the page request, and the first mask may represent pairs of page request data with different page interaction label data. For example, a pair of request data composed of page request data with page interaction and page request data without page interaction. In addition, different page interaction label data may also include interaction label data such as click-to-play and forward-share page interaction labels, and is not limited to interaction label data indicating the existence or non-existence of interaction. The present disclosure does not make specific limitations thereon.
[0061] In this exemplary embodiment, different page request data may correspond to their respective page request identifiers, and the corresponding page request can be uniquely determined according to the page request identifier. For example, the page request identifier "001" for a user to search for "moonlight" and the page request identifier "002" for a user to search for "undersea" can respectively correspond to different page requests. Different page request data may correspond to the same page request identifier. For example, when a user searches for "moonlight" and the page data for the corresponding comprehensive page and single-song page is displayed, it may correspond to the same page request identifier. According to the page request identifiers corresponding to each page request data, the second mask can be determined, and the second mask can represent pairs of page request data corresponding to the same page request identifier.
[0062] In order to reduce resource consumption and reuse capabilities, in this exemplary embodiment, sample data pairs may be constructed in the form of vector and matrix processing during the training process. The following page request data is used as an example for illustration:
[0063] Table 1
[0064]
[0065] The first mask is determined according to the page interaction label data in each page request data. Specifically, first, the page interaction label data of each page request data is extracted, such as [1 0 1 0 0], and then it can be column-expanded to obtain the first matrix: Further, the matrix is transposed to obtain the second matrix: Finally, the first mask in matrix form can be generated by comparing the magnitudes of the elements in the first matrix and the second matrix:
[0066] Determine the second mask according to the page request identifiers corresponding to each page request data. The second mask represents page request data pairs corresponding to the same page request identifier. Specifically, first extract the page request identifiers of each page request data, such as [1 1 2 2 2], and then perform column expansion on it to obtain a third matrix: Further, perform a transpose operation on this matrix to obtain a fourth matrix: Finally, the second mask in matrix form can be generated by comparing whether the elements in the third matrix and the fourth matrix are the same:
[0067]
[0068] After determining the first mask and the second mask, according to the first mask and the second mask, page request data pairs corresponding to the same page request identifier and with different page interaction label data can be determined as sample data pairs. For example, by taking the intersection of the first mask and the second mask, first determine the mask intersection, and then according to the sample identifier matrix constructed by the sample identifiers, determine the page request data pairs with the same page request identifier but different interaction label data as sample data pairs.
[0069] In an exemplary embodiment, the above-mentioned determining, according to the first mask and the second mask, page request data pairs corresponding to the same page request identifier and with different page interaction label data as sample data pairs may include the following steps:
[0070] Take the intersection of the first mask and the second mask to obtain a third mask;
[0071] Construct a sample identifier matrix according to the sample identifiers of each page request data;
[0072] Extract sample identifier pairs from the sample identifier matrix according to the third mask;
[0073] Determine page request data pairs corresponding to the same page request identifier and with different page interaction label data as sample data pairs according to the sample identifier pairs.
[0074] Taking the intersection of the first mask and the second mask to obtain a third mask, for example, for the first mask in matrix form and the second mask in matrix form take the intersection to obtain the third mask in matrix form:
[0075] The sample identifier can be used to reflect a certain index data. For example, the Logit index value or Logit vector of the page request data can be determined through a scoring model, and the Logit value can be used as the sample identifier. In this exemplary embodiment, a sample identifier matrix can be constructed according to the sample identifiers of each page request data. For example, first extract the vector data of the sample identifier from each page request data, and then perform processing such as column expansion or transposition on the vector data to obtain one or more sample identifier matrices. Both the matrices before and after transposition can be regarded as sample identifier matrices.
[0076] Then, a third mask can be used to extract sample identifier pairs from the sample identifier matrix. For example, extract the values at the positions corresponding to the T values of the third mask elements in the sample identifier matrix, and according to the extracted values, extract the sample identifier pairs. After obtaining the sample identifier pairs, page request data pairs corresponding to the same page request identifier and with different page interaction label data can be determined as sample data pairs.
[0077] In an exemplary embodiment, constructing the sample identifier matrix according to the sample identifiers of each page request data may include:
[0078] Expand the vector formed by the sample identifiers of each page request data to form a first sample identifier matrix, and transpose the first sample identifier matrix to obtain a second sample identifier matrix;
[0079] Extracting the sample identifier pairs from the sample identifier matrix according to the third mask may include:
[0080] Determine one or more first sample identifiers from the first sample identifier matrix according to the third mask, and determine one or more second sample identifiers from the second sample identifier matrix according to the third mask;
[0081] Combine one or more first sample identifiers and one or more second sample identifiers in sequence to obtain sample identifier pairs.
[0082] The first sample identifier matrix refers to the matrix obtained by column expansion of the vector formed by the sample identifiers. For example, according to the sample identifier [5 4 3 2 1] in Table 1 for column expansion, the first sample identifier matrix can be obtained: Transposing the first sample identifier matrix can obtain the second sample identifier matrix: Both the first sample identifier matrix and the second sample identifier matrix can be regarded as sample identifier matrices.
[0083] Then, determine one or more first sample identifiers from the first sample identifier matrix according to the third mask. For example, according to the third mask from the first sample identifier matrix Extract the element values [5 3 3] corresponding to the T elements in the third mask as the first sample identifier, and determine one or more second sample identifiers from the second sample identifier matrix according to the third mask. For example, from the second sample identifier matrix Extract the element values [4 2 1] corresponding to the T elements in the third mask as the second sample identifier. Finally, combine one or more first sample identifiers and one or more second sample identifiers in sequence to obtain sample identifier pairs, and then determine page request data pairs corresponding to the same page request identifier and having different page interaction label data as sample data pairs. For example, combine the corresponding sample identifiers in the first sample identifier [5 3 3] and the second sample identifier [4 2 1] to construct a sample identifier pair, and it can be determined that the sample identifier pair composed of sample identifier 5 and sample identifier 4 corresponds to the sample data pair (page request data 1, page request data 2), the sample identifier pair composed of sample identifier 3 and sample identifier 2 corresponds to the sample data pair (page request data 3, page request data 4), and the sample identifier pair composed of sample identifier 3 and sample identifier 1 corresponds to the sample data pair (page request data 3, page request data 5).
[0084] In an exemplary embodiment, the above model update method may further include:
[0085] Determine a second loss function value according to the page evaluation data and page interaction label data of the same page;
[0086] Updating the page evaluation model based on the first loss function value may include:
[0087] Update the page evaluation model based on the first loss function value and the second loss function value.
[0088] In this exemplary embodiment, the first loss function value can be regarded as the loss function value constructed by the sample data pair, and the second loss function value refers to the loss function constructed by a single sample data. This exemplary embodiment can determine the second loss function value according to the page evaluation data and page interaction label data of the same page, and update the page evaluation model based on the first loss function value constructed by the sample pair and the second loss function value constructed by the single sample.
[0089] In this exemplary embodiment, the finally determined loss function can be expressed as: loss = loss(pointwise) + a * loss(pairwise), where a represents a hyperparameter that can be adjusted according to the business scenario, loss(pointwise) represents the value of the second loss function, and cross-entropy loss can be used; loss(pairwise) represents the value of the first loss function, and BPR loss can be used. This exemplary embodiment can determine the final loss function by fusing the value of the second loss function constructed from a single sample and the value of the first loss function constructed from a sample pair, learn the partial order relationship within the page using the sample pair, and learn the unbiased behavior data of the user using a single sample, improving the accuracy of the page evaluation model and enabling a better sorting effect in a multi-page evaluation scenario.
[0090] Figure 5 FIG. shows an architectural schematic diagram of a model update method in this exemplary embodiment, which may specifically include:
[0091] A page request data acquisition module 510, configured to acquire page request data; the page request data includes page data and page interaction label data of the page provided in response to the page request; the page interaction label data represents the interaction result between the user and the page;
[0092] A sample data pair construction module 520, configured to form sample data pairs from page request data with different page interaction label data in the same page request; wherein, the sample data pair construction module 520 further includes a first mask determination unit, configured to determine a first mask according to the page interaction label data in each page request data; a second mask determination unit, configured to determine a second mask according to the page request identifier corresponding to each page request data; a third mask determination unit, configured to take the intersection of the first mask and the second mask to obtain a third mask; the sample data pair construction unit constructs a sample identifier matrix according to the sample identifiers of each page request data; extracts sample identifier pairs from the sample identifier matrix according to the third mask; and determines page request data pairs corresponding to the same page request identifier and with different page interaction label data as sample data pairs;
[0093] A first loss function value determination module 530, configured to process the page data using the page evaluation model to obtain page evaluation data; and determine the first loss function value by comparing the page evaluation data corresponding to the two page data in the sample data pair;
[0094] A second loss function value determination module 540, configured to determine the second loss function value according to the page evaluation data and the page interaction label data of the same page;
[0095] The page evaluation model update module 550 is configured to update the page evaluation model based on the first loss function value and the second loss function value.
[0096] In an exemplary embodiment, the above-mentioned page evaluation data includes a predicted interaction probability; determining the second loss function value according to the page evaluation data and the page interaction label data of the same page may include the following steps:
[0097] Statistically analyze the page interaction label data of the page to obtain the first interaction probability and the second interaction probability of the page. The first interaction probability represents the probability that the user interacts with the content in the page, and the second interaction probability represents the probability that the user interacts with the page.
[0098] Determine the third interaction probability of the page according to the first interaction probability and the second interaction probability. The third interaction probability represents the probability that the user interacts with the content in the page when interacting with the page.
[0099] Determine the second loss function value according to the difference between the predicted interaction probability and the third interaction probability of the page.
[0100] Considering that the content is exposed in multiple page data, but the user preferences are consistent. Therefore, the interaction behaviors or processes of the same user on two pages should be consistent. The overall user behavior differences among pages are essentially caused by page biases. Therefore, it is necessary to eliminate page biases so that the page evaluation model can learn the real user behaviors, such as learning the real click-through rate.
[0101] In this exemplary embodiment, the page interaction label data may include whether the user has viewed the page in the page request, such as whether the page is exposed, that is, whether there is an interaction between the user and the page, and whether the user has clicked on the content in the page, that is, whether there is an interaction between the user and the content in the page. In one page request data, multiple page data may be provided. For example, when searching for the song "Under the Sea", the page data of the comprehensive page and the page data of the single-song page will be provided, and each page has corresponding page interaction label data. In different page request data, the same page may be provided. For example, different users search for the same word, and the displayed page may be the same, but different users may have different interaction behaviors.
[0102] This exemplary embodiment can statistically analyze the page interaction tag data of the same page to obtain the first interaction probability and the second interaction probability of the page. Among them, the first interaction probability represents the probability that a user interacts with the content on the page. For example, the probability that a user clicks on the content displayed according to the page request can be expressed as p(y = 1|x, page). The second interaction probability represents the probability that a user interacts with the page. For example, the probability that a user sees the content on the current page can be expressed as p(seen|page).
[0103] Determine the third interaction probability of the page according to the first interaction probability and the second interaction probability. The third interaction probability represents the probability that a user interacts with the content on the page when interacting with the page. This third interaction probability refers to the interaction probability calculated from the tag data. For example, the probability that a user clicks on the content after seeing it is expressed as p(y = 1|x, seen).
[0104] The calculation relationship among the first interaction probability, the second interaction probability, and the third interaction probability can be expressed as: p(y = 1|x, page) = p(seen|page) * p(y = 1|x, seen), where page represents the displayed page and seen represents exposure. Based on the above formula, the third interaction probability can be calculated using the first interaction probability and the second interaction probability. For example, the third interaction probability p(y = 1|x, seen) = the first interaction probability p(y = 1|x, page) / the second interaction probability p(seen|page).
[0105] The predicted interaction probability refers to the interaction probability predicted by the page evaluation model. This exemplary embodiment can determine the second loss function value through the third interaction probability and the predicted interaction probability. For example, determine the second loss function according to the difference between the third interaction probability and the predicted interaction probability.
[0106] This exemplary embodiment combines the first loss function value constructed using sample data, the second loss function value constructed using single-page data, and the method of debiasing the page to update the page evaluation model. Among them, the first loss function value can learn the partial order relationship of the user within the page, the second loss function value can learn the unbiased click-through rate of the user, and the page debiasing process can remove the bias of the displayed page and enable the model to learn the unbiased click-through rate of the user. The page evaluation model updated in this comprehensive way can be more accurate and effective.
[0107] Exemplary Device
[0108] The exemplary embodiment of the present disclosure also provides a model update device. Refer to Figure 6As shown, the model update device 600 may include the following program modules: a page request data acquisition module 610, configured to acquire page request data; the page request data includes page data of a page provided in response to a page request and page interaction tag data; the page interaction tag data represents the interaction result between a user and a page; a sample data pair formation module 620, configured to form sample data pairs from page request data with different page interaction tag data in the same page request; a page evaluation data obtaining module 630, configured to process the page data by using a page evaluation model to obtain page evaluation data; a first loss function value determination module 640, configured to determine a first loss function value by comparing the page evaluation data corresponding to two page data in a sample data pair; and a page evaluation model update module 650, configured to update the page evaluation model based on the first loss function value.
[0109] In one implementation, the sample data pair formation module 620 includes: a first mask determination unit, configured to determine a first mask according to the page interaction tag data in each page request data, where the first mask represents a pair of page request data with different page interaction tag data; a second mask determination unit, configured to determine a second mask according to the page request identifier corresponding to each page request data, where the second mask represents a pair of page request data corresponding to the same page request identifier; and a sample data pair generation unit, configured to determine, according to the first mask and the second mask, a pair of page request data corresponding to the same page request identifier and having different page interaction tag data as a sample data pair.
[0110] In one implementation, the sample data pair generation unit includes: a third mask determination subunit, configured to take the intersection of the first mask and the second mask to obtain a third mask; a sample identifier matrix construction subunit, configured to construct a sample identifier matrix according to the sample identifiers of each page request data; a sample identifier pair extraction subunit, configured to extract sample identifier pairs from the sample identifier matrix according to the third mask; and a sample data pair determination subunit, configured to determine, according to the sample identifier pairs, a pair of page request data corresponding to the same page request identifier and having different page interaction tag data as a sample data pair.
[0111] In one implementation, the sample identifier matrix construction subunit includes: a vector processing subunit, configured to expand a vector formed by the sample identifiers of each page request data to form a first sample identifier matrix, and transpose the first sample identifier matrix to obtain a second sample identifier matrix; the sample identifier pair extraction subunit includes: a sample identifier determination subunit, configured to determine one or more first sample identifiers from the first sample identifier matrix according to the third mask, and determine one or more second sample identifiers from the second sample identifier matrix according to the third mask; and a sample identifier combination subunit, configured to sequentially combine the one or more first sample identifiers and the one or more second sample identifiers to obtain sample identifier pairs.
[0112] In one embodiment, the model updating device further includes: a second loss function value determining module, configured to determine a second loss function value according to the page evaluation data and the page interaction label data of the same page; and a page evaluation model updating module 650, configured to update the page evaluation model based on the first loss function value and the second loss function value.
[0113] In one embodiment, the page evaluation data includes a predicted interaction probability; the second loss function value determining module includes: a data statistics unit, configured to perform statistics on the page interaction label data of the page to obtain a first interaction probability and a second interaction probability of the page, where the first interaction probability represents the probability that a user interacts with the content in the page, and the second interaction probability represents the probability that a user interacts with the page; a probability determining unit, configured to determine a third interaction probability of the page according to the first interaction probability and the second interaction probability, where the third interaction probability represents the probability that a user interacts with the content in the page when interacting with the page; and a second loss function determining unit, configured to determine the second loss function value according to the difference between the predicted interaction probability and the third interaction probability of the page.
[0114] In one embodiment, the first loss function value determining module 640 includes: a function value calculation unit, configured to determine the difference between the page evaluation data corresponding to two page data in a sample data pair, and calculate the function value corresponding to the difference by using a Bayesian personalized ranking (BPR) loss function as the first loss function value.
[0115] In addition, the other specific details of the embodiments of the present disclosure have been described in detail in the embodiments of the above method, and will not be elaborated herein.
[0116] Exemplary Storage Medium
[0117] The exemplary embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the above method of the present disclosure is implemented. The above method can be implemented by a program product. For example, a portable compact disc read-only memory (CD-ROM) can be used and includes program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, device, or component.
[0118] The program product may employ any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable 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.
[0119] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0120] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0121] The program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device and partially on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0122] Exemplary Electronic Device
[0123] Exemplary embodiments of the present disclosure also provide an electronic device, which can be any device in Figure 1 . The electronic device includes a processor and a memory for storing executable instructions of the processor. The processor is configured to execute the above method of the present disclosure by executing the executable instructions.
[0124] Refer toFigure 7 An electronic device according to an exemplary embodiment of the present disclosure will be described. Figure 7 The illustrated electronic device 700 is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0125] As Figure 7 shown, the electronic device 700 is presented in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, and a bus 730 that connects different system components (including the storage unit 720 and the processing unit 710).
[0126] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 710, so that the processing unit 710 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above of this specification. For example, the processing unit 710 can execute the method steps as Figure 2 shown, etc.
[0127] The storage unit 720 may include a volatile storage unit, such as a random access storage unit (RAM) 721 and / or a cache storage unit 722, and may further include a read-only storage unit (ROM) 723.
[0128] The storage unit 720 may further include a program / utilities 724 having a set (at least one) of program modules 725. Such program modules 725 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0129] The bus 730 may include a data bus, an address bus, and a control bus.
[0130] The electronic device 700 may also communicate with one or more external devices 800 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and such communication may be performed through an input / output (I / O) interface 740. The electronic device 700 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 750. As shown in the figure, the network adapter 750 communicates with other modules of the electronic device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in combination with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0131] It should be noted that although several modules or sub - modules of the device are mentioned in the above - detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above - described units / modules can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0132] In addition, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0133] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefits. This division is only for the convenience of expression. The present disclosure aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A model updating method, characterized in that: include: Get page request data; The page request data includes page data and page interaction tag data of the page provided in response to the page request; the page interaction tag data represents the interaction result between the user and the page; The page request data with different page interaction tag data in the same page request are formed into a sample data pair; Processing the page data using a page evaluation model to obtain page evaluation data; Determine a first loss function value by comparing page evaluation data corresponding to two page data in the sample data pair; The page evaluation model is updated based on the first loss function value.
2. The method according to claim 1, characterized in that The forming of sample data pairs of page request data with different page interaction tag data in the same page request includes: Determining a first mask according to the page interaction tag data in each page request data, wherein the first mask represents a pair of page request data with different page interaction tag data; determining a second mask according to the page request identifier corresponding to each page request data, wherein the second mask represents a pair of page request data corresponding to the same page request identifier; According to the first mask and the second mask, a page request data pair corresponding to the same page request identifier and having different page interaction tag data is determined as the sample data pair.
3. The method according to claim 2, characterized in that The step of determining, according to the first mask and the second mask, a page request data pair corresponding to the same page request identifier and having different page interaction tag data as the sample data pair includes: Taking the intersection of the first mask and the second mask to obtain a third mask; Construct a sample identification matrix according to the sample identification of each page request data; extracting sample identification pairs from the sample identification matrix according to the third mask; A page request data pair corresponding to the same page request identifier and having different page interaction tag data is determined according to the sample identification pair to serve as the sample data pair.
4. The method according to claim 3, characterized in that The step of constructing a sample identification matrix according to the sample identifications of each page request data includes: Expanding the vector formed by the sample identification of each page request data to form a first sample identification matrix, and transposing the first sample identification matrix to obtain a second sample identification matrix; The extracting the sample identification pairs from the sample identification matrix according to the third mask comprises: determining one or more first sample identifications from the first sample identification matrix according to the third mask, and determining one or more second sample identifications from the second sample identification matrix according to the third mask; The one or more first sample identifiers and the one or more second sample identifiers are combined in sequence to obtain the sample identifier pair.
5. The method according to claim 1, characterized in that The method further comprises: Determine a second loss function value based on the page evaluation data and the page interaction label data of the same page; The updating of the page evaluation model based on the first loss function value includes: The page evaluation model is updated based on the first loss function value and the second loss function value.
6. The method according to claim 5, characterized in that The page evaluation data includes a predicted interaction probability; and determining the second loss function value according to the page evaluation data and the page interaction tag data of the same page includes: Performing statistics on the page interaction tag data of the page to obtain a first interaction probability and a second interaction probability of the page, wherein the first interaction probability indicates a probability that a user interacts with content in the page, and the second interaction probability indicates a probability that a user interacts with the page; Determine a third interaction probability of the page according to the first interaction probability and the second interaction probability, wherein the third interaction probability represents a probability of a user interacting with content in the page when the user interacts with the page; The second loss function value is determined according to the difference between the predicted interaction probability of the page and the third interaction probability.
7. The method according to claim 1, characterized in that The determining of the first loss function value by comparing the page evaluation data corresponding to the two page data in the sample data pair includes: Determine the difference between the page evaluation data corresponding to the two page data in the sample data pair, and use the Bayesian personalized ranking BPR loss function to calculate the function value corresponding to the difference as the first loss function value.
8. A model updating device, characterized in that: include: A page request data acquisition module is used to acquire page request data; The page request data includes page data and page interaction tag data of the page provided in response to the page request; the page interaction tag data represents the interaction result between the user and the page; A sample data pair forming module, used for forming a sample data pair from page request data with different page interaction tag data in the same page request; A page evaluation data acquisition module, used to process the page data using a page evaluation model to obtain page evaluation data; A first loss function value determination module, configured to determine a first loss function value by comparing page evaluation data corresponding to two page data in the sample data pair; A page evaluation model updating module is used to update the page evaluation model based on the first loss function value.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.