Model training method and device, equipment, storage medium and product

By combining the key data of the sample object and the general object representation, the operation prediction model is used for prediction processing and training, which solves the problem of insufficient prediction accuracy of the operation prediction model under limited training data and significantly improves the prediction accuracy of the model.

CN118643322APending Publication Date: 2024-09-13SHENZHEN WANGYU COMPUTER NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310270823.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Due to limited time and high cost of manual annotation, the amount of training data for operational prediction models is usually limited, resulting in insufficient prediction accuracy and becoming a hot issue in current research.

Method used

By obtaining the key data and general object representation of the sample object, the operation prediction model is used for prediction processing, and the model is trained based on the difference between the annotated data and prediction information to improve the prediction accuracy of the model.

Benefits of technology

Under limited training data, by combining common object representations as additional features for training, the prediction accuracy of the operation prediction model is significantly improved and the training adequacy of the model is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643322A
    Figure CN118643322A
Patent Text Reader

Abstract

The embodiment of the invention discloses a model training method and device, equipment, a storage medium and a product. The method comprises the steps that a training data set and general object representation of a sample object are obtained, the training data set comprises key data of the sample object and annotation data of the sample object, and the general object representation of the sample object is extracted based on historical operation executed by the sample object in an application scene; and calling a first operation prediction model to predict the key data and the general object representation of the sample object to obtain first probability indication information, and training the first operation prediction model based on the difference between the annotation data and the first probability indication information. Visibly, the general object representation of the sample object is taken as the additional feature, and the first operation prediction model is trained in combination with the training data, so that the training of the first operation prediction model can be more sufficient under the limited training data, and the prediction accuracy of the first operation prediction model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a model training method, a model training device, a computer equipment, a computer-readable storage medium and a model training product. Background Art

[0002] With the advancement of scientific and technological research, artificial intelligence models have been widely used in various fields. In the field of promotion (such as advertising promotion), the operation prediction model (an artificial intelligence model) can predict the probability of an object performing a certain operation (such as downloading, registering, etc.) based on the characteristic information of the object, so as to assist promoters in more accurate promotion and thus improve promotion efficiency. The prediction accuracy of the operation prediction model is positively correlated with the amount of training data. Studies have found that due to limited time and high manual labeling costs, the amount of training data is often limited; how to train the operation prediction model based on limited training data to improve the prediction accuracy of the operation prediction model has become a hot issue in current research. Summary of the invention

[0003] The embodiments of the present application provide a model training method, apparatus, device, computer-readable storage medium and product, which can improve the prediction accuracy of the operation prediction model.

[0004] On the one hand, an embodiment of the present application provides a model training method, comprising:

[0005] Acquire a training data set, the training data set including key data of a sample object and annotated data of the sample object; the key data including at least one element that affects whether the sample object performs a target operation in an application scenario; the annotated data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data;

[0006] Obtaining a common object representation of the sample object, where the common object representation of the sample object is extracted based on historical operations performed by the sample object in the application scenario;

[0007] Calling a first operation prediction model to perform prediction processing on key data and a common object representation of a sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability of the sample object performing a target operation in an application scenario;

[0008] Based on the difference between the labeled data and the first probability indication information, the first operation prediction model is trained; the trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario.

[0009] On the one hand, an embodiment of the present application provides a model training device, the model training device comprising:

[0010] an acquisition unit, configured to acquire a training data set, the training data set including key data of a sample object and annotated data of the sample object; the key data including at least one element affecting whether the sample object performs a target operation in an application scenario; and the annotated data indicating whether the sample object performs a target operation in an application scenario under the influence of the key data;

[0011] and for obtaining a common object representation of the sample object, the common object representation of the sample object being extracted based on historical operations performed by the sample object in the application scenario;

[0012] A processing unit, configured to call a first operation prediction model to perform prediction processing on key data and a common object representation of a sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability that the sample object performs a target operation in an application scenario;

[0013] And used to train a first operation prediction model based on the difference between the labeled data and the first probability indication information; the trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario.

[0014] In one embodiment, the processing unit is used to obtain a common object representation of the sample object, specifically to:

[0015] Obtain a general object representation set, the general object representation set includes general object representations of N general objects, the general object representation of each object is associated with the identifier of the object; the sample object belongs to the N general objects, and N is an integer greater than 1;

[0016] Get the identity of the sample object;

[0017] The common object representation of the sample object is queried from the common object representation set according to the identifier of the sample object.

[0018] In one implementation, the processing unit is used to obtain a set of general object representations, specifically to:

[0019] Get the historical operation set of N general objects in the application scenario;

[0020] obtaining a second operation prediction model;

[0021] Calling the second operation prediction model to perform feature extraction processing on the historical operation sets of N general objects in the application scenario to obtain a general object representation matrix, where the general object representation matrix includes N general object representation sets, and the i-th general object representation set is extracted based on the historical operation set of the i-th general object in the application scenario;

[0022] The N object representation sets in the general object representation matrix are pooled to obtain general object representation sets of the N general objects.

[0023] In one embodiment, the processing unit is used to obtain a common object representation of the sample object, specifically to:

[0024] Obtain the historical operation set of the sample object in the application scenario;

[0025] obtaining a second operation prediction model;

[0026] The second operation prediction model is called to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain the behavior representation of the sample object.

[0027] In one implementation, the sample object belongs to a sample object set; the training process of the second operation prediction model includes:

[0028] Acquire a historical operation set of a general object in an application scenario, the general object belongs to the general object set, and the sample object set is a subset of the general object set; the historical operation set of the general object in the application scenario includes at least two historical operations;

[0029] Performing mask processing on at least one historical operation in a historical operation set of the general object in the application scenario to obtain a mask set of the general object in the application scenario;

[0030] The model to be trained is used to predict the operations of the mask set to obtain a predicted operation set of the general object;

[0031] Based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario, the model to be trained is trained to obtain a second operation prediction model.

[0032] In one embodiment, the predicted operations in the predicted operation set correspond one-to-one to the historical operations in the historical operation set of the general object in the application scenario; the processing unit is used to train the to-be-trained model based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario to obtain a second operation prediction model, specifically used to:

[0033] Filtering out a mask operation from the prediction operation set, where the mask operation is a prediction operation in the prediction operation set corresponding to a historical operation in the history operation set of the general object in the application scenario that is subjected to mask processing;

[0034] Constructing a prediction loss according to the difference between the mask operation and the historical operation of the general object in which the mask processing is performed in the historical operation set in the application scenario;

[0035] Based on the prediction loss, the model to be trained is trained to obtain a second operation prediction model.

[0036] In one embodiment, the processing unit is used to call the first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain the first probability indication information, which is specifically used to:

[0037] Extracting features from key data of sample objects to obtain key features of sample objects;

[0038] Concatenate the key features of the sample object with the common object representation of the sample object to obtain a concatenated feature;

[0039] The first operation prediction model is called to perform prediction processing on the splicing feature to obtain first probability indication information.

[0040] In one implementation, the key data of the sample object includes P key-value pairs, where P is a positive integer; the processing unit is used to extract features from the key data of the sample object to obtain key features of the sample object, specifically for:

[0041] Perform random initialization processing on P keys to obtain first features corresponding to the P keys;

[0042] Normalize the values ​​of the P keys to obtain the second features corresponding to the P values;

[0043] The first feature and the second feature are concatenated to obtain the key feature of the sample object.

[0044] In one embodiment, the process of the processing unit training the first operation prediction model based on the difference between the labeled data and the first probability indication information includes:

[0045] Determining a second probability that the sample object performs a target operation in the application scenario based on the labeled data;

[0046] Construct a cross entropy loss function through the first probability and the second probability;

[0047] According to the cross entropy loss function, the first operation prediction model is trained until the value of the cross entropy loss function is less than the loss threshold.

[0048] In one embodiment, the application scenario includes at least one of the following: a game application scenario, a multimedia information browsing scenario, a social application scenario, and a resource transfer scenario;

[0049] The historical operations performed by the sample objects in different application scenarios are different.

[0050] In one embodiment, the application scenario is a game application scenario; the processing unit is further used for:

[0051] Acquire key data of the object to be processed and a common object representation of the object to be processed, where the common object representation of the object to be processed is extracted based on historical operations performed by the object to be processed in the game application scenario;

