A data processing method and related device

By acquiring and fusing the feature representation and weight of user operation data in multiple scenarios, the problem of reduced prediction accuracy of single-task models is solved, more accurate position bias correction is achieved, and recommendation model bias and Matthew effect are avoided.

CN115048560BActive Publication Date: 2024-09-13HUAWEI TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210326504.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-09-13
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

In the case of multi-scenario joint modeling, the prediction accuracy of the single-task model decreases due to different data distribution, and the existing position bias correction technology is difficult to effectively solve, resulting in recommended model bias and the Matthew effect.

Method used

By obtaining user operation data in different recommendation scenarios, the feature extraction network and task network are used to extract feature representation and tendency information, and the weights of different scenarios are integrated through the gate control network, and the loss function is adjusted to reduce interference and improve prediction accuracy.

Benefits of technology

It effectively reduces the interference between different recommendation scenarios, improves the prediction accuracy of the model in multiple scenarios, reduces the impact of position bias on the recommendation model, and avoids the occurrence of model deviation and Matthew effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048560B
    Figure CN115048560B
Patent Text Reader

Abstract

The present application discloses a data processing method, which can be applied to the field of artificial intelligence, and the method includes: obtaining an operation log, the operation log includes the first operation data of the user in the first recommendation scenario; according to the first operation data, respectively obtaining a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network; according to the first feature representation, obtaining first tendency information and second tendency information through a task network, and fusing the first tendency information and the second tendency information with the first weight and the second weight of the first gating network to obtain the first target tendency information. The present application can reduce the interference between different recommendation scenarios, and thus solve the problem of reduced prediction accuracy caused by the influence of different distributions between data on a single task model in the case of joint modeling of multiple scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a data processing method and related devices. Background Art

[0002] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0003] In the recommendation scenario, the system will record the interaction information between the user and the system, such as operation logs, and use this as a data source to train the most core recommendation model (such as the ranking model) in the search system. User operation logs have the characteristics of large data volume and strong timeliness. However, user operations are often biased. Users tend to operate objects with high rankings. If the recommendation model is trained only based on user operation logs, the recommendation model cannot accurately learn the true correlation between the user's true intention and the recommended object. An important reason for this is the serious position bias in the system. Taking the search scenario as an example, the user enters the search system and enters the query term in the search box. The system will immediately feedback the query results and present them in the user interaction interface. When users focus on the displayed objects, due to their different positions, they will also pay different attention, which will lead to position bias, that is, users tend to interact with objects with better positions in the search result list, and the user's tendency has nothing to do with whether the object can reflect the user's true intention.

[0004] Due to the existence of position bias, the implicit feedback data of users used to train the model, that is, whether to operate, cannot reflect the user's real search intention. If the implicit feedback data of users is directly used as positive and negative samples for training, the recommendation model obtained will be biased, and as the model is continuously updated, a Matthew effect will be formed, causing the model to become more and more biased. In order to obtain a more accurate recommendation model, the position bias needs to be corrected during offline training to eliminate the influence of position-bias. The inverse propensity score (IPS) technology is a commonly used position bias correction technology. By estimating the position propensity score of the sample, the loss function during training is reversely weighted, so that the weight of samples with high position propensity scores is lower, achieving the effect of position correction. In different recommendation scenarios, the position bias is also different. For example, in some recommendation scenarios, multiple objects that the user wants to operate at this time can be actively recommended. In some recommendation scenarios, multiple objects related to the search terms can be recommended based on the search terms entered by the user. In these two recommendation scenarios, the position bias of different positions is also different.

[0005] In an existing implementation, a contextual position-based model (CPBM) is used to calculate position bias (or tendency information). The existing solution is to train the same CPBM based on operation data of multiple scenes. However, in the case of multi-scene joint modeling, the position biases of different positions in different recommendation scenes are different, which will lead to a decrease in the accuracy of tendency information prediction. Summary of the invention

[0006] In a first aspect, the present application provides a data processing method, the method comprising: obtaining an operation log, the operation log comprising first operation data of a user in a first recommendation scenario, the first operation data comprising the user's operation data when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario; according to the first operation data, respectively obtaining a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network; according to the first feature representation, obtaining first tendency information through a first task network, the first tendency information being used to represent the influence of the recommendation position in the recommendation scenario on the user's operation behavior; according to the second feature representation, obtaining second tendency information through a second task network, the second tendency information being used to represent the influence of the recommendation position in the recommendation scenario on the user's operation behavior; according to the first operation data, respectively obtaining a first weight of the first tendency information and a second weight of the second tendency information through a first gating network; according to the first weight and the second weight, fusing the first tendency information and the second tendency information to obtain first target tendency information, the first target tendency information being used to represent the influence of the recommendation position in the first recommendation scenario on the user's operation behavior, and the first target tendency information being used to train a recommendation model.

[0007] In an embodiment of the present application, the first gating network can obtain a set of weights for the first recommendation scenario, and fuse the outputs of multiple task networks based on the weights to obtain the position bias (first target tendency information) of the first recommendation scenario. The first gating network can identify and fuse the information related to the first recommendation scenario in the outputs of each task network through numerical control of the weights. On the one hand, the correlation between different recommendation scenarios can be learned. On the other hand, based on the dynamic weight method, the interference between different recommendation scenarios can be reduced, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in the case of joint modeling of multiple scenarios.

[0008] In a possible implementation, the obtaining of the first feature representation and the second feature representation through the first feature extraction network and the second feature extraction network respectively according to the first operation data includes: obtaining the first initial feature representation and the second initial feature representation through the first feature extraction network and the second feature extraction network respectively according to the first operation data; obtaining the third weight of the first initial feature representation and the fourth weight of the second initial feature representation respectively according to the first operation data through the second gating network; fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation; obtaining the fifth weight of the first initial feature representation and the sixth weight of the second initial feature representation respectively according to the first operation data through the third gating network; fusing the first initial feature representation and the second initial feature representation according to the fifth weight and the sixth weight to obtain the second feature representation.

[0009] In a possible implementation, the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the user's operation data when the same recommended object or the recommended object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scenario; the method also includes: according to the second operation data, respectively obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network; according to the third feature representation, obtaining third tendency information through the first task network, and the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; according to the fourth feature representation, obtaining fourth tendency information through the second task network, and the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; according to the second operation data, respectively obtaining a seventh weight of the third tendency information and an eighth weight of the fourth tendency information through the first gating network; according to the seventh weight and the eighth weight, fusing the third tendency information and the fourth tendency information to obtain second target tendency information, the second target tendency information is used to represent the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

[0010] In a possible implementation, the fusion includes: weighted summation.

[0011] In a possible implementation, the first task network or the second task network is a context-dependent position bias model (CPBM).

[0012] In a possible implementation, the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

[0013] In a possible implementation, the method also includes: obtaining a first ground truth of the tendency information corresponding to the first operation data; determining a first loss based on the first tendency information and the first ground truth, and updating parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network based on the first loss.

[0014] In a possible implementation, the method also includes: obtaining a second true value of the tendency information corresponding to the second operation data; determining a second loss based on the second tendency information and the second true value, and updating parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network based on the second loss.

[0015] In a possible implementation, during each iterative update, the losses obtained for each recommendation scenario can be fused (e.g., addition operation), and the parameters can be updated based on the fused losses. Since the click-through rates and observation propensity scores of each location in different scenarios are different, MCPBM has different convergence speeds when training with different scenario data, and the weights of different tasks are adjusted using exponential weighting.

[0016] In a possible implementation, the method also includes: obtaining a first convergence degree; adjusting the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree; updating parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network according to the first loss, including: updating parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network according to the adjusted first loss.

[0017] That is to say, for recommendation scenarios with a higher degree of convergence, the weight of its loss function can be set smaller, and for recommendation scenarios with a lower degree of convergence, the weight of its loss function can be set higher, so that the convergence progress of each recommendation scenario remains basically consistent, thereby improving the prediction accuracy of the model.

[0018] In a possible implementation, the method further includes:

[0019] Acquire a second loss of the recommendation model, where the second loss is a loss obtained when the recommendation model is fed forward according to the first operation data;

[0020] The second loss is adjusted according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update parameters of the recommendation model.

[0021] In a second aspect, the present application provides a data processing device, the device comprising:

