Model acquisition method and device, equipment and storage medium
By obtaining and processing label-free application inventory data, generating reconstruction losses and classification losses, and adjusting model parameters, the problem of insufficient prediction accuracy and generalization ability of risk prediction models for label-free data in the existing technology is solved, and higher prediction accuracy and generalization ability are achieved.
Patent Information
- Application Number
- CN202411753394.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-04-22
AI Technical Summary
In the prior art, when the risk prediction model predicts labeled data that has not reached the risk performance period, it has poor accuracy and insufficient generalization ability.
By obtaining the first sample data pair, including label-free application inventory data, processed using the encoder in the initial model, reconstructed and classification losses are generated, and model parameters are adjusted to generate the target model.
The prediction accuracy and generalization ability of the target model for labelless data is improved, and more representative embeddings are generated through self-supervised learning methods.
Smart Images

Figure CN119862929A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of artificial intelligence technology, and in particular to a model acquisition method, device, equipment and storage medium. Background Art
[0002] Risk prediction based on application lists is crucial for understanding user behavior and identifying potential risks. In the existing technology, risk prediction models are usually trained relying on limited labeled data. When training risk prediction models, unlabeled data before the risk manifestation period is not utilized, resulting in poor accuracy of the trained risk prediction model in predicting unlabeled data before the risk manifestation period, that is, the generalization ability of the trained risk prediction model is poor. Summary of the invention
[0003] The purpose of the present invention is to at least provide a model acquisition method, device, equipment and storage medium, which can at least solve the problem of poor generalization ability and low accuracy of target model prediction risk, and at least improve the generalization ability and accuracy of target model prediction risk.
[0004] To solve the above technical problems, at least one embodiment of the present application provides a model acquisition method, including: obtaining a first sample data pair, wherein the first sample data pair includes a first application list data pair; processing the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair; obtaining a second sample data pair, wherein the second sample data pair includes a second application list data pair, and a true label information pair corresponding to the second application list data pair; generating a reconstruction loss based on the second application list data pair, the first reconstruction pair and the first exchange pair; generating a classification loss based on the predicted label information pair and the true label information pair; adjusting the parameters of the initial model based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
[0005] At least one embodiment of the present application also provides a model acquisition device, including: a first acquisition module, used to acquire a first sample data pair, wherein the first sample data pair includes a first application list data pair; a processing module, used to process the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair; a second acquisition module, used to acquire a second sample data pair, wherein the second sample data pair includes a second application list data pair, and a real label information pair corresponding to the second application list data pair; a first generation module, used to generate a reconstruction loss based on the second application list data pair, the first reconstruction pair and the first exchange pair; a second generation module, used to generate a classification loss based on the predicted label information pair and the real label information pair; an adjustment module, used to adjust the parameters of the initial model based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
[0006] At least one embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned model acquisition method.
[0007] At least one embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program implements the above-mentioned model acquisition method when executed by a processor.
[0008] The model acquisition method provided by the embodiment of the present application obtains a first sample data pair, wherein the first sample data pair includes a first application list data pair; the first sample data pair is processed based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair; the second sample data pair is obtained, wherein the second sample data pair includes a second application list data pair and a real label information pair corresponding to the second application list data pair; a reconstruction loss is generated based on the second application list data pair, the first reconstruction pair and the first exchange pair; a classification loss is generated based on the predicted label information pair and the real label information pair; the parameters of the initial model are adjusted based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list. The target model is obtained by jointly training the labeled and unlabeled sample data, which improves the accuracy and generalization ability of the target model for predicting unlabeled data. And by automatically learning the unlabeled first sample data pair and reconstructing the data of the first sample data pair, a more representative first exchange pair and a first reconstruction pair are obtained, thereby obtaining a more representative embedding, which effectively improves the accuracy of the target model in predicting risks. The generalization ability of the target model is improved by the self-supervised learning method.
[0009] In some optional embodiments, the obtaining of the first sample data pair includes: obtaining a plurality of initial application list information, wherein each of the plurality of initial application list information includes an application name and installation time of at least one application; obtaining a plurality of original integer sequences based on the plurality of initial application list information and a preset mapping table, wherein the length of the original integer sequence is equal to a preset length; and randomly obtaining two original integer sequences from the plurality of original integer sequences as the first sample data pair. The initial application list information is preprocessed to obtain first sample data pairs of equal length, so that subsequent processing based on the first sample data pairs is more convenient, thereby improving the efficiency of obtaining the target model.
[0010] In some optional embodiments, the method further includes: counting the installation frequency of each application based on the sample data; obtaining the application name of the target application whose installation frequency is higher than the preset frequency, and counting the first number of the target application; constructing a mapping relationship between the application name of the target application and an integer to obtain a preset mapping table, wherein the number of mapping relationships in the preset mapping table is equal to the first number. Based on the installation frequency, the application with a higher installation frequency can be determined, and a mapping relationship is constructed between the application with a higher installation frequency and the integer, so that the corresponding application can be quickly obtained based on the integer, so as to obtain the sample data pair of the integer sequence, so that the initial model can process the sample data pair.
[0011] In some optional embodiments, the obtaining of multiple original integer sequences based on the multiple initial application list information and the preset mapping table includes: for each of the multiple initial application list information, the initial application list information is sorted based on the order of installation time from recent to distant to obtain target application list information; based on the preset mapping table, the application name of each application in the target application list information is mapped to an integer to obtain an initial integer sequence; the initial integer sequence is processed into an original integer sequence with a length equal to a preset length, thereby obtaining multiple original integer sequences. The initial integer sequence corresponding to the target application list information can be quickly determined through the preset mapping table, and the initial integer sequence is processed to obtain a preset length and an original integer sequence, thereby ensuring that the input sequence length of the sample data in each first sample data pair is consistent.
[0012] In some optional embodiments, the encoder in the initial model processes the first sample data pair to obtain a first reconstruction pair, a first exchange pair, and a predicted label information pair, including: encoding the first sample data pair based on the encoder to obtain a first feature vector pair; processing the first feature vector pair to obtain a first significant feature pair, a first shared feature pair, and a predicted label information pair; generating a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair. The encoder obtains the significant feature pair and the shared feature pair of the first sample data pair, and the exchange pair and the reconstruction pair are obtained based on the shared feature pair and the significant feature pair, so that a more representative embedding is generated, thereby improving the accuracy and generalization ability of the target model prediction.
[0013] In some optional embodiments, the processing of the first feature vector pair to obtain a first significant feature pair and a first shared feature pair and a predicted label information pair includes: processing the first feature vector pair based on a preset first projector to obtain a first shared feature and a second shared feature; processing the first feature vector pair based on a preset second projector to obtain a first significant feature and a second significant feature; forming a first shared feature pair based on the first shared feature and the second shared feature; forming a first significant feature pair based on the first significant feature and the second significant feature; predicting the first feature vector pair based on a preset multi-layer perceptron to obtain first predicted label information and second predicted label information; forming a predicted label information pair based on the first predicted label information and the second predicted label information. By automatically learning the significant features and shared features in the first sample data pair (application list), a more representative embedding can be generated, which effectively improves the accuracy and efficiency of risk prediction by the target model.
[0014] In some optional embodiments, the generating of the first reconstruction pair and the first exchange pair based on the first significant feature pair and the first shared feature pair includes: processing the first significant feature and the first shared feature using a preset function to obtain a first reconstruction feature; processing the second significant feature and the second shared feature using the preset function to obtain a second reconstruction feature; forming a first reconstruction pair based on the first reconstruction feature and the second reconstruction feature; processing the first significant feature and the second shared feature using the preset function to obtain a first exchange feature; processing the second significant feature and the first shared feature using the preset function to obtain a second exchange feature; forming a first exchange pair based on the first exchange feature and the second exchange feature. By decoupling the encoded feature vector into significant features and shared features. Reconstructing data through a decoder and calculating reconstruction loss to optimize model parameters. Improving the accuracy of the target model. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0016] Figure 1 is a flow chart of a model acquisition method provided by an embodiment of the present application;
[0017] Figure 2 is a flowchart of a model processing process provided by an embodiment of the present application;
[0018] Figure 3 is a structural diagram of a model processing provided by an embodiment of the present application;
[0019] Figure 4 is a flowchart of another model processing process provided by an embodiment of the present application;
[0020] Figure 5 is a structural schematic diagram of a model acquisition device provided by another embodiment of the present application;
[0021] Figure 6 It is a schematic diagram of the structure of an electronic device provided by another embodiment of the present application. DETAILED DESCRIPTION
[0022] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0023] Self-supervised learning (SSL) is a machine learning paradigm that does not rely on manually annotated labels, but instead uses the structure and properties of the data itself to train the model. In self-supervised learning, useful feature representations are learned by learning the input X features. Since they do not rely on task-specific labels, the feature representations of self-supervised learning usually have better generalization capabilities.
[0024] Decoder: The main purpose of the decoder is to reconstruct the original data from the low-dimensional representation generated by the encoder.
[0025] Feature decoupling: The method proposed in the present invention is used to decouple the encoded feature vector into significant features and shared features.
[0026] Reconstruction optimization: reconstruct the data through the decoder and calculate the reconstruction loss to optimize the model parameters.
[0027] OOT samples (Out Of Time samples): refers to data samples that are not used in the model training process. These samples are usually the data sets that are used to test the model's prediction ability after the model is trained. These samples are located behind the training data in time to ensure a fair evaluation of the model. They are also called future samples.
[0028] Risk prediction based on the application list (Applist) is crucial for understanding user behavior and identifying potential risks. In the existing technology, risk prediction models are usually trained relying on limited labeled data. When training risk prediction models, unlabeled data before the risk manifestation period is not utilized, resulting in poor accuracy of the trained risk prediction model in predicting unlabeled data before the risk manifestation period, that is, the generalization ability of the trained risk prediction model is poor.
[0029] Specifically, the existing technology generally embeds the installation, uninstallation or active sequences of the user's application list or extracts statistical features to establish a binary classification risk model. The label generally uses whether the user is overdue after a certain bill date, which belongs to a supervised model. For example, the existing methods for training risk prediction models include risk prediction methods based on statistical features and risk prediction methods based on end-to-end deep learning. Among them, the risk prediction method based on statistical features is: processing statistical features from the application list sequence, and generally the following dimensions can be considered: Application category of application (APP): classify the App by category (such as games, social, tools, loans, etc.) and process statistical features, such as the number and proportion of loan apps; usage frequency: count the frequency of users using each application. Installation time: analyze the relationship between the installation time of the application and user behavior. Based on the above-processed statistical features as input, train a tree model or a deep learning model. The risk prediction method based on end-to-end deep learning is to embed the application list sequence, extract feature information through the encoding layer, and then splice the fully connected layer to directly predict the overdue risk probability. This method relies on the label of the sample and is a supervised risk prediction method.
[0030] In summary, existing methods for training risk prediction models often rely on limited labeled data. A classification model needs to be established for the application list sequence to predict user risks. Unlabeled data that has not yet reached the risk manifestation period is not utilized and trained, resulting in poor prediction results and low accuracy for data samples that are not used in the model training process, resulting in poor generalization ability of the trained risk prediction model.
[0031] In order to solve the technical problems of poor generalization ability and low accuracy of the above-mentioned trained risk prediction model, the present invention proposes a model acquisition method. The implementation details of the model acquisition method of this embodiment are specifically described below. The following content is only the implementation details provided for the convenience of understanding and is not necessary for the implementation of this solution.
[0032] Embodiment 1:
[0033] The model acquisition method of this embodiment can be applied to electronic devices with communication, computing and data storage capabilities. The specific process can be as follows: Figure 1 As shown, it includes steps 101 to 106:
[0034] Step 101: Acquire a first sample data pair, wherein the first sample data pair includes a first application list data pair.
[0035] Specifically, the application list data pair includes two application list data, and the application list data is also called an application list sequence, which is a set of integer sequences.
[0036] Specifically, the first sample data pair refers to application list data without label information.
[0037] Specifically, the application list data without label information includes OOT samples that have not reached the label presentation period and OOT samples that have reached the label presentation period but the labels are covered by a mask.
[0038] Specifically, the label is used to indicate the risk type or risk level, etc., and can be set according to actual needs.
[0039] Specifically, the first sample data pair refers to a pair of data sequences consisting of two application manifest data.
[0040] In some examples, the method further includes: obtaining initial sample data, dividing the initial sample data to obtain a training sample set, a validation sample set, and an OOT sample set, wherein the OOT sample set includes a majority of sample data that have not reached the label expression period and a small portion of sample data that have reached the label expression period but the label is masked, wherein the first sample data pair belongs to the OOT sample set. The data in the training sample set and the validation sample set both contain labels.
[0041] In some examples, obtaining the first sample data pair includes: obtaining a plurality of initial application list information, wherein each of the plurality of initial application list information includes an application name and an installation time of at least one application; obtaining a plurality of original integer sequences based on the plurality of initial application list information and a preset mapping table, wherein a length of the original integer sequence is equal to a preset length; and randomly obtaining two original integer sequences from the plurality of original integer sequences as the first sample data pair.
[0042] Specifically, the initial application list information is a list of applications installed by the user, including the names and installation times of multiple applications.
[0043] Specifically, the preset mapping table includes a mapping relationship between an application name of an application program and an integer.
[0044] In some examples, the method further includes: based on sample data, counting the installation frequency of each application; obtaining the application name of the target application whose installation frequency is higher than a preset frequency, and counting a first number of the target application; constructing a mapping relationship between the application name of the target application and an integer to obtain a preset mapping table, wherein the number of mapping relationships in the preset mapping table is equal to the first number.
[0045] Specifically, the integer may be an integer between 1 and the value of the first number, including 1 and the first number, or an integer between 0 and the value of the first number minus 1, including 1 and the value of the first number minus 1. The specific setting can be based on actual needs, and will not be described in detail here.
[0046] Exemplarily, the preset mapping table includes application A-1, indicating that the integer corresponding to application A is 1; application B-2, indicating that the integer corresponding to application B is 2, application C-3, indicating that the integer corresponding to application C is 3; and application D-4, indicating that the integer corresponding to application D is 4.
[0047] Specifically, the sample data refers to a plurality of initial application manifest information, each of which includes a plurality of applications.
[0048] For example, count the applist pkg (applications) with a high installation frequency, for example, count the applications with an installation frequency of more than 10,000 times. The applications with a high installation frequency are grouped into a vocabulary size (dictionary), and the applist pkg package name is mapped to an integer from 1 to the vocabulary size, where the vocabulary size refers to the number of applications with an installation frequency higher than the preset frequency.
[0049] In some examples, the obtaining of multiple original integer sequences based on the multiple initial application list information and the preset mapping table includes: obtaining multiple initial integer sequences based on the multiple initial application list information and the preset mapping table; for each initial integer sequence in the multiple initial integer sequences, calculating the difference between the length of the initial integer sequence and the preset length; if the difference is greater than zero, truncating the initial integer sequence by the difference integers to obtain the original integer sequence; if the difference is less than zero, filling the absolute value of the difference by preset integers to obtain the original integer sequence; if the difference is equal to zero, taking the initial integer sequence as the original integer sequence, thereby obtaining multiple original integer sequences.
[0050] Specifically, the preset integer may be a value such as 0, 1, 2, 3, etc. The preset integer may be set according to actual needs, and will not be described in detail here.
[0051] In some examples, the method of obtaining multiple original integer sequences based on the multiple initial application list information and the preset mapping table includes: for each initial application list information in the multiple initial application list information, sorting the initial application list information in order of installation time from recent to far to obtain target application list information; mapping the application name of each application in the target application list information to an integer based on the preset mapping table to obtain an initial integer sequence; processing the initial integer sequence into an original integer sequence having a length equal to a preset length, thereby obtaining multiple original integer sequences.
[0052] Specifically, the order of installation time from recent to distant refers to an order from a smaller difference between the installation time and the current time to a larger difference between the installation time and the current time.
[0053] Step 102: Process the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair, and a predicted label information pair.
[0054] Specifically, the encoder is represented by a transformer encoder. For how the encoder performs encoding processing, please refer to the prior art, which will not be described in detail here.
[0055] In some examples, the encoder based on the initial model processes the first sample data pair to obtain a first reconstruction pair, a first exchange pair, and a predicted label information pair, including: encoding the first sample data pair based on the encoder to obtain a first feature vector pair; processing the first feature vector pair to obtain a first significant feature pair, a first shared feature pair, and a predicted label information pair; generating a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair.
[0056] Specifically, the first reconstruction pair and the first exchange are referred to as reconstruction data.
[0057] For some examples, see Figure 2 The encoder based on the initial model processes the first sample data pair to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair, including the following steps 01-03:
[0058] Step 01: Encode the first sample data pair based on an encoder to obtain a first feature vector pair;
[0059] For some examples, see Figure 3, the first sample data pair includes first data and second data, the first data refers to the first application list sequence, the second data indicates the second application list sequence, wherein the application list sequence refers to the list sequence obtained by mapping the application name (application package name) corresponding to the application list information to an integer based on a preset mapping table, that is, the application list data. In the above-mentioned step 01, the first sample data pair is encoded based on the encoder to obtain a first feature vector pair, including: encoding the first data in the first sample data pair based on the encoder to obtain a first feature vector; encoding the second data in the first sample data pair based on the encoder to obtain a second feature vector, and forming a first feature vector pair based on the first feature vector and the second feature vector.
[0060] Step 02: Process the first feature vector pair to obtain a first significant feature pair, a first shared feature pair, and a predicted label information pair;
[0061] In some examples, the first significant feature pair includes two significant features, the first shared feature pair includes two shared features, and the predicted label information pair includes two predicted labels, wherein the significant feature refers to an important feature that can effectively distinguish feature vectors. Shared features refer to common features in feature vectors. Predicted labels are used to predict the risk level of the corresponding application list sequence. In the aforementioned step 02, the first feature vector pair is processed to obtain the first significant feature pair, the first shared feature pair and the predicted label information pair, including: processing the first feature vector pair based on a preset first projector to obtain the first shared feature and the second shared feature; processing the first feature vector pair based on a preset second projector to obtain the first significant feature and the second significant feature; forming a first shared feature pair based on the first shared feature and the second shared feature; forming a first significant feature pair based on the first significant feature and the second significant feature; predicting the first feature vector pair based on a preset multilayer perceptron to obtain the first predicted label information and the second predicted label information; forming a predicted label information pair based on the first predicted label information and the second predicted label information.
[0062] For some examples, see Figure 3 , based on the first projector, the first eigenvector is decoupled to obtain a first shared feature, based on the first projector, the second eigenvector is decoupled to obtain a second shared feature; based on the second projector, the first eigenvector is decoupled to obtain a first significant feature; based on the second projector, the second eigenvector is decoupled to obtain a second significant feature.
[0063] In some examples, the first feature vector pair includes a first feature vector and a second feature vector, and the predicting the first feature vector pair based on a preset multi-layer perceptron to obtain first predicted label information and second predicted label information includes: predicting the first feature vector based on a preset multi-layer perceptron to obtain first predicted label information; predicting the second feature vector based on a preset multi-layer perceptron to obtain second predicted label information.
[0064] Specifically, the first feature vector is predicted based on a preset multi-layer perceptron, and the first predicted label information obtained can be expressed as the following formula:
[0065]
[0066] in, is the first predicted label information, z1 is the first eigenvector, and MLP() is the preset multi-layer perceptron.
[0067] Specifically, the second feature vector is predicted based on a preset multi-layer perceptron to obtain second predicted label information, which can be expressed as the following formula:
[0068]
[0069] in, is the second predicted label information, z2 is the first eigenvector, and MLP() is a preset multi-layer perceptron.
[0070] Step 03: Generate a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair.
[0071] For some examples, see Figure 4 In the aforementioned step 03, generating a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair includes the following steps 001-006:
[0072] Step 001: Use a preset function to process the first significant feature and the first shared feature to obtain a first reconstructed feature.
[0073] Specifically, in the aforementioned step 001, the first significant feature and the first shared feature are processed by using a preset function to obtain a first reconstructed feature, which can be expressed as the following formula:
[0074]
[0075] in, refers to the first reconstructed feature, m1 is the first shared feature, s1 is the first shared feature, It represents an XOR operation, and the d() decoder represents mapping the compressed feature representation to the high-dimensional representation of the original data.
[0076] Step 002: Use the preset function to process the second significant feature and the second shared feature to obtain a second reconstructed feature.
[0077] Specifically, in the above 002, the second significant feature and the second shared feature are processed by using the preset function to obtain a second reconstructed feature, which can be expressed as the following formula:
[0078]
[0079] in, refers to the second reconstructed feature, m2 is the second shared feature, s2 is the second shared feature, It represents an XOR operation, and the d() decoder represents mapping the compressed feature representation to the high-dimensional representation of the original data.
[0080] Step 003: forming a first reconstruction pair based on the first reconstruction feature and the second reconstruction feature.
[0081] Step 004: Use the preset function to process the first significant feature and the second shared feature to obtain a first exchange feature.
[0082] Specifically, in the aforementioned step 004, the first significant feature and the second shared feature are processed using the preset function to obtain a first exchange feature, which can be expressed as the following formula:
[0083]
[0084] in, refers to the first exchange feature, m2 is the second shared feature, s1 is the first shared feature, It represents an XOR operation, and the d() decoder represents mapping the compressed feature representation to the high-dimensional representation of the original data.
[0085] Step 005: Use the preset function to process the second significant feature and the first shared feature to obtain a second exchange feature.
[0086] Specifically, in the aforementioned step 005, the second significant feature and the first shared feature are processed by using the preset function to obtain a second exchange feature, which can be expressed as the following formula:
[0087]
[0088] in, refers to the second exchange feature, m1 is the first shared feature, s2 is the second shared feature, It represents an XOR operation, and the d() decoder represents mapping the compressed feature representation to the high-dimensional representation of the original data.
[0089] Step 006: forming a first exchange pair based on the first exchange feature and the second exchange feature.
[0090] Step 103: Acquire a second sample data pair, wherein the second sample data pair includes a second application list data pair, and a real label information pair corresponding to the second application list data pair.
[0091] Specifically, the second sample data pair includes third data and fourth data, the third data refers to the third application list sequence, and the fourth data indicates the fourth application list sequence, wherein the application list sequence refers to the list sequence obtained by mapping the application name (application package name) corresponding to the application list information to an integer based on a preset mapping table, that is, the application list data.
[0092] Specifically, the second sample data belongs to the data in the training sample set
[0093] Specifically, the real label information pair corresponds one-to-one to the second application manifest data pair. Specifically, the real label information pair includes a first real label and a second real label, the second application manifest data pair includes a third application manifest data (i.e., a third application manifest sequence) and a fourth application manifest data (i.e., a fourth application manifest sequence), the first real label corresponds to the third application manifest data, and the second real label corresponds to the fourth application manifest data.
[0094] The true labels are the known labels corresponding to the application manifest data.
[0095] Step 104: Generate a reconstruction loss based on the second application inventory data pair, the first reconstruction pair, and the first exchange pair.
[0096] Specifically, reconstruction loss refers to the reconstruction loss in self-supervised learning.
[0097] Specifically, in step 104, a reconstruction loss is generated based on the second application list data pair, the first reconstruction pair, and the first exchange pair, which can be expressed as the following formula:
[0098]
[0099] L recon =L1+L2
[0100] Among them, L1 is the first reconstruction loss, L2 is the second reconstruction loss, L recon is the reconstruction loss, For the second application manifest data pair, For the first exchange pair, is the first exchange pair, M is the number of second application inventory data pairs or the number of first reconstruction pairs, or the number of first exchange pairs, and j represents the jth pair of second application inventory data pairs, the jth pair of first exchange pairs, and the jth pair of first reconstruction pairs.
[0101] Step 105: Generate a classification loss based on the predicted label information pair and the true label information pair.
[0102] Specifically, classification loss is used to measure the difference between the model's predicted classification results and the actual classification. That is, it measures the difference between the predicted label and the true label.
[0103] In some examples, generating a classification loss based on the predicted label information pair and the actual label information pair includes: processing the predicted label information pair and the actual label information pair based on a preset classification loss function to obtain a classification loss.
[0104] Specifically, the predicted label information pair and the true label information pair are processed based on a preset classification loss function to obtain a classification loss, which can be expressed as the following formula:
[0105]
[0106] Among them, L cls is the classification loss, (y1, y2) is the true label information pair, is the predicted label information pair.
[0107] Step 106: Adjust the parameters of the initial model based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
[0108] In some examples, adjusting the parameters of the initial model based on the classification loss and the reconstruction loss includes:
[0109] A total loss is obtained based on the classification loss and the reconstruction loss, and the parameters of the initial model are adjusted using the total loss.
[0110] Specifically, the total loss is obtained based on the even classification loss and the reconstruction loss, which can be expressed as the following formula:
[0111] L total =L recon +α*L cls
[0112] Among them, L total is the total loss, L recon To integrate the reconstruction loss, L cls is the classification loss, α is used to balance the classification loss and reconstruction loss, and is set to 1 by default.
[0113] In summary, the model acquisition method provided by the embodiment of the present application obtains a first sample data pair, wherein the first sample data pair includes a first application list data pair; the first sample data pair is processed based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair; the second sample data pair is obtained, wherein the second sample data pair includes a second application list data pair and a real label information pair corresponding to the second application list data pair; a reconstruction loss is generated based on the second application list data pair, the first reconstruction pair and the first exchange pair; a classification loss is generated based on the predicted label information pair and the real label information pair; the parameters of the initial model are adjusted based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list. The target model is obtained by jointly training the labeled and unlabeled sample data, which improves the accuracy and generalization ability of the target model for predicting unlabeled data. And by automatically learning the unlabeled first sample data pair and reconstructing the data of the first sample data pair, a more representative first exchange pair and a first reconstruction pair are obtained, thereby obtaining a more representative embedding, which effectively improves the accuracy of the target model in predicting risks. The generalization ability of the target model is improved by the self-supervised learning method.
[0114] In addition, by masking the labeled samples in the OOT sample set, an unlabeled OOT sample set is obtained, and the initial model is trained based on the sample data in the unlabeled OOT sample set to obtain the target model, thereby improving the generalization ability of the target model. The salient features and shared features of the first sample data pair are extracted to obtain salient feature pairs and shared feature pairs. By exchanging and processing the salient feature pairs and shared feature pairs, more representative embeddings, namely reconstruction pairs and exchange pairs, are obtained. The parameters of the initial model are adjusted based on the reconstruction pairs and exchange pairs and the second application list data pair to obtain the target model, which effectively improves the accuracy of the target model in risk prediction and the generalization ability of risk prediction for unlabeled application data. In order to identify user overdue risk behavior. By obtaining accurate classification loss and optimizing model parameters using classification loss, the accuracy of the target model is improved.
[0115] Embodiment 2:
[0116] Another embodiment of the present application relates to a model acquisition device. The implementation details of the model acquisition device of this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details, and is not necessary for the implementation of this solution. The schematic diagram of the model acquisition device of this embodiment can be as follows Figure 5 As shown, it includes a first acquisition module 501 , a processing module 502 , a second acquisition module 503 , a first generation module 504 , a second generation module 505 and an adjustment module 506 .
[0117] A first acquisition module 501 is used to acquire a first sample data pair, wherein the first sample data pair includes a first application list data pair;
[0118] A processing module 502 is used to process the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair;
[0119] A second acquisition module 503 is used to acquire a second sample data pair, wherein the second sample data pair includes a second application list data pair and a real label information pair corresponding to the second application list data pair;
[0120] A first generating module 504, configured to generate a reconstruction loss based on the second application inventory data pair, the first reconstruction pair, and the first exchange pair;
[0121] A second generating module 505, configured to generate a classification loss based on the predicted label information pair and the true label information pair;
[0122] The adjustment module 506 is used to adjust the parameters of the initial model based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
[0123] Optionally, the device is used to obtain the first sample data pair, specifically to: obtain multiple initial application list information, wherein each initial application list information in the multiple initial application list information includes an application name and installation time of at least one application; obtain multiple original integer sequences based on the multiple initial application list information and a preset mapping table, wherein the length of the original integer sequence is equal to a preset length; and randomly obtain two original integer sequences from the multiple original integer sequences as the first sample data pair.
[0124] Optionally, the device is also used to: count the installation frequency of each application based on sample data; obtain the application name of the target application whose installation frequency is higher than the preset frequency, and count the first number of the target application; construct a mapping relationship between the application name of the target application and an integer to obtain a preset mapping table, wherein the number of mapping relationships in the preset mapping table is equal to the first number.
[0125] Optionally, the device is used to obtain multiple original integer sequences based on the multiple initial application list information and a preset mapping table, specifically for: for each initial application list information in the multiple initial application list information, sorting the initial application list information based on the order of installation time from recent to far to obtain target application list information; mapping the application name of each application in the target application list information to an integer based on the preset mapping table to obtain an initial integer sequence; processing the initial integer sequence into an original integer sequence with a length equal to a preset length, thereby obtaining multiple original integer sequences.
[0126] Optionally, the device is used to process the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair, and is specifically used to: encode the first sample data pair based on the encoder to obtain a first feature vector pair; process the first feature vector pair to obtain a first significant feature pair, a first shared feature pair and a predicted label information pair; generate a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair.
[0127] Optionally, the device is used to process the first feature vector pair to obtain a first significant feature pair, a first shared feature pair and a predicted label information pair, specifically for: processing the first feature vector pair based on a preset first projector to obtain a first shared feature and a second shared feature; processing the first feature vector pair based on a preset second projector to obtain a first significant feature and a second significant feature; forming a first shared feature pair based on the first shared feature and the second shared feature; forming a first significant feature pair based on the first significant feature and the second significant feature; predicting the first feature vector pair based on a preset multilayer perceptron to obtain a first predicted label information and a second predicted label information; forming a predicted label information pair based on the first predicted label information and the second predicted label information.
[0128] Optionally, the device is used to generate a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair, specifically for: processing the first significant feature and the first shared feature using a preset function to obtain a first reconstruction feature; processing the second significant feature and the second shared feature using the preset function to obtain a second reconstruction feature; forming a first reconstruction pair based on the first reconstruction feature and the second reconstruction feature; processing the first significant feature and the second shared feature using the preset function to obtain a first exchange feature; processing the second significant feature and the first shared feature using the preset function to obtain a second exchange feature; forming a first exchange pair based on the first exchange feature and the second exchange feature.
[0129] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0130] Embodiment three:
[0131] Another embodiment of the present application relates to an electronic device, such as Figure 6 As shown, it includes: at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the model acquisition method in the above-mentioned embodiments.
[0132] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0133] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0134] Embodiment 4:
[0135] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0136] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as: ROM), random access memory (Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program codes.
[0137] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A model acquisition method, characterized in that: include: Obtaining a first sample data pair, wherein the first sample data pair includes a first application manifest data pair; Processing the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair, and a predicted label information pair; Acquire a second sample data pair, wherein the second sample data pair includes a second application list data pair and a real label information pair corresponding to the second application list data pair; generating a reconstruction loss based on the second application inventory data pair, the first reconstruction pair, and the first exchange pair; Generating a classification loss based on the predicted label information pair and the true label information pair; The parameters of the initial model are adjusted based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
2. The model acquisition method according to claim 1, characterized in that: The obtaining of the first sample data pair comprises: Acquire multiple initial application list information, wherein each initial application list information in the multiple initial application list information includes an application name and an installation time of at least one application; Based on the multiple initial application list information and the preset mapping table, a plurality of original integer sequences are obtained, wherein the length of the original integer sequence is equal to the preset length; Two original integer sequences are randomly acquired from the multiple original integer sequences as first sample data pairs.
3. The model acquisition method according to claim 2, characterized in that: The method further comprises: Based on the sample data, the installation frequency of each application is counted; Obtaining application names of target applications whose installation frequencies are higher than a preset frequency, and counting a first number of the target applications; A mapping relationship between an application name of the target application and an integer is constructed to obtain a preset mapping table, wherein the number of mapping relationships in the preset mapping table is equal to the first number.
4. The model acquisition method according to claim 3, characterized in that: The obtaining of multiple original integer sequences based on the multiple initial application list information and the preset mapping table includes: For each of the plurality of initial application list information, sort the initial application list information based on the order of installation time from recent to distant, to obtain target application list information; Mapping the application name of each application in the target application list information to an integer based on the preset mapping table to obtain an initial integer sequence; The initial integer sequence is processed into an original integer sequence having a length equal to a preset length, thereby obtaining a plurality of original integer sequences.
5. The model acquisition method according to claim 1, characterized in that: The encoder based on the initial model processes the first sample data pair to obtain a first reconstruction pair, a first exchange pair and a predicted label information pair, including: Performing encoding processing on the first sample data pair based on an encoder to obtain a first feature vector pair; Processing the first feature vector pair to obtain a first significant feature pair, a first shared feature pair, and a predicted label information pair; A first reconstruction pair and a first exchange pair are generated based on the first salient feature pair and the first shared feature pair.
6. The model acquisition method according to claim 5, characterized in that: The processing of the first feature vector pair to obtain a first significant feature pair, a first shared feature pair, and a predicted label information pair includes: Processing the first feature vector pair based on a preset first projector to obtain a first shared feature and a second shared feature; Processing the first feature vector pair based on a preset second projector to obtain a first significant feature and a second significant feature; forming a first shared feature pair based on the first shared feature and the second shared feature; forming a first prominent feature pair based on the first prominent feature and the second prominent feature; Predicting the first feature vector pair based on a preset multi-layer perceptron to obtain first predicted label information and second predicted label information; A predicted label information pair is formed based on the first predicted label information and the second predicted label information.
7. The model acquisition method according to claim 6, characterized in that: The generating a first reconstruction pair and a first exchange pair based on the first significant feature pair and the first shared feature pair comprises: Processing the first significant feature and the first shared feature using a preset function to obtain a first reconstructed feature; Processing the second significant feature and the second shared feature using the preset function to obtain a second reconstructed feature; forming a first reconstruction pair based on the first reconstruction feature and the second reconstruction feature; Processing the first significant feature and the second shared feature using the preset function to obtain a first exchange feature; Processing the second significant feature and the first shared feature using the preset function to obtain a second exchange feature; A first exchange pair is formed based on the first exchange feature and the second exchange feature.
8. A model acquisition device, characterized in that: include: A first acquisition module, configured to acquire a first sample data pair, wherein the first sample data pair includes a first application list data pair; A processing module, configured to process the first sample data pair based on the encoder in the initial model to obtain a first reconstruction pair, a first exchange pair, and a predicted label information pair; A second acquisition module, configured to acquire a second sample data pair, wherein the second sample data pair includes a second application list data pair and a real label information pair corresponding to the second application list data pair; a first generating module, configured to generate a reconstruction loss based on the second application inventory data pair, the first reconstruction pair, and the first exchange pair; A second generation module, used to generate a classification loss based on the predicted label information pair and the true label information pair; An adjustment module is used to adjust the parameters of the initial model based on the classification loss and the reconstruction loss to obtain a target model for risk prediction based on the application list.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model acquisition method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the model acquisition method according to any one of claims 1 to 7 is implemented.