[0052] The trained first operation prediction model is called to perform prediction processing on the key data of the object to be processed and the common object representation of the object to be processed to obtain second probability indication information; the second probability indication information is used to indicate the probability of the object to be processed performing the target operation in the game application scenario.

[0053] Accordingly, the present application provides a computer device, the computer device comprising:

[0054] a memory, wherein a computer program is stored in the memory;

[0055] A processor is used to load a computer program to implement the above-mentioned model training method.

[0056] Accordingly, the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is suitable for being loaded by a processor and executing the above-mentioned model training method.

[0057] Accordingly, the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned model training method.

[0058] In the embodiment of the present application, a training data set and a common object representation of a sample object are obtained, the training data set includes key data of the sample object and labeled data of the sample object, the common object representation of the sample object is extracted based on the historical operations performed by the sample object in the application scenario, the first operation prediction model is called to perform prediction processing on the key data and the common object representation of the sample object, and the first probability indication information is obtained, and the first operation prediction model is trained based on the difference between the labeled data and the first probability indication information. It can be seen that by using the common object representation of the sample object as an additional feature and training the first operation prediction model in combination with the training data, the training of the first operation prediction model can be made more sufficient under limited training data, thereby improving the prediction accuracy of the first operation prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0060] Figure 1 A schematic diagram of a model training scheme provided in an embodiment of the present application;

[0061] Figure 2 A flowchart of a model training method provided in an embodiment of the present application;

[0062] Figure 3 A flowchart of another model training method provided in an embodiment of the present application;

[0063] Figure 4 A schematic diagram of a training process of a second operation prediction model provided in an embodiment of the present application;

[0064] Figure 5 A calling flow chart of a first operation prediction model provided in an embodiment of the present application;

[0065] Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;

[0066] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0068] This application involves artificial intelligence and machine learning technologies. The following is a brief introduction to the relevant technologies:

[0069] Artificial Intelligence (AI): AI is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making. The embodiments of the present application mainly involve calling a trained operation prediction model to predict the probability of an object performing a target operation in an application scenario through the key data of any object and the general object representation of the object.

[0070] AI technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, large application processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0071] Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithmic complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills, and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching. The embodiment of the present application mainly trains the operation prediction model through the difference between the probability indication information and the labeled data; wherein the probability indication information is predicted by the operation prediction model based on the key data of the object and the general object representation.

[0072] Based on artificial intelligence and machine learning technologies, an embodiment of the present application provides a model training solution to improve the prediction accuracy of the operation prediction model. Figure 1 A schematic diagram of a model training scheme provided in an embodiment of the present application, such as Figure 1As shown, the model training scheme can be executed by a computer device 101, and the computer device 101 can specifically be a terminal device or a server. Among them, the terminal device may include but is not limited to: smart phones (such as Android phones, IOS phones, etc.), tablet computers, portable personal computers, mobile Internet devices (Mobile Internet Devices, referred to as MID), vehicle-mounted terminals, smart home appliances, unmanned aerial vehicles, wearable devices, etc., and the embodiments of this application do not limit this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network, content distribution network), and big data and artificial intelligence platforms and other basic cloud computing services, and the embodiments of this application do not limit this.

[0073] It should be noted that Figure 1 The number of computer devices is only used as an example and does not constitute an actual limitation of this application; for example, Figure 1 The computer device 101 may also include a computer device 102, which may be used to extract a common object representation of a sample object. The computer device 101 and the computer device 102 may be connected via a wired or wireless manner, which is not limited in the present application.

[0074] In the specific implementation, the general principle of the model training solution provided by this application is as follows:

[0075] (1) The computer device 101 obtains a training data set. The training data set includes key data of the sample object and labeled data of the sample object. Among them, the key data includes at least one element that affects the sample object to perform the target operation in the application scenario. The application scenario may include, but is not limited to: game application scenarios (such as game download, game registration, etc.), multimedia information browsing scenarios (such as video browsing scenarios, live broadcast browsing scenarios, picture and text browsing scenarios, etc.), social application scenarios (such as multi-person chat scenarios), and resource transfer scenarios (such as shopping scenarios). It can be understood that the target operation can be the same or different in different application scenarios; for example, in a game promotion scenario, the target operation can refer to game registration, game download, etc.; for another example, in a video promotion scenario and a game application scenario, the target operation can refer to triggering an advertising link; for another example, in a shopping scenario, the target operation can refer to placing an order. For different application scenarios, the key data may be the same or different, and may be partially the same and partially different; for example, for different application scenarios, the key data may all be attribute information of the object; for another example, for a game scenario, the key data may be the age of the object; for a social scenario, the key data may be the number of group chats (or the number of friends) the object has joined; for another example, for a game scenario, the key data may be the age and gender of the object; for a shopping scenario, the key data may be the age of the object and the industry in which he or she is engaged.

[0076] The annotation data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data; for example, assuming that the key data is the age of the sample object, the application scenario is the game video browsing scenario, and the target operation is to download the game associated with the currently playing game video; when the annotation data is a valid value (such as 1), it means that the sample object has downloaded the game associated with the game video while browsing the game video at the current age. When the annotation data is an invalid value (such as 0), it means that the sample object has not downloaded the game associated with the game video while browsing the game video at the current age.

[0077] (2) The computer device 101 obtains the common object representation of the sample object. The common object representation of the sample object is extracted based on the historical operations performed by the sample object in the application scenario. The historical operations performed by the sample object in different application scenarios are different; for example, in the game application scenario, the historical operations may be shooting operations, jumping operations, resurrection operations, etc.; in the video browsing scenario, the historical operations may be like operations, sharing operations, comment operations, etc.

[0078] In one embodiment, on the one hand, the computer device 101 obtains a set of general object representations, which includes general object representations of N general objects, each of which is associated with an identifier of the object, and the sample object belongs to N general objects, where N is an integer greater than 1. On the other hand, the computer device 101 obtains an identifier (such as an ID) of the sample object, and queries the general object representation of the sample object from the set of general object representations through the identifier of the sample object.

[0079] In another embodiment, on the one hand, the computer device 101 obtains a historical operation set of the sample object in the application scenario; on the other hand, the computer device 101 obtains a second operation prediction model, and calls the second operation prediction model to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain a behavioral representation of the sample object.

[0080] Optionally, some identical data may exist in the key data of the sample object and the historical operation set of the sample object; for example, the key data of the sample object includes the attribute data of the sample object and the number of times the sample object performs operation 1 in the application scenario; the historical operation set of the sample object includes the sequence of operations performed by the sample object in the application scenario, through which the number of times the sample object performs operation 1 in the application scenario can be counted.

[0081] (3) The computer device 101 calls the first operation prediction model to perform prediction processing on the key data and the universal object representation of the sample object to obtain first probability indication information. The first probability indication information is used to indicate the first probability that the sample object performs the target operation in the application scenario (i.e., the first operation prediction model predicts the probability that the sample object performs the target operation in the application scenario based on the key data of the sample object and the universal object representation of the sample object).

[0082] In one embodiment, the computer device 101 extracts features from key data of the sample object to obtain key features of the sample object. After obtaining the key features of the sample object, the computer device 101 splices the key features of the sample object and the common object representation of the sample object to obtain spliced ​​features, and calls the first operation prediction model to perform prediction processing on the spliced ​​features to obtain first probability indication information.

[0083] (4) The computer device 101 trains the first operation prediction model based on the difference between the labeled data and the first probability indication information. The trained first operation prediction model is used to predict the probability of any object performing the target operation in the application scenario. In one embodiment, the process of the computer device 101 training the first operation prediction model based on the difference between the labeled data and the first probability indication information includes: determining the second probability of the sample object performing the target operation in the application scenario based on the labeled data; specifically, if the sample object performs the target operation in the application scenario, the second probability is 1; correspondingly, if the sample object does not perform the target operation in the application scenario, the second probability is 0. After obtaining the second probability, the computer device 101 constructs a cross-entropy loss function through the first probability and the second probability, and trains the first operation prediction model according to the cross-entropy loss function until the value of the cross-entropy loss function is less than the loss threshold.

