WO2023185925A1 - 一种数据处理方法及相关装置 - Google Patents

一种数据处理方法及相关装置 Download PDF

Info

Publication number
WO2023185925A1
WO2023185925A1 PCT/CN2023/084704 CN2023084704W WO2023185925A1 WO 2023185925 A1 WO2023185925 A1 WO 2023185925A1 CN 2023084704 W CN2023084704 W CN 2023084704W WO 2023185925 A1 WO2023185925 A1 WO 2023185925A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
tendency information
weight
recommendation
operation data
Prior art date
Application number
PCT/CN2023/084704
Other languages
English (en)
French (fr)
Inventor
赖金财
曹泽麟
董振华
徐君
何秀强
Original Assignee
华为技术有限公司
中国人民大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司, 中国人民大学 filed Critical 华为技术有限公司
Publication of WO2023185925A1 publication Critical patent/WO2023185925A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • This application relates to the field of artificial intelligence, and in particular, to a data processing method and related devices.
  • Artificial intelligence is a 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.
  • artificial intelligence is a branch of computer science that attempts to understand the nature of intelligence and produce a new class of intelligent machines that can respond in a manner similar to human intelligence.
  • Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
  • 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 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, users' operations are often biased. Users tend to operate the top-ranked objects. If the recommendation model is trained only based on the user's operation log, the recommendation model cannot accurately learn the real correlation between the user's true intention and the recommended object. sex. The important reason is that there is a serious position-bias in the system.
  • the search scenario as an example, the user enters the search system and enters query words in the search box, and the system will immediately feedback the query results and present them on the user interaction interface.
  • the position bias needs to be corrected during the offline training process to eliminate the influence of position-bias.
  • Inverse probability weighting inverse propensity score, IPS
  • IPS inverse propensity score
  • the position offset is also different.
  • multiple objects that the user wants to operate at this time can be actively recommended.
  • the location offset can be recommended based on the search terms entered by the user. There are multiple objects related to the search term.
  • the position offsets of different positions are also different.
  • a contextual position-based model (CPBM) is used to calculate the position bias (or tendency information).
  • the existing solution is based on multiple The same CPBM is trained based on the operation data of the scene.
  • the prediction accuracy of the tendency information will decrease.
  • this application provides a data processing method.
  • the method includes: obtaining an operation log.
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same Or the user's operation data when the recommended object with a similarity higher than the threshold is at different recommended positions in the first recommendation scene; according to the first operation data, through the first feature extraction network and the second feature extraction network respectively, we obtain The first feature representation and the second feature representation; according to the first feature representation, through the first task network, the first tendency information is obtained, and the first tendency information is used to represent the operation of the recommended location for the user in the recommendation scenario.
  • second tendency information is obtained through the second task network, and the second tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scene;
  • the first weight of the first tendency information and the second weight of the second tendency information are respectively obtained through the first gating network; according to the first weight and the second Weight, fuse the first tendency information and the second tendency information to obtain the first target tendency information, the first target tendency information is used to represent the recommended position in the first recommendation scene Regarding the impact on the user's operating behavior, the first target preference information is used to train the recommendation model.
  • 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 offset (first target tendency) of the first recommendation scenario. sexual information).
  • the first gating network can identify the output of each task network and fuse the information related to the first recommendation scenario through numerical control of weights.
  • it can learn the correlation between different recommendation scenarios, and on the other hand, it can learn the correlation between different recommendation scenarios.
  • the method based on dynamic weights can reduce the interference between different recommended scenarios, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in a single-task model in the case of joint modeling of multiple scenarios. .
  • obtaining 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: according to the first feature extraction network The operation data passes through the first feature extraction network and the second feature extraction network respectively to obtain the first initial feature representation and the second initial feature representation; according to the first operation data, through the second gating network, the first initial feature representation and the second initial feature representation are respectively obtained.
  • the third weight of an initial feature representation and the fourth weight of the second initial feature representation; according to the third weight and the fourth weight, the first initial feature representation and the second initial feature representation Fusion is performed to obtain the first feature representation; according to the first operation data, through the third gating network, the fifth weight of the first initial feature representation and the fifth weight of the second initial feature representation are respectively obtained.
  • Six weights; according to the fifth weight and the sixth weight, the first initial feature representation and the second initial feature representation are fused to obtain the second feature representation.
  • the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the same recommendation object or a similarity higher than a threshold in the second recommendation scenario.
  • the user's operation data at different recommended positions in the recommendation scene; the method also includes: according to the second operation data, obtaining a third feature representation through the first feature extraction network and the second feature extraction network respectively. and a fourth feature representation; 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 impact of the recommended location on the user's operating behavior in the recommendation scenario. Influence; according to the fourth characteristic expression, through all The second task network is used to obtain fourth tendency information.
  • the fourth tendency information is used to represent the impact of the recommended location on the user's operation behavior in the recommendation scene; according to the second operation data, through the first gate Control the network to obtain the seventh weight of the third tendency information and the eighth weight of the fourth tendency information respectively; according to the seventh weight and the eighth weight, the third tendency information is It is fused with the fourth tendency information to obtain the second target tendency information.
  • the second target tendency information is used to represent the impact of the recommended location on the user's operating behavior in the second recommendation scenario.
  • the second target preference information is used to train the recommendation model.
  • the fusion includes: weighted summation.
  • the first task network or the second task network is a context-dependent position bias model (CPBM).
  • CPBM context-dependent position bias model
  • the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).
  • MLP multi-layer perceptron
  • the method further includes: obtaining a first truth value (groundtruth) of the tendency information corresponding to the first operation data; according to the first tendency information and the first ground truth , determine the first loss, and perform the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gate according to the first loss. control network to update parameters.
  • a first truth value groundtruth
  • the method further includes: obtaining a second true value of the tendency information corresponding to the second operation data; and determining a third true value according to the second tendency information and the second true value.
  • Two losses, and according to the second loss, perform the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network. Parameters updated.
  • the losses obtained from each recommended scenario can be fused (for example, addition operation), and the parameters can be updated based on the fused losses. Since the click-through rate and observation tendency score of each position in different scenes are different, MCPBM has different convergence speeds when training with different scene data, and uses exponential weighting to adjust the weight of different tasks.
  • the method further includes: obtaining a first degree of convergence; adjusting the first loss according to the first degree of convergence to obtain an adjusted first loss, where the adjusted The first loss is negatively related to the first degree of convergence; according to the first loss, the first feature extraction network, the second feature extraction network, the first task network, the second Performing parameter updates on the task network and the first gating network includes: based on the adjusted first loss, updating the first feature extraction network, the second feature extraction network, the first task network, The second task network and the first gating network perform parameter updates.
  • the weight of the loss function can be set smaller, and for recommendation scenarios with a lower degree of convergence, the weight of the loss function can be set higher, thus making The convergence progress of each recommended scenario remains basically the same, improving the accuracy of model prediction.
  • the method further includes:
  • the second loss is a loss obtained when the recommendation model is fed forward based on 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.
  • this application provides a data processing device, which includes:
  • An acquisition module configured to acquire an operation log, which includes the user's first operation data in the first recommendation scenario, and the first operation data includes the same recommendation object or a recommendation object with a similarity higher than a threshold in the first recommendation scenario.
  • User operation data when recommending different recommended locations in the scenario;
  • a feature extraction module configured to obtain 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
  • a tendency information calculation module configured to obtain first tendency information through a first task network according to the first feature representation, where the first tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario. Impact; According to the second feature representation, second tendency information is obtained through the second task network, and the second tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • a weight determination module configured to obtain the first weight of the first tendency information and the second weight of the second tendency information through the first gating network according to the first operation data
  • a fusion module configured 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, the first The target tendency information is used to represent the impact of the recommended position in the first recommendation scene on the user's operating behavior, and the first target tendency information is used to train the recommendation model.
  • the feature extraction module is specifically used to:
  • the first operation data obtain the first initial feature representation and the second initial feature representation through the first feature extraction network and the second feature extraction network respectively;
  • the third weight of the first initial feature representation and the fourth weight of the second initial feature representation are respectively obtained;
  • the first initial feature representation and the second initial feature representation are fused to obtain the first feature representation
  • the fifth weight of the first initial feature representation and the sixth weight of the second initial feature representation are respectively obtained through the third gating network;
  • the first initial feature representation and the second initial feature representation are fused to obtain the second feature representation.
  • the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the same recommendation object or a similarity higher than a threshold in the second recommendation scenario. Not recommended in scenarios The user’s operation data when using the same recommended location;
  • the feature extraction module is specifically used for:
  • the second operation data obtain 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:
  • third tendency information is obtained through the first task network, and the third tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scene;
  • the fourth tendency information is obtained through the second task network, and the fourth tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • the weight determination module is specifically configured to obtain the seventh weight of the third tendency information and the seventh weight of the fourth tendency information through the first gating network according to the second operation data. Eight weights;
  • the fusion module is specifically used for:
  • the third tendency information and the fourth tendency information are fused to obtain second target tendency information, where the second target tendency information is In order to represent the impact of the recommended position on the user's operating behavior in the second recommendation scenario, the second target preference information is used to train the recommendation model.
  • the fusion includes: weighted summation.
  • the first task network or the second task network is a context-dependent position bias model (CPBM).
  • CPBM context-dependent position bias model
  • the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).
  • MLP multi-layer perceptron
  • the acquisition module is also used to:
  • the device also includes:
  • a model training module configured to determine a first loss based on the first tendency information and the first true value, and to perform training on the first feature extraction network and the second feature extraction network based on the first loss.
  • the network, the first task network, the second task network and the first gating network perform parameter updates.
  • the acquisition module is also used to:
  • the model training module is further configured to determine a second loss based on the second tendency information and the second true value, and to perform the training on the first feature extraction network and the third feature extraction network based on the second loss.
  • the two feature extraction networks, the first task network, the second task network and the first gating network perform parameter updates.
  • the acquisition module is also used to:
  • the device also includes:
  • a loss adjustment module configured to adjust the first loss according to the first degree of convergence to obtain an adjusted first loss, where the adjusted first loss is negatively correlated with the first degree of convergence;
  • the model training module is specifically used for:
  • parameters are performed on the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network. renew.
  • the acquisition module is also used to:
  • the second loss is a loss obtained when the recommendation model is fed forward based on the first operation data
  • the loss adjustment module is also configured 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 adjust the recommendation
  • the model is updated with parameters.
  • embodiments of the present application provide a data processing device, which may include a memory, a processor, and a bus system.
  • the memory is used to store programs
  • the processor is used to execute programs in the memory to perform the above-mentioned first aspect. Any optional method.
  • a training device which may include a memory, a processor, and a bus system.
  • the memory is used to store programs
  • the processor is used to execute programs in the memory to perform any of the above-mentioned tasks in the first aspect.
  • embodiments of the present application provide a computer-readable storage medium that stores a computer program that, when run on a computer, causes the computer to execute the first aspect and any of the above-mentioned aspects. method of selection.
  • embodiments of the present application provide a computer program product, including code, used to implement the above first aspect and any optional method when the code is executed.
  • 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, for example, sending or processing data involved in the above methods; Or, information.
  • the chip system further includes a memory, and the memory is used to store necessary program instructions and data for executing the device or training the device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • An embodiment of the present application provides a data processing method.
  • the method includes: obtaining an operation log.
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same or similar data.
  • the user's operation data when the recommended object with a degree higher than the threshold is at different recommendation positions in the first recommendation scene; according to the first operation data, the first feature extraction network and the second feature extraction network are used to obtain the first Feature representation and second feature representation; according to the first feature representation, through the first task network, first tendency information is obtained, and the first tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario.
  • the second tendency information is obtained, and the second tendency information is used to represent the impact of the recommended location on the user's operation behavior in the recommendation scene
  • the first operation data through the first Gating network, respectively obtains the first weight of the first tendency information and the second weight of the second tendency information
  • the first tendency is The information and the second tendency information are fused to obtain the first target tendency information, and the first target tendency information is used to represent the impact of the recommended location on the user's operating behavior in the first recommendation scene, so The first target preference information is used to train the recommendation model.
  • 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 offset (first target tendency) of the first recommendation scenario. sexual information).
  • the first gating network can identify the output of each task network and fuse the information related to the first recommendation scenario through numerical control of weights.
  • it can learn the correlation between different recommendation scenarios, and on the other hand, it can learn the correlation between different recommendation scenarios.
  • the method based on dynamic weights can reduce the interference between different recommended scenarios, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in a single-task model in the case of joint modeling of multiple scenarios. .
  • Figure 1 is a structural schematic diagram of the main framework of artificial intelligence
  • Figure 2 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • Figure 3 is a schematic diagram of an information recommendation process provided by an embodiment of the present application.
  • Figure 4 is a schematic flow chart of a data processing method provided by an embodiment of the present application.
  • Figure 5 is a schematic structural diagram of a model provided by an embodiment of the present application.
  • Figure 6 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 7 is a schematic diagram of an execution device provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of a training device provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a chip provided by an embodiment of the present application.
  • Figure 1 shows a structural schematic diagram of the artificial intelligence main framework.
  • the following is from the “intelligent information chain” (horizontal axis) and “IT value chain” ( vertical axis) two Dimension elaborates on the above artificial intelligence theme framework.
  • the "intelligent information chain” reflects a series of processes from data acquisition to processing. For example, it can be the 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 gone through the 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 and information (providing and processing technology implementation) to the systematic industrial ecological process.
  • Infrastructure provides computing power support for artificial intelligence systems, enables communication with the external world, and supports it through basic platforms.
  • computing power is provided by smart chips (hardware acceleration chips such as CPU, NPU, GPU, ASIC, FPGA, etc.);
  • the basic platform includes distributed computing framework and network and other related platform guarantees and support, which can include cloud storage and Computing, interconnection networks, etc.
  • sensors communicate with the outside world to obtain data, which are provided to smart chips in the distributed computing system provided by the basic platform for calculation.
  • Data from the upper layer of the infrastructure is used to represent data sources in the field of artificial intelligence.
  • the data involves graphics, images, voice, and text, as well as IoT data of traditional devices, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
  • machine learning and deep learning can perform symbolic and formal intelligent information modeling, extraction, preprocessing, training, etc. on data.
  • Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formal information to perform machine thinking and problem solving based on reasoning control strategies. Typical functions are search and matching.
  • Decision-making refers to the process of decision-making after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
  • some general capabilities can be formed based on the results of further data processing, such as algorithms or a general system, such as translation, text analysis, computer vision processing, speech recognition, and image processing. identification, etc.
  • Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of overall artificial intelligence solutions, productizing intelligent information decision-making and realizing practical applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart healthcare, autonomous driving, smart cities, etc.
  • Embodiments of the present application can be applied to the field of information recommendation. Specifically, they can be applied to application markets, music playback recommendations, video playback recommendations, reading recommendations, news information recommendations, and information recommendations in web pages.
  • This application can be applied to a recommendation system.
  • the recommendation system can determine recommended objects based on the recommendation method provided by this application.
  • the recommended objects can be, for example, but are not limited to, applications (APPs), audio and video, web pages, news information and other items.
  • information recommendation can include processes such as prediction and recommendation.
  • prediction needs to solve the problem of predicting the user's preference for each item, which can be reflected by the probability of the user selecting the item.
  • Recommendation can be to sort the recommended objects according to the predicted results, for example, according to the predicted degree of preference, according to the degree of preference Sort from high to low, and recommend information to users based on the sorting results.
  • the recommendation system can recommend applications to users based on the sorting results.
  • the recommendation system can recommend music to users based on the sorting results.
  • the recommendation system can recommend videos to users based on the sorting results.
  • FIG. 2 is a schematic diagram of the system architecture provided by an embodiment of the present application.
  • 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.
  • the execution device 510 includes a computing module 511, an I/O interface 512, a preprocessing module 513 and a preprocessing module 514.
  • the target model/rule 501 may be included in the calculation module 511, and the preprocessing module 513 and the preprocessing module 514 are optional.
  • Data collection device 560 is used to collect training samples.
  • the training sample may be the user's historical operation record, and the historical operation record may be the user's behavior log (or called an operation log).
  • the operation log may include the user's operation information on items, where , the operation information may include the operation type, the user's identification, and the item's identification.
  • the operation type may include but is not limited to click, purchase, return, add to shopping cart, etc.
  • the operation type can be, but is not limited to, click, download, etc.
  • the operation log may include the user's first operation data in the first recommendation scenario, and the user's second operation data in the first recommendation scenario.
  • the training samples can be the data used to train the multi-gate contextual position-based model (MCPBM) based on contextual information, or the initialized recommendation model.
  • MCPBM multi-gate contextual position-based model
  • the data collection device 560 After collecting the training samples, stores the training samples into the database 530 .
  • 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.
  • the target model/rule 501 may be the trained MCPBM.
  • the MCPBM may obtain the position bias in a recommended scene based on the user's operation data of the scene (such as the tendency in the embodiment of the present application). information), the target model/rule 501 can be a recommendation model.
  • the recommendation model can predict the probability that the user performs an operation corresponding to the operation type on the item based on the user's operation information on the item. This probability can be used to recommend information.
  • the training samples maintained in the database 530 are not necessarily collected by the data collection device 560 , and may also be received from other devices, or based on the data collected by the data collection device 560 . Obtained by data expansion (for example, the second operation type of the target user on the first item in the embodiment of the present application).
  • the training device 520 may not necessarily train the target model/rules 501 based entirely on the training samples maintained by the database 530. It may also obtain training samples from the cloud or other places for model training. The above description should not be used as a guarantee for this application. Limitations of Examples.
  • the target model/rules 501 trained according to the training device 520 can be applied to different systems or devices, such as to the execution device 510 shown in Figure 2.
  • the execution device 510 can be a terminal, such as a mobile phone terminal, a tablet computer, Laptops, augmented reality (AR)/virtual reality (VR) devices, vehicle-mounted terminals, etc., or servers or clouds, etc.
  • AR augmented reality
  • VR virtual reality
  • the execution device 510 is configured with an input/output (I/O) interface 512 for data interaction with external devices.
  • the user can input data to the I/O interface 512 through the client device 540 (for example, this Operation logs in application examples, etc.).
  • the preprocessing module 513 and the preprocessing module 514 are used to perform preprocessing according to the input data received by the I/O interface 512. It should be understood that there may be no preprocessing module 513 and 514 or only one preprocessing module. When the preprocessing module 513 and the preprocessing module 514 do not exist, the computing module 511 can be directly used to process the input data.
  • the execution device 510 When the execution device 510 preprocesses input data, or when the calculation module 511 of the execution device 510 performs calculations and other related processes, the execution device 510 can call data, codes, etc. in the data storage system 550 for corresponding processing. , the data, instructions, etc. obtained by corresponding processing can also be stored in the data storage system 550.
  • the I/O interface 512 presents the processing results to the client device 540, thereby providing them to the user.
  • 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.
  • the execution device 510 may include hardware circuits (such as application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), general-purpose processors, digital signal processors (digital signal processing, DSP, microprocessor or microcontroller, etc.), or a combination of these hardware circuits.
  • ASICs application specific integrated circuits
  • FPGAs field-programmable gate arrays
  • DSP digital signal processors
  • the execution device 510 can be a hardware system with the function of executing instructions, such as a CPU, DSP, etc., or it can be a combination of other hardware circuits.
  • a hardware system with the function of executing instructions such as ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without the function of executing instructions and a hardware system with the function of executing instructions.
  • the execution device 510 can be a hardware system with the function of executing instructions.
  • the information recommendation method provided by the embodiment of the present application can be a software code stored in the data storage system 550.
  • the execution device 510 can obtain it from the data storage system 550. software code, and execute the obtained software code to implement the data processing method provided by the embodiment of this application.
  • 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 by the embodiment of the present application can also be implemented by the execution device 510 that does not have the function of executing instructions.
  • the hardware system is implemented, which is not limited here.
  • the user can manually set input data, and the "manually given input data" can be operated through the interface provided by the I/O interface 512 .
  • the client device 540 can automatically send input data to the I/O interface 512. If requiring the client device 540 to automatically send the input data requires the user's authorization, the user can set corresponding permissions 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 may be display, sound, action, etc.
  • the client device 540 can also be used as a data collection 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 new sample data, and store them in the database 530.
  • the I/O interface 512 directly uses the input data input to the I/O interface 512 and the output result of the output I/O interface 512 as a new sample as shown in the figure.
  • the data is stored in database 530.
  • Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the positional relationship between the devices, devices, modules, etc. shown in the figure does not constitute any limitation.
  • the data Storage system 550 relative The execution device 510 is an external memory.
  • the data storage system 550 can also be placed in the execution device 510 .
  • the above execution device 510 may be deployed in the client device 540.
  • CTR Click-throughrate
  • Click probability also known as click-through rate
  • Click-through rate refers to the ratio of the number of clicks and the number of exposures to recommended information (for example, recommended items) on a website or application. Click-through rate is usually an important indicator for measuring recommendation systems in recommendation systems.
  • a personalized recommendation system refers to a system that uses machine learning algorithms to analyze based on the user's historical data (such as the operation information in the embodiment of this application), and uses this to predict new requests and provide personalized recommendation results.
  • Offline training refers to a module in the 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 embodiments of this application) until the set requirements are met.
  • Online prediction refers to predicting the user's preference for recommended items in the current context based on the characteristics of users, items and context based on offline trained models, and predicting the probability of users choosing recommended items.
  • Position bias In search/advertisement/recommendation systems, users' implicit feedback data are used to model ranking models. When users view the displayed documents, due to their different positions, the user's attention is also If they are not the same, it will lead to position bias, that is, users tend to interact with documents with better positions in the search result list, and the user's position bias tendency has nothing to do with whether the document can reflect the user's true intention.
  • 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 performance of the model in one or more tasks can be improved. Learning efficiency and performance metrics.
  • FIG. 3 is a schematic diagram of a recommendation system provided by an embodiment of the present application.
  • the recommendation system will input the request and its related information (such as the operation information in the embodiment of this application) into the recommendation model, and then predict the user's response to the system.
  • the items are arranged 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 locations in order as a recommendation result to the user.
  • Users browse different located items and perform user actions such as browsing, selection, and downloading.
  • the user's actual behavior will be stored in the log as training data, and the parameters of the recommended model will be continuously updated through the offline training module to improve the prediction effect of the model.
  • the recommendation system in the application market can be triggered.
  • the recommendation system of the application market will predict the probability of users downloading each recommended candidate APP based on the user's historical behavior logs, 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. .
  • the recommendation system of the application market can display the candidate APPs in descending order according to the predicted probability value, thereby increasing the download probability of the candidate APPs.
  • APPs with a higher predicted user selection rate may be displayed in the front recommendation position
  • APPs with a lower predicted user selection rate may be displayed in the lower recommendation position
  • the above recommendation model may be a neural network model.
  • the relevant terms and concepts of neural networks that may be involved in the embodiments of this application are introduced below.
  • the neural network can be composed of neural units.
  • the neural unit can refer to an operation unit that takes xs (ie, input data) and intercept 1 as input.
  • the output of the operation unit can be:
  • s 1, 2,...n, n is a natural number greater than 1
  • Ws is the weight of xs
  • 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 an output signal.
  • the output signal of this activation function can be used as the input of the next convolutional layer, and the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting multiple above-mentioned single neural units together, 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 features of the local receptive field.
  • the local receptive field can be an area composed of several neural units.
  • Deep Neural Network also known as multi-layer neural network
  • DNN Deep Neural Network
  • the neural network inside DNN can be divided into three categories: input layer, hidden layer, and output layer.
  • the first layer is the input layer
  • the last layer is the output layer
  • the layers in between are hidden layers.
  • the layers are fully connected, that is to say, any neuron in the i-th layer must be connected to any neuron in the i+1-th layer.
  • the coefficient from the k-th neuron in layer L-1 to the j-th neuron in layer L is defined as It should be noted that the input layer has no W parameter.
  • more hidden layers make the network more capable of describing complex situations in the real world. Theoretically, a model with more parameters has higher complexity and greater "capacity", which means it can complete more complex learning tasks.
  • Training a deep neural network is the process of learning the weight matrix. The ultimate goal is to obtain the weight matrix of all layers of the trained deep neural network (a weight matrix formed by the vectors W of many layers).
  • loss function loss function
  • objective function object function
  • 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, forward propagation of the input signal until the output will produce an error loss, and backward propagation of the error loss information is used to update the parameters in the initial model, so that the error loss converges.
  • the backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain optimal model parameters, such as weight matrices.
  • 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 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, users' operations are often biased. Users tend to operate the top-ranked objects. If the recommendation model is trained only based on the user's operation log, the recommendation model cannot accurately learn the real correlation between the user's true intention and the recommended object. sex. The important reason is that there is a serious position-bias in the system.
  • the search scenario as an example, the user enters the search system and enters query words in the search box, and the system will immediately feedback the query results and present them on the user interaction interface.
  • the position bias needs to be corrected during the offline training process to eliminate the influence of position-bias.
  • Inverse probability weighting inverse propensity score, IPS
  • IPS inverse propensity score
  • the position offset is also different.
  • multiple objects that the user wants to operate at this time can be actively recommended.
  • the location offset can be recommended based on the search terms entered by the user. There are multiple objects related to the search term.
  • the position offsets of different positions are also different.
  • a contextual position-based model (CPBM) is used to calculate the position bias (or tendency information).
  • the existing solution is based on multiple The same CPBM is trained based on the operation data of the scene.
  • the prediction accuracy of the tendency information will decrease.
  • the data processing method provided by this application can solve the problem that in the case of multi-scenario joint modeling, the single-task model is affected by the different distributions between data, resulting in a decrease in prediction accuracy.
  • Figure 4 is a schematic diagram of an embodiment of a data processing method provided by an embodiment of the present application.
  • a data processing method provided by an embodiment of the present application includes:
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same recommendation object or a recommendation object with a similarity higher than a threshold in the first recommendation scenario.
  • 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 tablet) or laptop device, multi-processor system, game console or controller, microprocessor-based system, set-top box, programmable consumer electronics, mobile phone, wearable or accessory form factor (e.g., watch, glasses, headsets, or earbuds), network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like.
  • a mobile or portable computing device such as a smart phone
  • a personal computer such as a server computer
  • a handheld device such as tablet
  • microprocessor-based system such as tablet
  • set-top box such as programmable consumer electronics
  • mobile phone wearable or accessory form factor
  • network PCs e.g., watch, glasses, headsets, or earbuds
  • minicomputers
  • the execution subject of step 401 can be a server on the cloud side, and the server can receive the operation log sent from the terminal device, and then the server can obtain the operation log.
  • the execution device may obtain an operation log.
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same recommendation or a recommendation with a similarity higher than a threshold.
  • the user's operation data when the object is in different recommended positions in the first recommendation scene.
  • the model will be continuously updated iteratively or there will be different types of recommendation models, which will produce data in which different recommendation algorithms process similar search content and obtain different recommendation results.
  • intervention harvesting can be used to obtain data with differential recommendation results.
  • Intervention harvesting uses a natural intervention strategy and focuses on the differences in document ranking when users interact with different recommendation algorithms to mine a location being observed. The probability. Taking advantage of the differences in different sorting algorithms, we collect data on user clicks on the same item at different locations under the same search terms. At this time, the relevance of the items is the same, and user clicks are only related to the position offset.
  • the user's first operation data in the first recommendation scenario can be obtained, where the first operation data can be the data with differential recommendation results described above, that is, the first operation data includes the same
  • the user's operation data when one or a recommendation object whose similarity is higher than the threshold is in different recommendation positions in the first recommendation scene.
  • the position offset that is, the tendency information
  • the operation data may include the user's operation results for multiple objects recommended by the recommendation model.
  • the objects may also be described as items, and the items may be physical items or virtual items, such as APPs, audio and video, web pages, and news.
  • Items such as information, the attribute information of the item can be at least one of the item name, developer, installation package size, category and rating.
  • the item category can be chat, parkour Games, offices, etc.
  • the rating can be ratings, comments, etc. for items; this application is not limited to items The specific type of attribute information.
  • the operation result may include whether to operate or the operation type of the operation.
  • the operation type may be the user's behavior operation type for the item.
  • users On network platforms and applications, users often have a variety of interaction forms with items (that is, there are Multiple operation types), such as browsing, clicking, adding to shopping cart, purchasing and other operation types in user behavior on e-commerce platforms. These diverse behaviors reflect user preferences and are very helpful in accurately characterizing user characteristics.
  • the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the same recommendation object or a similarity higher than a threshold in the second recommendation scenario.
  • User operation data when recommending different recommended locations in the scenario.
  • the operation log also includes the user's operation data in other than the first recommendation scenario and the second recommendation scenario, which is not limited by the embodiments of the present application.
  • the operation data can be context information.
  • the first feature extraction network or the second feature extraction network are different feature extraction networks. That is to say, the operation data can be input to multiple feature extraction networks respectively to obtain multiple feature representations.
  • the first feature extraction network or the second feature extraction network is a network including a multilayer perceptron (MLP).
  • MLP multilayer perceptron
  • obtaining 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: according to the third An operation data passes through the first feature extraction network and the second feature extraction network respectively to obtain the first initial feature representation and the second initial feature representation; according to the first operation data, through the second gating network, the said The third weight of the first initial feature representation and the fourth weight of the second initial feature representation; according to the third weight and the fourth weight, the first initial feature representation and the second initial feature The representations are fused to obtain the first feature representation; according to the first operation data, through the third gating network, the fifth weight of the first initial feature representation and the fifth weight of the second initial feature representation are respectively obtained. Sixth weight: fuse 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.
  • 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 third weight (corresponding to the first initial feature representation) can be obtained through the second gating network.
  • feature representation) and the fourth weight (corresponding to the second initial feature representation) are fused to obtain the first feature representation.
  • 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 can be used for the third initial feature representation and the fourth initial feature representation. Fusion is performed to obtain the second feature representation.
  • FIG. 5 is a schematic structural diagram of a network model provided by an embodiment of the present application.
  • the feature extraction network can be called an expert network.
  • Each expert network is composed of multi-layer perceptrons (MLP).
  • the input of the expert network Expert i can be the contextual information of all scenes (for example, it can include the first operation data); while the gate control network Gate i is used to select the weighted output of multiple expert networks as the input of the upper layer network.
  • Each gate network The input is for all scenarios Contextual information (which may include first operational data, for example).
  • the weight calculation can be as shown in formula (1).
  • This flexible information sharing method has the functions of information selection and information isolation, and can transfer the information that needs to be shared to the upper task layer network.
  • G i softmax(X 1 ,X 2 ,...,X N ) (1);
  • the third feature representation and the fourth feature representation can be obtained through the first feature extraction network and the second feature extraction network respectively according to the second operation data.
  • the third feature representation and the fourth feature representation are obtained through the first feature extraction network and the second feature extraction network respectively according to the second operation data, specifically including: According to the second operation data, the third initial feature representation and the fourth initial feature representation are obtained through the first feature extraction network and the second feature extraction network respectively; according to the second operation data, through the second gating Network, respectively obtain the weight of the third initial feature representation and the weight of the fourth initial feature representation; according to the weight of the third initial feature representation and the weight of the fourth initial feature representation, the third initial feature representation and the fourth initial feature representation are fused to obtain the third feature representation; according to the second operation data, through the third gating network, the weights of the third initial feature representation and the The weight of the fourth initial feature representation; according to the weight of the third initial feature representation and the weight of the fourth initial feature representation, fuse the third initial feature representation and the fourth initial feature representation to obtain The fourth characteristic represents.
  • first tendency information is obtained through the first task network.
  • the first tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario.
  • the first task network or the second task network may be a context-dependent position bias model (CPBM).
  • CPBM can explicitly introduce context features.
  • Position bias will be affected by context features (such as query categories), and then specifically use propensity Model to estimate the relationship between position preference scores and context features. .
  • the first tendency information may include the position offset of each recommended position in the recommended scene, that is, the impact of the position on the user's operation behavior.
  • the first recommendation scene may include multiple recommended locations (for example, multiple recommended objects may be displayed in the first recommendation scene, and the location of each recommended object is the recommended location).
  • the second feature representation obtain second tendency information through the second task network.
  • the second tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario.
  • the first task network and the second task network may be different task networks, for example, they may be different CPBMs.
  • the second tendency information may include the position offset of each recommended position in the recommended scene, that is, the impact of the position on the user's operation behavior.
  • the first recommendation scene may include multiple recommended locations (for example, multiple recommended objects may be displayed in the first recommendation scene, and the location of each recommended object is the recommended location).
  • the third tendency can be obtained through the first task network according to the third feature representation.
  • the third tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario; according to the fourth feature table Indicates that through the second task network, fourth tendency information is obtained, and the fourth tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scene.
  • the first operation data obtain the first weight of the first tendency information and the second weight of the second tendency information through the first gating network.
  • the first tendency information and the second tendency information can be fused, and the fusion result can be used as the tendency information of the first recommendation scenario (for example, the first target tendency information in the embodiment of this application) .
  • the first tendency information in order to fuse the first tendency information and the second tendency information, can be obtained respectively through the first gating network according to the first operation data.
  • the first weight and the second weight of the second tendency information Furthermore, the first tendency information and the second tendency information may be fused (for example, weighted summation) according to the first weight and the second weight to obtain the first target tendency information.
  • the first task network and the second task network may belong to a task layer (task layer), where each task network may be composed of a CPBM model and used to estimate the propensity score of each scenario. Similar to the expert layer network, the task layer network also has a gating network that is used to estimate the weight of each task network (CPBM) and is used to capture the similarity at the label level.
  • the output Yi of task layer Task i can be:
  • first weight and the second weight fuse the first tendency information and the second tendency information to obtain first target tendency information.
  • the first target tendency The information is used to represent the impact of the recommended location in the first recommendation scenario on the user's operating behavior, and the first target preference information is used to train the recommendation model.
  • the fusion includes: weighted summation.
  • the third tendency information can be obtained respectively through the first gating network according to the second operation data.
  • the seventh weight of and the eighth weight of the fourth tendency information; according to the seventh weight and the eighth weight, the third tendency information and the fourth tendency information are fused to Second target tendency information is obtained, the second target tendency information is used to represent the impact of the recommended position on the user's operating behavior in the second recommendation scene, and the second target tendency information is used to train the recommendation model.
  • the first target preference information is used to represent the impact of the recommended location on the user's operating behavior in the first recommendation scenario, and the first target preference information is used to train the recommendation model.
  • the first target preference information can be used as a position offset of the first recommendation scene.
  • the second loss of the recommendation model can be obtained.
  • the second loss is the loss obtained when the recommendation model is fed forward according to the first operation data; according to the The first tendency information is used to adjust the second loss to obtain an adjusted second loss, and the adjusted second loss is used to update parameters of the recommendation model.
  • each sample in the biased data set can be weighted by dividing it by the corresponding propensity score
  • the first term is the regular term, which constrains the learnable parameter W in the training model through the hyperparameter ⁇ ;
  • the second term is the model loss term, y l represents the true label of the l-th sample,
  • the code model predicts the label of the sample, z l represents the inverse propensity score corresponding to the position feature of the sample.
  • 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 offset (first target tendency) of the first recommendation scenario. sexual information).
  • the first gating network can identify the output of each task network and fuse the information related to the first recommendation scenario through numerical control of weights.
  • it can learn the correlation between different recommendation scenarios, and on the other hand, it can learn the correlation between different recommendation scenarios.
  • the method based on dynamic weights can reduce the interference between different recommended scenarios, thereby solving the problem of reduced prediction accuracy caused by the different distribution of data in a single-task model in the case of joint modeling of multiple scenarios. .
  • the data processing method corresponding to Figure 4 above can be a feedforward action during model training.
  • the tendency information corresponding to the first operation data can be obtained.
  • the first groundtruth, and according to the first tendency information and the first groundtruth determine the first loss, and according to the first loss, perform the first feature extraction network, the The second feature extraction network, the first task network, the second task network and the first gating network perform parameter updates.
  • the data processing method corresponding to Figure 4 above can be a feedforward action during model training.
  • the tendency information corresponding to the second operation data can be obtained.
  • Equation (5) For example, after obtaining the network output of each task, the loss function defined by Equation (5) can be used:
  • ⁇ i is the weight of each task
  • loss i is the loss function of each task, which is calculated by formula (6):
  • the losses obtained from each recommended scenario can be fused (for example, addition operation), and the parameters can be updated based on the fused losses. Since the click-through rate and observation tendency score of each position in different scenes are different, MCPBM has different convergence speeds when training with different scene data, and uses exponential weighting to adjust the weight of different tasks.
  • a first degree of convergence can be obtained; the higher the first degree of convergence, the closer it can be to the convergence state.
  • the first loss is adjusted according to the first degree of convergence to obtain the adjusted first loss, so The adjusted first loss is negatively correlated with the first degree of convergence; further, based on the adjusted first loss, the first feature extraction network, the second feature extraction network, the first task The network, the second task network and the first gating network perform parameter updates.
  • s is a hyperparameter that controls the smoothness of task weights
  • is a hyperparameter that controls the task loss before round t in the loss of round t+1.
  • the weight of the loss function can be set smaller, and for recommendation scenarios with a lower degree of convergence, the weight of the loss function can be set higher, thus making The convergence progress of each recommended scenario remains basically the same, improving the accuracy of model prediction.
  • the search page includes a search box that displays the user's current search terms, such as "designing games.”
  • the main content below this page is the ranking of related apps displayed to users by the search system of the App Market for this search term.
  • the search recommendation system of the application market predicts the user's click probability on the candidate set of apps based on the user, candidate set of apps, and contextual features, and ranks the candidate products in descending order according to probability, ranking the apps most likely to be downloaded at the top.
  • the MCPBM architecture in the embodiment of this application can be used to train the model.
  • Step 1 Design an intervention experiment strategy, which can be random traffic intervention or Intervention Harvest.
  • Step 2 Use the collected intervention experimental data and jointly model multiple search scenarios to train the propensity score prediction model MCPBM based on multi-task learning;
  • Step 3 Use the trained MCPBM propensity score model to correct user click logs to obtain an unbiased User click data;
  • Step 4 Use the corrected user click data as unbiased training data to train the downstream fine ranking model, and then train to obtain an unbiased fine ranking model, which can be used for inference sorting on the live network.
  • LE Location Estimators
  • PBM Position Based Model
  • CPBM Contextual Position-Based Model
  • the propensity score prediction accuracy of the MCPBM model in each scenario is better than that of the three baseline models, and the debiasing effect of the MCPBM model is better than that of the three baseline models.
  • the partial model has a 1%-5% improvement in the overall ranking index AvgRank.
  • the embodiment of the present application also provides a data processing method, which method includes:
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same or different recommendation objects with similarity higher than a threshold in the first recommendation scenario.
  • the first operation data obtain the first feature representation and the second feature representation through the first feature extraction network and the second feature extraction network respectively;
  • first tendency information is obtained through the first task network, and the first tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • second tendency information is obtained through the second task network, and the second tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • the first weight of the first tendency information and the second weight of the second tendency information are respectively obtained through the first gating network
  • the first tendency information and the second tendency information are fused to obtain first target tendency information, where the first target tendency information is To represent the impact of the recommended location on the user's operating behavior in the first recommendation scenario;
  • a first loss is determined, and according to the first loss, the first feature extraction network, the second feature extraction network, the first The task network, the second task network and the first gating network perform parameter updates.
  • the first feature representation and the second feature representation are obtained through the first feature extraction network and the second feature extraction network respectively according to the first operation data, including:
  • the first operation data obtain the first initial feature representation and the second initial feature representation through the first feature extraction network and the second feature extraction network respectively;
  • the third weight of the first initial feature representation and the fourth weight of the second initial feature representation are respectively obtained;
  • the first initial feature representation and the second initial feature representation are fused to obtain the first feature representation
  • the fifth weight of the first initial feature representation and the sixth weight of the second initial feature representation are respectively obtained through the third gating network;
  • the first initial feature representation and the second initial feature representation are fused to obtain the second feature representation.
  • the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the same recommendation object or a similarity higher than a threshold in the second recommendation scenario.
  • User operation data when recommending different recommended locations in the scenario;
  • the method also includes:
  • the second operation data obtain a third feature representation and a fourth feature representation through the first feature extraction network and the second feature extraction network respectively;
  • third tendency information is obtained through the first task network, and the third tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • fourth tendency information is obtained through the second task network, and the fourth tendency information
  • the tropism information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario
  • the seventh weight of the third tendency information and the eighth weight of the fourth tendency information are respectively obtained through the first gating network
  • the third tendency information and the fourth tendency information are fused to obtain second target tendency information, where the second target tendency information is In order to represent the impact of the recommended position on the user's operating behavior in the second recommendation scenario, the second target preference information is used to train the recommendation model.
  • the fusion includes: weighted summation.
  • the first task network or the second task network is a context-dependent position bias model (CPBM).
  • CPBM context-dependent position bias model
  • the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).
  • MLP multi-layer perceptron
  • the method further includes:
  • a second loss is determined, and according to the second loss, the first feature extraction network, the second feature extraction network, the first The task network, the second task network and the first gating network perform parameter updates.
  • the method further includes:
  • the first loss is adjusted according to the first degree of convergence to obtain an adjusted first loss, where the adjusted first loss is negatively correlated with the first degree of convergence;
  • parameters are performed on the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network. renew.
  • Figure 6 is a schematic structural diagram of a data processing device provided by an embodiment of the present application. As shown in Figure 6, the device 600 may include:
  • Obtaining module 601 is used to obtain an operation log.
  • the operation log includes the user's first operation data in the first recommendation scenario.
  • the first operation data includes the same recommendation object or a recommendation object with a similarity higher than a threshold in the first recommendation scenario. 1.
  • step 401 For the specific description of the acquisition module 601, reference may be made to the description of step 401 in the above embodiment, which will not be described again here.
  • the feature extraction module 602 is configured to obtain 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;
  • step 402 For a specific description of the feature extraction module 602, reference may be made to the description of step 402 in the above embodiment, which will not be described again here.
  • the tendency information calculation module 603 is used to obtain the first task network according to the first feature representation. Tendency information, the first tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario; according to the second feature representation, the second tendency information is obtained through the second task network, the The second tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scenario;
  • the weight determination module 604 is configured to obtain the first weight of the first tendency information and the second weight of the second tendency information through the first gating network according to the first operation data;
  • weight determination module 604 For a specific description of the weight determination module 604, reference may be made to the description of step 405 in the above embodiment, which will not be described again here.
  • the fusion module 605 is configured to fuse the first tendency information and the second tendency information according to the first weight and the second weight to obtain the first target tendency information.
  • a target tendency information is used to represent the impact of the recommended position in the first recommendation scene on the user's operating behavior, and the first target tendency information is used to train the recommendation model.
  • the feature extraction module is specifically used to:
  • the first operation data obtain the first initial feature representation and the second initial feature representation through the first feature extraction network and the second feature extraction network respectively;
  • the third weight of the first initial feature representation and the fourth weight of the second initial feature representation are respectively obtained;
  • the first initial feature representation and the second initial feature representation are fused to obtain the first feature representation
  • the fifth weight of the first initial feature representation and the sixth weight of the second initial feature representation are respectively obtained through the third gating network;
  • the first initial feature representation and the second initial feature representation are fused to obtain the second feature representation.
  • the operation log also includes second operation data of the user in the second recommendation scenario, and the second operation data includes the same recommendation object or a similarity higher than a threshold in the second recommendation scenario.
  • User operation data when recommending different recommended locations in the scenario;
  • the feature extraction module is specifically used for:
  • the second operation data obtain 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:
  • third tendency information is obtained through the first task network, and the third tendency information is used to represent the impact of the recommended location on the user's operating behavior in the recommendation scene;
  • the third tendency information Four feature representations, through the second task network, the fourth tendency information is obtained, and the fourth tendency information is used to represent the recommendation site The impact of the recommended location in the scene on the user’s operating behavior;
  • the weight determination module is specifically configured to obtain the seventh weight of the third tendency information and the seventh weight of the fourth tendency information through the first gating network according to the second operation data. Eight weights;
  • the fusion module is specifically used for:
  • the third tendency information and the fourth tendency information are fused to obtain second target tendency information, where the second target tendency information is In order to represent the impact of the recommended position on the user's operating behavior in the second recommendation scenario, the second target preference information is used to train the recommendation model.
  • the fusion includes: weighted summation.
  • the first task network or the second task network is a context-dependent position bias model (CPBM).
  • CPBM context-dependent position bias model
  • the first feature extraction network or the second feature extraction network is a network including a multi-layer perceptron (MLP).
  • MLP multi-layer perceptron
  • the acquisition module is also used to:
  • the device also includes:
  • a model training module configured to determine a first loss based on the first tendency information and the first true value, and to perform training on the first feature extraction network and the second feature extraction network based on the first loss.
  • the network, the first task network, the second task network and the first gating network perform parameter updates.
  • the acquisition module is also used to:
  • the model training module is further configured to determine a second loss based on the second tendency information and the second true value, and to perform the training on the first feature extraction network and the third feature extraction network based on the second loss.
  • the two feature extraction networks, the first task network, the second task network and the first gating network perform parameter updates.
  • the acquisition module is also used to:
  • the device also includes:
  • a loss adjustment module configured to adjust the first loss according to the first degree of convergence to obtain an adjusted first loss, where the adjusted first loss is negatively correlated with the first degree of convergence;
  • the model training module is specifically used for:
  • parameters are performed on the first feature extraction network, the second feature extraction network, the first task network, the second task network and the first gating network. renew.
  • the acquisition module is also used to:
  • the second loss is a loss obtained when the recommendation model is fed forward based on the first operation data
  • the loss adjustment module is also configured 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 adjust the recommendation
  • the model is updated with parameters.
  • FIG. 7 is a schematic structural diagram of an execution device provided by an embodiment of the present application.
  • the execution device 700 can be embodied as a mobile phone, a tablet, a notebook computer, Smart wearable devices, servers, etc. are not limited here.
  • the data processing device described in the corresponding embodiment of FIG. 6 may be deployed on the execution device 700 to implement the data processing function in the corresponding embodiment of FIG. 4 .
  • the execution device 700 includes: a receiver 701, a transmitter 702, a processor 703, and a memory 704 (the number of processors 703 in the execution device 700 may be one or more), where the processor 703 may include application processing processor 7031 and communication processor 7032.
  • the receiver 701, the transmitter 702, the processor 703, and the memory 704 may be connected through a bus or other means.
  • Memory 704 may include read-only memory and random access memory and provides instructions and data to processor 703 .
  • a portion of memory 704 may also include non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 704 stores processor and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for implementing various operations.
  • Processor 703 controls execution of operations of the device.
  • various components of the execution device are coupled together through a bus system.
  • the bus system may also include a power bus, a control bus, a status signal bus, etc.
  • various buses are called bus systems in the figure.
  • the methods disclosed in the above embodiments of the present application can be applied to the processor 703 or implemented by the processor 703 .
  • the processor 703 may be an integrated circuit chip with signal processing capabilities. During the implementation process, each step of the above method can be completed by instructions in the form of hardware integrated logic circuits or software in the processor 703 .
  • the above-mentioned processor 703 can be a general-purpose processor, a digital signal processor (DSP), a microprocessor or a microcontroller, a vision processing unit (VPU), or a tensor processing unit.
  • TPU and other processors suitable for AI computing, may further include application specific integrated circuits (ASICs), field-programmable gate arrays (field-programmable gate arrays, FPGAs) or other programmable logic devices, Discrete gate or transistor logic devices, discrete hardware components.
  • ASICs application specific integrated circuits
  • FPGAs field-programmable gate arrays
  • Discrete gate or transistor logic devices discrete hardware components.
  • the processor 703 can implement or execute each method, step and logical block diagram disclosed in the embodiment of this application.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
  • the steps of the method disclosed in conjunction with the embodiments of the present application can be directly implemented by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers and other mature storage media in this field.
  • the storage medium is located in the memory 704.
  • the processor 703 reads the information in the memory 704 and completes steps 401 to 406 in the above embodiment in combination with its hardware.
  • the receiver 701 may be configured to receive input numeric or character information and generate signal inputs related to performing relevant settings and functional controls of the device.
  • the transmitter 702 can be used to output numeric 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 .
  • FIG. 8 is a training device provided by the embodiment of the present application.
  • the training device 800 is implemented by one or more servers.
  • the training device 800 may vary greatly due to different configurations or performance, and may include one or more central processing units (central processing units).
  • CPU central processing units
  • CPU central processing units
  • memory 832 e.g, one or more processors
  • storage media 830 e.g, one or more mass storage devices
  • the memory 832 and the storage medium 830 may be short-term storage or persistent 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 processor 88 may be configured to communicate with the storage medium 830 and execute a series of instruction operations in the storage medium 830 on the training device 800 .
  • 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 and so on.
  • operating systems 841 such as Windows ServerTM, Mac OS XTM , UnixTM, LinuxTM, FreeBSDTM and so on.
  • the training device can perform the steps related to model training in the above embodiments.
  • An embodiment of the present application also provides a computer program product that, when run on a computer, causes the computer to perform the steps performed by the foregoing execution device, or causes the computer to perform the steps performed by the foregoing training device.
  • Embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores a program for performing signal processing.
  • the program When the program is run on a computer, it causes the computer to perform the steps performed by the aforementioned execution device. , or, causing the computer to perform the steps performed by the aforementioned training device.
  • the execution device, training device or terminal device provided by the embodiment of the present application may specifically be a chip.
  • the chip includes: a processing unit and a communication unit.
  • the processing unit may be, for example, a processor.
  • the communication unit may be, for example, an input/output interface. Pins or circuits, etc.
  • the processing unit can 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.
  • the storage unit is a storage unit within the chip, such as a register, cache, etc.
  • the storage unit may also be a storage unit located outside the chip in the wireless access device, such as Read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), etc.
  • ROM Read-only memory
  • RAM random access memory
  • Figure 9 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • the chip can be represented as a neural network processor NPU 900.
  • the NPU 900 serves as a co-processor and is mounted to the host CPU. ), tasks are allocated by the Host CPU.
  • the core part of the NPU is the arithmetic circuit 903.
  • the arithmetic circuit 903 is controlled by the controller 904 to extract the matrix data in the memory and perform multiplication operations.
  • NPU 900 can implement the information recommendation method provided in the embodiment described in Figure 4 and the method provided in the embodiment described in Figure 4 through the mutual cooperation between various internal components.
  • the computing circuit 903 in the NPU 900 internally includes multiple processing units (Process Engine, PE).
  • arithmetic circuit 903 is a two-dimensional systolic array.
  • the arithmetic circuit 903 may also be a one-dimensional systolic array or other electronic circuit capable of performing mathematical operations such as multiplication and addition.
  • arithmetic circuit 903 is a general-purpose matrix processor.
  • the arithmetic circuit obtains the corresponding data of matrix B from the weight memory 902 and caches it on each PE in the arithmetic circuit.
  • the operation circuit takes matrix A data and matrix B from the input memory 901 to perform matrix operations, and the partial result or final result of the obtained matrix is stored in an accumulator (accumulator) 908 .
  • the unified memory 906 is used to store input data and output data.
  • the weight data directly passes through the storage unit access controller (Direct Memory Access Controller, DMAC) 905, and the DMAC is transferred to the weight memory 902.
  • the input data is also transferred to unified memory 906 via DMAC.
  • DMAC Direct Memory Access Controller
  • BIU is the Bus Interface Unit, that is, the bus interface unit 910, which is used for the interaction between the AXI bus and the DMAC and the Instruction Fetch Buffer (IFB) 909.
  • IFB Instruction Fetch Buffer
  • the bus interface unit 910 (Bus Interface Unit, BIU for short) is used to fetch the 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.
  • BIU Bus Interface Unit
  • DMAC is mainly used to transfer the input data in the external memory DDR to the unified memory 906 or the weight data to the weight memory 902 or the input data to the input memory 901 .
  • the vector calculation unit 907 includes multiple arithmetic processing units, and if necessary, further processes the output of the arithmetic circuit 903, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
  • vector calculation unit 907 can store the processed output vectors to unified memory 906 .
  • 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 on the feature plane extracted by the convolution layer, or a vector of accumulated values, to generate an activation value.
  • vector calculation unit 907 generates normalized values, pixel-wise summed values, or both.
  • the processed output vector can be used as an activation input to the arithmetic circuit 903, such as for use in a subsequent layer in a neural network.
  • the instruction fetch buffer 909 connected to the controller 904 is used to store instructions used by the controller 904;
  • the unified memory 906, the input memory 901, the weight memory 902 and the fetch memory 909 are all On-Chip memories. External memory is private to the NPU hardware architecture.
  • the processor mentioned in any of the above places can be a general central processing unit, a microprocessor, an ASIC, or one or more integrated circuits used to control the execution of the above programs.
  • the device embodiments described above are only illustrative.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physically separate.
  • the physical unit can be located in one place, or it can be distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between modules indicates that there are communication connections between them, which can be specifically implemented as one or more communication buses or signal lines.
  • the computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to cause a computer device (which can be a personal computer, training device, or network device, etc.) to execute the steps described in various embodiments of this application. method.
  • a computer device which can be a personal computer, training device, or network device, etc.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training equipment or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means.
  • wired such as coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless such as infrared, wireless, microwave, etc.
  • 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 or a data center integrated with one or more available media.
  • the available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (Solid State Disk, SSD)), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开了一种数据处理方法,可以应用于人工智能领域,方法包括:获取操作日志,操作日志包括用户在第一推荐场景中的第一操作数据;根据第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;根据第一特征表示,通过任务网络,得到第一倾向性信息和第二倾向性信息,并第一门控网络的第一权重和第二权重,对第一倾向性信息和第二倾向性信息进行融合,以得到第一目标倾向性信息。本申请可以降低不同推荐场景之间的干扰,进而解决多场景联合建模的情况下,单任务模型受数据之间分布不同的影响,所导致的预测准确性下降的问题。