[0022] an acquisition module, configured to acquire an operation log, wherein the operation log includes first operation data of a user in a first recommendation scenario, wherein the first operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario;

[0023] A feature extraction module, configured to obtain a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network respectively according to the first operation data;

[0024] a tendency information calculation module, configured to obtain first tendency information through a first task network according to the first feature representation, wherein the first tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; and obtain second tendency information through a second task network according to the second feature representation, wherein the second tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0025] a weight determination module, configured to obtain, according to the first operation data, a first weight of the first tendency information and a second weight of the second tendency information through a first gating network;

[0026] A fusion module is used to fuse the first tendency information and the second tendency information according to the first weight and the second weight to obtain first target tendency information, wherein the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior, and the first target tendency information is used to train the recommendation model.

[0027] In a possible implementation, the feature extraction module is specifically used to:

[0028] According to the first operation data, obtaining a first initial feature representation and a second initial feature representation through a first feature extraction network and a second feature extraction network respectively;

[0029] According to the first operation data, a third weight of the first initial feature representation and a fourth weight of the second initial feature representation are obtained through a second gating network respectively;

[0030] fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation;

[0031] According to the first operation data, obtaining a fifth weight of the first initial feature representation and a sixth weight of the second initial feature representation respectively through a third gating network;

[0032] The first initial feature representation and the second initial feature representation are fused according to the fifth weight and the sixth weight to obtain the second feature representation.

[0033] In a possible implementation, the operation log further includes second operation data of the user in the second recommendation scene, where the second operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scene;

[0034] The feature extraction module is specifically used for:

[0035] According to the second operation data, obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively;

[0036] The tendency information calculation module is specifically used for:

[0037] According to the third feature representation, third tendency information is obtained through the first task network, and the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; according to the fourth feature representation, fourth tendency information is obtained through the second task network, and the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0038] The weight determination module is specifically configured to: obtain, according to the second operation data, through the first gating network, respectively a seventh weight of the third tendency information and an eighth weight of the fourth tendency information;

[0039] The fusion module is specifically used for:

[0040] According to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, wherein the second target tendency information is used to indicate the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

[0041] In a possible implementation, the fusion includes: weighted summation.

[0042] In a possible implementation, the first task network or the second task network is a context-dependent position bias model (CPBM).

[0043] In a possible implementation, the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

[0044] In a possible implementation, the acquisition module is further used to:

[0045] Obtaining a first ground truth of the tendency information corresponding to the first operation data;

[0046] The device also includes:

[0047] A model training module is used to determine a first loss according to the first tendency information and the first true value, and update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network according to the first loss.

[0048] In a possible implementation, the acquisition module is further used to:

[0049] Acquire a second true value of the tendency information corresponding to the second operation data;

[0050] The model training module is also used to determine a second loss based on the second tendency information and the second true value, and to update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network based on the second loss.

[0051] In a possible implementation, the acquisition module is further used to:

[0052] Get the first convergence degree;

[0053] The device also includes:

[0054] a loss adjustment module, configured to adjust the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree;

[0055] The model training module is specifically used for:

[0056] According to the adjusted first loss, parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

[0057] In a possible implementation, the acquisition module is further used to:

[0058] Acquire a second loss of the recommendation model, where the second loss is a loss obtained when the recommendation model is fed forward according to the first operation data;

[0059] The loss adjustment module is further used to adjust the second loss according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update the parameters of the recommendation model.

[0060] In a third aspect, an embodiment of the present application provides a data processing device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform any optional method as described in the first aspect above.

[0061] In a fourth aspect, an embodiment of the present application provides a training device, which may include a memory, a processor, and a bus system, wherein the memory is used to store programs, and the processor is used to execute the programs in the memory to perform any optional method as described in the first aspect above.

[0062] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the above-mentioned first aspect and any optional method.

[0063] In a sixth aspect, an embodiment of the present application provides a computer program product, including code, which, when executed, is used to implement the above-mentioned first aspect and any optional method.

[0064] In a seventh aspect, the present application provides a chip system, which includes a processor for supporting an execution device or a training device to implement the functions involved in the above aspects, such as sending or processing the data involved in the above methods; or, information. In a possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the execution device or the training device. The chip system can be composed of chips, or it can include chips and other discrete devices.

[0065] An embodiment of the present application provides a data processing method, the method comprising: obtaining an operation log, the operation log comprising first operation data of a user in a first recommendation scenario, the first operation data comprising operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario; obtaining a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network respectively according to the first operation data; obtaining first tendency information through a first task network according to the first feature representation, the first tendency information being used to represent the influence of the recommendation position in the recommendation scenario on the user's operation behavior; obtaining second tendency information through a second task network according to the second feature representation, the second tendency information being used to represent the influence of the recommendation position in the recommendation scenario on the user's operation behavior; obtaining a first weight of the first tendency information and a second weight of the second tendency information respectively according to the first operation data through a first gating network; fusing the first tendency information and the second tendency information according to the first weight and the second weight to obtain first target tendency information, the first target tendency information being used to represent the influence of the recommendation position in the first recommendation scenario on the user's operation behavior, and the first target tendency information being used to train a recommendation model. In an embodiment of the present application, the first gating network can obtain a set of weights for the first recommendation scenario, and fuse the outputs of multiple task networks based on the weights to obtain the position bias (first target tendency information) of the first recommendation scenario. The first gating network can identify and fuse the information related to the first recommendation scenario in the outputs of each task network through numerical control of the weights. On the one hand, the correlation between different recommendation scenarios can be learned. On the other hand, based on the dynamic weight method, the interference between different recommendation scenarios can be reduced, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in the case of joint modeling of multiple scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A structural diagram of the main framework of artificial intelligence;

[0067] Figure 2A schematic diagram of a system architecture provided for an embodiment of the present application;

[0068] Figure 3 A schematic diagram of an information recommendation process provided in an embodiment of the present application;

[0069] Figure 4 A flowchart of a data processing method provided in an embodiment of the present application;

[0070] Figure 5 A schematic diagram of the structure of a model provided in an embodiment of the present application;

[0071] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0072] Figure 7 A schematic diagram of an execution device provided in an embodiment of the present application;

[0073] Figure 8 A schematic diagram of a training device provided in an embodiment of the present application;

[0074] Fig. 9 A schematic diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION

[0075] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.

[0076] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0077] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0078] First, the overall workflow of the artificial intelligence system is described. Figure 1 , Figure 1The figure shows a structural diagram of the main framework of artificial intelligence. The following is an explanation of the above artificial intelligence theme framework from the two dimensions of "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis). Among them, the "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data has undergone a condensation process of "data-information-knowledge-wisdom". The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the industrial ecology process of the system.

[0079] (1) Infrastructure

[0080] The infrastructure provides computing power support for the artificial intelligence system, enables communication with the outside world, and supports it through the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips (CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips); the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.

[0081] (2) Data

[0082] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.

[0083] (3) Data processing

[0084] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.

[0085] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0086] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0087] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.

[0088] (4) General ability

[0089] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0090] (5) Smart products and industry applications

[0091] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical applications. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.

[0092] The embodiments of the present application can be applied to the field of information recommendation, specifically, can be applied to application markets, music play recommendations, video play recommendations, reading recommendations, news information recommendations, and information recommendations in web pages, etc. The present application can be applied to a recommendation system, and the recommendation system can determine the recommended object based on the recommendation method provided by the present application. The recommended object can be, for example, but not limited to, application programs (APP), audio and video, web pages, news information, and other items.

[0093] In the recommendation system, information recommendation can include prediction and recommendation processes. Among them, prediction needs to solve the problem of predicting the user's preference for each item, and the above preference can be reflected by the probability of the user selecting the item. Recommendation can be to sort the recommended objects according to the prediction results, for example, sorting them in order from high to low according to the predicted preference, and recommending information to users based on the sorting results.

[0094] For example, in the application market scenario, the recommendation system can recommend applications to users based on the sorting results. In the music recommendation scenario, the recommendation system can recommend music to users based on the sorting results. In the video recommendation scenario, the recommendation system can recommend videos to users based on the sorting results.

[0095] Next, the application architecture of the embodiment of the present application is introduced.