[0084] It should be noted that in the specific implementation of this application, key data of the object (such as attribute information, activity, etc.) and related data such as the historical operation set of the object in the application scenario are involved. When the above embodiments of this application are applied to specific products or technologies, it is necessary to obtain the permission or consent of the object, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0085] In the embodiment of the present application, a training data set and a common object representation of a sample object are obtained, the training data set includes key data of the sample object and labeled data of the sample object, the common object representation of the sample object is extracted based on the historical operations performed by the sample object in the application scenario, the first operation prediction model is called to perform prediction processing on the key data and the common object representation of the sample object, and the first probability indication information is obtained, and the first operation prediction model is trained based on the difference between the labeled data and the first probability indication information. It can be seen that by using the common object representation of the sample object as an additional feature and training the first operation prediction model in combination with the training data, the training of the first operation prediction model can be made more sufficient under limited training data, thereby improving the prediction accuracy of the first operation prediction model.

[0086] Based on the above-mentioned model training scheme, the embodiment of the present application proposes a more detailed model training method. The model training method proposed in the embodiment of the present application will be introduced in detail below in conjunction with the accompanying drawings.

[0087] See also Figure 2 , Figure 2 The flowchart of a model training method provided in an embodiment of the present application can be executed by a computer device, which can be a terminal device or a server. Figure 2As shown, the model training method may include the following steps S201-S204:

[0088] S201. Obtain a training data set.

[0089] The training data set includes key data of sample objects and labeled data of sample objects. In other words, the training data set is a labeled data set. The number of sample objects in the training data set can be one or more. The model training method provided in this application is mainly aimed at the situation where the number of sample objects in the training data set is limited (such as the number of sample objects in the training data set is less than the quantity threshold). Key data includes at least one element that affects the sample object's execution of the target operation in the application scenario; for example, key data can be the object's attribute information, current time, activity, etc.; wherein activity is used to indicate the degree of activity of the sample object in the application scenario (such as application usage duration, application usage frequency, etc.).

[0090] Among them, the application scenarios may include but are not limited to: game application scenarios, multimedia information browsing scenarios, social application scenarios, resource transfer scenarios. It is understandable that the target operations may be the same or different in different application scenarios. The target operations may specifically include but are not limited to: application (such as game) registration, page access, resource transfer, information browsing, application download; in addition, the number of target operations may also be multiple, for example, target operation 1 is application download, and target operation 2 is application registration. And the key data of the sample objects in different application scenarios may also be the same or different or partially the same. The annotation data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data.

[0091] In one implementation, the training data set can be represented as:

[0092] D l ={(x l,1 ,y1),(x l,2 ,y2),(x l,3 ,y3),…,(x l,M ,y M )}

[0093] Among them, D l represents the training data set, D l Contains the key data of M sample objects and the labeled data of M sample objects; x l,i Represents the key data of the i-th sample object, y i represents the labeled data of the i-th sample object; M is a positive integer, and i is a positive integer less than or equal to M. It should be noted that when the number of target operations is multiple, if the labeled data y of the i-th sample object iis a valid value (such as 1), indicating that in the key data x l,i Under the influence of , the i-th sample object performs all target operations in the application scenario; if the labeled data y of the i-th sample object i Is an invalid value (such as 0), indicating that the key data x l,i Under the influence of , the i-th sample object has at least one unexecuted target operation in the application scenario.

[0094] S202: Obtain a common object representation of a sample object.

[0095] The common object representation of the sample object is extracted based on the historical operations performed by the sample object in the application scenario. The historical operations performed by the sample object in different application scenarios are different; for example, in the game application scenario, the historical operations can be shooting operations, jumping operations, resurrection operations, etc.; in the video browsing scenario, the historical operations can be like operations, sharing operations, comment operations, etc.

[0096] In one implementation, a computer device obtains a set of general object representations, the set of general object representations includes general object representations of N general objects, the general object representation of each object is associated with an identifier of the object, the N general objects include a sample object (i.e., the sample object belongs to the N general objects), and N is an integer greater than 1. The computer device obtains an identifier (such as an ID) of the sample object, and queries the general object representation of the sample object from the set of general object representations through the identifier of the sample object.

[0097] In another embodiment, the computer device obtains a historical operation set of the sample object in the application scenario and obtains a second operation prediction model. The computer device then calls the second operation prediction model to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain a behavior representation of the sample object.

[0098] S203: Calling a first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information.

[0099] The first probability indication information is used to indicate a first probability of the sample object performing a target operation in an application scenario, and the first probability is a predicted probability.

[0100] In one embodiment, the computer device calls the first operation prediction model to perform prediction processing on the key data of the sample object and the universal object representation of the sample object to obtain the probability (i.e., the first probability) that the sample object performs the target operation in the application scenario. Specifically, the computer device first extracts features from the key data of the sample object to obtain key features of the sample object. After obtaining the key features of the sample object, the computer device splices the key features of the sample object and the universal object representation of the sample object to obtain spliced ​​features, and calls the first operation prediction model to perform prediction processing on the spliced ​​features to obtain first probability indication information.

[0101] S204: Training a first operation prediction model based on a difference between the labeled data and the first probability indication information.

[0102] The trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario.

[0103] In one embodiment, the process of training the first operation prediction model by the computer device based on the difference between the labeled data and the first probability indication information includes: determining a second probability (i.e., a calibration probability) that the sample object performs the target operation in the application scenario based on the labeled data; specifically, if the sample object performs the target operation in the application scenario, the second probability is 1; correspondingly, if the sample object does not perform the target operation in the application scenario, the second probability is 0.

[0104] After obtaining the second probability, the computer device constructs a cross entropy loss function through the first probability and the second probability, and trains the first operation prediction model according to the cross entropy loss function until the value of the cross entropy loss function is less than the loss threshold. Specifically, the computer device trains the parameters in the first operation prediction model according to the cross entropy loss function (such as adjusting the number of network layers of the first operation prediction model, the scale of the convolution kernel, etc.), until the value of the cross entropy loss function constructed by the first probability predicted by the trained first operation prediction model and the second probability is less than the loss threshold.

[0105] In the embodiment of the present application, a training data set and a common object representation of a sample object are obtained, the training data set includes key data of the sample object and labeled data of the sample object, the common object representation of the sample object is extracted based on the historical operations performed by the sample object in the application scenario, the first operation prediction model is called to perform prediction processing on the key data and the common object representation of the sample object, and the first probability indication information is obtained, and the first operation prediction model is trained based on the difference between the labeled data and the first probability indication information. It can be seen that by using the common object representation of the sample object as an additional feature and training the first operation prediction model in combination with the training data, the training of the first operation prediction model can be made more sufficient under limited training data, thereby improving the prediction accuracy of the first operation prediction model.

[0106] See also Figure 3 , Figure 3 A flowchart of another model training method provided in an embodiment of the present application, the model training method can be executed by a computer device, and the computer device can be a terminal device or a server. Figure 3 As shown, the model training method may include the following steps S301-S306:

[0107] S301: Obtain a training data set.

[0108] For the specific implementation of step S301, please refer to Figure 2 The implementation of step S201 will not be repeated here.

[0109] S302: Obtain a historical operation set of N general objects in an application scenario.

[0110] The sample object is included in N general objects. In one embodiment, the sample object belongs to a sample object set, N general objects belong to a general object set, and the sample object set is a subset of the general object set. In one embodiment, the historical operation set of N general objects in the application scenario includes N historical operation subsets, and each historical operation subset corresponds to a general object. The jth historical operation subset is obtained by counting the historical operations of the jth general object in the application scenario, and j is a positive integer less than or equal to N; for example, the jth historical operation subset is obtained by counting the historical operations of the jth general object in the application scenario within a preset time period; for another example, the jth historical operation subset is obtained by counting the historical operations of the jth general object in the application scenario up to the current moment. Each historical operation subset includes at least two historical operations of the corresponding general object in the application scenario; the historical operations in each historical operation subset can be all historical operations of the corresponding general object in the application scenario, or can be part of the historical operations of the corresponding general object in the application scenario (such as historical operations that need to be paid attention to, which can be set based on actual needs, and this application does not limit this).

[0111] It should be noted that the historical operations performed by the sample objects in the application scenario are unlabeled data sets, and the number of historical operations of each general object in the application scenario can be the same or different; for example, the historical operations of general object 1 in the application scenario include likes and favorites (that is, the historical operation subset corresponding to general object 1 includes 2 historical operations); the historical operations of general object 2 in the application scenario include messages, forwarding and favorites (that is, the historical operation subset corresponding to general object 2 includes 3 historical operations); the historical operations of general object 3 in the application scenario include messages and favorites (that is, the historical operation subset corresponding to general object 3 includes 2 historical operations). The historical operation set of N general objects in the application scenario can be specifically expressed as:

[0112] D u ={x u,1 ,x u,2 ,x u,3 ,…,x u, N}