Description

一种数据处理方法及相关装置
本申请要求于2022年03月30日提交中国专利局、申请号为202210326504.7、发明名称为“一种数据处理方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种数据处理方法及相关装置。
背景技术
人工智能(artificialintelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式作出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
在推荐场景下,系统将记录用户与系统的交互信息,比如操作日志,以此作为数据源来训练搜索系统中最为核心的推荐模型(例如排序模型)。用户操作日志具有数据量大、时效性强等特点。但用户的操作往往是有偏的,用户往往倾向于操作排名靠前的对象,仅根据用户的操作日志来训练推荐模型,推荐模型不能准确学习到用户的真实意图与推荐对象之间的真实相关性。其中重要的原因是系统中存在严重的位置偏置(position-bias)。以搜索场景为例,用户进入搜索系统,在搜索框输入查询词,系统将立即反馈查询结果呈现于用户交互界面。用户在对展示出来的对象,由于其位置不同,用户的注意力也不相同,将会导致位置偏置,即用户倾向于搜索结果列表中位置较好的对象进行交互,并且用户的倾向性与对象是否能反应用户真实意图无关。
由于位置偏置的存在,用于训练模型的用户隐式反馈数据,即是否操作,不能反应用户的真实搜索意图。如果直接将用户的隐式反馈数据作为正负样本训练,得到的推荐模型存在偏差,且会随着模型的不断更新,形成马太效应,导致模型越来越偏。为了得到更为精准的推荐模型,离线训练过程中需要对位置偏置进行纠偏,消除position-bias的影响。逆概率加权(inverse propensity score,IPS)技术是常用的位置偏置纠偏技术,通过预估出样本的位置倾向性得分,进而对训练时的损失函数进行反向加权,使得位置倾向性得分高的样本权重更低,达到位置纠偏的效果。在不同的推荐场景中,位置偏置也是不同的,例如,在一些推荐场景中,可以主动推荐用户此时想操作的多个对象,在一些推荐场景中,可以基于用户输入的搜索词推荐和搜索词相关的多个对象,这两个推荐场景中,不同位置的位置偏置也是不同的。
在一种现有的实现中,使用基于上下文信息的位置偏置模型(contextual position-based model,CPBM)来计算位置偏置(或者称之为倾向性信息),现有的方案是基于多个场景的操作数据来对同一个CPBM进行训练,然而,在多场景联合建模的情况下,由于不同推荐场景中不同位置的位置偏置是不同的,进而会导致倾向性信息预测准确性下降。
发明内容
第一方面,本申请提供了一种数据处理方法,所述方法包括:获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。
本申请实施例中,第一门控网络可以针对于第一推荐场景得到一组权重,并基于权重对多个任务网络的输出进行融合,得到第一推荐场景的位置偏置(第一目标倾向性信息)。第一门控网络可以通过权重的数值控制来将识别出各个任务网络的输出中和第一推荐场景相关的信息并融合,一方面,可以学习到不同的推荐场景之间的相关性,另一方面,基于动态权重的方式,可以降低不同推荐场景之间的干扰,进而解决多场景联合建模的情况下,单任务模型受数据之间分布不同的影响,所导致的预测准确性下降的问题。
在一种可能的实现中,所述根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示,包括:根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
在一种可能的实现中,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据;所述方法还包括:根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第四特征表示,通过所 述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述融合包括:加权求和。
在一种可能的实现中,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
在一种可能的实现中,所述方法还包括:获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述方法还包括:获取所述第二操作数据对应的倾向性信息的第二真值;根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,在每次迭代更新的过程中,可以针对于各个推荐场景得到的损失进行融合(例如加法运算),并基于融合后的损失进行参数更新。由于不同场景各个位置点击率和观测倾向性得分有所不同,因此在使用不同场景数据训练时MCPBM有不同的收敛速度,使用指数加权的方式调整不同任务的权重。
在一种可能的实现中,所述方法还包括:获取第一收敛程度;根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;所述根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新,包括:根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
也就是说,针对于收敛程度较高的推荐场景,可以对其损失函数的权重设置的较小,针对于收敛程度较低的推荐场景,可以对其损失函数的权重设置的较高,进而使得各个推荐场景的收敛进度保持基本一致,提高模型预测准确性。
在一种可能的实现中,所述方法还包括:
获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;
根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
第二方面,本申请提供了一种数据处理装置,所述装置包括:
获取模块,用于获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;
特征提取模块,用于根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;
倾向性信息计算模块,用于根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
权重确定模块,用于根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;
融合模块,用于根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述特征提取模块,具体用于:
根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;
根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;
根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;
根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;
根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
在一种可能的实现中,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不 同推荐位置时用户的操作数据;
所述特征提取模块,具体用于:
根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;
所述倾向性信息计算模块,具体用于:
根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第四特征表示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
所述权重确定模块,具体用于:根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;
所述融合模块,具体用于:
根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述融合包括:加权求和。
在一种可能的实现中,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
在一种可能的实现中,所述获取模块,还用于:
获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);
所述装置还包括:
模型训练模块,用于根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块,还用于:
获取所述第二操作数据对应的倾向性信息的第二真值;
所述模型训练模块,还用于根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块还用于:
获取第一收敛程度;
所述装置还包括:
损失调整模块,用于根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;
所述模型训练模块,具体用于:
根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块还用于:
获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;
所述损失调整模块,还用于根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
第三方面,本申请实施例提供了一种数据处理装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第一方面任一可选的方法。
第四方面,本申请实施例提供了一种训练装置,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于执行存储器中的程序,以执行如上述第一方面任一可选的方法。
第五方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面及任一可选的方法。
第六方面,本申请实施例提供了一种计算机程序产品,包括代码,当代码被执行时,用于实现上述第一方面及任一可选的方法。
第七方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持执行设备或训练设备实现上述方面中所涉及的功能,例如,发送或处理上述方法中所涉及的数据;或,信息。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存执行设备或训练设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。
本申请实施例提供了一种数据处理方法,所述方法包括:获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二特 征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。本申请实施例中,第一门控网络可以针对于第一推荐场景得到一组权重,并基于权重对多个任务网络的输出进行融合,得到第一推荐场景的位置偏置(第一目标倾向性信息)。第一门控网络可以通过权重的数值控制来将识别出各个任务网络的输出中和第一推荐场景相关的信息并融合,一方面,可以学习到不同的推荐场景之间的相关性,另一方面,基于动态权重的方式,可以降低不同推荐场景之间的干扰,进而解决多场景联合建模的情况下,单任务模型受数据之间分布不同的影响,所导致的预测准确性下降的问题。
附图说明
图1为人工智能主体框架的一种结构示意图;
图2为本申请实施例提供的一种系统架构的示意图;
图3为本申请实施例提供的一种信息推荐流程的示意图;
图4为本申请实施例提供的一种数据处理方法的流程示意图;
图5为本申请实施例提供的一种模型的结构示意图;
图6为本申请实施例提供的一种数据处理装置的结构示意图;
图7为本申请实施例提供的一种执行设备的示意图;
图8为本申请实施例提供的一种训练设备的示意图;
图9为本申请实施例提供的一种芯片的示意图。
具体实施方式
下面结合本发明实施例中的附图对本发明实施例进行描述。本发明的实施方式部分使用的术语仅用于对本发明的具体实施例进行解释,而非旨在限定本发明。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
首先对人工智能系统总体工作流程进行描述,请参见图1,图1示出的为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个 维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。
(1)基础设施
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。
(2)数据
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。
(3)数据处理
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。
(4)通用能力
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。
(5)智能产品及行业应用
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、智慧城市等。
本申请实施例可以应用于信息推荐领域,具体的,可以应用于应用市场、音乐播放推荐、视频播放推荐、阅读类推荐、新闻资讯推荐以及网页中的信息推荐等。本申请可以应用于推荐系统,推荐系统可以基于本申请提供的推荐方法来确定推荐对象,推荐对象例如可以但不限于是应用程序(application,APP)、音视频、网页以及新闻资讯等物品。
在推荐系统中,信息推荐可以包括预测和推荐等过程。其中,预测所需要解决的是预测用户对每个物品的喜好程度,可以通过用户选择该物品的概率来反映上述喜好程度。推荐可以是根据预测的结果将推荐对象进行排序,例如根据预测的喜好程度,按照喜好程度 高到低的顺序进行排序,并基于排序的结果对用户进行信息推荐。
例如,在应用市场的场景中,推荐系统可以基于排序的结果对用户进行应用程序的推荐,在音乐推荐的场景中,推荐系统可以基于排序的结果对用户进行音乐的推荐,在视频推荐的场景中,推荐系统可以基于排序的结果对用户进行视频的推荐。
接下来介绍本申请实施例的应用架构。
下面结合图2对本申请实施例提供的系统架构进行详细的介绍。图2为本申请一实施例提供的系统架构示意图。如图2所示,系统架构500包括执行设备510、训练设备520、数据库530、客户设备540、数据存储系统550以及数据采集系统560。
执行设备510包括计算模块511、I/O接口512、预处理模块513和预处理模块514。计算模块511中可以包括目标模型/规则501,预处理模块513和预处理模块514是可选的。
数据采集设备560用于采集训练样本。在本申请实施例中,训练样本可以为用户的历史操作记录,该历史操作记录可以为用户的行为日志(或者称之为操作日志),该操作日志可以包括用户针对于物品的操作信息,其中,操作信息可以包括操作类型、用户的标识、物品的标识,在物品为电商产品时,操作类型可以包括但不限于点击、购买、退货、加入购物车等等,在物品为应用程序时,操作类型可以但不限于为点击、下载等等。
在一种可能的实现中,操作日志可以包括用户在第一推荐场景中的第一操作数据、用户在第一推荐场景中的第二操作数据
其中,训练样本可以为对多门控基于上下文信息的位置偏置模型(multi-gate contextual position-based model,MCPBM)、或者对初始化的推荐模型进行训练时所采用的数据。在采集到训练样本之后,数据采集设备560将这些训练样本存入数据库530。
训练设备520可以基于数据库530中维护的训练样本对初始化的推荐模型或者MCPBM进行训练,以得到目标模型/规则501。本申请实施例中,目标模型/规则501可以为训练后的MCPBM,MCPBM可以基于用户对某个推荐场景的操作数据来得到在该场景中的位置偏置(例如本申请实施例中的倾向性信息),目标模型/规则501可以为推荐模型,推荐模型可以基于用户针对于物品的操作信息来预测用户针对于物品进行操作类型对应的操作的概率,该概率可以用于进行信息推荐。
需要说明的是,在实际应用中,数据库530中维护的训练样本不一定都来自于数据采集设备560的采集,也有可能是从其他设备接收得到的,或者是基于数据采集设备560采集的数据进行数据扩展得到的(例如本申请实施例中的目标用户对所述第一物品的第二操作类型)。另外需要说明的是,训练设备520也不一定完全基于数据库530维护的训练样本进行目标模型/规则501的训练,也有可能从云端或其他地方获取训练样本进行模型训练,上述描述不应该作为对本申请实施例的限定。
根据训练设备520训练得到的目标模型/规则501可以应用于不同的系统或设备中,如应用于图2所示的执行设备510,所述执行设备510可以是终端,如手机终端,平板电脑,笔记本电脑,增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备,车载终端等,还可以是服务器或者云端等。
在图2中,执行设备510配置输入/输出(input/output,I/O)接口512,用于与外部设备进行数据交互,用户可以通过客户设备540向I/O接口512输入数据(例如本申请实施例中的操作日志等)。
预处理模块513和预处理模块514用于根据I/O接口512接收到的输入数据进行预处理。应理解,可以没有预处理模块513和预处理模块514或者只有的一个预处理模块。当不存在预处理模块513和预处理模块514时,可以直接采用计算模块511对输入数据进行处理。
在执行设备510对输入数据进行预处理,或者在执行设备510的计算模块511执行计算等相关的处理过程中,执行设备510可以调用数据存储系统550中的数据、代码等以用于相应的处理,也可以将相应处理得到的数据、指令等存入数据存储系统550中。
最后,I/O接口512将处理结果呈现给客户设备540,从而提供给用户。
本申请实施例中,上述执行设备510可以获取到数据存储系统550中存储的代码来实现本申请实施例中的数据处理方法。
本申请实施例中,执行设备510可以包括硬件电路(如专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)、通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器等等)、或这些硬件电路的组合,例如,执行设备510可以为具有执行指令功能的硬件系统,如CPU、DSP等,或者为不具有执行指令功能的硬件系统,如ASIC、FPGA等,或者为上述不具有执行指令功能的硬件系统以及具有执行指令功能的硬件系统的组合。
具体的,执行设备510可以为具有执行指令功能的硬件系统,本申请实施例提供的信息推荐方法可以为存储在数据存储系统550中的软件代码,执行设备510可以从数据存储系统550中获取到软件代码,并执行获取到的软件代码来实现本申请实施例提供的数据处理方法。
应理解,执行设备510可以为不具有执行指令功能的硬件系统以及具有执行指令功能的硬件系统的组合,本申请实施例提供的推荐方法的部分步骤还可以通过执行设备510中不具有执行指令功能的硬件系统来实现,这里并不限定。
在图2所示情况下,用户可以手动给定输入数据,该“手动给定输入数据”可以通过I/O接口512提供的界面进行操作。另一种情况下,客户设备540可以自动地向I/O接口512发送输入数据,如果要求客户设备540自动发送输入数据需要获得用户的授权,则用户可以在客户设备540中设置相应权限。用户可以在客户设备540查看执行设备510输出的结果,具体的呈现形式可以是显示、声音、动作等具体方式。客户设备540也可以作为数据采集端,采集如图所示输入I/O接口512的输入数据及输出I/O接口512的输出结果作为新的样本数据,并存入数据库530。当然,也可以不经过客户设备540进行采集,而是由I/O接口512直接将如图所示输入I/O接口512的输入数据及输出I/O接口512的输出结果,作为新的样本数据存入数据库530。
值得注意的是,图2仅是本申请实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在图2中,数据存储系统550相对 执行设备510是外部存储器,在其它情况下,也可以将数据存储系统550置于执行设备510中。应理解,上述执行设备510可以部署于客户设备540中。
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。
1、点击概率(click-throughrate,CTR)
点击概率又可以称为点击率,是指网站或者应用程序上推荐信息(例如,推荐物品)被点击次数和曝光次数之比,点击率通常是推荐系统中衡量推荐系统的重要指标。
2、个性化推荐系统
个性化推荐系统是指根据用户的历史数据(例如本申请实施例中的操作信息),利用机器学习算法进行分析,并以此对新请求进行预测,给出个性化的推荐结果的系统。
3、离线训练(offlinetraining)
离线训练是指在个性化推荐系统中,根据用户的历史数据(例如本申请实施例中的操作信息),对推荐模型参数按照器学习的算法进行迭代更新直至达到设定要求的模块。
4、在线预测(onlineinference)
在线预测是指基于离线训练好的模型,根据用户、物品和上下文的特征预测该用户在当前上下文环境下对推荐物品的喜好程度,预测用户选择推荐物品的概率。
5、位置偏置(position bias):在搜索/广告/推荐系统中,会利用用户的隐式反馈数据来建模排序模型,用户在对展示出来的文档,由于其位置不同,用户的注意力也不相同,将会导致位置偏置,即用户倾向于搜索结果列表中位置较好的文档进行交互,并且用户的位置偏置倾向性与文档是否能反应用户真实意图无关。
6、多任务学习(multi task learning):在机器学习中,多个任务往往可以同时建模求解,通过研究多个任务之间的共通性和差异性,可以提高模型在一个或多个任务的学习效率和性能指标。
例如,图3是本申请实施例提供的推荐系统的示意图。如图3所示,当一个用户进入统,会触发一个推荐的请求,推荐系统会将该请求及其相关信息(例如本申请实施例中的操作信息)输入到推荐模型,然后预测用户对系统内的物品的选择率。进一步,根据预测的选择率或基于该选择率的某个函数将物品降序排列,即推荐系统可以按顺序将物品展示在不同的位置作为对用户的推荐结果。用户浏览不同的处于位置的物品并发生用户行为,如浏览、选择以及下载等。同时,用户的实际行为会存入日志中作为训练数据,通过离线训练模块不断更新推荐模型的参数,提高模型的预测效果。
例如,用户打开智能终端(例如,手机)中的应用市场即可触发应用市场中的推荐系统。应用市场的推荐系统会根据用户的历史行为日志,例如,用户的历史下载记录、用户选择记录,应用市场的自身特征,比如时间、地点等环境特征信息,预测用户下载推荐的各个候选APP的概率。根据计算的结果,应用市场的推荐系统可以按照预测的概率值大小降序展示候选APP,从而提高候选APP的下载概率。
示例性地,可以将预测的用户选择率较高的APP展示在靠前的推荐位置,将预测的用户选择率较低的APP展示在靠后的推荐位置。
上述推荐模型可以是神经网络模型,下面对本申请实施例可能涉及的神经网络的相关术语和概念进行介绍。
(1)神经网络
神经网络可以是由神经单元组成的,神经单元可以是指以xs(即输入数据)和截距1为输入的运算单元,该运算单元的输出可以为:
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入,激活函数可以是sigmoid函数。神经网络是将多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
(2)深度神经网络
深度神经网络(Deep Neural Network,DNN),也称多层神经网络,可以理解为具有很多层隐含层的神经网络,这里的“很多”并没有特别的度量标准。从DNN按不同层的位置划分,DNN内部的神经网络可以分为三类:输入层,隐含层,输出层。一般来说第一层是输入层,最后一层是输出层,中间的层数都是隐含层。层与层之间是全连接的,也就是说,第i层的任意一个神经元一定与第i+1层的任意一个神经元相连。虽然DNN看起来很复杂,但是就每一层的工作来说,其实并不复杂,简单来说就是如下线性关系表达式:其中,是输入向量,是输出向量,是偏移向量,W是权重矩阵(也称系数),α()是激活函数。每一层仅仅是对输入向量经过如此简单的操作得到输出向量由于DNN层数多,则系数W和偏移向量的数量也就很多了。这些参数在DNN中的定义如下所述:以系数W为例:假设在一个三层的DNN中,第二层的第4个神经元到第三层的第2个神经元的线性系数定义为上标3代表系数W所在的层数,而下标对应的是输出的第三层索引2和输入的第二层索引4。总结就是:第L-1层的第k个神经元到第L层的第j个神经元的系数定义为需要注意的是,输入层是没有W参数的。在深度神经网络中,更多的隐含层让网络更能够刻画现实世界中的复杂情形。理论上而言,参数越多的模型复杂度越高,“容量”也就越大,也就意味着它能完成更复杂的学习任务。训练深度神经网络的也就是学习权重矩阵的过程,其最终目的是得到训练好的深度神经网络的所有层的权重矩阵(由很多层的向量W形成的权重矩阵)。
(3)损失函数
在训练深度神经网络的过程中,因为希望深度神经网络的输出尽可能的接近真正想要 预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为深度神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到深度神经网络能够预测出真正想要的目标值或与真正想要的目标值非常接近的值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么深度神经网络的训练就变成了尽可能缩小这个loss的过程。
(4)反向传播算法
可以采用误差反向传播(back propagation,BP)算法在训练过程中修正初始模型中参数的大小,使得模型的误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始模型中的参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的模型参数,例如权重矩阵。
在推荐场景下,系统将记录用户与系统的交互信息,比如操作日志,以此作为数据源来训练搜索系统中最为核心的推荐模型(例如排序模型)。用户操作日志具有数据量大、时效性强等特点。但用户的操作往往是有偏的,用户往往倾向于操作排名靠前的对象,仅根据用户的操作日志来训练推荐模型,推荐模型不能准确学习到用户的真实意图与推荐对象之间的真实相关性。其中重要的原因是系统中存在严重的位置偏置(position-bias)。以搜索场景为例,用户进入搜索系统,在搜索框输入查询词,系统将立即反馈查询结果呈现于用户交互界面。用户在对展示出来的对象,由于其位置不同,用户的注意力也不相同,将会导致位置偏置,即用户倾向于搜索结果列表中位置较好的对象进行交互,并且用户的倾向性与对象是否能反应用户真实意图无关。
由于位置偏置的存在,用于训练模型的用户隐式反馈数据,即是否操作,不能反应用户的真实搜索意图。如果直接将用户的隐式反馈数据作为正负样本训练,得到的推荐模型存在偏差,且会随着模型的不断更新,形成马太效应,导致模型越来越偏。为了得到更为精准的推荐模型,离线训练过程中需要对位置偏置进行纠偏,消除position-bias的影响。逆概率加权(inverse propensity score,IPS)技术是常用的位置偏置纠偏技术,通过预估出样本的位置倾向性得分,进而对训练时的损失函数进行反向加权,使得位置倾向性得分高的样本权重更低,达到位置纠偏的效果。在不同的推荐场景中,位置偏置也是不同的,例如,在一些推荐场景中,可以主动推荐用户此时想操作的多个对象,在一些推荐场景中,可以基于用户输入的搜索词推荐和搜索词相关的多个对象,这两个推荐场景中,不同位置的位置偏置也是不同的。
在一种现有的实现中,使用基于上下文信息的位置偏置模型(contextual position-based model,CPBM)来计算位置偏置(或者称之为倾向性信息),现有的方案是基于多个场景的操作数据来对同一个CPBM进行训练,然而,在多场景联合建模的情况下,由于不同推荐场景中不同位置的位置偏置是不同的,进而会导致倾向性信息预测准确性下降。
本申请提供的数据处理方法可以解决多场景联合建模的情况下,单任务模型受数据之间分布不同的影响,导致的预测准确性下降的问题。
参照图4,图4为本申请实施例提供的一种数据处理方法的实施例示意,如图4示出的那样,本申请实施例提供的一种数据处理方法包括:
401、获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据。
本申请实施例中,步骤401的执行主体可以为终端设备,终端设备可以为便携式移动设备,例如但不限于移动或便携式计算设备(如智能手机)、个人计算机、服务器计算机、手持式设备(例如平板)或膝上型设备、多处理器系统、游戏控制台或控制器、基于微处理器的系统、机顶盒、可编程消费电子产品、移动电话、具有可穿戴或配件形状因子(例如,手表、眼镜、头戴式耳机或耳塞)的移动计算和/或通信设备、网络PC、小型计算机、大型计算机、包括上面的系统或设备中的任何一种的分布式计算环境等等。
本申请实施例中,步骤401的执行主体可以为云侧的服务器,服务器可以接收来自终端设备发送的操作日志,进而服务器可以获取到操作日志。
为了方便描述,以下不对执行主体的形态进行区分,都描述为执行设备。本申请实施例中,执行设备可以获取到获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据。
在搜索系统中,模型会进行不断迭代更新或者会存在不同类型的推荐模型,这样就会产生不同推荐算法处理相似搜索内容得到有差异推荐结果的数据。
在一种可能的实现中,可以采用intervention harvesting来获取有差异推荐结果的数据,intervention harvesting利用了天然的干预策略,关注用户与不同推荐算法进行交互时文档排序的差异性来挖掘一个位置被观测的概率。利用不同排序算法的差异,收集同样的搜索词下,同一个物品在不同位置用户点击数据,此时物品的相关性是相同的,用户点击只与位置偏置有关。
在一种可能的实现中,可以获取到在第一推荐场景中用户的第一操作数据,其中,第一操作数据可以为上述描述的有差异推荐结果的数据,也就是第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据。通过第一操作数据,可以挖掘出在第一推荐场景中各个推荐位置的位置偏置(也就是倾向性信息)。
其中,操作数据可以包括用户对于推荐模型推荐的多个对象的操作结果,其中,对象也可以描述为物品,物品可以为实体物品,或者是虚拟物品,例如可以为APP、音视频、网页以及新闻资讯等物品,物品的属性信息可以为物品名称、开发者、安装包大小、品类以及好评度中的至少一种,其中,以物品为应用程序为例,物品的品类可以为聊天类、跑酷类游戏、办公类等等,好评度可以为针对于物品的打分、评论等;本申请并不限定物品 的属性信息的具体类型。
其中,操作结果可以包括是否操作、或者操作的操作类型,操作类型可以为用户针对于物品的行为操作类型,在网络平台和应用上,用户往往和物品有多种多样的交互形式(也就是有多种操作类型),比如用户在电商平台行为中的浏览、点击、加入购物车、购买等操作类型。这些多种多样的行为反映了用户的偏好,对于准确的刻画用户特征有很大的帮助。
在一种可能的实现中,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据。
此外,操作日志还包括用户在除了第一推荐场景和第二推荐场景中的操作数据,本申请实施例并不限定。
在一种可能的实现中,操作数据可以为上下文信息。
402、根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为不同的特征提取网络。也就是说,可以将操作数据分别输入到多个特征提取网络,以得到多个特征表示。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(multilayer perceptron,MLP)的网络。
在一种可能的实现中,所述根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示,具体包括:根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
也就是说,可以分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示,可以通过第二门控网络得到的第三权重(对应于第一初始特征表示)和第四权重(对应于第二初始特征表示),对第一初始特征表示和第二初始特征表示进行融合,以得到第一特征表示。类似的,可以通过第二门控网络得到的第五权重(对应于第三初始特征表示)和第六权重(对应于第四初始特征表示),对第三初始特征表示和第四初始特征表示进行融合,以得到第二特征表示。
参照图5,图5为本申请实施例提供的一个网络模型的结构示意,其中,特征提取网络可以称之为专家网络,其中,每个专家网络有多层感知机(MLP)组成,每个专家网络Experti的输入可以为所有场景的上下文信息(例如可以包括第一操作数据);而门控网络Gatei用来选择多个专家网络的加权输出作为上层网络的输入,每个门控网络的输入为所有场景的 上下文信息(例如可以包括第一操作数据)。在一种可能的实现中,权重计算可以如公式(1)所示。当其他场景的数据与目标场景数据相关性越大时Gi值越大,两个任务的数据共享程度也就越高。反之,其他场景的数据与目标场景数据相关性越小时Gi越小,两个任务的数据共享程度也就越低。这种灵活的信息共享方式具有信息选择和信息隔离的功能,可以将需要共享的信息传递到上层任务层网络中。
Gi=softmax(X1,X2,…,XN)   (1);
因此,每个专家层网络Experti输出Mi为:
在一种可能的实现中,还可以根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示。
在一种可能的实现中,所述根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示,具体包括:根据所述第二操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第三初始特征表示和第四初始特征表示;根据所述第二操作数据,通过所述第二门控网络,分别得到所述第三初始特征表示的权重和所述第四初始特征表示的权重;根据所述第三初始特征表示的权重和第四初始特征表示的权重,对所述第三初始特征表示和所述第四初始特征表示进行融合,以得到所述第三特征表示;根据所述第二操作数据,通过第三门控网络,分别得到所述第三初始特征表示的权重和所述第四初始特征表示的权重;根据所述第三初始特征表示的权重和所述第四初始特征表示的权重,对所述第三初始特征表示和所述第四初始特征表示进行融合,以得到所述第四特征表示。
403、根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响。
在一种可能的实现中,所述第一任务网络或所述第二任务网络可以为上下文相关的位置偏置模型(CPBM)。在建模位置偏置的时候,CPBM可以显示的引入上下文context特征,位置偏置会受context特征(比如query类别)影响,进而专门的用propensity Model来预估位置倾向性得分与context特征的关系。
在一种可能的实现中,第一倾向性信息可以包括推荐场景各个推荐位置的位置偏置,也就是位置对于用户操作行为的影响。例如,第一推荐场景可以包括多个推荐位置(例如第一推荐场景中可以显示多个推荐对象,每个推荐对象所在的位置即为推荐位置)。
404、根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响。
其中,第一任务网络和第二任务网络可以为不同的任务网络,例如可以为不同的CPBM。
在一种可能的实现中,第二倾向性信息可以包括推荐场景各个推荐位置的位置偏置,也就是位置对于用户操作行为的影响。例如,第一推荐场景可以包括多个推荐位置(例如第一推荐场景中可以显示多个推荐对象,每个推荐对象所在的位置即为推荐位置)。
在一种可能的实现中,针对于第二操作数据的第三特征表示和第四特征表示,类似的,可以根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第四特征表 示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响。
405、根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重。
在一种可能的实现中,第一倾向性信息和第二倾向性信息可以进行融合,融合结果可以作为第一推荐场景的倾向性信息(例如本申请实施例中的第一目标倾向性信息)。
在一种可能的实现中,为了对第一倾向性信息和第二倾向性信息进行融合,可以根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重。进而,可以根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合(例如加权求和),以得到第一目标倾向性信息。
参照图5,第一任务网络和第二任务网络可以属于任务网络层(task layer),其中每个任务网络可以都由一个CPBM模型组成,用来预估每个场景的倾向性得分。和专家层网络类似,任务层网络也有一个门控网络,用来预估各个任务网络(CPBM)的权重,用于捕捉标签层面的相似性。任务层网络的Gate网络的输入也是所有搜索场景的上下文信息,其中权重计算可以如公式(3)所示:
Qi=softmax(X1,X2,…,XN)   (3);
任务层Taski的输出Yi可以为:
406、根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述融合包括:加权求和。
在一种可能的实现中,类似的,针对于第二推荐场景的第二操作数据,可以根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
在一种可能的实现中,第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。
在一种可能的实现中,在训练推荐模型时,第一目标倾向性信息可以用于作为第一推荐场景的位置偏置。具体的,在对推荐模型进行训练时,可以获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
示例性的,在训练过程中,对于有偏数据集当中的每一个样本可以除以相应的倾向性分数进行加权;
其中,第一项是正则项,通过超参数λ对训练模型中的可学习参数W进行约束;第二项是模型损失项,yl代表第l个样本的真实label,代码模型对该样本的预测label,zl代表样本的位置特征所对应的逆倾向性得分。
本申请实施例中,第一门控网络可以针对于第一推荐场景得到一组权重,并基于权重对多个任务网络的输出进行融合,得到第一推荐场景的位置偏置(第一目标倾向性信息)。第一门控网络可以通过权重的数值控制来将识别出各个任务网络的输出中和第一推荐场景相关的信息并融合,一方面,可以学习到不同的推荐场景之间的相关性,另一方面,基于动态权重的方式,可以降低不同推荐场景之间的干扰,进而解决多场景联合建模的情况下,单任务模型受数据之间分布不同的影响,所导致的预测准确性下降的问题。
应理解,上述介绍的数据处理方法可以为模型的推理过程。
接下来从模型的训练过程介绍本申请实施例中的数据处理方法:
在一种可能的实现中,上述图4对应的数据处理方法可以为模型训练时的前馈动作,针对于第一操作数据进行的训练过程,可以获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth),并根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,上述图4对应的数据处理方法可以为模型训练时的前馈动作,针对于第二操作数据进行的训练过程,可以获取所述第二操作数据对应的倾向性信息的第二真值;根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
示例性的,在获取各个任务网络输出后,可以采用式(5)定义的损失函数:
其中,αi为每个任务的权重,lossi为每个任务的损失函数,由公式(6)计算得来:
在一种可能的实现中,在每次迭代更新的过程中,可以针对于各个推荐场景得到的损失进行融合(例如加法运算),并基于融合后的损失进行参数更新。由于不同场景各个位置点击率和观测倾向性得分有所不同,因此在使用不同场景数据训练时MCPBM有不同的收敛速度,使用指数加权的方式调整不同任务的权重。
在一种可能的实现中,可以获取第一收敛程度;第一收敛程度越高,可以越接近于收敛状态。根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所 述调整后的第一损失与所述第一收敛程度负相关;进而根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
示例性的,损失的调整可以见公式(7)-(9):