[0096] Combine the following Figure 2 The system architecture provided in the embodiments of the present application is introduced in detail. Figure 2 This is a schematic diagram of the system architecture provided by an embodiment of the present application. Figure 2 As shown, the system architecture 500 includes an execution device 510 , a training device 520 , a database 530 , a client device 540 , a data storage system 550 , and a data collection system 560 .

[0097] The execution device 510 includes a calculation module 511, an I / O interface 512, a preprocessing module 513 and a preprocessing module 514. The calculation module 511 may include a target model / rule 501, and the preprocessing module 513 and the preprocessing module 514 are optional.

[0098] The data collection device 560 is used to collect training samples. In the embodiment of the present application, the training sample can be a user's historical operation record, which can be a user's behavior log (or operation log), which can include the user's operation information on the item, wherein the operation information can include the operation type, the user's identifier, and the item's identifier. When the item is an e-commerce product, the operation type can include but is not limited to click, purchase, return, add to shopping cart, etc. When the item is an application, the operation type can be but is not limited to click, download, etc.

[0099] In a possible implementation, the operation log may include the first operation data of the user in the first recommendation scenario, the second operation data of the user in the first recommendation scenario, and the

[0100] The training samples may be data used to train a multi-gate contextual position-based model (MCPBM) or an initialized recommendation model. After the training samples are collected, the data collection device 560 stores the training samples in the database 530.

[0101] The training device 520 can train the initialized recommendation model or MCPBM based on the training samples maintained in the database 530 to obtain the target model / rule 501. In the embodiment of the present application, the target model / rule 501 can be a trained MCPBM, and the MCPBM can obtain the position bias in a certain recommended scene based on the user's operation data on the scene (such as the tendency information in the embodiment of the present application). The target model / rule 501 can be a recommendation model, and the recommendation model can predict the probability of the user performing an operation corresponding to the operation type on the item based on the user's operation information on the item, and the probability can be used to recommend information.

[0102] It should be noted that, in actual applications, the training samples maintained in the database 530 may not all come from the data collected by the data acquisition device 560, but may also be received from other devices, or may be obtained by expanding the data collected by the data acquisition device 560 (for example, the second operation type of the target user on the first item in the embodiment of the present application). It should also be noted that the training device 520 may not necessarily train the target model / rule 501 entirely based on the training samples maintained in the database 530, but may also obtain training samples from the cloud or other places for model training. The above description should not be used as a limitation on the embodiments of the present application.

[0103] The target model / rule 501 obtained by training the training device 520 can be applied to different systems or devices, such as Figure 2 The execution device 510 shown may be a terminal, such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR) / virtual reality (VR) device, a vehicle terminal, etc., or may be a server or a cloud, etc.

[0104] exist Figure 2 In the embodiment, the execution device 510 is configured with an input / output (I / O) interface 512 for data interaction with an external device. The user can input data (such as the operation log in the embodiment of the present application) to the I / O interface 512 through the client device 540.

[0105] The preprocessing module 513 and the preprocessing module 514 are used to preprocess the input data received by the I / O interface 512. It should be understood that there may be no preprocessing module 513 and the preprocessing module 514 or only one preprocessing module. When there is no preprocessing module 513 and the preprocessing module 514, the computing module 511 may be directly used to process the input data.

[0106] When the execution device 510 preprocesses the input data, or when the computing module 511 of the execution device 510 performs calculations and other related processing, the execution device 510 can call the data, code, etc. in the data storage system 550 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing into the data storage system 550.

[0107] Finally, the I / O interface 512 presents the processing results to the client device 540 so as to provide them to the user.

[0108] In the embodiment of the present application, the above-mentioned execution device 510 can obtain the code stored in the data storage system 550 to implement the data processing method in the embodiment of the present application.

[0109] In an embodiment of the present application, the execution device 510 may include a hardware circuit (such as an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, etc.), or a combination of these hardware circuits. For example, the execution device 510 may be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0110] Specifically, the execution device 510 can be a hardware system with an execution instruction function, and the information recommendation method provided in the embodiment of the present application can be a software code stored in the data storage system 550. The execution device 510 can obtain the software code from the data storage system 550 and execute the obtained software code to implement the data processing method provided in the embodiment of the present application.

[0111] It should be understood that the execution device 510 can be a combination of a hardware system that does not have the function of executing instructions and a hardware system that has the function of executing instructions. Some steps of the recommended method provided in the embodiment of the present application can also be implemented by the hardware system that does not have the function of executing instructions in the execution device 510, which is not limited here.

[0112] exist Figure 2 In the case shown, the user can manually give input data, and the "manually given input data" can be operated through the interface provided by the I / O interface 512. In another case, the client device 540 can automatically send input data to the I / O interface 512. If the client device 540 is required to automatically send input data and needs to obtain the user's authorization, the user can set the corresponding authority in the client device 540. The user can view the results output by the execution device 510 on the client device 540, and the specific presentation form can be a specific method such as display, sound, action, etc. The client device 540 can also be used as a data acquisition terminal to collect the input data of the input I / O interface 512 and the output results of the output I / O interface 512 as shown in the figure as new sample data, and store them in the database 530. Of course, it is also possible not to collect through the client device 540, but the I / O interface 512 directly stores the input data of the input I / O interface 512 and the output results of the output I / O interface 512 as new sample data in the database 530.

[0113] It is worth noting that Figure 2 This is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 2 In the embodiment, the data storage system 550 is an external memory relative to the execution device 510. In other cases, the data storage system 550 may also be placed in the execution device 510. It should be understood that the execution device 510 may be deployed in the client device 540.

[0114] Since the embodiments of the present application involve the application of a large number of neural networks, in order to facilitate understanding, the relevant terms and related concepts such as neural networks involved in the embodiments of the present application are first introduced below.

[0115] 1. Click-throughrate (CTR)

[0116] Click probability, also known as click-through rate, refers to the ratio of the number of clicks and exposures of recommended information (for example, recommended items) on a website or application. Click-through rate is usually an important indicator in the recommendation system.

[0117] 2. Personalized recommendation system

[0118] A personalized recommendation system refers to a system that uses a machine learning algorithm to analyze the user's historical data (such as the operation information in the embodiment of the present application), and uses this to predict new requests and provide personalized recommendation results.

[0119] 3. Offline training

[0120] Offline training refers to a module in a personalized recommendation system that iteratively updates the recommendation model parameters according to the machine learning algorithm based on the user's historical data (such as the operation information in the embodiment of the present application) until the set requirements are met.

[0121] 4. Online prediction (onlineinference)

[0122] Online prediction refers to predicting the user's preference for the recommended item in the current context based on the offline trained model according to the characteristics of the user, item and context, and predicting the probability of the user selecting the recommended item.

[0123] 5. Position bias: In search / advertising / recommendation systems, implicit feedback data from users is used to build ranking models. Users pay different attention to displayed documents due to their different positions, which will lead to position bias. That is, users tend to interact with documents with better positions in the search results list, and the user's position bias tendency has nothing to do with whether the document can reflect the user's true intention.

[0124] 6. Multi-task learning: In machine learning, multiple tasks can often be modeled and solved at the same time. By studying the commonalities and differences between multiple tasks, the learning efficiency and performance indicators of the model in one or more tasks can be improved.

[0125] For example, Figure 3 Schematic diagram of the recommendation system provided in the embodiment of the present application. Figure 3 As shown, when a user enters the system, a recommendation request will be triggered. The recommendation system will input the request and related information (such as the operation information in the embodiment of the present application) into the recommendation model, and then predict the user's selection rate for the items in the system. Further, the items are sorted in descending order according to the predicted selection rate or a function based on the selection rate, that is, the recommendation system can display the items in different positions in sequence as the recommendation results for the user. The user browses the items in different positions and performs user behaviors, such as browsing, selecting, and downloading. At the same time, the user's actual behavior will be stored in the log as training data, and the parameters of the recommendation model will be continuously updated through the offline training module to improve the prediction effect of the model.

[0126] For example, a user can trigger the recommendation system in the application market by opening the application market in a smart terminal (e.g., a mobile phone). The recommendation system in the application market will predict the probability of the user downloading each recommended candidate APP based on the user's historical behavior log, such as the user's historical download records, user selection records, and the application market's own characteristics, such as time, location and other environmental feature information. Based on the calculation results, the recommendation system in the application market can display the candidate APPs in descending order according to the predicted probability values, thereby increasing the download probability of the candidate APPs.