[0113] Among them, D u represents the historical operation set of N general objects in the application scenario, x u,j represents the historical operation subset of the jth general object in the application scenario. Furthermore, x u,j It can be expressed as:

[0114] x u,j =[x u, j ,1 ,x u,j,2 ,…,x u,j,R ]

[0115] Among them, x u,j,1 represents the first historical operation of the jth general object in the application scenario, and R is used to indicate the total number of historical operations of the jth general object in the application scenario; it should be noted that the value of R may be different for different general objects, and R is an integer greater than 1. In addition, the historical operation subset of the general object in the application scenario may include multiple (at least two) identical historical operations.

[0116] S303 : Calling the second operation prediction model to perform feature extraction processing on the historical operation sets of N general objects in the application scenario to obtain a general object representation set.

[0117] In one embodiment, the computer device obtains the second operation prediction model. The training process of the second operation prediction model is as follows:

[0118] S11: The computer device obtains a historical operation set of at least one general object among N general objects in an application scenario. In one implementation, the historical operation set of the N general objects in the application scenario includes N historical operation subsets, each of which corresponds to a general object. Assuming that the computer device obtains the historical operation set of the j-th general object in the application scenario, the historical operation set of the j-th general object in the application scenario refers to: the historical operation subset corresponding to the j-th general object in the historical operation set of the N general objects in the application scenario.

[0119] S12: After obtaining the historical operation set of at least one general object among the N general objects in the application scenario, the computer device masks at least one historical operation in the historical operation set of each general object in the application scenario (i.e., the historical operation subset corresponding to each general object) to obtain the mask set of each general object in the application scenario. Masking a historical operation can be understood as covering up the historical operation (such as replacing the historical operation with a specific identifier). The mask set of each general object is obtained after masking at least one historical operation in the historical operation set of the general object. In actual applications, the number of masked historical operations in the historical operation subset corresponding to each general object is less than the total number of historical operations in the set; that is, the mask set of the general object includes at least one masked historical operation and at least one unmasked historical operation.

[0120] For example, assuming that the historical operation subset of the jth general object in the application scenario includes R historical operations, it can be specifically expressed as:

[0121] x u,j =[x u, j,1 ,x u,j,2 ,…,x u,j,R ]

[0122] After the computer device performs mask processing on the historical operation set of the j-th general object in the application scenario (i.e., the historical operation subset of the j-th general object in the application scenario), the mask set of the j-th general object in the application scenario can be expressed as:

[0123] x′ u,j =[x u,j,1 ,[MASK],…,[MASK],x u,j,R ]

[0124] Among them, x′ u,j represents the mask set of the jth general object in the application scenario, and [MASK] represents the masked portion of the historical operation set of the jth general object in the application scenario. It can be understood that the above x′ u,j It is only used as an example and does not constitute an actual limitation of the present application; for example, x u,j,1 Mask processing, or x u,j,R Perform mask processing, etc.

[0125] S13: After obtaining the mask set of each general object in the application scenario, the computer device uses the model to be trained to perform operation prediction on the mask set of each general object in the application scenario, and obtains the predicted operation set of each general object. Specifically, the model to be trained includes L layers of coding layers and classifiers; L is a positive integer. The computer device can convert the mask set of each general object in the application scenario into a continuous representation vector (Embedding) set; wherein, the representation vector set corresponding to the mask set of the jth general object in the application scenario can be expressed as:

[0126]

[0127] in, Represents the set of representation vectors corresponding to the mask set of the jth general object in the application scenario; E(x u,j,k ) represents the continuous representation vector corresponding to the kth historical operation of the jth general object in the application scenario, and k is a positive integer less than or equal to R; E([MASK]) represents the continuous representation vector corresponding to the historical operation of the jth general object being masked in the application scenario.

[0128] After obtaining the continuous representation vector (Embedding) set corresponding to the mask set of each common object in the application scenario, the computer device can encode the continuous representation vector (Embedding) set corresponding to the mask set of each common object in the application scenario through the L-layer encoding layer in the model to be trained (such as the encoding layer (TRF-Layer()) in the deep learning model (Transformer model) based on the attention mechanism), which can be specifically expressed as:

[0129]

[0130] in, represents the encoding result of the set of representation vectors corresponding to the mask set of the jth general object in the application scenario output by the i-th coding layer, and TRF-Layer() represents the coding layer. Further, the encoding result of the set of representation vectors corresponding to the mask set of the jth general object in the application scenario after being encoded by the L-layer coding layer can be expressed as:

[0131]

[0132] in, The encoding result after the set of representation vectors corresponding to the mask set of the j-th general object in the application scenario is encoded by L layers of encoding layers, It can be the continuous representation vector E(x) corresponding to the k-th historical operation of the j-th general object in the application scenario of the L-layer coding layer u,j,k ) encoding; it can also be obtained by the L-layer coding layer based on the continuous representation vector encoding corresponding to the historical operation of the j-th general object being masked in the application scenario (k-th); k is a positive integer less than or equal to R.

[0133] After obtaining the representation vector set corresponding to the mask set of each general object in the application scenario and the encoding result after encoding through the L-layer encoding layer (i.e., the encoding result corresponding to the mask set of each general object in the application scenario), the computer device classifies the encoding result corresponding to the mask set of each general object in the application scenario through the classifier in the model to be trained to obtain a predicted operation set. Specifically, the computer device classifies the encoding result corresponding to the mask set of each general object in the application scenario through the classifier in the model to be trained to obtain the operation probability distribution of the encoding result corresponding to the mask set of each general object in the application scenario.

[0134] In one embodiment, the encoding result corresponding to the mask set of each general object in the application scenario includes R encoding sub-results, and each encoding sub-result corresponds one-to-one to a historical operation (or a mask corresponding to a historical operation) in the mask set of the general object in the application scenario. The operation probability distribution of the k-th encoding sub-result is used to indicate the probability of a candidate operation associated with the predicted operation corresponding to the k-th historical operation of the general object in the application scenario; the number of candidate operations is multiple, and the candidate operations include all historical operations of the general object in the application scenario.

[0135] The computer device classifies the kth encoding sub-result in the encoding result of the jth general object through the classifier in the model to be trained, and obtains the probability of the candidate operation associated with the predicted operation corresponding to the kth historical operation of the jth general object, which can be expressed as:

[0136]

[0137] Among them, y k represents the probability of the candidate operation associated with the predicted operation corresponding to the k-th historical operation of the j-th general object, The kth encoding sub-result in the encoding result of the jth general object, the kth encoding sub-result can be the continuous representation vector E(x) corresponding to the kth historical operation of the L-layer encoding layer based on the jth general object in the application scenario u,j,k ) is encoded; it can also be encoded by the L-layer encoding layer based on the continuous representation vector corresponding to the historical operation of the j-th general object being masked in the application scenario (k-th). T is the transposed matrix, W T and b are adjustable parameters. T Adjusting a and b can improve the prediction accuracy of the model to be trained.

[0138] Furthermore, the computer device determines the predicted operation set of each general object in the application scenario based on the operation probability distribution of the encoding result corresponding to the mask set of each general object in the application scenario. For example, assuming that the probability of the predicted operation corresponding to the k-th historical operation of the j-th general object being associated with candidate operation 1 is 0.1, the probability of the associated candidate operation 2 is 0.8, the probability of the associated candidate operation 3 is 0.03, and the probability of the associated candidate operation 4 is 0.07; then the predicted operation corresponding to the k-th historical operation of the j-th general object is determined to be candidate operation 2.

[0139] S14: The computer device trains the model to be trained based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario to obtain a second operation prediction model. In one implementation, the computer device selects a mask operation from the predicted operation set, and the mask operation is a predicted operation in the predicted operation set corresponding to a historical operation that is masked in the historical operation set of the general object in the application scenario. The computer device constructs a prediction loss based on the difference between the mask operation and the historical operation that is masked in the historical operation set of the general object in the application scenario, and trains the model to be trained based on the prediction loss to obtain a second operation prediction model.

[0140] It should be noted that, by constructing the prediction loss through the difference between the mask operation and the historical operations that have been masked in the historical operation set of the general object in the application scenario, the influence of the difference between the prediction results of the historical operations that have not been masked and the historical operations that have not been masked on the model training can be reduced, making the model training process more targeted, thereby improving the prediction accuracy of the trained second operation prediction model.