αi(t+1)=γαi(t)+(1-γ)σi(t+1)     (9);
其中,s是控制任务权重平滑度的超参,γ是控制t轮之前任务loss在t+1轮的loss中的超参。
也就是说,针对于收敛程度较高的推荐场景,可以对其损失函数的权重设置的较小,针对于收敛程度较低的推荐场景,可以对其损失函数的权重设置的较高,进而使得各个推荐场景的收敛进度保持基本一致,提高模型预测准确性。
示例性的,以推荐场景为搜索场景为例,搜索页面包括搜索框,显示的是用户当前的搜索词,如“设计游戏”。这个页面下面的主体内容是应用市场的搜索系统针对该搜索词为用户展示的相关app排序。应用市场的搜索推荐系统根据用户、候选集app和上下文特征预测用户对候选集app的点击概率,并按照概率将候选商品降序排列,将最可能被下载的应用排在最靠前的位置。
用户看到应用市场的推荐结果之后,根据个人的兴趣,选择浏览、点击或者下载等操作,这些用户行为被存入日志。应用市场将这些累积的用户行为日志作为训练数据训练点击率预测模型,在此场景下可以使用本申请实施例中的MCPBM架构进行模型的训练。
搜索页面中存在位置偏置,位置更靠前的物品将有更大的概率被用户注意到,也就更有可能被点击。具体的,以搜索词“设计游戏”为例,步骤一:设计干预实验策略,可以是随机流量干预,也可以是Intervention Harvest,收集干预实验下的用户点击数据,得到干预实验数据;步骤二:用收集的干预实验数据,多个搜索场景联合建模,训练基于多任务学习的倾向性得分预测模型MCPBM;步骤三:用训练好的MCPBM倾向性得分模型对用户点击日志进行纠偏,得到无偏的用户点击数据;步骤四:用纠偏后的用户点击数据作为无偏的训练数据,训练下游精排模型,训练得到无偏的精排模型,用于现网推理排序。
接下里结合实验介绍本申请实施例的有益效果:在MQ2007百万查询词数据集和Yahoo LTR数据集上做了完备的离线实验,两个数据集都对比了MCPBM与LE,PBM,CPBM在AvgRank,Error两种典型指标上表现。通过实验测试,实验结果如下表所示:
表一各个搜索场景Error指标对比
表二各个搜索场景Error指标对比
在表一和表二中,LE(Local Estimators),PBM(Position Based Model),CPBM(Contextual Position-Based Model)是三种基线方法。θ≥0值控制该搜索场景中Context信息position bias的影响程度,θ=0表示Context信息对position bias无影响,θ值越大,表示position bias受context信息的影响越大。
从表一和表二中,可以看出,MCPBM模型在Yahoo,MQ2007数据集,各个场景的倾向性得分预测准确性都优于三种基线模型,MCPBM模型的去偏效果优于三种基线去偏模型,在整体排序指标AvgRank上有1%-5%的提升。
本申请实施例还提供了一种数据处理方法,所述方法包括:
获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位 置时用户的操作数据;
根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;
根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;
根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响;
获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);
根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示,包括:
根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;
根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;
根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;
根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;
根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
在一种可能的实现中,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据;
所述方法还包括:
根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;
根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
根据所述第四特征表示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾 向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;
根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述融合包括:加权求和。
在一种可能的实现中,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
在一种可能的实现中,所述方法还包括:
获取所述第二操作数据对应的倾向性信息的第二真值;
根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述方法还包括:
获取第一收敛程度;
根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;
所述根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新,包括:
根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
参照图6,图6为本申请实施例提供的一种数据处理装置的结构示意,如图6所示,所述装置600可以包括:
获取模块601,用于获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;
其中,关于获取模块601的具体描述可以参照上述实施例中步骤401的描述,这里不再赘述。
特征提取模块602,用于根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;
其中,关于特征提取模块602的具体描述可以参照上述实施例中步骤402的描述,这里不再赘述。
倾向性信息计算模块603,用于根据所述第一特征表示,通过第一任务网络,得到第一 倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
其中,关于倾向性信息计算模块603的具体描述可以参照上述实施例中步骤403和步骤404的描述,这里不再赘述。
权重确定模块604,用于根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;
其中,关于权重确定模块604的具体描述可以参照上述实施例中步骤405的描述,这里不再赘述。
融合模块605,用于根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响,所述第一目标倾向性信息用于训练推荐模型。
其中,关于融合模块605的具体描述可以参照上述实施例中步骤406的描述,这里不再赘述。
在一种可能的实现中,所述特征提取模块,具体用于:
根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;
根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;
根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;
根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;
根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
在一种可能的实现中,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据;
所述特征提取模块,具体用于:
根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;
所述倾向性信息计算模块,具体用于:
根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第四特征表示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场 景中推荐位置对于用户的操作行为的影响;
所述权重确定模块,具体用于:根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;
所述融合模块,具体用于:
根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
在一种可能的实现中,所述融合包括:加权求和。
在一种可能的实现中,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
在一种可能的实现中,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
在一种可能的实现中,所述获取模块,还用于:
获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);
所述装置还包括:
模型训练模块,用于根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块,还用于:
获取所述第二操作数据对应的倾向性信息的第二真值;
所述模型训练模块,还用于根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块还用于:
获取第一收敛程度;
所述装置还包括:
损失调整模块,用于根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;
所述模型训练模块,具体用于:
根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
在一种可能的实现中,所述获取模块还用于:
获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;
所述损失调整模块,还用于根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
接下来介绍本申请实施例提供的一种执行设备,请参阅图7,图7为本申请实施例提供的执行设备的一种结构示意图,执行设备700具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备700上可以部署有图6对应实施例中所描述的数据处理装置,用于实现图4对应实施例中数据处理的功能。具体的,执行设备700包括:接收器701、发射器702、处理器703和存储器704(其中执行设备700中的处理器703的数量可以一个或多个),其中,处理器703可以包括应用处理器7031和通信处理器7032。在本申请的一些实施例中,接收器701、发射器702、处理器703和存储器704可通过总线或其它方式连接。
存储器704可以包括只读存储器和随机存取存储器,并向处理器703提供指令和数据。存储器704的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器704存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。
处理器703控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。
上述本申请实施例揭示的方法可以应用于处理器703中,或者由处理器703实现。处理器703可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器703中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器703可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器、以及视觉处理器(vision processing unit,VPU)、张量处理器(tensor processing unit,TPU)等适用于AI运算的处理器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器703可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器704,处理器703读取存储器704中的信息,结合其硬件完成上述实施例中步骤401至步骤406的步骤。
接收器701可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器702可用于通过第一接口输出数字或字符信息;发射器702还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器702还可以包括显示屏等显示设备。
本申请实施例还提供了一种训练设备,请参阅图8,图8是本申请实施例提供的训练 设备一种结构示意图,具体的,训练设备800由一个或多个服务器实现,训练设备800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)88(例如,一个或一个以上处理器)和存储器832,一个或一个以上存储应用程序842或数据844的存储介质830(例如一个或一个以上海量存储设备)。其中,存储器832和存储介质830可以是短暂存储或持久存储。存储在存储介质830的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器88可以设置为与存储介质830通信,在训练设备800上执行存储介质830中的一系列指令操作。
训练设备800还可以包括一个或一个以上电源826,一个或一个以上有线或无线网络接口850,一个或一个以上输入输出接口858;或,一个或一个以上操作系统841,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
具体的,训练设备可以进行上述实施例中和模型训练相关的步骤。
本申请实施例中还提供一种包括计算机程序产品,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
具体的,请参阅图9,图9为本申请实施例提供的芯片的一种结构示意图,所述芯片可以表现为神经网络处理器NPU900,NPU 900作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路903,通过控制器904控制运算电路903提取存储器中的矩阵数据并进行乘法运算。
NPU 900可以通过内部的各个器件之间的相互配合,来实现图4所描述的实施例中提供的信息推荐方法以及图4所描述的实施例中提供的方法。
更具体的,在一些实现中,NPU 900中的运算电路903内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路903是二维脉动阵列。运算电路903还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路903是通用的矩阵处理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器902中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器901中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)908中。
统一存储器906用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)905,DMAC被搬运到权重存储器902中。输入数据也通过DMAC被搬运到统一存储器906中。
BIU为Bus Interface Unit即,总线接口单元910,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)909的交互。
总线接口单元910(Bus Interface Unit,简称BIU),用于取指存储器909从外部存储器获取指令,还用于存储单元访问控制器905从外部存储器获取输入矩阵A或者权重矩阵B的原数据。
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器906或将权重数据搬运到权重存储器902中或将输入数据数据搬运到输入存储器901中。
向量计算单元907包括多个运算处理单元,在需要的情况下,对运算电路903的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对特征平面进行上采样等。
在一些实现中,向量计算单元907能将经处理的输出的向量存储到统一存储器906。例如,向量计算单元907可以将线性函数;或,非线性函数应用到运算电路903的输出,例如对卷积层提取的特征平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元907生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路903的激活输入,例如用于在神经网络中的后续层中的使用。
控制器904连接的取指存储器(instruction fetch buffer)909,用于存储控制器904使用的指令;
统一存储器906,输入存储器901,权重存储器902以及取指存储器909均为On-Chip存储器。外部存储器私有于该NPU硬件架构。
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软 件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (23)

  1. 一种数据处理方法,其特征在于,所述方法包括:
    获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;
    根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;
    根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;
    根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示,包括:
    根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;
    根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;
    根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;
    根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;
    根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
  3. 根据权利要求1或2所述的方法,其特征在于,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据;
    所述方法还包括:
    根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;
    根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾 向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    根据所述第四特征表示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;
    根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
  4. 根据权利要求1至3任一所述的方法,其特征在于,所述融合包括:加权求和。
  5. 根据权利要求1至4任一所述的方法,其特征在于,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
  6. 根据权利要求1至5任一所述的方法,其特征在于,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述方法还包括:
    获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);
    根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  8. 根据权利要求3至7任一所述的方法,其特征在于,所述方法还包括:
    获取所述第二操作数据对应的倾向性信息的第二真值;
    根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  9. 根据权利要求7或8所述的方法,其特征在于,所述方法还包括:
    获取第一收敛程度;
    根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;
    所述根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新,包括:
    根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述方法还包括:
    获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;
    根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
  11. 一种数据处理装置,其特征在于,所述装置包括:
    获取模块,用于获取操作日志,所述操作日志包括用户在第一推荐场景中的第一操作数据,所述第一操作数据包括同一个或相似度高于阈值的推荐对象处于所述第一推荐场景中的不同推荐位置时用户的操作数据;
    特征提取模块,用于根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一特征表示和第二特征表示;
    倾向性信息计算模块,用于根据所述第一特征表示,通过第一任务网络,得到第一倾向性信息,所述第一倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第二特征表示,通过第二任务网络,得到第二倾向性信息,所述第二倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    权重确定模块,用于根据所述第一操作数据,通过第一门控网络,分别得到所述第一倾向性信息的第一权重和所述第二倾向性信息的第二权重;
    融合模块,用于根据所述第一权重和所述第二权重,对所述第一倾向性信息和所述第二倾向性信息进行融合,以得到第一目标倾向性信息,所述第一目标倾向性信息用于表示所述第一推荐场景中推荐位置对于用户的操作行为的影响。
  12. 根据权利要求11所述的装置,其特征在于,所述特征提取模块,具体用于:
    根据所述第一操作数据,分别通过第一特征提取网络和第二特征提取网络,得到第一初始特征表示和第二初始特征表示;
    根据所述第一操作数据,通过第二门控网络,分别得到所述第一初始特征表示的第三权重和所述第二初始特征表示的第四权重;
    根据所述第三权重和所述第四权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第一特征表示;
    根据所述第一操作数据,通过第三门控网络,分别得到所述第一初始特征表示的第五权重和所述第二初始特征表示的第六权重;
    根据所述第五权重和所述第六权重,对所述第一初始特征表示和所述第二初始特征表示进行融合,以得到所述第二特征表示。
  13. 根据权利要求11或12所述的装置,其特征在于,所述操作日志还包括用户在第二推荐场景中的第二操作数据,所述第二操作数据包括同一个或相似度高于阈值的推荐对象处于所述第二推荐场景中的不同推荐位置时用户的操作数据;
    所述特征提取模块,具体用于:
    根据所述第二操作数据,分别通过所述第一特征提取网络和所述第二特征提取网络,得到第三特征表示和第四特征表示;
    所述倾向性信息计算模块,具体用于:
    根据所述第三特征表示,通过所述第一任务网络,得到第三倾向性信息,所述第三倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;根据所述第四特征表示,通过所述第二任务网络,得到第四倾向性信息,所述第四倾向性信息用于表示推荐场景中推荐位置对于用户的操作行为的影响;
    所述权重确定模块,具体用于:根据所述第二操作数据,通过所述第一门控网络,分别得到所述第三倾向性信息的第七权重和所述第四倾向性信息的第八权重;
    所述融合模块,具体用于:
    根据所述第七权重和所述第八权重,对所述第三倾向性信息和所述第四倾向性信息进行融合,以得到第二目标倾向性信息,所述第二目标倾向性信息用于表示所述第二推荐场景中推荐位置对于用户的操作行为的影响,所述第二目标倾向性信息用于训练推荐模型。
  14. 根据权利要求11至13任一所述的装置,其特征在于,所述融合包括:加权求和。
  15. 根据权利要求11至14任一所述的装置,其特征在于,所述第一任务网络或所述第二任务网络为上下文相关的位置偏置模型(CPBM)。
  16. 根据权利要求11至15任一所述的装置,其特征在于,所述第一特征提取网络或所述第二特征提取网络为包括多层感知机(MLP)的网络。
  17. 根据权利要求11至16任一所述的装置,其特征在于,所述获取模块,还用于:
    获取所述第一操作数据对应的倾向性信息的第一真值(groundtruth);
    所述装置还包括:
    模型训练模块,用于根据所述第一倾向性信息和所述第一真值,确定第一损失,并根据所述第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  18. 根据权利要求13至17任一所述的装置,其特征在于,所述获取模块,还用于:
    获取所述第二操作数据对应的倾向性信息的第二真值;
    所述模型训练模块,还用于根据所述第二倾向性信息和所述第二真值,确定第二损失,并根据所述第二损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  19. 根据权利要求17或18所述的装置,其特征在于,所述获取模块还用于:
    获取第一收敛程度;
    所述装置还包括:
    损失调整模块,用于根据所述第一收敛程度对所述第一损失进行调整,以得到调整后的第一损失,所述调整后的第一损失与所述第一收敛程度负相关;
    所述模型训练模块,具体用于:
    根据所述调整后的第一损失,对所述第一特征提取网络、所述第二特征提取网络、所述第一任务网络、所述第二任务网络以及所述第一门控网络进行参数更新。
  20. 根据权利要求11至19任一所述的装置,其特征在于,所述获取模块还用于:
    获取所述推荐模型的第二损失,所述第二损失为根据所述第一操作数据对所述推荐模型进行前馈时得到的损失;
    所述损失调整模块,还用于根据所述第一倾向性信息,对所述第二损失进行调整,以得到调整后的第二损失,所述调整后的第二损失用于对所述推荐模型进行参数更新。
  21. 一种计算设备,其特征在于,所述计算设备包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为获取所述代码,并执行如权利要求1至10任一所述的方法。
  22. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有一个或多个指令,所述指令在由一个或多个计算机执行时使得所述一个或多个计算机实施权利要求1至10任一所述的方法。
  23. 一种计算机程序产品,包括代码,其特征在于,在所述代码被执行时用于实现如权利要求1至10任一所述的方法。