[0127] For example, an APP with a higher predicted user selection rate may be displayed in a front recommended position, and an APP with a lower predicted user selection rate may be displayed in a back recommended position.

[0128] The above-mentioned recommendation model may be a neural network model. The following introduces the relevant terms and concepts of the neural network that may be involved in the embodiments of the present application.

[0129] (1) Neural Network

[0130] A neural network may be composed of neural units, and a neural unit may refer to an operation unit that takes xs (i.e., input data) and intercept 1 as input, and the output of the operation unit may be:

[0131]

[0132] Where s=1, 2, ...n, n is a natural number greater than 1, Ws is the weight of xs, and b is the bias of the neural unit. f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal. The output signal of the activation function can be used as the input of the next convolution layer, and the activation function can be a sigmoid function. A neural network is a network formed by connecting multiple single neural units mentioned above, that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the characteristics of the local receptive field. The local receptive field can be an area composed of several neural units.

[0133] (2) Deep Neural Networks

[0134] Deep Neural Network (DNN), also known as multi-layer neural network, can be understood as a neural network with many hidden layers. There is no special metric for "many" here. From the position of different layers of DNN, the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the layers in between are all hidden layers. The layers are fully connected, that is, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer. Although DNN looks complicated, the work of each layer is actually not complicated. Simply put, it is the following linear relationship expression: in, is the input vector, is the output vector, is the offset vector, W is the weight matrix (also called coefficient), and α() is the activation function. Each layer is just an input vector After such a simple operation, the output vector Since DNN has many layers, the coefficient W and the offset vector The definition of these parameters in DNN is as follows: Take coefficient W as an example: Assume that in a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as The superscript 3 represents the layer number of the coefficient W, while the subscripts correspond to the output third layer index 2 and the input second layer index 4. In summary, the coefficients from the kth neuron in the L-1th layer to the jth neuron in the Lth layer are defined as It should be noted that the input layer does not have a W parameter. In a deep neural network, more hidden layers allow the network to better describe complex situations in the real world. Theoretically, the more parameters a model has, the higher its complexity and the greater its "capacity", which means it can complete more complex learning tasks. Training a deep neural network is the process of learning the weight matrix, and its ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (the weight matrix formed by many layers of vector W).

[0135] (3) Loss Function

[0136] In the process of training a deep neural network, because we hope that the output of the deep neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually an initialization process before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the predicted value of the network is high, adjust the weight vector to make it predict a lower value, and keep adjusting until the deep neural network can predict the target value we really want or a value very close to the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function or objective function, which are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible.

[0137] (4) Back propagation algorithm

[0138] The error back propagation (BP) algorithm can be used to correct the size of the parameters in the initial model during the training process, so that the error loss of the model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the parameters in the initial model are updated by back propagating the error loss information, so that the error loss converges. The back propagation algorithm is a back propagation movement dominated by error loss, aiming to obtain the optimal model parameters, such as the weight matrix.

[0139] In the recommendation scenario, the system will record the interaction information between the user and the system, such as operation logs, and use this as a data source to train the most core recommendation model (such as the ranking model) in the search system. User operation logs have the characteristics of large data volume and strong timeliness. However, user operations are often biased. Users tend to operate objects with high rankings. If the recommendation model is trained only based on user operation logs, the recommendation model cannot accurately learn the true correlation between the user's true intention and the recommended object. An important reason for this is the serious position bias in the system. Taking the search scenario as an example, the user enters the search system and enters the query term in the search box. The system will immediately feedback the query results and present them in the user interaction interface. When users focus on the displayed objects, due to their different positions, they will also pay different attention, which will lead to position bias, that is, users tend to interact with objects with better positions in the search result list, and the user's tendency has nothing to do with whether the object can reflect the user's true intention.

[0140] Due to the existence of position bias, the implicit feedback data of users used to train the model, that is, whether to operate, cannot reflect the user's real search intention. If the implicit feedback data of users is directly used as positive and negative samples for training, the recommendation model obtained will be biased, and as the model is continuously updated, a Matthew effect will be formed, causing the model to become more and more biased. In order to obtain a more accurate recommendation model, the position bias needs to be corrected during offline training to eliminate the influence of position-bias. The inverse propensity score (IPS) technology is a commonly used position bias correction technology. By estimating the position propensity score of the sample, the loss function during training is reversely weighted, so that the weight of samples with high position propensity scores is lower, achieving the effect of position correction. In different recommendation scenarios, the position bias is also different. For example, in some recommendation scenarios, multiple objects that the user wants to operate at this time can be actively recommended. In some recommendation scenarios, multiple objects related to the search terms can be recommended based on the search terms entered by the user. In these two recommendation scenarios, the position bias of different positions is also different.

[0141] In an existing implementation, a contextual position-based model (CPBM) is used to calculate position bias (or tendency information). The existing solution is to train the same CPBM based on operation data of multiple scenes. However, in the case of multi-scene joint modeling, the position biases of different positions in different recommendation scenes are different, which will lead to a decrease in the accuracy of tendency information prediction.

[0142] The data processing method provided in this application can solve the problem that in the case of joint modeling of multiple scenarios, the single-task model is affected by the different distributions of data, resulting in a decrease in prediction accuracy.

[0143] Reference Figure 4 , Figure 4 An example of a data processing method provided in the present application is shown in FIG. Figure 4 As shown, a data processing method provided by an embodiment of the present application includes:

[0144] 401. Obtain an operation log, where the operation log includes first operation data of a user in a first recommendation scenario, where the first operation data includes the user's operation data when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario.

[0145] In the embodiment of the present application, the execution subject of step 401 may be a terminal device, and the terminal device may be a portable mobile device, such as but not limited to a mobile or portable computing device (such as a smart phone), a personal computer, a server computer, a handheld device (such as a tablet) or a laptop device, a multi-processor system, a game console or controller, a microprocessor-based system, a set-top box, a programmable consumer electronic product, a mobile phone, a mobile computing and / or communication device with a wearable or accessory form factor (such as a watch, glasses, a headset or earplugs), a network PC, a minicomputer, a mainframe computer, a distributed computing environment including any of the above systems or devices, and the like.

[0146] In the embodiment of the present application, the execution entity of step 401 may be a server on the cloud side, and the server may receive the operation log sent from the terminal device, and then the server may obtain the operation log.

[0147] For the convenience of description, the following does not distinguish the form of the execution subject, and is described as an execution device. In the embodiment of the present application, the execution device can obtain an operation log, and the operation log includes the first operation data of the user in the first recommendation scene, and the first operation data includes the user's operation data when the same or the similarity of the recommended object is higher than the threshold value in different recommendation positions in the first recommendation scene.

[0148] In the search system, the model will be continuously updated or there will be different types of recommendation models, which will generate data with different recommendation results when different recommendation algorithms process similar search content.

[0149] In a possible implementation, intervention harvesting can be used to obtain data with different recommendation results. Intervention harvesting uses natural intervention strategies and focuses on the differences in document ranking when users interact with different recommendation algorithms to mine the probability of a position being observed. By using the differences in different ranking algorithms, user click data for the same item at different positions under the same search term is collected. At this time, the relevance of the items is the same, and user clicks are only related to the position bias.

[0150] In a possible implementation, the first operation data of the user in the first recommendation scenario can be obtained, wherein the first operation data can be the data with different recommendation results described above, that is, the first operation data includes the user's operation data when the same recommendation object or the recommendation object with similarity higher than a threshold is in different recommendation positions in the first recommendation scenario. Through the first operation data, the position bias (that is, tendency information) of each recommendation position in the first recommendation scenario can be mined.

[0151] Among them, the operation data may include the user's operation results on multiple objects recommended by the recommendation model, wherein the objects can also be described as items, and the items can be physical items or virtual items, such as APPs, audio and video, web pages, and news information. The attribute information of the items can be at least one of the item name, developer, installation package size, category, and praise. Taking the item as an application as an example, the category of the item can be chat, parkour games, office, etc., and the praise degree can be a score, comment, etc. for the item; the present application does not limit the specific type of the attribute information of the item.

[0152] The operation result may include whether the operation is performed or the operation type. The operation type may be the user's behavior operation type for the item. On network platforms and applications, users often have various forms of interaction with items (that is, there are various operation types), such as browsing, clicking, adding to shopping carts, and purchasing in e-commerce platform behaviors. These various behaviors reflect the user's preferences and are very helpful for accurately describing user characteristics.