[0141] Figure 4 A schematic diagram of the training process of a second operation prediction model provided in an embodiment of the present application. Figure 4 As shown, during the training process of the second operation prediction model, the computer device converts the mask set of each common object in the application scenario into a continuous representation vector (Embedding), and encodes the representation vector through an L-layer coding layer, and then classifies the encoding result output by the L-layer coding layer through a classifier to obtain the probability of candidate operations associated with the predicted operation corresponding to each historical operation of each common object.

[0142] It should be noted that since the historical operation set of general objects in application scenarios is unlabeled data, during the training process of the second operation prediction model, a large amount (the number is greater than the number threshold) of unlabeled data can be used to fully train the model to be trained, so that the trained second operation prediction model can explore the hidden features in the historical operation set of general objects in application scenarios, thereby improving the prediction accuracy of the second operation prediction model.

[0143] In another implementation, the computer device calls the encoding layer in the second operation prediction model to encode the historical operation set of N general objects in the application scenario, and obtains the encoding matrix corresponding to the historical operation set of N general objects in the application scenario. The encoding matrix can be expressed as:

[0144] H L =[H L,1 ,H L,2 ,…,HL,N ]

[0145] Among them, H L Represents the encoding matrix corresponding to the historical operation set of N general objects in the application scenario, H L,j Represents the historical operation subset x of the jth general object in the application scenario u,j The corresponding encoding set.

[0146] After obtaining the encoding matrix corresponding to the historical operation set of N general objects in the application scenario, the computer device performs pooling processing (such as maximum pooling processing, average pooling processing, etc.) on the encoding matrix to obtain a general object representation set corresponding to the historical operation set of N general objects in the application scenario, which can be specifically expressed as:

[0147] z=pooling([H L,1 ,H L,2 ,…,H L,N ])={z1,z2,…,z N}

[0148] Where z represents the set of generic object representations corresponding to the historical operation set of N generic objects in the application scenario; pooling(x) represents the pooling process of x, z j The generic object representation representing the j-th generic object.

[0149] It can be understood that after obtaining the encoding matrix corresponding to the historical operation set of N general objects in the application scenario, by performing pooling processing on the encoding matrix, the dimension of the encoding matrix can be reduced and the data processing efficiency of subsequent processes can be improved.

[0150] S304: Query the common object representation of the sample object from the common object representation set according to the identifier of the sample object.

[0151] In one embodiment, the general object representation set includes general object representations of N general objects, the general object representation of each object is associated with an identifier of the object, the N general objects include a sample object (i.e., the sample object belongs to the N general objects), and N is an integer greater than 1. The computer device obtains the identifier of the sample object, and queries the general object representation of the sample object from the general object representation set through the identifier of the sample object.

[0152] S305: Calling a first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information.

[0153] The first probability indication information is used to indicate a first probability of the sample object performing a target operation in an application scenario, and the first probability is a predicted probability.

[0154] In one embodiment, the computer device first extracts features from the key data of the sample object to obtain the key features of the sample object. In one embodiment, the key data of the sample object includes P key-value pairs (also known as attribute-value pairs), where P is a positive integer. For example, the number of active days: 3 days, the number of active days is the key, and 3 days is the value; for another example, the number of comments: 200, the number of comments is the key, and 200 is the value. The computer device performs random initialization processing on the P keys (attributes) to obtain the first features corresponding to the P keys; wherein, the random initialization processing on the P keys can be understood as the random initialization of the importance (such as weight) of the P keys. And the values ​​of the P keys are normalized (that is, the values ​​of the P keys are mapped to the interval of 0 to 1) to obtain the second features corresponding to the P values. By normalizing the values ​​of the P keys, the adverse effects caused by singular samples (the difference with other samples is greater than the difference threshold) can be reduced (such as causing a decrease in prediction accuracy). After obtaining the first feature and the second feature, the computer device splices the first feature with the second feature to obtain the key features of the sample object. It can be understood that the first feature is extracted from the key in the key data of the sample object, and the second feature is extracted from the value in the key data of the sample object. The key feature corresponding to the key data of the sample object can be obtained by splicing the first feature and the second feature. Further, the computer device splices the key feature of the sample object and the universal object representation of the sample object to obtain the spliced ​​feature, and calls the first operation prediction model to perform prediction processing on the spliced ​​feature to obtain the first probability indication information. It can be specifically expressed as:

[0155]

[0156] in, represents the first probability, F(a) represents calling the first operation prediction model to predict a; [x i ,z i ] indicates x i and z i Splice; x i is the key feature of the sample object, z i is a common object feature of the sample object; θ is an adjustable model parameter. By optimizing θ, the prediction accuracy of the first operation prediction model can be improved.

[0157] It should be noted that the first operation prediction model can be specifically constructed based on a multilayer perceptron (MLP) or a network model of an attention mechanism (such as a transformer model). Taking the multilayer perceptron as an example, the first operation prediction model is called to perform prediction processing on the splicing features, and the first probability indication information can be expressed as:

[0158]

[0159] in, represents the first probability, sigmoid(a) represents mapping the real number a to the interval [0,1]; [x i ,z i ] indicates x i and z i Splice; x i is the key feature of the sample object, z i is the common object feature of the sample object; and is the transposed matrix; and b5 and b6 are both adjustable model parameters.

[0160] S306: Training a first operation prediction model based on the difference between the labeled data and the first probability indication information.

[0161] In one embodiment, a second probability that the sample object performs a target operation in an application scenario is determined based on the labeled data; specifically, if the sample object performs the target operation in the application scenario, the second probability is 1; correspondingly, if the sample object does not perform the target operation in the application scenario, the second probability is 0. After obtaining the second probability, the computer device constructs a cross entropy loss function through the first probability and the second probability. The cross entropy loss function is used to indicate the difference between the first probability and the second probability, which can be specifically expressed as:

[0162]

[0163]

[0164] in, is the overall loss corresponding to the training dataset, Represents the cross entropy loss function of the i-th sample object, Represents the first probability of the i-th sample object, y i Represents the second probability of the i-th sample object.

[0165] After constructing the cross entropy loss function, the computer device trains the first operation prediction model according to the cross entropy loss function until the value of the cross entropy loss function is less than the loss threshold. The optimization objective of the cross entropy loss function can be expressed as:

[0166]

[0167] in, is the overall loss corresponding to the training data set; min θa represents adjusting the adjustable parameter θ so that the value of a is less than the loss threshold.

[0168] The trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario. The application scenarios include, but are not limited to: game application scenarios, multimedia information browsing scenarios, social application scenarios, and resource transfer scenarios. Figure 5 A flowchart of calling a first operation prediction model provided in an embodiment of the present application. Figure 5 The calling process of the first operation prediction model in the game application scenario is described. Figure 5 As shown, firstly, the second operation prediction model is used to extract features from the historical operation set (such as direction control operation, skill release operation, character skin change operation, etc.) of the general object in the game application scene to obtain a general object representation set; wherein, the general object includes the object to be predicted; the second operation prediction model is obtained by training the training model with the mask set corresponding to the historical operation set of the general object in the game application scene and the historical operation set of the general object in the game application scene. After obtaining the general object representation set, the computer device can retrieve the general object representation of the object to be predicted from the general object representation set through the identifier of the object to be predicted; and use the first operation prediction model to perform operation prediction on the general object representation and key data of the object to be predicted to obtain a prediction result, which is used to indicate the probability of the object to be predicted performing the target operation (such as registration) in the game application scene. Further, the promoter can predict the probability of multiple objects performing the target operation in the game application scene according to the above method, and formulate a promotion strategy based on the prediction probability corresponding to each object (such as promoting to objects with a probability higher than the probability threshold) to improve the promotion efficiency.

[0169] In a multimedia information browsing scenario, firstly, a feature extraction is performed on a historical operation set (such as like, share, favorite, etc.) of a general object in a multimedia information browsing scenario by a second operation prediction model to obtain a general object representation set; wherein, the general object includes an object to be predicted; the second operation prediction model is obtained by training a training model with a mask set corresponding to the historical operation set of the general object in the multimedia information browsing scenario and the historical operation set of the general object in the multimedia information browsing scenario. After obtaining the general object representation set, the computer device can retrieve the general object representation of the object to be predicted from the general object representation set by the identifier of the object to be predicted; and the first operation prediction model is used to perform operation prediction on the general object representation and key data of the object to be predicted to obtain a prediction result, which is used to indicate the probability of the object to be predicted performing a target operation (such as sharing a video) in the multimedia information browsing scenario. Further, the promoter can predict the probability of multiple objects performing a target operation in the multimedia information browsing scenario according to the above method, and formulate a promotion strategy (such as promoting to objects with a probability higher than a probability threshold) based on the prediction probability corresponding to each object to improve the promotion efficiency.