PCT/CN2023/084704 2022-03-30 2023-03-29 一种数据处理方法及相关装置 WO2023185925A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210326504.7 2022-03-30
CN202210326504.7A CN115048560A (zh) 2022-03-30 2022-03-30 一种数据处理方法及相关装置

Publications (1)

Publication Number Publication Date
WO2023185925A1 true WO2023185925A1 (zh) 2023-10-05

Family

ID=83158349

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/084704 WO2023185925A1 (zh) 2022-03-30 2023-03-29 一种数据处理方法及相关装置

Country Status (2)

Country Link
CN (1) CN115048560A (zh)
WO (1) WO2023185925A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115048560A (zh) * 2022-03-30 2022-09-13 华为技术有限公司 一种数据处理方法及相关装置
CN116628236B (zh) * 2023-07-25 2024-02-23 腾讯科技(深圳)有限公司 多媒体信息的投放方法、装置、电子设备及存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487278A (zh) * 2019-09-11 2021-03-12 华为技术有限公司 推荐模型的训练方法、预测选择概率的方法及装置
CN113761352A (zh) * 2021-03-25 2021-12-07 北京沃东天骏信息技术有限公司 信息推送方法、装置、设备和存储介质
CN115048560A (zh) * 2022-03-30 2022-09-13 华为技术有限公司 一种数据处理方法及相关装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112487278A (zh) * 2019-09-11 2021-03-12 华为技术有限公司 推荐模型的训练方法、预测选择概率的方法及装置
CN113761352A (zh) * 2021-03-25 2021-12-07 北京沃东天骏信息技术有限公司 信息推送方法、装置、设备和存储介质
CN115048560A (zh) * 2022-03-30 2022-09-13 华为技术有限公司 一种数据处理方法及相关装置