[0153] In a possible implementation, the operation log also includes second operation data of the user in a second recommendation scenario, and the second operation data includes the user's operation data when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scenario.

[0154] In addition, the operation log also includes the user's operation data in scenarios other than the first recommendation scenario and the second recommendation scenario, which is not limited in the embodiment of the present application.

[0155] In a possible implementation, the operation data may be context information.

[0156] 402. According to the first operation data, obtain a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network respectively.

[0157] In a possible implementation, the first feature extraction network or the second feature extraction network is a different feature extraction network. That is, the operation data can be input into multiple feature extraction networks respectively to obtain multiple feature representations.

[0158] In a possible implementation, the first feature extraction network or the second feature extraction network is a network including a multilayer perceptron (MLP).

[0159] In a possible implementation, the obtaining of the first feature representation and the second feature representation through the first feature extraction network and the second feature extraction network respectively according to the first operation data specifically includes: obtaining the first initial feature representation and the second initial feature representation through the first feature extraction network and the second feature extraction network respectively according to the first operation data; obtaining the third weight of the first initial feature representation and the fourth weight of the second initial feature representation respectively according to the first operation data through the second gating network; fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation; obtaining the fifth weight of the first initial feature representation and the sixth weight of the second initial feature representation respectively according to the first operation data through the third gating network; fusing the first initial feature representation and the second initial feature representation according to the fifth weight and the sixth weight to obtain the second feature representation.

[0160] That is, the first initial feature representation and the second initial feature representation can be obtained through the first feature extraction network and the second feature extraction network respectively, and the first initial feature representation and the second initial feature representation can be fused by the third weight (corresponding to the first initial feature representation) and the fourth weight (corresponding to the second initial feature representation) obtained by the second gating network to obtain the first feature representation. Similarly, the third initial feature representation and the fourth initial feature representation can be fused by the fifth weight (corresponding to the third initial feature representation) and the sixth weight (corresponding to the fourth initial feature representation) obtained by the second gating network to obtain the second feature representation.

[0161] Reference Figure 5 , Figure 5A schematic diagram of the structure of a network model provided in an embodiment of the present application, wherein the feature extraction network can be referred to as an expert network, wherein each expert network is composed of a multi-layer perceptron (MLP), and each expert network Expert i The input of can be the context information of all scenes (for example, it can include the first operation data); and the gate network Gate i It is used to select the weighted outputs of multiple expert networks as the input of the upper network. The input of each gating network is the context information of all scenes (for example, it can include the first operation data). In a possible implementation, the weight calculation can be shown in formula (1). When the data of other scenes is more relevant to the target scene data, G i The larger the value, the higher the degree of data sharing between the two tasks. Conversely, the smaller the correlation between the data of other scenes and the target scene data, the greater the value. i The smaller the size, the lower the degree of data sharing between the two tasks. This flexible information sharing method has the functions of information selection and information isolation, and can pass the information that needs to be shared to the upper task layer network.

[0162] G i =softmax(X 1 , X 2 , ..., X N ) (1);

[0163] Therefore, each expert layer network Expert i Output M i for:

[0164]

[0165] In a possible implementation, a third feature representation and a fourth feature representation may be obtained according to the second operation data through the first feature extraction network and the second feature extraction network respectively.

[0166] In a possible implementation, the obtaining of the third feature representation and the fourth feature representation through the first feature extraction network and the second feature extraction network respectively according to the second operation data specifically includes: obtaining a third initial feature representation and a fourth initial feature representation through the first feature extraction network and the second feature extraction network respectively according to the second operation data; obtaining the weight of the third initial feature representation and the weight of the fourth initial feature representation respectively through the second gating network according to the second operation data; fusing the third initial feature representation and the fourth initial feature representation according to the weight of the third initial feature representation and the weight of the fourth initial feature representation to obtain the third feature representation; obtaining the weight of the third initial feature representation and the weight of the fourth initial feature representation respectively through the third gating network according to the second operation data; fusing the third initial feature representation and the fourth initial feature representation according to the weight of the third initial feature representation and the weight of the fourth initial feature representation to obtain the fourth feature representation.

[0167] 403. According to the first feature representation, obtain first tendency information through a first task network, where the first tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior.

[0168] In a possible implementation, the first task network or the second task network can be a context-dependent position bias model (CPBM). When modeling position bias, CPBM can explicitly introduce context features. Position bias will be affected by context features (such as query categories), and then a propensity model is specifically used to estimate the relationship between position propensity scores and context features.

[0169] In a possible implementation, the first tendency information may include the position bias of each recommended position in the recommendation scene, that is, the influence of the position on the user's operation behavior. For example, the first recommendation scene may include multiple recommended positions (for example, multiple recommended objects may be displayed in the first recommendation scene, and the position of each recommended object is the recommended position).

[0170] 404. Obtain second tendency information through a second task network according to the second feature representation, where the second tendency information is used to indicate the influence of the recommended position in the recommendation scenario on the user's operation behavior.

[0171] The first task network and the second task network may be different task networks, for example, different CPBMs.

[0172] In a possible implementation, the second tendency information may include the position bias of each recommended position in the recommendation scene, that is, the influence of the position on the user's operation behavior. For example, the first recommendation scene may include multiple recommended positions (for example, the first recommendation scene may display multiple recommended objects, and the position of each recommended object is the recommended position).

[0173] In a possible implementation, for the third feature representation and the fourth feature representation of the second operation data, similarly, third tendency information can be obtained through the first task network based on the third feature representation, and the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; and fourth tendency information can be obtained through the second task network based on the fourth feature representation, and the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior.

[0174] 405. According to the first operation data, obtain a first weight of the first tendency information and a second weight of the second tendency information through a first gating network.

[0175] In a possible implementation, the first tendency information and the second tendency information may be fused, and the fusion result may be used as the tendency information of the first recommendation scenario (eg, the first target tendency information in the embodiment of the present application).

[0176] In a possible implementation, in order to fuse the first tendency information and the second tendency information, a first weight of the first tendency information and a second weight of the second tendency information can be obtained respectively through a first gating network according to the first operation data. Furthermore, the first tendency information and the second tendency information can be fused (e.g., weighted sum) according to the first weight and the second weight to obtain the first target tendency information.

[0177] Reference Figure 5 , the first task network and the second task network can belong to the task network layer (task layer), where each task network can be composed of a CPBM model to estimate the propensity score of each scene. Similar to the expert layer network, the task layer network also has a gate network to estimate the weights of each task network (CPBM) to capture the similarity at the label level. The input of the Gate network of the task layer network is also the context information of all search scenes, where the weight calculation can be shown as formula (3):

[0178] Q i =softmax(X 1 , X2, ..., X N ) (3);

[0179] Task layer i The output Y i Can be:

[0180]

[0181] 406. Based on the first weight and the second weight, the first tendency information and the second tendency information are fused to obtain first target tendency information, wherein the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior, and the first target tendency information is used to train the recommendation model.

[0182] In a possible implementation, the fusion includes: weighted summation.

[0183] In a possible implementation, similarly, for the second operation data of the second recommendation scenario, the seventh weight of the third tendency information and the eighth weight of the fourth tendency information can be obtained respectively according to the second operation data through the first gating network; according to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, the second target tendency information is used to represent the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

[0184] In a possible implementation, the first target tendency information is used to represent the influence of the recommended position in the first recommendation scenario on the user's operation behavior, and the first target tendency information is used to train the recommendation model.

[0185] In a possible implementation, when training the recommendation model, the first target tendency information can be used as a position bias of the first recommendation scene. Specifically, when training the recommendation model, a second loss of the recommendation model can be obtained, the second loss being the loss obtained when the recommendation model is fed forward according to the first operation data; the second loss is adjusted according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update the parameters of the recommendation model.

[0186] For example, during the training process, each sample in the biased data set can be weighted by dividing it by the corresponding propensity score;

[0187]

[0188] Among them, the first term is the regularization term, which constrains the learnable parameter W in the training model through the hyperparameter λ; the second term is the model loss term, yl represents the true label of the lth sample, The code model predicts the label of this sample, z l Represents the inverse propensity score corresponding to the location characteristics of the sample.