[0170] In a social application scenario, firstly, a second operation prediction model is used to extract features from a historical operation set (such as sending emoticons, establishing a social chat window, etc.) of a general object in a social application scenario to obtain a general object representation set; wherein, the general object includes an object to be predicted; the second operation prediction model is obtained by training a training model with a mask set corresponding to the historical operation set of the general object in the social application scenario and the historical operation set of the general object in the social application scenario. After obtaining the general object representation set, the computer device can retrieve the general object representation of the object to be predicted from the general object representation set through the identifier of the object to be predicted; and use the first operation prediction model to perform operation prediction on the general object representation and key data of the object to be predicted to obtain a prediction result, which is used to indicate the probability of the object to be predicted performing a target operation (such as sharing a link) in the social application scenario. Further, the promoter can predict the probability of multiple objects performing a target operation in the social application scenario according to the above method, and formulate a promotion strategy based on the predicted probability corresponding to each object (such as promoting to objects with a probability higher than a probability threshold) to improve the promotion efficiency.

[0171] In the resource transfer scenario, firstly, the second operation prediction model is used to extract features from the historical operation set (such as collection, sharing, adding to shopping cart, etc.) of the general object in the resource transfer scenario to obtain a general object representation set; wherein the general object includes the object to be predicted; the second operation prediction model is obtained by training the training model with the mask set corresponding to the historical operation set of the general object in the resource transfer scenario and the historical operation set of the general object in the resource transfer scenario. After obtaining the general object representation set, the computer device can retrieve the general object representation of the object to be predicted from the general object representation set through the identifier of the object to be predicted; and use the first operation prediction model to perform operation prediction on the general object representation and key data of the object to be predicted to obtain a prediction result, which is used to indicate the probability of the object to be predicted performing the target operation (such as purchasing the target product) in the resource transfer scenario. Further, the promoter can predict the probability of multiple objects performing the target operation in the resource transfer scenario according to the above method, and formulate a promotion strategy based on the predicted probability corresponding to each object (such as promoting to objects with a probability higher than the probability threshold) to improve the promotion efficiency.

[0172] From the above, it can be seen that, in terms of function, the first operation prediction model is used to predict the probability of the object to be processed performing the target operation based on the key data of the object to be processed and the common object representation of the object to be processed; the second operation prediction model is used to extract the common object representation of the object to be processed based on the historical operation set of the object to be processed. From the training perspective, the training data of the first operation prediction model is a labeled data set, and the training data of the second operation prediction model is an unlabeled data set.

[0173] In the embodiment of the present application, a training data set and a general object representation of a sample object are obtained, the training data set includes key data of the sample object and labeled data of the sample object, the general object representation of the sample object is extracted based on the historical operation performed by the sample object in the application scenario, the first operation prediction model is called to predict the key data and the general object representation of the sample object, and the first probability indication information is obtained, and the first operation prediction model is trained based on the difference between the labeled data and the first probability indication information. It can be seen that by using the general object representation of the sample object as an additional feature and training the first operation prediction model in combination with the training data, the training of the first operation prediction model can be made more sufficient under limited training data, thereby improving the prediction accuracy of the first operation prediction model. In addition, since the historical operation set of the general object in the application scenario is unlabeled data, in the training process of the second operation prediction model, a large amount (the number is greater than the number threshold) of unlabeled data can be used to fully train the training model, so that the trained second operation prediction model can mine the hidden features in the historical operation set of the general object in the application scenario, improve the prediction accuracy of the second operation prediction model (that is, improve the accuracy of the input data of the first operation prediction model), and further improve the prediction accuracy of the first operation prediction model.

[0174] The method of the embodiment of the present application is described in detail above. In order to facilitate better implementation of the above scheme of the embodiment of the present application, the device of the embodiment of the present application is provided below accordingly.

[0175] See also Figure 6 , Figure 6 A schematic diagram of the structure of a model training device provided in an embodiment of the present application, Figure 6 The model training apparatus shown may be mounted in a computer device, which may specifically be a terminal device or a server. Figure 6 The model training apparatus shown can be used to perform the above Figure 2 and Figure 3 Some or all of the functions of the described method embodiments. Figure 6 , the model training device comprises:

[0176] The acquisition unit 601 is used to acquire a training data set, where the training data set includes key data of the sample object and annotated data of the sample object; the key data includes at least one element that affects whether the sample object performs the target operation in the application scenario; the annotated data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data;

[0177] and for obtaining a common object representation of the sample object, the common object representation of the sample object being extracted based on historical operations performed by the sample object in the application scenario;

[0178] The processing unit 602 is used to call the first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability of the sample object performing the target operation in the application scenario;

[0179] And used to train a first operation prediction model based on the difference between the labeled data and the first probability indication information; the trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario.

[0180] In one implementation, the processing unit 602 is configured to obtain a common object representation of a sample object, specifically to:

[0181] Obtain a general object representation set, the general object representation set includes general object representations of N general objects, the general object representation of each object is associated with the identifier of the object; the sample object belongs to the N general objects, and N is an integer greater than 1;

[0182] Get the identity of the sample object;

[0183] The common object representation of the sample object is queried from the common object representation set according to the identifier of the sample object.

[0184] In one implementation, the processing unit 602 is used to obtain a set of general object representations, specifically to:

[0185] Get the historical operation set of N general objects in the application scenario;

[0186] obtaining a second operation prediction model;

[0187] Calling the second operation prediction model to perform feature extraction processing on the historical operation sets of N general objects in the application scenario to obtain a general object representation matrix, where the general object representation matrix includes N general object representation sets, and the i-th general object representation set is extracted based on the historical operation set of the i-th general object in the application scenario;

[0188] The N object representation sets in the general object representation matrix are pooled to obtain general object representation sets of the N general objects.

[0189] In one implementation, the processing unit 602 is configured to obtain a common object representation of a sample object, specifically to:

[0190] Obtain the historical operation set of the sample object in the application scenario;

[0191] obtaining a second operation prediction model;

[0192] The second operation prediction model is called to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain the behavior representation of the sample object.

[0193] In one implementation, the sample object belongs to a sample object set; the training process of the second operation prediction model includes:

[0194] Acquire a historical operation set of a general object in an application scenario, the general object belongs to the general object set, and the sample object set is a subset of the general object set; the historical operation set of the general object in the application scenario includes at least two historical operations;

[0195] Performing mask processing on at least one historical operation in a historical operation set of the general object in the application scenario to obtain a mask set of the general object in the application scenario;

[0196] The model to be trained is used to predict the operations of the mask set to obtain a predicted operation set of the general object;

[0197] Based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario, the model to be trained is trained to obtain a second operation prediction model.

[0198] In one implementation, the predicted operations in the predicted operation set correspond one-to-one to the historical operations in the historical operation set of the general object in the application scenario; the processing unit 602 is used to train the to-be-trained model based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario to obtain a second operation prediction model, specifically used to:

[0199] Filtering out a mask operation from the prediction operation set, where the mask operation is a prediction operation in the prediction operation set corresponding to a historical operation in the history operation set of the general object in the application scenario that is subjected to mask processing;

[0200] Constructing a prediction loss according to the difference between the mask operation and the historical operation of the general object in which the mask processing is performed in the historical operation set in the application scenario;

[0201] Based on the prediction loss, the model to be trained is trained to obtain a second operation prediction model.

[0202] In one implementation, the processing unit 602 is used to call the first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain the first probability indication information, which is specifically used to:

[0203] Extracting features from key data of sample objects to obtain key features of sample objects;

[0204] Concatenate the key features of the sample object with the common object representation of the sample object to obtain a concatenated feature;

[0205] The first operation prediction model is called to perform prediction processing on the splicing feature to obtain first probability indication information.

[0206] In one implementation, the key data of the sample object includes P key-value pairs, where P is a positive integer; the processing unit 602 is used to extract features from the key data of the sample object to obtain key features of the sample object, specifically for:

[0207] Perform random initialization processing on P keys to obtain first features corresponding to the P keys;

[0208] Normalize the values ​​of the P keys to obtain the second features corresponding to the P values;