Also Published As

Publication number Publication date
CN115048560A (zh) 2022-09-13

Similar Documents

Publication Publication Date Title
WO2021047593A1 (zh) 推荐模型的训练方法、预测选择概率的方法及装置
WO2021233199A1 (zh) 搜索推荐模型的训练方法、搜索结果排序的方法及装置
WO2022016556A1 (zh) 一种神经网络蒸馏方法以及装置
WO2023185925A1 (zh) 一种数据处理方法及相关装置
WO2022143482A1 (zh) 一种推荐方法、推荐网络及相关设备
WO2024002167A1 (zh) 一种操作预测方法及相关装置
WO2024041483A1 (zh) 一种推荐方法及相关装置
WO2024131762A1 (zh) 一种推荐方法及相关设备
WO2021136058A1 (zh) 一种处理视频的方法及装置
WO2024067373A1 (zh) 一种数据处理方法及相关装置
CN117217284A (zh) 一种数据处理方法及其装置
WO2023050143A1 (zh) 一种推荐模型训练方法及装置
WO2024012360A1 (zh) 一种数据处理方法及相关装置
WO2023246735A1 (zh) 一种项目推荐方法及其相关设备
WO2024067779A1 (zh) 一种数据处理方法及相关装置
CN116843022A (zh) 一种数据处理方法及相关装置
WO2023197910A1 (zh) 一种用户行为预测方法及其相关设备
CN116910357A (zh) 一种数据处理方法及相关装置
CN117056589A (zh) 一种物品推荐方法及其相关设备
CN117251619A (zh) 一种数据处理方法及相关装置
CN116204709A (zh) 一种数据处理方法及相关装置
CN116308640A (zh) 一种推荐方法及相关装置
CN115545738A (zh) 一种推荐方法及相关装置
WO2023051678A1 (zh) 一种推荐方法及相关装置
EP4398128A1 (en) Recommendation method and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23778290

Country of ref document: EP

Kind code of ref document: A1