[0189] In an embodiment of the present application, the first gating network can obtain a set of weights for the first recommendation scenario, and fuse the outputs of multiple task networks based on the weights to obtain the position bias (first target tendency information) of the first recommendation scenario. The first gating network can identify and fuse the information related to the first recommendation scenario in the outputs of each task network through numerical control of the weights. On the one hand, the correlation between different recommendation scenarios can be learned. On the other hand, based on the dynamic weight method, the interference between different recommendation scenarios can be reduced, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in the case of joint modeling of multiple scenarios.

[0190] It should be understood that the data processing method introduced above can be the reasoning process of the model.

[0191] Next, the data processing method in the embodiment of the present application is introduced from the training process of the model:

[0192] In one possible implementation, the above Figure 4 The corresponding data processing method can be a feedforward action during model training. For the training process performed on the first operation data, the first groundtruth of the tendency information corresponding to the first operation data can be obtained, and the first loss can be determined based on the first tendency information and the first groundtruth. Based on the first loss, the parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network can be updated.

[0193] In one possible implementation, the above Figure 4 The corresponding data processing method can be a feedforward action during model training. For the training process performed on the second operation data, the second true value of the tendency information corresponding to the second operation data can be obtained; based on the second tendency information and the second true value, the second loss is determined, and based on the second loss, the parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network are updated.

[0194] For example, after obtaining the output of each task network, the loss function defined in formula (5) can be used:

[0195]

[0196] Among them, α i For each task's weight, loss i The loss function for each task is calculated by formula (6):

[0197]

[0198] In a possible implementation, during each iterative update, the losses obtained for each recommendation scenario can be fused (e.g., addition operation), and the parameters can be updated based on the fused losses. Since the click-through rates and observation propensity scores of each location in different scenarios are different, MCPBM has different convergence speeds when training with different scenario data, and the weights of different tasks are adjusted using exponential weighting.

[0199] In a possible implementation, a first convergence degree can be obtained; the higher the first convergence degree, the closer it can be to a convergence state. The first loss is adjusted according to the first convergence degree to obtain an adjusted first loss, and the adjusted first loss is negatively correlated with the first convergence degree; and then, according to the adjusted first loss, the parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

[0200] For example, the adjustment of loss can be seen in formulas (7)-(9):

[0201]

[0202]

[0203] α i (t+1)=γα i (t)+(1-γ)σ i (t+1) (9);

[0204] Among them, s is a hyperparameter that controls the smoothness of the task weight, and γ is a hyperparameter that controls the loss of the task before round t in the loss of round t+1.

[0205] That is to say, for recommendation scenarios with a higher degree of convergence, the weight of its loss function can be set smaller, and for recommendation scenarios with a lower degree of convergence, the weight of its loss function can be set higher, so that the convergence progress of each recommendation scenario remains basically consistent, thereby improving the prediction accuracy of the model.

[0206] For example, taking the recommendation scenario as a search scenario, the search page includes a search box, which displays the user's current search term, such as "design games". The main content below this page is the ranking of related apps displayed to users by the search system of the application market for the search term. The search recommendation system of the application market predicts the user's click probability on the candidate set app based on the user, the candidate set app and context features, and sorts the candidate products in descending order according to the probability, placing the most likely to be downloaded app in the front position.

[0207] After seeing the recommended results of the application market, users choose to browse, click or download according to their personal interests, and these user behaviors are stored in the log. The application market uses these accumulated user behavior logs as training data to train the click-through rate prediction model. In this scenario, the MCPBM architecture in the embodiment of the present application can be used to train the model.

[0208] There is a position bias in the search page. Items that are closer to the front will have a greater probability of being noticed by users, and are more likely to be clicked. Specifically, taking the search term "design game" as an example, step 1: design an intervention experiment strategy, which can be random traffic intervention or Intervention Harvest, collect user click data under the intervention experiment, and obtain intervention experiment data; step 2: use the collected intervention experiment data to jointly model multiple search scenarios and train the propensity score prediction model MCPBM based on multi-task learning; step 3: use the trained MCPBM propensity score model to correct the user click log to obtain unbiased user click data; step 4: use the corrected user click data as unbiased training data to train the downstream fine ranking model, and train the unbiased fine ranking model for current network reasoning and sorting.

[0209] Next, the beneficial effects of the embodiments of the present application are introduced in combination with experiments: a complete offline experiment was conducted on the MQ2007 million query word dataset and the Yahoo LTR dataset. Both datasets compared the performance of MCPBM with LE, PBM, and CPBM in two typical indicators, AvgRank and Error. Through experimental testing, the experimental results are shown in the following table:

[0210] Table 1 Comparison of Error indicators in various search scenarios

[0211]

[0212] Table 2 Comparison of Error indicators in various search scenarios

[0213]

[0214] In Tables 1 and 2, LE (Local Estimators), PBM (Position Based Model), and CPBM (Contextual Position-Based Model) are three baseline methods. The value of θ≥0 controls the influence of the context information position bias in the search scenario. θ=0 means that the context information has no effect on the position bias. The larger the value of θ, the greater the influence of the context information on the position bias.

[0215] From Table 1 and Table 2, we can see that the MCPBM model has better prediction accuracy of the propensity score in each scenario in the Yahoo,MQ2007 dataset than the three baseline models. The debiasing effect of the MCPBM model is better than the three baseline debiasing models, and the overall ranking index AvgRank is improved by 1%-5%.

[0216] The present application also provides a data processing method, which includes:

[0217] Acquire an operation log, where the operation log includes first operation data of a user in a first recommendation scenario, where the first operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario;

[0218] According to the first operation data, respectively obtaining a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network;

[0219] According to the first feature representation, obtaining first tendency information through a first task network, wherein the first tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0220] According to the second feature representation, second tendency information is obtained through a second task network, where the second tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0221] According to the first operation data, obtaining a first weight of the first tendency information and a second weight of the second tendency information respectively through a first gating network;

[0222] According to the first weight and the second weight, the first tendency information and the second tendency information are merged to obtain first target tendency information, where the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior;

[0223] Obtaining a first ground truth of the tendency information corresponding to the first operation data;

[0224] A first loss is determined according to the first tendency information and the first true value, and parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated according to the first loss.

[0225] In a possible implementation, obtaining the first feature representation and the second feature representation through a first feature extraction network and a second feature extraction network respectively according to the first operation data includes:

[0226] According to the first operation data, obtaining a first initial feature representation and a second initial feature representation through a first feature extraction network and a second feature extraction network respectively;

[0227] According to the first operation data, a third weight of the first initial feature representation and a fourth weight of the second initial feature representation are obtained through a second gating network respectively;

[0228] fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation;

[0229] According to the first operation data, obtaining a fifth weight of the first initial feature representation and a sixth weight of the second initial feature representation respectively through a third gating network;

[0230] The first initial feature representation and the second initial feature representation are fused according to the fifth weight and the sixth weight to obtain the second feature representation.

[0231] In a possible implementation, the operation log further includes second operation data of the user in the second recommendation scene, where the second operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scene;

[0232] The method further comprises:

[0233] According to the second operation data, obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively;

[0234] According to the third feature representation, third tendency information is obtained through the first task network, where the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0235] According to the fourth feature representation, fourth tendency information is obtained through the second task network, where the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0236] According to the second operation data, obtaining, through the first gating network, a seventh weight of the third tendency information and an eighth weight of the fourth tendency information respectively;

[0237] According to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, wherein the second target tendency information is used to indicate the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

[0238] In a possible implementation, the fusion includes: weighted summation.

[0239] In a possible implementation, the first task network or the second task network is a context-dependent position bias model (CPBM).

[0240] In a possible implementation, the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

[0241] In a possible implementation, the method further includes:

[0242] Acquire a second true value of the tendency information corresponding to the second operation data;

[0243] A second loss is determined according to the second tendency information and the second true value, and parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated according to the second loss.

[0244] In a possible implementation, the method further includes:

[0245] Get the first convergence degree;

[0246] Adjusting the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree;

[0247] The updating of parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network according to the first loss includes:

[0248] According to the adjusted first loss, parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

[0249] Reference Figure 6 , Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the device 600 may include:

[0250] An acquisition module 601 is used to acquire an operation log, wherein the operation log includes first operation data of a user in a first recommendation scenario, wherein the first operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario;