[0209] The first feature and the second feature are concatenated to obtain the key feature of the sample object.

[0210] In one implementation, the process of the processing unit 602 training the first operation prediction model based on the difference between the labeled data and the first probability indication information includes:

[0211] Determining a second probability that the sample object performs a target operation in the application scenario based on the labeled data;

[0212] Construct a cross entropy loss function through the first probability and the second probability;

[0213] According to the cross entropy loss function, the first operation prediction model is trained until the value of the cross entropy loss function is less than the loss threshold.

[0214] In one embodiment, the application scenario includes at least one of the following: a game application scenario, a multimedia information browsing scenario, a social application scenario, and a resource transfer scenario;

[0215] The historical operations performed by the sample objects in different application scenarios are different.

[0216] In one implementation, the application scenario is a game application scenario; the processing unit 602 is further configured to:

[0217] Acquire key data of the object to be processed and a common object representation of the object to be processed, where the common object representation of the object to be processed is extracted based on historical operations performed by the object to be processed in the game application scenario;

[0218] The trained first operation prediction model is called to perform prediction processing on the key data of the object to be processed and the common object representation of the object to be processed to obtain second probability indication information; the second probability indication information is used to indicate the probability of the object to be processed performing the target operation in the game application scenario.

[0219] According to one embodiment of the present application, Figure 2 and Figure 3 Some of the steps involved in the model training method shown can be represented by Figure 6 The model training device shown is executed by each unit. For example, Figure 2 Steps S201 and S202 shown in FIG. 1 can be represented by Figure 6 The acquisition unit 601 shown in FIG. 6 is executed, and step S203 and step S204 can be performed by Figure 6 The processing unit 602 shown executes; Figure 3 Steps S301 and S302 shown in FIG. 1 can be represented by Figure 6 The acquisition unit 601 shown in FIG. 1 is executed, and steps S303 to S306 can be performed by Figure 6 Processing unit 602 is shown executing. Figure 6 The various units in the model training device shown can be separately or all combined into one or several other units to constitute, or some of the units (some) can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of a unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of the present application, the model training device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0220] According to another embodiment of the present application, the program can be executed by running a program on a general computing device such as a computer device including a central processing unit (CPU), a random access memory medium (RAM), a read-only memory medium (ROM), and other processing elements and storage elements. Figure 2 and Figure 3 A computer program (including program code) for each step involved in the corresponding method shown in Figure 6 The model training device shown in and the model training method of the embodiment of the present application are implemented. The computer program can be recorded on, for example, a computer readable recording medium, and loaded into the above-mentioned computing device through the computer readable recording medium and run therein.

[0221] Based on the same inventive concept, the principles and beneficial effects of solving the problems by the model training device provided in the embodiment of the present application are similar to the principles and beneficial effects of solving the problems by the model training method in the method embodiment of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.

[0222] See also Figure 7 , Figure 7 The following is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a terminal device or a server. Figure 7 As shown, the computer device at least includes a processor 701, a communication interface 702 and a memory 703. The processor 701, the communication interface 702 and the memory 703 can be connected via a bus or other means. The processor 701 (or central processing unit (CPU)) is the computing core and control core of the computer device, which can parse various instructions in the computer device and process various data of the computer device. For example, the CPU can be used to parse the power on and off instructions issued by the object to the computer device, and control the computer device to perform power on and off operations; for example, the CPU can transmit various interactive data between the internal structures of the computer device, and so on. The communication interface 702 can optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.), which can be used to send and receive data under the control of the processor 701; the communication interface 702 can also be used for the transmission and interaction of data within the computer device. The memory 703 (Memory) is a memory device in the computer device, which is used to store programs and data. It can be understood that the memory 703 here can include both the built-in memory of the computer device and the extended memory supported by the computer device. The memory 703 provides a storage space, which stores the operating system of the computer device, including but not limited to: Android system, iOS system, Windows Phone system, etc., which is not limited in this application.

[0223] The embodiment of the present application also provides a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the processing system of the computer device. In addition, a computer program suitable for being loaded and executed by the processor 701 is also stored in the storage space. It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory, such as at least one disk storage; optionally, it can also be at least one computer-readable storage medium located away from the aforementioned processor.

[0224] In one embodiment, the processor 701 performs the following operations by running the computer program in the memory 703:

[0225] Acquire a training data set, the training data set including key data of a sample object and annotated data of the sample object; the key data including at least one element that affects whether the sample object performs a target operation in an application scenario; the annotated data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data;

[0226] Obtaining a common object representation of the sample object, where the common object representation of the sample object is extracted based on historical operations performed by the sample object in the application scenario;

[0227] Calling a first operation prediction model to perform prediction processing on key data and a common object representation of a sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability of the sample object performing a target operation in an application scenario;

[0228] Based on the difference between the labeled data and the first probability indication information, the first operation prediction model is trained; the trained first operation prediction model is used to predict the probability of any object performing a target operation in an application scenario.

[0229] As an optional embodiment, the specific embodiment of the processor 701 obtaining the general object representation of the sample object is:

[0230] Obtain a general object representation set, the general object representation set includes general object representations of N general objects, the general object representation of each object is associated with the identifier of the object; the sample object belongs to the N general objects, and N is an integer greater than 1;

[0231] Get the identity of the sample object;

[0232] The common object representation of the sample object is queried from the common object representation set according to the identifier of the sample object.

[0233] As an optional embodiment, the specific embodiment of the processor 701 obtaining the general object representation set is:

[0234] Get the historical operation set of N general objects in the application scenario;

[0235] obtaining a second operation prediction model;

[0236] Calling the second operation prediction model to perform feature extraction processing on the historical operation sets of N general objects in the application scenario to obtain a general object representation matrix, where the general object representation matrix includes N general object representation sets, and the i-th general object representation set is extracted based on the historical operation set of the i-th general object in the application scenario;

[0237] The N object representation sets in the general object representation matrix are pooled to obtain general object representation sets of the N general objects.

[0238] As an optional embodiment, the specific embodiment of the processor 701 obtaining the general object representation of the sample object is:

[0239] Obtain the historical operation set of the sample object in the application scenario;

[0240] obtaining a second operation prediction model;

[0241] The second operation prediction model is called to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain the behavior representation of the sample object.

[0242] As an optional embodiment, the sample object belongs to a sample object set; the training process of the second operation prediction model includes:

[0243] Acquire a historical operation set of a general object in an application scenario, the general object belongs to the general object set, and the sample object set is a subset of the general object set; the historical operation set of the general object in the application scenario includes at least two historical operations;

[0244] Performing mask processing on at least one historical operation in a historical operation set of the general object in the application scenario to obtain a mask set of the general object in the application scenario;

[0245] The model to be trained is used to predict the operations of the mask set to obtain a predicted operation set of the general object;

[0246] Based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario, the model to be trained is trained to obtain a second operation prediction model.

[0247] As an optional embodiment, the predicted operations in the predicted operation set correspond one-to-one to the historical operations in the historical operation set of the general object in the application scenario; the processor 701 trains the to-be-trained model based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario, and a specific embodiment of obtaining the second operation prediction model is:

[0248] Filtering out a mask operation from the prediction operation set, where the mask operation is a prediction operation in the prediction operation set corresponding to a historical operation in the history operation set of the general object in the application scenario that is subjected to mask processing;

[0249] Constructing a prediction loss according to the difference between the mask operation and the historical operation of the general object in which the mask processing is performed in the historical operation set in the application scenario;

[0250] Based on the prediction loss, the model to be trained is trained to obtain a second operation prediction model.

[0251] As an optional embodiment, the processor 701 calls the first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object, and a specific embodiment of obtaining the first probability indication information is:

[0252] Extracting features from key data of sample objects to obtain key features of sample objects;

[0253] Concatenate the key features of the sample object with the common object representation of the sample object to obtain a concatenated feature;

[0254] The first operation prediction model is called to perform prediction processing on the splicing feature to obtain first probability indication information.

[0255] As an optional embodiment, the key data of the sample object includes P key-value pairs, where P is a positive integer; the processor 701 extracts features from the key data of the sample object to obtain the key features of the sample object. The specific embodiment is as follows:

[0256] Perform random initialization processing on P keys to obtain first features corresponding to the P keys;

[0257] Normalize the values ​​of the P keys to obtain the second features corresponding to the P values;

[0258] The first feature and the second feature are concatenated to obtain the key feature of the sample object.

