Account classification model training method and device, computer device, and storage medium
By encoding, decoding, and extracting features from multi-view datasets, and training the model using self-supervised loss, the problems of low efficiency and insufficient accuracy in account classification are solved, achieving more efficient account classification.
Patent Information
- Application Number
- CN202211302841.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-24
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2042-10-24
AI Technical Summary
In existing technologies, account classification methods are inefficient and inaccurate, making it difficult to effectively distinguish between normal and abnormal accounts.
By acquiring a training dataset with multi-perspective information, encoding and decoding are performed to obtain reconstruction loss. Essential and semantic features are extracted and consistency constraints are applied. The initial account classification model is then trained using self-supervised loss to form the target account classification model.
It improves the accuracy and efficiency of account classification, ensures consistency in feature extraction and classification from different perspectives, and enhances the model's classification capabilities.
Smart Images

Figure CN115905858B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular to an account classification model training method, apparatus, computer device, storage medium, and computer program product. Background Technology
[0002] With the development of internet technology, products and services have gradually shifted from offline to online. Users log in to online applications, websites, and mini-programs using their accounts to complete activities such as product purchases and payments online. However, some users use their accounts to conduct abnormal activities online. To ensure the smooth operation of user activities, it is necessary to classify a large number of accounts, for example, into normal accounts and abnormal accounts. In traditional technology, manually identifying account categories is not only inefficient but also prone to inaccurate account classification. Summary of the Invention
[0003] Therefore, it is necessary to provide an account classification model training method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of account classification models in response to the above-mentioned technical problems.
[0004] Firstly, this application provides a method for training an account classification model. The method includes:
[0005] Obtain the training dataset corresponding to the multi-view information of the account to be trained;
[0006] The training dataset is encoded to obtain an encoded dataset, and the encoded dataset is decoded to obtain a decoded dataset. The reconstruction loss is obtained based on the difference between the decoded dataset and the training dataset.
[0007] Essential features are extracted from the encoded dataset to obtain an essential feature dataset. Interview consistency constraints are applied to the essential feature dataset to obtain the essential loss.
[0008] Semantic features are extracted from the encoded dataset to obtain a semantic feature dataset. Interview consistency constraints are applied to the semantic feature dataset to obtain a semantic loss.
[0009] Semantic feature prediction is performed on the essential feature dataset to obtain a reference semantic feature dataset, and a self-supervised loss is obtained based on the semantic feature dataset and the reference semantic feature dataset.
[0010] Based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the initial account classification model is trained to obtain the target account classification model.
[0011] In one embodiment, training the initial account classification model based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss to obtain the target account classification model includes:
[0012] The autoencoder in the initial account classification model is trained based on the reconstruction loss to obtain the first autoencoder parameter corresponding to the autoencoder.
[0013] Based on the first autoencoder parameter, reconstruction loss, essential loss and semantic loss, the autoencoder, essential feature encoder and semantic feature encoder in the initial account classification model are trained to obtain the second autoencoder parameter corresponding to the autoencoder, the first essential encoding parameter corresponding to the essential feature encoder and the first semantic encoding parameter corresponding to the semantic feature encoder.
[0014] Based on the second autoencoder parameter, the first essential encoding parameter, and the first semantic encoding parameter, as well as the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder in the initial account classification model are trained to obtain the target account classification model.
[0015] In one embodiment, the training dataset includes training data from multiple perspectives of at least two accounts; the process of encoding the training dataset to obtain an encoded dataset, decoding the encoded dataset to obtain a decoded dataset, and obtaining a reconstruction loss based on the difference between the decoded dataset and the training dataset includes:
[0016] For each viewpoint, the training data of the viewpoint is encoded by an autoencoder corresponding to the viewpoint to obtain the encoded data of the viewpoint.
[0017] The encoded data of the viewpoint is obtained by decoding the encoded data using an autoencoder corresponding to the viewpoint.
[0018] The difference between the decoded data and the training data of the given viewpoint is statistically analyzed to obtain the autoencoding loss of the given viewpoint.
[0019] Based on the autoencoding loss corresponding to the multiple perspectives, the reconstruction loss is obtained.
[0020] In one embodiment, the essential feature dataset includes essential feature data from multiple perspectives of at least two accounts; the step of applying inter-perspective consistency constraints to the essential feature dataset to obtain the essential loss includes:
[0021] For each account, calculate the first similarity between the essential feature data of the target account from the target perspective and the essential feature data of the target account from the non-target perspective, and calculate the second similarity between the essential feature data of the target account from the target perspective and the essential feature data of the non-target account from the non-target perspective.
[0022] Based on the first similarity and the second similarity, the essential consistency constraint corresponding to the target perspective is obtained;
[0023] Based on the essential consistency constraints corresponding to each perspective, the essential loss is obtained.
[0024] In one embodiment, the semantic feature dataset includes semantic feature data from multiple perspectives of at least two accounts, and the reference semantic feature dataset includes reference semantic feature data from the multiple perspectives of the at least two accounts; the self-supervised loss obtained based on the semantic feature dataset and the reference semantic feature dataset includes:
[0025] For each viewpoint, calculate the cross-entropy between the semantic feature data corresponding to the viewpoint and the reference semantic feature data corresponding to the viewpoint;
[0026] The self-supervised loss is obtained based on the cross-entropy corresponding to each perspective.
[0027] Secondly, this application provides an account classification method, the method comprising:
[0028] Obtain the dataset to be tested corresponding to the multi-perspective information of the accounts to be classified;
[0029] The dataset to be detected is input into the target account classification model for identification to obtain the category of the account to be classified;
[0030] The target account classification model is the target account classification model obtained by the account classification model training method in the first aspect.
[0031] In one embodiment, the step of inputting the dataset to be detected into the target account classification model for identification, and obtaining the category of the account to be classified, includes:
[0032] The data to be detected in each viewpoint of the dataset to be detected is encoded to obtain the encoded data to be detected for each viewpoint. The encoded data to be detected for each viewpoint is then decoded to obtain the decoded data to be detected for each viewpoint.
[0033] A reconstruction score is obtained based on the difference between the decoded data to be detected and the data to be detected from each perspective;
[0034] The essential features of the coded data to be detected are extracted to obtain the essential feature data to be detected. Based on the similarity between the essential feature data to be detected from various perspectives, a consistency score is obtained.
[0035] Based on the reconstruction score and the consistency score, the account score of the account to be detected is obtained. Based on the relationship between the account score and the classification threshold, the category of the account to be classified is determined.
[0036] Thirdly, this application also provides an account classification model training device. The device includes:
[0037] The acquisition module is used to acquire the training dataset corresponding to the multi-viewpoints of the account to be trained.
[0038] An autoencoder module is used to encode the training dataset to obtain an encoded dataset, decode the encoded dataset to obtain a decoded dataset, and obtain a reconstruction loss based on the difference between the decoded dataset and the training dataset.
[0039] The essential feature extraction module is used to extract essential features from the encoded dataset to obtain an essential feature dataset, and to apply inter-view consistency constraints to the essential feature dataset to obtain the essential loss.
[0040] The semantic feature extraction module is used to extract semantic features from the encoded dataset to obtain a semantic feature dataset, and to apply inter-view consistency constraints to the semantic feature dataset to obtain a semantic loss.
[0041] The semantic feature prediction module is used to perform semantic feature prediction on the essential feature dataset to obtain a reference semantic feature dataset, and to obtain a self-supervised loss based on the semantic feature dataset and the reference semantic feature dataset.
[0042] The training module is used to train the initial account classification model based on the reconstruction loss, essential loss, semantic loss and self-supervised loss to obtain the target account classification model.
[0043] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0044] Obtain the training dataset corresponding to the multi-view information of the account to be trained;
[0045] The training dataset is encoded to obtain an encoded dataset, and the encoded dataset is decoded to obtain a decoded dataset. The reconstruction loss is obtained based on the difference between the decoded dataset and the training dataset.
[0046] Essential features are extracted from the encoded dataset to obtain an essential feature dataset. Interview consistency constraints are applied to the essential feature dataset to obtain the essential loss.
[0047] Semantic features are extracted from the encoded dataset to obtain a semantic feature dataset. Interview consistency constraints are applied to the semantic feature dataset to obtain a semantic loss.
[0048] Semantic feature prediction is performed on the essential feature dataset to obtain a reference semantic feature dataset, and a self-supervised loss is obtained based on the semantic feature dataset and the reference semantic feature dataset.
[0049] Based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the initial account classification model is trained to obtain the target account classification model.
[0050] Fifthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0051] Obtain the training dataset corresponding to the multi-view information of the account to be trained;
[0052] The training dataset is encoded to obtain an encoded dataset, and the encoded dataset is decoded to obtain a decoded dataset. The reconstruction loss is obtained based on the difference between the decoded dataset and the training dataset.
[0053] Essential features are extracted from the encoded dataset to obtain an essential feature dataset. Interview consistency constraints are applied to the essential feature dataset to obtain the essential loss.
[0054] Semantic features are extracted from the encoded dataset to obtain a semantic feature dataset. Interview consistency constraints are applied to the semantic feature dataset to obtain a semantic loss.
[0055] Semantic feature prediction is performed on the essential feature dataset to obtain a reference semantic feature dataset, and a self-supervised loss is obtained based on the semantic feature dataset and the reference semantic feature dataset.
[0056] Based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the initial account classification model is trained to obtain the target account classification model.
[0057] The aforementioned account classification model training method, apparatus, computer equipment, storage medium, and computer program product utilize the following methods: Reconstruction loss represents the difference between the decoded dataset and the training dataset. Training the initial account classification model using reconstruction loss improves encoding accuracy. Essential loss represents the consistency of data across different perspectives in the essential feature dataset. Training the initial account classification model using essential loss improves the consistency of data extracted from different perspectives. Semantic loss represents the consistency of data across different perspectives in the semantic feature dataset. Training the initial account classification model using semantic loss improves the consistency of data extracted from different perspectives. Self-supervised loss represents the difference between the reference semantic feature dataset obtained after essential feature extraction and semantic feature prediction and the semantic feature dataset. Training the initial account classification model using self-supervised loss improves the accuracy of essential feature extraction. Based on reconstruction loss, essential loss, semantic loss, and self-supervised loss, training the initial account classification model improves the accuracy of the target account classification model in account classification. Attached Figure Description
[0058] Figure 1 This is a diagram illustrating the application environment of an account classification model training method in one embodiment.
[0059] Figure 2 This is a flowchart illustrating an account classification model training method in one embodiment;
[0060] Figure 3 This is a flowchart illustrating the training steps of an account classification model in one embodiment;
[0061] Figure 4 This is a flowchart illustrating the reconstruction loss calculation steps in one embodiment;
[0062] Figure 5 This is a flowchart illustrating the steps for classifying accounts to be classified in one embodiment;
[0063] Figure 6 This is a schematic diagram of the structure of an account classification model in one embodiment;
[0064] Figure 7 This is a flowchart illustrating the training steps of an account classification model in one embodiment;
[0065] Figure 8 This is a structural block diagram of an account classification model training device in one embodiment;
[0066] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0068] The account classification model training method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on a cloud or other network server. Both the terminal and server can be used independently to execute the account classification model training provided in this embodiment. The terminal and server can also be used collaboratively to execute the account classification model training provided in this embodiment. For example, the training dataset corresponding to the multi-view information of the account to be trained is obtained; the training dataset is encoded to obtain an encoded dataset; the encoded dataset is decoded to obtain a decoded dataset; a reconstruction loss is obtained based on the difference between the decoded dataset and the training dataset; essential features are extracted from the encoded dataset to obtain an essential feature dataset; inter-view consistency constraints are applied to the essential feature dataset to obtain an essential loss; semantic features are extracted from the encoded dataset to obtain a semantic feature dataset; inter-view consistency constraints are applied to the semantic feature dataset to obtain a semantic loss; semantic features are predicted from the essential feature dataset to obtain a reference semantic feature dataset; a self-supervised loss is obtained based on the semantic feature dataset and the reference semantic feature dataset; and the initial account classification model is trained based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss to obtain the target account classification model. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0069] In one embodiment, such as Figure 2 As shown, an account classification model training method is provided. This method can be applied to computer devices, which can be terminals or servers. The method can be executed independently by the terminal or server, or through interaction between the terminal and server. This embodiment uses the application of this method to a computer device as an example for illustration, including steps 202 to 212.
[0070] Step 202: Obtain the training dataset corresponding to the multi-view information of the account to be trained.
[0071] In this context, "accounts to be trained" refers to multiple accounts used to train the initial account classification model. Accounts are used to uniquely identify users. Accounts can be user accounts generated after registration, or registered instant messaging identifiers, email addresses, communication identifiers, ID card numbers, etc. "Multi-perspective information" refers to information from multiple dimensions. Multi-perspective information can include multiple perspectives related to account profiles and multiple perspectives related to account behavior. Multiple perspectives related to account profiles describe user status, such as age, location, income level, and risk tolerance. Multiple perspectives related to account behavior describe user operational behavior, including purchase, usage, and transaction information, such as the number of years a user has purchased products, the frequency of purchases, historical purchase counts, and new transaction objects. The training dataset is a collection of data representing the multi-perspective information of the accounts to be trained. The training dataset contains training data corresponding to multiple perspectives. It can be understood that the training dataset consists of multiple training data sets, each corresponding to one perspective of multiple accounts to be trained. For example, the training dataset for M perspectives of N accounts to be trained is X = {X...} 1 X 2 , ...X M}, where the training data for the Mth viewpoint is denoted as X. M X M It is an N×d m The matrix, where each row of data represents the viewpoint information of the Mth viewpoint of the account to be trained, for example, X M It is a 2×3 matrix. Where [1 2 2] represents the view information of one account M to be trained, and [2 0 1] represents the view information of another account M to be trained.
[0072] For example, a computer device acquires a training dataset corresponding to the multi-view information of the account to be trained.
[0073] In one embodiment, a computer device obtains the identifier of the account to be trained, and based on the identifier, obtains perspective information from multiple viewpoints of the account to be trained. Feature engineering is then used to convert the perspective information from multiple viewpoints into a training dataset. Feature engineering refers to a method that uses a series of engineered approaches to select better data features from raw information, typically including data preprocessing, feature selection, dimensionality reduction, and other steps.
[0074] Step 204: Encode the training dataset to obtain the encoded dataset, decode the encoded dataset to obtain the decoded dataset, and obtain the reconstruction loss based on the difference between the decoded dataset and the training dataset.
[0075] Encoding refers to the process of performing a nonlinear mapping on the training dataset, transforming the complex nonlinear structure in the training dataset into a relatively simple linear structure in the feature space, while preserving the original information of the training dataset. It can be understood as a preliminary feature extraction from the training dataset. Decoding refers to the process of reconstructing the encoded dataset. The reconstruction loss represents the difference between the decoded dataset and the training dataset.
[0076] For example, a computer device encodes a training dataset to obtain an encoded dataset, then decodes the encoded dataset to obtain a decoded dataset, calculates the difference between the decoded dataset and the training dataset, and obtains the reconstruction loss between the decoded dataset and the training dataset.
[0077] In one embodiment, a computer device encodes the training dataset using the encoder in an autoencoder to obtain an encoded dataset, and then decodes the encoded dataset using the decoder in the autoencoder to obtain a decoded dataset. The difference between the decoded dataset and the training dataset is calculated to obtain the reconstruction loss. An autoencoder (AE) is a type of artificial neural network used in semi-supervised and unsupervised learning. Its function is to learn representations of input information by using the input information as the learning target. An autoencoder includes an encoder and a decoder.
[0078] In one embodiment, the computer device uses multiple sets of encoders and decoders to encode and decode the training dataset, with one set of encoders and decoders encoding and decoding training data from one viewpoint. For example, the training dataset contains training data from two viewpoints, namely training data A and B. A is encoded using a first encoder to obtain A1, and A1 is decoded using a first decoder to obtain A2. B is encoded using a second encoder to obtain B1, and B1 is decoded using a second decoder to obtain B2.
[0079] Step 206: Extract essential features from the encoded dataset to obtain the essential feature dataset, and apply inter-view consistency constraints to the essential feature dataset to obtain the essential loss.
[0080] Essential feature extraction refers to the mapping process of the encoded dataset. It can be understood that the encoded dataset contains both common information and viewpoint-specific information of the accounts to be trained. Essential feature extraction further extracts the common information, which is shared by all viewpoints and represents the essential features of the accounts to be trained. Viewpoint-specific information refers to information unique to each viewpoint. Essential feature extraction can be implemented using a Multilayer Perceptron (MLP). Inter-view consistency constraint refers to constraining the similarity between essential feature data from different viewpoints of the same account to be trained, and the similarity between essential feature data from different viewpoints of different accounts to be trained. It can be understood that inter-view consistency constraint retains more common viewpoint information by constraining the consistency of essential feature data across different viewpoints. Essential loss is a parameter used to characterize the effect of inter-view consistency constraint on the essential feature dataset, and it can be calculated based on the essential feature dataset and the essential loss function.
[0081] For example, a computer device extracts essential features from an encoded dataset to obtain an essential feature dataset, and then calculates inter-view consistency constraints on the essential feature dataset to obtain the essential loss.
[0082] Step 208: Extract semantic features from the encoded dataset to obtain a semantic feature dataset, and apply inter-view consistency constraints to the semantic feature dataset to obtain the semantic loss.
[0083] Semantic feature extraction refers to the process of extracting semantic category information from the encoded dataset. Semantic feature extraction can be implemented using a multilayer perceptron. The semantic feature extraction settings can be customized based on specific circumstances; different settings will yield different probabilities. For example, semantic feature extraction can calculate the probability of the risk resistance level of each perspective of the training account based on the encoded data of each perspective. Risk resistance levels can include low risk, medium risk, and high risk. Alternatively, semantic feature extraction can calculate the probability that each perspective of the training account belongs to the categories of teenager, youth, middle-aged, and elderly based on the encoded data of each perspective of each training account. The training data for the Mth perspective is denoted as X. M X M It is an N×d m The matrix, each dimension d m This represents the viewpoint information of the Mth viewpoint of an account to be trained. Semantic feature extraction is based on each d. mCalculate the probability P1 of the corresponding account to be classified as a teenager, the probability P2 of a young adult, the probability P3 of a middle-aged person, and the probability P4 of an elderly person from the perspective of M. Semantic loss refers to a parameter used to characterize the effect of inter-perspective consistency constraints on the semantic feature dataset, and can be calculated based on the semantic feature dataset and the essential loss function.
[0084] For example, a computer device extracts semantic features from an encoded dataset to obtain a semantic feature dataset, and then calculates the inter-view consistency constraint on the semantic feature dataset to obtain the semantic loss.
[0085] Step 210: Perform semantic feature prediction on the essential feature dataset to obtain a reference semantic feature dataset, and obtain a self-supervised loss based on the semantic feature dataset and the reference semantic feature dataset.
[0086] Semantic feature prediction refers to the process of extracting semantic category information from an essential feature dataset. Semantic feature prediction can be implemented using prediction networks, for example, using a linear layer and a softmax (normalized exponential function) activation layer in a neural network. It can be understood that semantic feature prediction and semantic feature extraction have the same function, but the object of semantic feature prediction is the essential feature dataset, while the object of semantic feature extraction is the encoded dataset. Because the objects are different, the processes are different, but the function achieved is the same: extracting semantic category information. Self-supervised loss refers to the difference between the reference semantic feature dataset and the original semantic feature dataset.
[0087] For example, a computer device performs semantic feature prediction on an essential feature dataset to obtain a semantic feature dataset, calculates the difference between the semantic feature dataset and a reference semantic feature dataset, and obtains a self-supervised loss.
[0088] Step 212: Based on reconstruction loss, essential loss, semantic loss and self-supervised loss, train the initial account classification model to obtain the target account classification model.
[0089] The initial account classification model refers to the initial model used to classify accounts. This can be understood as an untrained account classification model where the parameters are undetermined. The target account classification model, on the other hand, is a trained account classification model whose parameters are now determined.
[0090] For example, the computer device trains the initial account classification model based on reconstruction loss, essence loss, semantic loss and self-supervised loss to obtain the target account classification model.
[0091] In one embodiment, the computer device inputs a first set of training datasets into an initial account classification model. The parameters in the initial account classification model are random parameters. After steps 204 to 210, the reconstruction loss, essential loss, semantic loss, and self-supervised loss of the first round of training are obtained. The model parameters in the account classification model are adjusted based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss of the first round of training to obtain the first parameters. Then, a second set of training datasets is input into the initial account classification model. At this time, the parameters in the initial account classification model are the first parameters. After steps 204 to 210, the reconstruction loss, essential loss, semantic loss, and self-supervised loss of the second round of training are obtained. The second parameters of the account classification model are adjusted based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss of the second round of training. The above training process is repeated until the reconstruction loss, essential loss, semantic loss, and self-supervised loss converge, or the preset number of training iterations is reached to obtain the target parameters. The parameters in the initial account classification model are determined as the target parameters, and the target account classification model is obtained.
[0092] In the above account classification model training method, reconstruction loss represents the difference between the decoding dataset and the training dataset. Training the initial account classification model using reconstruction loss can improve the accuracy of encoding. Essence loss represents the consistency of data from different perspectives in the essence feature dataset. Training the initial account classification model using essence loss can improve the consistency of data from different perspectives in essence feature extraction. Semantic loss represents the consistency of data from different perspectives in the semantic feature dataset. Training the initial account classification model using semantic loss can improve the consistency of data from different perspectives in semantic feature extraction. Self-supervised loss represents the difference between the reference semantic feature dataset and the semantic feature dataset obtained after essence feature extraction and semantic feature prediction. Training the initial account classification model using self-supervised loss improves the accuracy of essence feature extraction. Based on reconstruction loss, essence loss, semantic loss, and self-supervised loss, training the initial account classification model improves the accuracy of the target account classification model in account classification.
[0093] In one exemplary embodiment, such as Figure 3 As shown, based on reconstruction loss, essential loss, semantic loss, and self-supervised loss, the initial account classification model is trained to obtain the target account classification model, which includes:
[0094] Step 302: Train the autoencoder in the initial account classification model based on the reconstruction loss to obtain the first autoencoder parameters corresponding to the autoencoder.
[0095] Here, the first encoding parameters refer to the parameters of the autoencoder obtained by training the encoder multiple times. It can be understood as the optimal parameters determined by the autoencoder during the first round of training.
[0096] For example, the computer device trains the autoencoder in the initial account classification model based on the reconstruction loss to obtain the first autoencoder parameters corresponding to the autoencoder.
[0097] In one embodiment, the computer device counts the number of training iterations of the autoencoder to obtain the current count, compares the current count with a training iteration threshold, and if the current count is less than the training iteration threshold, adjusts the autoencoder parameters according to the reconstruction loss obtained from training, repeats the training process, and updates the current count. If the current count is equal to the training iteration threshold, training is stopped, the reconstruction loss obtained from each training iteration is compared, and the parameter corresponding to the minimum reconstruction loss is determined as the first encoding parameter.
[0098] In one embodiment, the computer device trains the autoencoder until the reconstruction loss obtained from the training converges, then stops training and determines the parameters at which the reconstruction loss converges as the first encoding parameters.
[0099] Step 304: Train the autoencoder, essential feature encoder, and semantic feature encoder in the initial account classification model based on the first autoencoder parameters, reconstruction loss, essential loss, and semantic loss to obtain the second autoencoder parameters corresponding to the autoencoder, the first essential encoding parameters corresponding to the essential feature encoder, and the first semantic encoding parameters corresponding to the semantic feature encoder.
[0100] For example, the computer device uses the first autoencoder parameter as the initial parameter of the autoencoder and random parameters as the parameters of the essential feature encoder and the semantic feature encoder to train the autoencoder, essential feature encoder and semantic feature encoder in the initial account classification model. Based on the reconstruction loss, essential loss and semantic loss obtained in each training, the parameters of the autoencoder, essential feature encoder and semantic feature encoder are adjusted respectively until the training is completed, so as to obtain the second autoencoder parameter corresponding to the autoencoder, the first essential encoding parameter corresponding to the essential feature encoder and the first semantic encoding parameter corresponding to the semantic feature encoder.
[0101] Step 306: Based on the second autoencoder parameter, the first essential encoding parameter, and the first semantic encoding parameter, as well as the reconstruction loss, essential loss, semantic loss, and self-supervised loss, train the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder in the initial account classification model to obtain the target account classification model.
[0102] For example, the computer device uses the second autoencoder parameter as the initial parameter of the autoencoder, the first essential encoding parameter as the initial parameter of the essential feature encoder, the first semantic encoding parameter as the initial parameter of the semantic feature encoder, and random parameters as the initial parameter of the predictive encoder. It trains the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder in the initial account classification model. Based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss obtained in each training, the parameters of the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder are adjusted respectively until the training is completed. The target autoencoder parameter, the target essential encoding parameter, the target semantic encoding parameter, and the target predictive encoding parameter are obtained, thus obtaining the target account classification model.
[0103] In this embodiment, the initial account classification model is trained in three stages. Each stage trains one or more parts of the initial account classification model, which improves the training speed and effectiveness, and enhances the accuracy of the target account classification model.
[0104] In one exemplary embodiment, such as Figure 4 As shown, the training dataset includes training data from multiple perspectives of at least two accounts; the training dataset is encoded to obtain an encoded dataset, and the encoded dataset is decoded to obtain a decoded dataset. The reconstruction loss is derived based on the difference between the decoded dataset and the training dataset, including:
[0105] Step 402: For each viewpoint, the training data of the viewpoint is encoded by an autoencoder corresponding to the viewpoint to obtain the encoded data of the viewpoint.
[0106] Here, perspective refers to dimension. It can be understood that one perspective is one dimension.
[0107] For example, the computer device uses an autoencoder corresponding to each viewpoint to encode the training data corresponding to that viewpoint, thereby obtaining the encoded data corresponding to that viewpoint.
[0108] Step 404: Decode the encoded data using an autoencoder corresponding to the viewpoint to obtain the decoded viewpoint data.
[0109] For example, the computer device uses an autoencoder corresponding to each viewpoint to decode the encoded data corresponding to that viewpoint, thereby obtaining the decoded data corresponding to that viewpoint.
[0110] Step 406: Analyze the differences between the decoded data and the training data from the statistical perspective to obtain the autoencoding loss of the perspective.
[0111] For example, the computer device calculates the difference between the decoded data and the corresponding training data to obtain the difference value, and then performs statistics on the difference value of the same viewpoint to obtain the autoencoding loss corresponding to that viewpoint.
[0112] In one embodiment, the computer device subtracts the corresponding training data from the decoded data to obtain the difference, then takes the absolute value of the difference to obtain the absolute difference, and then adds the absolute differences of the same viewpoint to obtain the autoencoding loss corresponding to that viewpoint.
[0113] In one embodiment, the computer device subtracts the corresponding training data from the decoded data to obtain the difference, then multiplies the difference by the difference to obtain the absolute difference, and then adds the absolute differences of the unified viewpoint to obtain the autoencoding loss corresponding to that viewpoint.
[0114] In one embodiment, the autoencoding loss corresponding to viewpoint m for:
[0115]
[0116] in, For the training data of the i-th account m to be trained, the encoder of view m is denoted as f. m The decoder for viewpoint m is denoted as g. m N is the total number of accounts to be trained.
[0117] Step 408: Based on the autoencoding loss corresponding to multiple perspectives, the reconstruction loss is obtained.
[0118] For example, the computer device calculates the reconstruction loss based on the autoencoding loss corresponding to multiple perspectives.
[0119] In one embodiment, the computer device adds the autoencoding losses corresponding to multiple viewpoints to obtain the reconstruction loss:
[0120]
[0121] Where M is the total number of viewpoints, that is, there are a total of M viewpoints.
[0122] In one embodiment, the computer device sums the autoencoding losses corresponding to multiple viewpoints to obtain the statistical autoencoding loss, and then divides the statistical autoencoding loss by the number of viewpoints to obtain the reconstruction loss.
[0123] In this embodiment, an autoencoder corresponding to each viewpoint is used to decode the encoded data for that viewpoint, resulting in decoded data for that viewpoint. This autoencoder for each viewpoint allows for better encoding and decoding of the data for that viewpoint, improving encoding accuracy. The reconstruction loss represents the difference between the decoded dataset and the training dataset after encoding and decoding. Adjusting the autoencoder parameters using the reconstruction loss can further improve the accuracy of the autoencoder encoding.
[0124] In an exemplary embodiment, the essential feature dataset includes essential feature data from multiple perspectives of at least two accounts; applying inter-perspective consistency constraints to the essential feature dataset yields the essential loss, which includes:
[0125] For each account, calculate the first similarity between the essential feature data of the target account from the target perspective and the essential feature data of the target account from the non-target perspective, and calculate the second similarity between the essential feature data of the target account from the target perspective and the essential feature data of the non-target account from the non-target perspective. Based on the first similarity and the second similarity, obtain the essential consistency constraint corresponding to the target perspective. Based on the essential consistency constraint corresponding to each perspective, obtain the essential loss.
[0126] Similarity refers to the degree of similarity between two objects. Similarity can be calculated using Euclidean distance, cosine similarity, and other methods.
[0127] For example, a computer device acquires an essential feature dataset, then acquires essential feature data for each perspective of a target account and essential feature data for each perspective of other non-target accounts from the essential feature dataset, calculates a first similarity between the essential feature data corresponding to the target account from the target perspective and the essential feature data corresponding to the non-target perspectives, calculates a second similarity between the essential feature data corresponding to the target account from the target perspective and the essential feature data corresponding to the non-target accounts from the non-target perspectives, calculates the essential consistency constraint corresponding to the target perspective based on the first and second similarities, and then obtains the essential loss based on the essential consistency constraints corresponding to each perspective.
[0128] In one embodiment, the computer device calculates a first similarity between the target viewpoint of the target account and the first non-target viewpoint of the target account, calculates a second similarity between the target viewpoint of the target account and the first non-target viewpoint of each non-target account, obtains a statistical second similarity between the target viewpoint of the target account and the first non-target viewpoint of the non-target account based on each second similarity, obtains the essential consistency constraint between the target viewpoint of the target account and the first non-target viewpoint based on the ratio between the first similarity and the statistical second similarity, calculates the essential consistency constraint between the target viewpoint of the target account and the first non-target viewpoint, obtains the first non-target viewpoint consistency constraint between the target viewpoint and the first non-target viewpoint, calculates the non-target viewpoint consistency constraint corresponding to each non-target viewpoint under the same target viewpoint, obtains the essential consistency constraint corresponding to the target viewpoint, and then obtains the essential loss based on the essential consistency constraints corresponding to each viewpoint.
[0129] In one embodiment, essential loss for:
[0130]
[0131]
[0132] in, The essential consistency constraint from the perspective of m. For the essential feature data from the perspective of the i-th training account m, For the essential feature data of the i-th training account n from the perspective, τ F These are optional hyperparameters. sim(·) is an indicator function, and sim(·) is a similarity metric function, such as cosine similarity.
[0133] Semantic loss for:
[0134]
[0135]
[0136] in, For semantic consistency constraints from the perspective of m. Let m be the semantic feature data of the j-th class from the perspective of any account to be trained. For the semantic feature data of the j-th class from the perspective of the same training account n, K is the total number of semantic classes, and τ L This is an optional hyperparameter.
[0137] In this embodiment, the essential consistency constraint corresponding to the target viewpoint is calculated based on the first similarity and the second similarity. The initial account classification model is trained by the essential consistency constraint, which enables the essential feature encoder to retain more common information from different viewpoints and improves the accuracy of the account classification model.
[0138] In an exemplary embodiment, the semantic feature dataset includes semantic feature data from multiple perspectives of at least two accounts, and the reference semantic feature dataset includes reference semantic feature data from multiple perspectives of at least two accounts; the self-supervised loss obtained based on the semantic feature dataset and the reference semantic feature dataset includes:
[0139] For each perspective, calculate the cross-entropy between the semantic feature data corresponding to the perspective and the reference semantic feature data corresponding to the perspective; based on the cross-entropy corresponding to each perspective, obtain the self-supervised loss.
[0140] Cross entropy is an important concept in Shannon's information theory, mainly used to measure the difference between two probability distributions.
[0141] For example, the computer device calculates the cross-entropy between semantic feature data at the same position from the same viewpoint and reference semantic feature data, adds the cross-entropy of different positions from the same viewpoint to obtain the viewpoint cross-entropy, and then adds the viewpoint cross-entropy corresponding to each viewpoint to obtain the self-supervised loss.
[0142] In one embodiment, self-supervised loss for:
[0143]
[0144] in, The probability of the j-th semantic class from the m-th perspective of the i-th training account in the reference semantic feature dataset can be understood as the probability of the j-th semantic class calculated by the semantic prediction encoder using the essential feature data of the m-th training account. Let K be the probability of the j-th semantic class from the m-th perspective of the i-th training account in the semantic feature dataset. It can be understood as the probability of the j-th semantic class calculated by the semantic feature encoder using the encoded data of the m-th perspective of the i-th training account. K is the total number of semantic classes, N is the total number of training accounts, and M is the total number of perspectives.
[0145] In this embodiment, the self-supervised loss represents the difference between the semantic feature dataset and the reference semantic feature dataset. The semantic feature encoder supervises the encoding of the essential feature encoder, thereby improving the accuracy of the essential feature encoder.
[0146] In one exemplary embodiment, an account classification method includes:
[0147] Obtain the detection dataset corresponding to the multi-view information of the account to be classified; input the detection dataset into the target account classification model for recognition to obtain the category of the account to be classified; wherein, the target account classification model is the target account classification model of any one of claims 1 to 5.
[0148] Here, "accounts to be classified" refers to accounts whose categories need to be determined. Account categories can be set to normal and abnormal states, or multiple states can be set according to actual needs. The dataset to be tested refers to a collection of data representing multiple perspectives of information about the accounts to be classified.
[0149] For example, a computer device acquires a dataset corresponding to multi-view information of accounts to be classified, inputs the dataset into a target account classification model, and obtains the category of the accounts to be classified. The target account classification model is any one of the target account classification models described in the above embodiments.
[0150] In one embodiment, a computer device inputs a dataset to be detected corresponding to multi-view information of an account to be classified into a target account classification model to obtain the account category of the account to be classified.
[0151] In one embodiment, the computer device simultaneously inputs the dataset to be detected corresponding to the multi-view information of multiple accounts to be classified into the target account classification model to obtain the categories corresponding to the multiple accounts to be classified.
[0152] In this embodiment, a target account classification model is used to identify the accounts to be classified. The target account classification model is a trained account classification model that can accurately identify the category of the accounts to be classified, thereby improving the accuracy of the category determination of the accounts to be classified.
[0153] In one exemplary embodiment, such as Figure 5 As shown, the dataset to be detected is input into the target account classification model for identification, and the categories of the accounts to be classified are as follows:
[0154] Step 502: Encode the data to be detected for each viewpoint in the dataset to be detected to obtain the encoded data to be detected for each viewpoint. Decode the encoded data to be detected for each viewpoint to obtain the decoded data to be detected for each viewpoint.
[0155] For example, the computer device uses the autoencoder corresponding to each viewpoint in the target account classification model to encode the data to be detected for each viewpoint in the dataset to be detected, to obtain the encoded data to be detected for each viewpoint, and then decodes the encoded data to be detected for each viewpoint to obtain the decoded data to be detected for each viewpoint.
[0156] Step 504: Based on the difference between the decoded data to be detected and the data to be detected from each perspective, obtain the reconstruction score.
[0157] For example, the computer device calculates the difference between the decoded data to be detected and the data to be detected for each viewpoint of each account, and statistically analyzes the above differences for each viewpoint of the same account to be classified to obtain the reconstruction score for each account to be classified.
[0158] In one embodiment, the reconstruction score s of the i-th account to be classified 重构 (i) is:
[0159]
[0160] Where m is the m-th viewpoint and M is the total number of viewpoints.
[0161] Step 506: Extract essential features from the coded data to be detected to obtain essential feature data to be detected. Based on the similarity between the essential feature data to be detected from various perspectives, obtain a consistency score.
[0162] For example, the computer device extracts essential features from the coded data to be detected to obtain essential feature data to be detected, calculates the similarity between any two essential feature data from different perspectives of the same account to be classified, and statistically analyzes multiple similarities corresponding to each account to be classified to obtain a consistency score corresponding to each account to be classified.
[0163] In one embodiment, the consistency score s of the i-th account to be classified 一致性 (i) is:
[0164]
[0165] Where d(·) is a formula for calculating similarity by distance, such as the Euclidean distance formula, the Manhattan distance formula, etc. For the essential feature data from the perspective of the i-th account m to be classified, This represents the essential feature data from the perspective of the i-th account to be classified, n.
[0166] Step 508: Based on the reconstruction score and consistency score, obtain the account score of the account to be detected, and determine the category of the account to be classified based on the relationship between the account score and the classification threshold.
[0167] For example, the computer device adds the reconstruction score and consistency score corresponding to the same account to be classified to obtain the account score of the account to be detected, and compares the account score with the classification threshold to determine the category of the account to be classified.
[0168] In one embodiment, the account score s(i) of the i-th account to be classified is:
[0169] s(i)=s 重构 (i)+s 一致性 (i) Formula (8)
[0170] In one embodiment, the computer device compares the account score with a first classification threshold. If the score is less than the first classification threshold, the account is in a normal state. If the score is greater than the first classification threshold, the computer device compares the account score with a second classification threshold. If the score is less than the second classification threshold, the account is in a risky state. If the score is greater than the second classification threshold, the account is in an abnormal state. The computer device then processes the account accordingly based on its status.
[0171] In one embodiment, the computer device compares the account score with a classification threshold. If the score is less than the classification threshold, the account is in a normal state; if the score is equal to or greater than the classification threshold, the account is in an abnormal state. The computer device then processes the account in response to the account's status.
[0172] In this embodiment, the trained account classification model has accurate encoding and decoding capabilities for the data to be detected corresponding to normal accounts. If it is a normal account, the difference between the decoded data and the data to be detected after encoding and decoding by the autoencoder is small, and the reconstruction score is small. If it is an abnormal account, the difference between the decoded data and the data to be detected after encoding and decoding by the autoencoder is large, and the reconstruction score is large. Similarly, the consistency score between the essential feature data of each perspective after the encoded data of normal accounts is processed by the essential feature encoder is low. Therefore, the category of the account to be classified can be determined according to the relationship between the sum of the reconstruction score and the consistency score and the classification threshold, which improves the accuracy of classifying the account category.
[0173] In one exemplary embodiment, the account classification model is as follows: Figure 6 As shown, it includes M autoencoders, one essential feature encoder, one semantic feature encoder, and one predictive encoder. Each autoencoder encodes and decodes training data from one perspective. The encoding function of the autoencoder is to extract preliminary features of the account to be trained from the training data. The preliminary features include common features and perspective features. The decoding function of the autoencoder is to restore the encoded data to obtain decoded data. The function of the essential feature encoder is to further extract the common features from the encoded data. The function of the semantic feature encoder is to calculate the probability of the account to be classified belonging to each semantic category based on the encoded data. The function of the predictive encoder is to calculate the probability of the account to be classified belonging to each semantic category based on the essential feature data.
[0174] X 1Z represents the first-person perspective training data in the training dataset. 1 For X 1 The encoded data of the first perspective obtained after encoding by the first encoder, Y 1 For Z 1 The first-person view decoded data obtained by the first decoder, H 1 For Z 1 The first-person essential feature data, Q, is obtained after encoding by the essential feature encoder. 1 For Z 1 The first-person semantic feature data, P, is obtained after encoding by the semantic feature encoder. 1 For H 1 The first-person reference semantic feature data obtained by the predictive encoder.
[0175] The training process of the account classification model is as follows: Figure 7 As shown, firstly, the account classification model is pre-trained. The training object for pre-training is the autoencoder in the account classification model. In each round of training, a set of training data from the training dataset is input into the account classification model, and the training data X for each viewpoint is... i The data is input into the autoencoder corresponding to the viewpoint to obtain the encoded data Y for each viewpoint. i The autoencoder loss for each viewpoint is calculated using formula (1), and the autoencoder loss for each viewpoint is statistically analyzed using formula (2) to obtain the reconstruction loss. The parameters of the autoencoder are adjusted based on the reconstruction loss, and then the next round of training is started. After N1 rounds of training, the initial parameters of the autoencoder for entering the feature learning stage are determined.
[0176] Secondly, feature learning training is performed on the account classification model. The training objects for feature learning training are the autoencoder, essential feature encoder, and semantic feature encoder in the account classification model. In each round of training, a set of training datasets from the training dataset is input into the account classification model. The reconstruction loss is calculated using formula (2), the essential loss is calculated using formula (3), and the semantic loss is calculated using formula (4). The parameters of the autoencoder are adjusted based on the reconstruction loss, the parameters of the essential feature encoder are adjusted based on the essential loss, and the parameters of the semantic feature encoder are adjusted based on the semantic loss. Then, the next round of training is carried out until after N2 rounds of training, the initial parameters of the autoencoder entering the self-supervised stage, the initial parameters of the essential feature encoder entering the self-supervised stage, and the initial parameters of the semantic feature encoder entering the self-supervised stage are determined.
[0177] Finally, the account classification model is subjected to self-supervised training. The training objects of the self-supervised training are the autoencoder, essential feature encoder, semantic feature encoder and predictive encoder in the account classification model. In each round of training, a set of training datasets from the training dataset is input into the account classification model. The reconstruction loss is calculated using formula (2), the essential loss is calculated using formula (3), the semantic loss is calculated using formula (4), and the self-supervised loss is calculated using formula (5). The parameters of the autoencoder are adjusted based on the reconstruction loss, the parameters of the essential feature encoder are adjusted based on the essential loss, the parameters of the semantic feature encoder are adjusted based on the semantic loss, and the parameters of the predictive encoder are adjusted based on the self-supervised loss. Then the next round of training is carried out until after N3 rounds of training, the target parameters of the autoencoder, the essential feature encoder, the semantic feature encoder and the predictive encoder are determined, and the target account classification model is obtained.
[0178] Then, the target account classification model is used to determine the type of the account to be classified. The dataset to be detected corresponding to the account to be classified is input into the target account classification model, the reconstruction score is calculated using formula (6), the consistency score is calculated using formula (7), the account score is calculated using formula (8), the account score is compared with the classification threshold, and the type of the account to be classified is output.
[0179] In this embodiment, reconstruction loss represents the difference between the decoded dataset and the training dataset. Training the initial account classification model using reconstruction loss can improve the accuracy of encoding. Essence loss represents the consistency of data from different perspectives in the essence feature dataset. Training the initial account classification model using essence loss can improve the consistency of data from different perspectives in essence feature extraction. Semantic loss represents the consistency of data from different perspectives in the semantic feature dataset. Training the initial account classification model using semantic loss can improve the consistency of data from different perspectives in semantic feature extraction. Self-supervised loss represents the difference between the reference semantic feature dataset and the semantic feature dataset obtained after essence feature extraction and semantic feature prediction. Training the initial account classification model using self-supervised loss improves the accuracy of essence feature extraction. Based on reconstruction loss, essence loss, semantic loss, and self-supervised loss, training the initial account classification model improves the accuracy of the target account classification model.
[0180] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0181] Based on the same inventive concept, this application also provides an account classification model training device for implementing the account classification model training method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more account classification model training device embodiments provided below can be found in the limitations of the account classification model training method described above, and will not be repeated here.
[0182] In one embodiment, such as Figure 8 As shown, an account classification model training device is provided, including: an acquisition module, an autoencoder module, an essential feature extraction module, a semantic feature extraction module, a semantic feature prediction module, and a training module, wherein:
[0183] Module 802 is used to obtain the training dataset corresponding to the multi-view of the account to be trained.
[0184] Autoencoder module 804 is used to encode the training dataset to obtain an encoded dataset, decode the encoded dataset to obtain a decoded dataset, and obtain a reconstruction loss based on the difference between the decoded dataset and the training dataset.
[0185] The essential feature extraction module 806 is used to extract essential features from the encoded dataset to obtain an essential feature dataset, and to impose inter-view consistency constraints on the essential feature dataset to obtain the essential loss.
[0186] The semantic feature extraction module 808 is used to extract semantic features from the encoded dataset to obtain a semantic feature dataset, and to impose inter-view consistency constraints on the semantic feature dataset to obtain semantic loss.
[0187] The semantic feature prediction module 810 is used to predict semantic features on the essential feature dataset to obtain a reference semantic feature dataset, and to obtain a self-supervised loss based on the semantic feature dataset and the reference semantic feature dataset.
[0188] Training module 812 is used to train the initial account classification model based on reconstruction loss, essential loss, semantic loss and self-supervised loss to obtain the target account classification model.
[0189] In one embodiment, the training module 812 is further configured to: train the autoencoder in the initial account classification model based on the reconstruction loss to obtain the first autoencoder parameters corresponding to the autoencoder; train the autoencoder, essential feature encoder, and semantic feature encoder in the initial account classification model based on the first autoencoder parameters, the reconstruction loss, the essential loss, and the semantic loss to obtain the second autoencoder parameters corresponding to the autoencoder, the first essential encoding parameters corresponding to the essential feature encoder, and the first semantic encoding parameters corresponding to the semantic feature encoder; and train the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder in the initial account classification model based on the second autoencoder parameters, the first essential encoding parameters, the first semantic encoding parameters, the reconstruction loss, the essential loss, the semantic loss, and the self-supervised loss to obtain the target account classification model.
[0190] In one embodiment, the autoencoder module 804 is further configured to: for each viewpoint, encode the training data of the viewpoint using an autoencoder corresponding to the viewpoint to obtain the encoded data of the viewpoint, then decode the encoded data using an autoencoder corresponding to the viewpoint to obtain the decoded data of the viewpoint, and statistically analyze the difference between the decoded data of the viewpoint and the training data to obtain the autoencoder loss of the viewpoint, and obtain the reconstruction loss based on the autoencoder losses corresponding to multiple viewpoints.
[0191] In one embodiment, the essential feature extraction module 806 is further configured to: for each account, calculate a first similarity between the essential feature data of the target account from the target perspective and the essential feature data of the target account from the non-target perspective, calculate a second similarity between the essential feature data of the target account from the target perspective and the essential feature data of the non-target account from the non-target perspective, and then obtain the essential consistency constraint corresponding to the target perspective based on the first similarity and the second similarity, and obtain the essential loss based on the essential consistency constraint corresponding to each perspective.
[0192] In one embodiment, the semantic feature prediction module 810 is further configured to: calculate the cross-entropy between the semantic feature data corresponding to each viewpoint and the reference semantic feature data corresponding to the viewpoint for each viewpoint, and obtain the self-supervised loss based on the cross-entropy corresponding to each viewpoint.
[0193] In one embodiment, an account classification device is provided, comprising: an account acquisition module and an identification module, wherein:
[0194] The unclassified account acquisition module is used to acquire the dataset to be detected corresponding to the multi-perspective information of the unclassified accounts.
[0195] The recognition module is used to input the dataset to be detected into the target account classification model for recognition, and to obtain the category of the account to be classified; wherein, the target account classification model is the target account classification model obtained by the account classification model training device mentioned above.
[0196] In one embodiment, the identification module is further configured to: encode the data to be detected for each viewpoint in the dataset to be detected, to obtain the encoded data to be detected for each viewpoint; decode the encoded data to be detected for each viewpoint, to obtain the decoded data to be detected for each viewpoint; obtain a reconstruction score based on the difference between the decoded data to be detected and the data to be detected for each viewpoint; extract essential features from the encoded data to be detected, to obtain essential feature data to be detected; obtain a consistency score based on the similarity between the essential feature data to be detected for each viewpoint; obtain the account score of the account to be detected based on the reconstruction score and the consistency score; and determine the category of the account to be classified based on the relationship between the account score and the classification threshold.
[0197] Each module in the aforementioned account classification model training device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0198] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 9 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements an account classification model training method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0199] Those skilled in the art will understand that Figure 9The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0200] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0202] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0203] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0206] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for training an account classification model, characterized in that, The method includes: Obtain the training dataset corresponding to the multi-view information of the account to be trained; The training dataset is encoded to obtain an encoded dataset, and the encoded dataset is decoded to obtain a decoded dataset. The reconstruction loss is obtained based on the difference between the decoded dataset and the training dataset. Essential features are extracted from the encoded dataset to obtain an essential feature dataset. Interview consistency constraints are applied to the essential feature dataset to obtain the essential loss. Semantic features are extracted from the encoded dataset to obtain a semantic feature dataset. Interview consistency constraints are applied to the semantic feature dataset to obtain a semantic loss. Semantic feature prediction is performed on the essential feature dataset to obtain a reference semantic feature dataset, and a self-supervised loss is obtained based on the semantic feature dataset and the reference semantic feature dataset. Based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the initial account classification model is trained to obtain the target account classification model.
2. The method according to claim 1, characterized in that, The process of training the initial account classification model based on the reconstruction loss, essential loss, semantic loss, and self-supervised loss to obtain the target account classification model includes: The autoencoder in the initial account classification model is trained based on the reconstruction loss to obtain the first autoencoder parameter corresponding to the autoencoder. Based on the first autoencoder parameter, reconstruction loss, essential loss and semantic loss, the autoencoder, essential feature encoder and semantic feature encoder in the initial account classification model are trained to obtain the second autoencoder parameter corresponding to the autoencoder, the first essential encoding parameter corresponding to the essential feature encoder and the first semantic encoding parameter corresponding to the semantic feature encoder. Based on the second autoencoder parameter, the first essential encoding parameter, and the first semantic encoding parameter, as well as the reconstruction loss, essential loss, semantic loss, and self-supervised loss, the autoencoder, essential feature encoder, semantic feature encoder, and predictive encoder in the initial account classification model are trained to obtain the target account classification model.
3. The method according to claim 1, characterized in that, The training dataset includes training data from multiple perspectives of at least two accounts; the process of encoding the training dataset to obtain an encoded dataset, decoding the encoded dataset to obtain a decoded dataset, and obtaining a reconstruction loss based on the difference between the decoded dataset and the training dataset includes: For each viewpoint, the training data of the viewpoint is encoded by an autoencoder corresponding to the viewpoint to obtain the encoded data of the viewpoint. The encoded data of the viewpoint is obtained by decoding the encoded data using an autoencoder corresponding to the viewpoint. The difference between the decoded data and the training data of the given viewpoint is statistically analyzed to obtain the autoencoding loss of the given viewpoint. Based on the autoencoding loss corresponding to the multiple perspectives, the reconstruction loss is obtained.
4. The method according to claim 1, characterized in that, The essential feature dataset includes essential feature data from multiple perspectives of at least two accounts; the essential feature loss obtained by applying inter-perspective consistency constraints to the essential feature dataset includes: For each account, calculate the first similarity between the essential feature data of the target account from the target perspective and the essential feature data of the target account from the non-target perspective, and calculate the second similarity between the essential feature data of the target account from the target perspective and the essential feature data of the non-target account from the non-target perspective. Based on the first similarity and the second similarity, the essential consistency constraint corresponding to the target perspective is obtained; Based on the essential consistency constraints corresponding to each perspective, the essential loss is obtained.
5. The method according to claim 1, characterized in that, The semantic feature dataset includes semantic feature data from multiple perspectives of no less than two accounts, and the reference semantic feature dataset includes reference semantic feature data from multiple perspectives of no less than two accounts. The self-supervised loss obtained based on the semantic feature dataset and the reference semantic feature dataset includes: For each viewpoint, calculate the cross-entropy between the semantic feature data corresponding to the viewpoint and the reference semantic feature data corresponding to the viewpoint; The self-supervised loss is obtained based on the cross-entropy corresponding to each perspective.
6. An account classification method, characterized in that, The method includes: Obtain the dataset to be tested corresponding to the multi-perspective information of the accounts to be classified; The dataset to be detected is input into the target account classification model for identification to obtain the category of the account to be classified; wherein, the target account classification model is the target account classification model according to any one of claims 1 to 5.
7. The method according to claim 6, characterized in that, The step of inputting the dataset to be detected into the target account classification model for identification, and obtaining the categories of the accounts to be classified, includes: The data to be detected in each viewpoint of the dataset to be detected is encoded to obtain the encoded data to be detected for each viewpoint. The encoded data to be detected for each viewpoint is then decoded to obtain the decoded data to be detected for each viewpoint. A reconstruction score is obtained based on the difference between the decoded data to be detected and the data to be detected from each perspective; The essential features of the coded data to be detected are extracted to obtain the essential feature data to be detected. Based on the similarity between the essential feature data to be detected from various perspectives, a consistency score is obtained. Based on the reconstruction score and the consistency score, the account score of the account to be classified is obtained. Based on the relationship between the account score and the classification threshold, the category of the account to be classified is determined.
8. An account classification model training device, characterized in that, The device includes: The acquisition module is used to acquire the training dataset corresponding to the multi-viewpoints of the account to be trained. An autoencoder module is used to encode the training dataset to obtain an encoded dataset, decode the encoded dataset to obtain a decoded dataset, and obtain a reconstruction loss based on the difference between the decoded dataset and the training dataset. The essential feature extraction module is used to extract essential features from the encoded dataset to obtain an essential feature dataset, and to apply inter-view consistency constraints to the essential feature dataset to obtain the essential loss. The semantic feature extraction module is used to extract semantic features from the encoded dataset to obtain a semantic feature dataset, and to apply inter-view consistency constraints to the semantic feature dataset to obtain a semantic loss. The semantic feature prediction module is used to perform semantic feature prediction on the essential feature dataset to obtain a reference semantic feature dataset, and to obtain a self-supervised loss based on the semantic feature dataset and the reference semantic feature dataset. The training module is used to train the initial account classification model based on the reconstruction loss, essential loss, semantic loss and self-supervised loss to obtain the target account classification model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Low-resolution face image super-resolution method for recognition.
CN112288627A
Text classification method and device, electronic equipment and storage medium
CN113392210A