[0251] The specific description of the acquisition module 601 can refer to the description of step 401 in the above embodiment, which will not be repeated here.

[0252] A feature extraction module 602 is used to obtain a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network according to the first operation data;

[0253] The specific description of the feature extraction module 602 can refer to the description of step 402 in the above embodiment, which will not be repeated here.

[0254] The tendency information calculation module 603 is used to obtain first tendency information through a first task network according to the first feature representation, wherein the first tendency information is used to indicate the influence of the recommended position in the recommendation scene on the user's operation behavior; and obtain second tendency information through a second task network according to the second feature representation, wherein the second tendency information is used to indicate the influence of the recommended position in the recommendation scene on the user's operation behavior;

[0255] The specific description of the tendency information calculation module 603 may refer to the description of step 403 and step 404 in the above embodiment, which will not be repeated here.

[0256] A weight determination module 604, configured to obtain, according to the first operation data, a first weight of the first tendency information and a second weight of the second tendency information through a first gating network;

[0257] The specific description of the weight determination module 604 may refer to the description of step 405 in the above embodiment, which will not be repeated here.

[0258] Fusion module 605 is used to fuse the first tendency information and the second tendency information according to the first weight and the second weight to obtain first target tendency information, wherein the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior, and the first target tendency information is used to train the recommendation model.

[0259] The specific description of the fusion module 605 can refer to the description of step 406 in the above embodiment, which will not be repeated here.

[0260] In a possible implementation, the feature extraction module is specifically used to:

[0261] According to the first operation data, obtaining a first initial feature representation and a second initial feature representation through a first feature extraction network and a second feature extraction network respectively;

[0262] According to the first operation data, a third weight of the first initial feature representation and a fourth weight of the second initial feature representation are obtained through a second gating network respectively;

[0263] fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation;

[0264] According to the first operation data, obtaining a fifth weight of the first initial feature representation and a sixth weight of the second initial feature representation respectively through a third gating network;

[0265] The first initial feature representation and the second initial feature representation are fused according to the fifth weight and the sixth weight to obtain the second feature representation.

[0266] In a possible implementation, the operation log further includes second operation data of the user in the second recommendation scene, where the second operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scene;

[0267] The feature extraction module is specifically used for:

[0268] According to the second operation data, obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively;

[0269] The tendency information calculation module is specifically used for:

[0270] According to the third feature representation, third tendency information is obtained through the first task network, and the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; according to the fourth feature representation, fourth tendency information is obtained through the second task network, and the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior;

[0271] The weight determination module is specifically configured to: obtain, according to the second operation data, through the first gating network, respectively a seventh weight of the third tendency information and an eighth weight of the fourth tendency information;

[0272] The fusion module is specifically used for:

[0273] According to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, wherein the second target tendency information is used to indicate the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

[0274] In a possible implementation, the fusion includes: weighted summation.

[0275] In a possible implementation, the first task network or the second task network is a context-dependent position bias model (CPBM).

[0276] In a possible implementation, the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

[0277] In a possible implementation, the acquisition module is further used to:

[0278] Obtaining a first ground truth of the tendency information corresponding to the first operation data;

[0279] The device also includes:

[0280] A model training module is used to determine a first loss according to the first tendency information and the first true value, and update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network according to the first loss.

[0281] In a possible implementation, the acquisition module is further used to:

[0282] Acquire a second true value of the tendency information corresponding to the second operation data;

[0283] The model training module is also used to determine a second loss based on the second tendency information and the second true value, and to update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network based on the second loss.

[0284] In a possible implementation, the acquisition module is further used to:

[0285] Get the first convergence degree;

[0286] The device also includes:

[0287] a loss adjustment module, configured to adjust the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree;

[0288] The model training module is specifically used for:

[0289] According to the adjusted first loss, parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

[0290] In a possible implementation, the acquisition module is further used to:

[0291] Acquire a second loss of the recommendation model, where the second loss is a loss obtained when the recommendation model is fed forward according to the first operation data;

[0292] The loss adjustment module is further used to adjust the second loss according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update the parameters of the recommendation model.

[0293] Next, an execution device provided by an embodiment of the present application is introduced. Figure 7 , Figure 7 This is a schematic diagram of a structure of an execution device provided in an embodiment of the present application. The execution device 700 can be specifically a mobile phone, a tablet, a laptop, a smart wearable device, a server, etc., which is not limited here. Among them, the execution device 700 can be deployed with Figure 6 The data processing device described in the corresponding embodiment is used to implement Figure 4The function of data processing in the corresponding embodiment. Specifically, the execution device 700 includes: a receiver 701, a transmitter 702, a processor 703 and a memory 704 (wherein the number of processors 703 in the execution device 700 can be one or more), wherein the processor 703 may include an application processor 7031 and a communication processor 7032. In some embodiments of the present application, the receiver 701, the transmitter 702, the processor 703 and the memory 704 may be connected via a bus or other means.

[0294] The memory 704 may include a read-only memory and a random access memory, and provides instructions and data to the processor 703. A portion of the memory 704 may also include a non-volatile random access memory (NVRAM). The memory 704 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.

[0295] The processor 703 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.

[0296] The method disclosed in the above embodiment of the present application can be applied to the processor 703, or implemented by the processor 703. The processor 703 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware or software instructions in the processor 703. The above processor 703 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and a vision processor (vision processing unit, VPU), a tensor processor (tensorprocessing unit, TPU) and other processors suitable for AI computing, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 703 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 704, and the processor 703 reads the information in the memory 704, and completes the steps 401 to 406 in the above embodiment in combination with its hardware.

[0297] The receiver 701 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 702 can be used to output digital or character information through the first interface; the transmitter 702 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 702 can also include a display device such as a display screen.

[0298] The present application also provides a training device. Figure 8 , Figure 81 is a structural diagram of a training device provided in an embodiment of the present application. Specifically, the training device 800 is implemented by one or more servers. The training device 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 88 (for example, one or more processors) and a memory 832, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 can be short-term storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processing unit 88 can be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the training device 800.

[0299] The training device 800 may also include one or more power supplies 826, one or more wired or wireless network interfaces 850, one or more input and output interfaces 858; or, one or more operating systems 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0300] Specifically, the training device can perform the steps related to model training in the above embodiments.

[0301] Also provided in an embodiment of the present application is a computer program product which, when executed on a computer, enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0302] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for signal processing. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps executed by the aforementioned execution device, or enables the computer to execute the steps executed by the aforementioned training device.

[0303] The execution device, training device or terminal device provided in the embodiments of the present application may specifically be a chip, and the chip includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit may also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0304] For details, please refer to Fig. 9 , Fig. 9 A schematic diagram of the structure of a chip provided in an embodiment of the present application, the chip can be expressed as a neural network processor NPU900, NPU 900 is mounted on the host CPU (Host CPU) as a coprocessor, and the host CPU assigns tasks. The core part of the NPU is the operation circuit 903, which is controlled by the controller 904 to extract matrix data in the memory and perform multiplication operations.

[0305] NPU 900 can achieve Figure 4 The information recommendation method provided in the described embodiments and Figure 4 The methods provided in the described embodiments.

[0306] More specifically, in some implementations, the operation circuit 903 in the NPU 900 includes a plurality of processing units (Process Engine, PE) inside. In some implementations, the operation circuit 903 is a two-dimensional systolic array. The operation circuit 903 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 903 is a general-purpose matrix processor.

[0307] For example, assume there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit takes the corresponding data of matrix B from the weight memory 902 and caches it on each PE in the operation circuit. The operation circuit takes the matrix A data from the input memory 901 and performs matrix operation with matrix B, and the partial result or final result of the matrix is ​​stored in the accumulator 908.

[0308] The unified memory 906 is used to store input data and output data. The weight data is directly transferred to the weight memory 902 through the direct memory access controller (DMAC) 905. The input data is also transferred to the unified memory 906 through the DMAC.

[0309] BIU stands for Bus Interface Unit, i.e., bus interface unit 910 , which is used for interaction between AXI bus, DMAC and instruction fetch buffer (IFB) 909 .

[0310] The bus interface unit 910 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 909 to obtain instructions from the external memory, and is also used for the storage unit access controller 905 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0311] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 906 or to transfer weight data to the weight memory 902 or to transfer input data to the input memory 901.