[0259] As an optional embodiment, the process in which the processor 701 trains the first operation prediction model based on the difference between the labeled data and the first probability indication information includes:

[0260] Determining a second probability that the sample object performs a target operation in the application scenario based on the labeled data;

[0261] Construct a cross entropy loss function through the first probability and the second probability;

[0262] According to the cross entropy loss function, the first operation prediction model is trained until the value of the cross entropy loss function is less than the loss threshold.

[0263] As an optional embodiment, the application scenario includes at least one of the following: a game application scenario, a multimedia information browsing scenario, a social application scenario, and a resource transfer scenario;

[0264] The historical operations performed by the sample objects in different application scenarios are different.

[0265] As an optional embodiment, the application scenario is a game application scenario; the processor 701 further performs the following operations by running the computer program in the memory 703:

[0266] Acquire key data of the object to be processed and a common object representation of the object to be processed, where the common object representation of the object to be processed is extracted based on historical operations performed by the object to be processed in the game application scenario;

[0267] The trained first operation prediction model is called to perform prediction processing on the key data of the object to be processed and the common object representation of the object to be processed to obtain second probability indication information; the second probability indication information is used to indicate the probability of the object to be processed performing the target operation in the game application scenario.

[0268] Based on the same inventive concept, the principles and beneficial effects of solving the problems by the computer device provided in the embodiment of the present application are similar to the principles and beneficial effects of solving the problems by the model training method in the method embodiment of the present application. Please refer to the principles and beneficial effects of the implementation of the method. For the sake of concise description, they will not be repeated here.

[0269] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the model training method of the above method embodiment.

[0270] An embodiment of the present application also provides a computer program product, which includes a computer program, and the computer program is suitable for being loaded by a processor and executing the model training method of the above method embodiment.

[0271] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the above-mentioned model training method.

[0272] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0273] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0274] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the readable storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0275] What is disclosed above is only a preferred embodiment of the present application, and it certainly cannot be used to limit the scope of rights of the present application. Ordinary technicians in this field can understand that all or part of the processes of implementing the above embodiment and equivalent changes made according to the claims of the present application are still within the scope covered by the application.

Claims

1. A model training method, It is characterized in that The method comprises: Acquire a training data set, the training data set including key data of a sample object and annotated data of the sample object; the key data including at least one element affecting whether the sample object performs a target operation in an application scenario; the annotated data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data; Acquire a common object representation of the sample object, where the common object representation of the sample object is extracted based on a historical operation performed by the sample object in the application scenario; Calling a first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability that the sample object performs the target operation in the application scenario; Based on the difference between the labeled data and the first probability indication information, the first operation prediction model is trained; the trained first operation prediction model is used to predict the probability of any object performing the target operation in the application scenario.

2. The method according to claim 1, It is characterized in that The obtaining of the common object representation of the sample object comprises: Acquire a set of general object representations, wherein the set of general object representations includes general object representations of N general objects, and the general object representation of each object is associated with an identifier of the object; the sample object belongs to the N general objects, where N is an integer greater than 1; Obtaining an identifier of the sample object; The common object representation of the sample object is queried from the common object representation set according to the identifier of the sample object.

3. The method according to claim 2, It is characterized in that The obtaining of the general object representation set includes: Obtaining a historical operation set of the N general objects in the application scenario; obtaining a second operation prediction model; Calling the second operation prediction model to perform feature extraction processing on the historical operation sets of the N general objects in the application scenario to obtain a general object representation matrix, wherein the general object representation matrix includes N general object representation sets, and the i-th general object representation set is extracted based on the historical operation set of the i-th general object in the application scenario; Pooling is performed on the N object representation sets in the general object representation matrix to obtain general object representation sets of the N general objects.

4. The method according to claim 1, It is characterized in that The obtaining of the common object representation of the sample object comprises: Obtaining a historical operation set of the sample object in the application scenario; obtaining a second operation prediction model; The second operation prediction model is called to perform feature extraction processing on the historical operation set of the sample object in the application scenario to obtain a behavior representation of the sample object.

5. The method according to claim 3 or 4, It is characterized in that The sample object belongs to a sample object set; the training process of the second operation prediction model includes: Acquire a historical operation set of a general object in the application scenario, the general object belongs to a general object set, the sample object set is a subset of the general object set; the historical operation set of the general object in the application scenario includes at least two historical operations; Performing mask processing on at least one historical operation in a historical operation set of the general object in the application scenario to obtain a mask set of the general object in the application scenario; Using the model to be trained to perform operation prediction on the mask set to obtain a predicted operation set of the general object; Based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario, the model to be trained is trained to obtain a second operation prediction model.

6. The method according to claim 5, It is characterized in that The predicted operations in the predicted operation set correspond to the historical operations in the historical operation set of the general object in the application scenario in a one-to-one manner; and the training of the model to be trained based on the difference between the predicted operation set and the historical operation set of the general object in the application scenario to obtain a second operation prediction model includes: Filtering out a mask operation from the predicted operation set, the mask operation being a predicted operation in the predicted operation set corresponding to a historical operation in which a mask process is performed on the general object in a historical operation set in the application scenario; constructing a prediction loss according to a difference between the mask operation and a historical operation of the general object in which mask processing is performed in a historical operation set in the application scenario; Based on the prediction loss, the model to be trained is trained to obtain a second operation prediction model.

7. The method according to claim 1, It is characterized in that The calling of the first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information includes: Extracting features from the key data of the sample object to obtain key features of the sample object; Splicing the key features of the sample object with the common object representation of the sample object to obtain a spliced ​​feature; The first operation prediction model is called to perform prediction processing on the splicing feature to obtain first probability indication information.

8. The method according to claim 7, It is characterized in that The key data of the sample object includes P key-value pairs, where P is a positive integer; the key data of the sample object is subjected to feature extraction to obtain key features of the sample object, including: Performing random initialization processing on P keys to obtain first features corresponding to the P keys; Normalizing the values ​​of the P keys to obtain second features corresponding to the P values; The first feature and the second feature are concatenated to obtain a key feature of the sample object.

9. The method according to claim 1, It is characterized in that The process of training the first operation prediction model based on the difference between the labeled data and the first probability indication information includes: Determining a second probability that the sample object performs the target operation in the application scenario based on the labeled data; Constructing a cross entropy loss function through the first probability and the second probability; The first operation prediction model is trained according to the cross entropy loss function until a value of the cross entropy loss function is less than a loss threshold.

10. The method according to claim 1, It is characterized in that The application scenario includes at least one of the following: a game application scenario, a multimedia information browsing scenario, a social application scenario, and a resource transfer scenario; The sample object has different historical operations performed in different application scenarios.

11. The method according to claim 10, It is characterized in that The application scenario is a game application scenario; the method further includes: Acquire key data of an object to be processed and a common object representation of the object to be processed, wherein the common object representation of the object to be processed is extracted based on historical operations performed by the object to be processed in the game application scenario; The trained first operation prediction model is called to perform prediction processing on the key data of the object to be processed and the common object representation of the object to be processed to obtain second probability indication information; the second probability indication information is used to indicate the probability of the object to be processed performing the target operation in the game application scenario.

12. A model training device, It is characterized in that The model training device comprises: an acquisition unit, configured to acquire a training data set, wherein the training data set includes key data of a sample object and annotated data of the sample object; the key data includes at least one element that affects whether the sample object performs a target operation in an application scenario; and the annotated data is used to indicate whether the sample object performs the target operation in the application scenario under the influence of the key data; and for obtaining a common object representation of the sample object, wherein the common object representation of the sample object is extracted based on a historical operation performed by the sample object in the application scenario; A processing unit, configured to call a first operation prediction model to perform prediction processing on the key data and the common object representation of the sample object to obtain first probability indication information; the first probability indication information is used to indicate a first probability that the sample object performs the target operation in the application scenario; And used to train the first operation prediction model based on the difference between the labeled data and the first probability indication information; the trained first operation prediction model is used to predict the probability of any object performing the target operation in the application scenario.

13. A computer device, It is characterized in that include: Memory and processor; a memory, wherein a computer program is stored in the memory; A processor, used to load the computer program to implement the model training method as described in any one of claims 1-11.

14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which is suitable for being loaded by a processor and executing the model training method as described in any one of claims 1-11.

15. A computer program product, It is characterized in that The computer program product comprises a computer program, which is suitable for being loaded by a processor and executing the model training method as described in any one of claims 1-11.