[0312] The vector calculation unit 907 includes multiple operation processing units, and further processes the output of the operation circuit 903 when necessary, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of feature planes, etc.

[0313] In some implementations, the vector calculation unit 907 can store the processed output vector to the unified memory 906. For example, the vector calculation unit 907 can apply a linear function; or a nonlinear function to the output of the operation circuit 903, such as linear interpolation of the feature plane extracted by the convolution layer, and then, for example, a vector of accumulated values ​​to generate an activation value. In some implementations, the vector calculation unit 907 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 903, for example, for use in a subsequent layer in a neural network.

[0314] An instruction fetch buffer 909 connected to the controller 904 is used to store instructions used by the controller 904;

[0315] Unified memory 906, input memory 901, weight memory 902 and instruction fetch memory 909 are all On-Chip memories. External memories are private to the NPU hardware architecture.

[0316] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.

[0317] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0318] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0319] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0320] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A data processing method, characterized in that: The method comprises: Acquire an operation log, where the operation log includes first operation data of a user in a first recommendation scenario, where the first operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario; According to the first operation data, respectively obtaining a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network; According to the first feature representation, obtaining first tendency information through a first task network, wherein the first tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; According to the second feature representation, second tendency information is obtained through a second task network, where the second tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; According to the first operation data, obtaining a first weight of the first tendency information and a second weight of the second tendency information respectively through a first gating network; The first tendency information and the second tendency information are fused according to the first weight and the second weight to obtain first target tendency information, where the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior.

2. The method according to claim 1, characterized in that The obtaining of a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network according to the first operation data respectively comprises: According to the first operation data, obtaining a first initial feature representation and a second initial feature representation through a first feature extraction network and a second feature extraction network respectively; According to the first operation data, a third weight of the first initial feature representation and a fourth weight of the second initial feature representation are obtained through a second gating network respectively; fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation; According to the first operation data, obtaining a fifth weight of the first initial feature representation and a sixth weight of the second initial feature representation respectively through a third gating network; The first initial feature representation and the second initial feature representation are fused according to the fifth weight and the sixth weight to obtain the second feature representation.

3. The method according to claim 1 or 2, characterized in that: The operation log also includes second operation data of the user in the second recommendation scenario, wherein the second operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scenario; The method further comprises: According to the second operation data, obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively; According to the third feature representation, third tendency information is obtained through the first task network, where the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; According to the fourth feature representation, fourth tendency information is obtained through the second task network, where the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; According to the second operation data, obtaining, through the first gating network, a seventh weight of the third tendency information and an eighth weight of the fourth tendency information respectively; According to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, wherein the second target tendency information is used to represent the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

4. The method according to claim 1 or 2, characterized in that: The fusion includes: weighted summation.

5. The method according to claim 1 or 2, characterized in that: The first task network or the second task network is a context-dependent position bias model (CPBM).

6. The method according to claim 1 or 2, characterized in that: The first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

7. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining a first ground truth of the tendency information corresponding to the first operation data; A first loss is determined according to the first tendency information and the first true value, and parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated according to the first loss.

8. The method according to claim 3, characterized in that The method further comprises: Acquire a second true value of the tendency information corresponding to the second operation data; A second loss is determined according to the second tendency information and the second true value, and parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated according to the second loss.

9. The method according to claim 7, characterized in that: The method further comprises: Get the first convergence degree; Adjusting the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree; The updating of parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network according to the first loss includes: According to the adjusted first loss, parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

10. The method according to claim 1 or 2, characterized in that: The method further comprises: Obtaining a second loss of the recommendation model, where the second loss is a loss obtained when the recommendation model is fed forward according to the first operation data; The second loss is adjusted according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update parameters of the recommendation model.

11. A data processing device, characterized in that: The device comprises: an acquisition module, configured to acquire an operation log, wherein the operation log includes first operation data of a user in a first recommendation scenario, wherein the first operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the first recommendation scenario; A feature extraction module, configured to obtain a first feature representation and a second feature representation through a first feature extraction network and a second feature extraction network respectively according to the first operation data; a tendency information calculation module, configured to obtain first tendency information through a first task network according to the first feature representation, wherein the first tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; and obtain second tendency information through a second task network according to the second feature representation, wherein the second tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; a weight determination module, configured to obtain, according to the first operation data, a first weight of the first tendency information and a second weight of the second tendency information through a first gating network; A fusion module is used to fuse the first tendency information and the second tendency information according to the first weight and the second weight to obtain first target tendency information, wherein the first target tendency information is used to indicate the influence of the recommended position in the first recommendation scenario on the user's operation behavior.

12. The device according to claim 11, characterized in that The feature extraction module is specifically used for: According to the first operation data, obtaining a first initial feature representation and a second initial feature representation through a first feature extraction network and a second feature extraction network respectively; According to the first operation data, a third weight of the first initial feature representation and a fourth weight of the second initial feature representation are obtained through a second gating network respectively; fusing the first initial feature representation and the second initial feature representation according to the third weight and the fourth weight to obtain the first feature representation; According to the first operation data, obtaining a fifth weight of the first initial feature representation and a sixth weight of the second initial feature representation respectively through a third gating network; The first initial feature representation and the second initial feature representation are fused according to the fifth weight and the sixth weight to obtain the second feature representation.

13. The device according to claim 11 or 12, characterized in that The operation log also includes second operation data of the user in the second recommendation scenario, wherein the second operation data includes operation data of the user when the same recommendation object or a recommendation object with a similarity higher than a threshold is in different recommendation positions in the second recommendation scenario; The feature extraction module is specifically used for: According to the second operation data, obtaining a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively; The tendency information calculation module is specifically used for: According to the third feature representation, third tendency information is obtained through the first task network, and the third tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; according to the fourth feature representation, fourth tendency information is obtained through the second task network, and the fourth tendency information is used to represent the influence of the recommended position in the recommendation scenario on the user's operation behavior; The weight determination module is specifically configured to: obtain, according to the second operation data, through the first gating network, respectively a seventh weight of the third tendency information and an eighth weight of the fourth tendency information; The fusion module is specifically used for: According to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to obtain second target tendency information, wherein the second target tendency information is used to represent the influence of the recommended position in the second recommendation scenario on the user's operation behavior, and the second target tendency information is used to train the recommendation model.

14. The device according to claim 11 or 12, characterized in that The fusion includes: weighted summation.

15. The device according to claim 11 or 12, characterized in that The first task network or the second task network is a context-dependent position bias model (CPBM).

16. The device according to claim 11 or 12, characterized in that The first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).

17. The device according to claim 11 or 12, characterized in that The acquisition module is further used for: Obtaining a first ground truth of the tendency information corresponding to the first operation data; The device also includes: A model training module is used to determine a first loss according to the first tendency information and the first true value, and update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network according to the first loss.

18. The device according to claim 13, characterized in that The acquisition module is further used for: Acquire a second true value of the tendency information corresponding to the second operation data; The device also includes: A model training module is used to determine a second loss according to the second tendency information and the second true value, and to update parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network according to the second loss.

19. The device according to claim 17, characterized in that The acquisition module is also used for: Get the first convergence degree; The device also includes: a loss adjustment module, configured to adjust the first loss according to the first convergence degree to obtain an adjusted first loss, wherein the adjusted first loss is negatively correlated with the first convergence degree; The model training module is specifically used for: According to the adjusted first loss, parameters of the first feature extraction network, the second feature extraction network, the first task network, the second task network, and the first gating network are updated.

20. The device according to claim 11 or 12, characterized in that The acquisition module is also used for: Obtaining a second loss of the recommendation model, where the second loss is a loss obtained when the recommendation model is fed forward according to the first operation data; The device also includes: A loss adjustment module is used to adjust the second loss according to the first tendency information to obtain an adjusted second loss, and the adjusted second loss is used to update the parameters of the recommendation model.

21. A computing device, characterized in that The computing device includes a memory and a processor; the memory stores codes, and the processor is configured to obtain the codes and execute the method according to any one of claims 1 to 10.

22. A computer storage medium, characterized in that The computer storage medium stores one or more instructions, which, when executed by one or more computers, enable the one or more computers to implement the method of any one of claims 1 to 10.

23. A computer program product comprising code, characterized in that When the code is executed, it is used to implement the method according to any one of claims 1 to 10.