Resource transfer processing method and device
By extracting and clustering the user's resource flow data and predicting user categories with self-attention calculation, the problem of user lag or ineffectiveness during resource flow is solved, and the effectiveness and user experience of reminders are improved.
Patent Information
- Application Number
- CN202411436855.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-18
AI Technical Summary
During the resource transfer process, some users have lag or ineffective problems, resulting in problems in the operation of the organization and face great pressure.
By extracting and merging the user's resource flow data and user identity data, clustering and feature conversion, splicing features and encoding, and finally predicting user categories through self-attention calculation to determine the reminder strategy.
It improves the accuracy and pertinence of user category prediction, enhances the effectiveness of resource flow reminders, and improves user experience and organization operation efficiency.
Smart Images

Figure CN119477510A_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of data processing technology, and in particular to a resource flow processing method and device. Background Art
[0002] With the continuous development of Internet technology and the continuous improvement of users' living standards, more and more users have begun to carry out resource transfer operations such as repayment and repayment in various institutions. Users can carry out various activities through resources, but as more and more users rely on institutions to transfer resources, some users also have problems such as delayed and ineffective resource transfer, which causes some problems in the operation of institutions providing resources, making various institutions face great pressure. Summary of the invention
[0003] One or more embodiments of the present specification provide a resource flow processing method, including: extracting features and merging features of resource flow data and user identity data of each user to obtain multiple user features. Performing user clustering based on each user feature to obtain a feature type label for each user, and performing feature conversion on the feature type label to obtain the type feature for each user. Performing feature splicing on the user features and type features corresponding to each user to obtain each spliced feature, and encoding each spliced feature. Performing self-attention calculation on the encoded features to obtain an attention feature, and performing user category prediction based on the attention feature to obtain the user category of each user, so as to perform resource flow reminders according to the reminder strategy corresponding to the user category.
[0004] One or more embodiments of the present specification provide a method for training a classification model, including: obtaining sample data, extracting features from resource flow data and user identity data of multiple sample users contained in the sample data, and merging features to obtain multiple sample features. The sample features are input into the classification model to be trained to predict user categories, and a predicted category of each sample user is obtained. The classification model parameters are adjusted according to the labels of each sample user and the loss calculated for the predicted category to obtain a classification model. Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation on the spliced features, and performing user category prediction through the obtained attention features to obtain the predicted category.
[0005] One or more embodiments of the present specification provide a resource flow processing device, including: a feature processing module, configured to extract and merge features of resource flow data and user identity data of each user to obtain multiple user features. A clustering module, configured to perform user clustering according to the features of each user to obtain the feature type label of each user, and perform feature conversion on the feature type label to obtain the type feature of each user. An encoding module, configured to perform feature splicing on the user features and type features corresponding to each user to obtain each spliced feature, and perform encoding processing on each spliced feature. A category prediction module, configured to perform self-attention calculation of the encoded features to obtain attention features, perform user category prediction based on the attention features to obtain the user category of each user, so as to perform resource flow reminders according to the reminder strategy corresponding to the user category.
[0006] One or more embodiments of the present specification provide a training device for a classification model, including: a sample feature processing module, configured to obtain sample data, perform feature extraction and feature merging on resource flow data and user identity data of multiple sample users contained in the sample data to obtain multiple sample features. A category prediction module, configured to input the sample features into the classification model to be trained to perform user category prediction, and obtain the predicted category of each sample user. A parameter adjustment module, configured to perform parameter adjustment on the classification model according to the label of each sample user and the loss calculated by the predicted category, so as to obtain a classification model. Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation on the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
[0007] One or more embodiments of the present specification provide a resource flow processing device, including: a processor; and a memory configured to store computer-executable instructions, wherein the processor executes the computer-executable instructions to implement the following process: extracting features and merging features of resource flow data and user identity data of each user to obtain multiple user features. Performing user clustering based on each user feature to obtain a feature type label for each user, and performing feature conversion on the feature type label to obtain the type feature of each user. Performing feature splicing on the user features and type features corresponding to each user to obtain each spliced feature, and encoding each spliced feature. Performing self-attention calculation on the encoded features to obtain an attention feature, and performing user category prediction based on the attention feature to obtain the user category of each user, so as to perform resource flow reminders according to the reminder strategy corresponding to the user category.
[0008] One or more embodiments of the present specification provide a classification model training device, including: a processor; and a memory configured to store computer-executable instructions, wherein the processor executes the computer-executable instructions to implement the following process: obtaining sample data, extracting features from resource flow data and user identity data of multiple sample users contained in the sample data, and merging features to obtain multiple sample features. The sample features are input into the classification model to be trained to predict user categories, and the predicted categories of each sample user are obtained. The classification model parameters are adjusted according to the labels of each sample user and the loss calculated for the predicted categories to obtain a classification model. Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type features of each sample user, splicing the sample features and the type features, performing self-attention calculation on the spliced features, and performing user category prediction through the obtained attention features to obtain the predicted category.
[0009] One or more embodiments of the present specification provide a computer-readable storage medium for storing computer-executable instructions, which implement the following process when executed: extracting features and merging features of resource flow data and user identity data of each user to obtain multiple user features. Performing user clustering based on each user feature to obtain a feature type label for each user, and performing feature conversion on the feature type label to obtain the type feature of each user. Performing feature splicing on the user features and type features corresponding to each user to obtain each spliced feature, and encoding each spliced feature. Performing self-attention calculation on the encoded features to obtain attention features, and performing user category prediction based on the attention features to obtain the user category of each user, so as to perform resource flow reminders according to the reminder strategy corresponding to the user category.
[0010] One or more embodiments of the present specification provide another computer-readable storage medium for storing computer-executable instructions, which implement the following process when executed: obtain sample data, extract features from resource flow data and user identity data of multiple sample users contained in the sample data, and merge features to obtain multiple sample features. Input the sample features into the classification model to be trained to predict user categories and obtain the predicted categories of each sample user. Adjust the parameters of the classification model according to the labels of each sample user and the loss calculated for the predicted category to obtain a classification model. Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type features of each sample user, splicing the sample features and the type features, performing self-attention calculation on the spliced features, and performing user category prediction through the obtained attention features to obtain the predicted category. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor. Figure 1 A schematic diagram of a classification model provided for one or more embodiments of this specification; Figure 2 A processing flow chart of a resource transfer processing method provided for one or more embodiments of this specification; Figure 3 A schematic diagram of a resource flow processing architecture provided for one or more embodiments of this specification; Figure 4 A processing sequence diagram of a resource flow processing method applied to a user category prediction scenario provided by one or more embodiments of this specification; Figure 5 A processing flow chart of a classification model training method provided for one or more embodiments of this specification; Figure 6 A processing sequence diagram of a resource flow processing method applied to a classification model training scenario provided by one or more embodiments of this specification; Figure 7 A schematic diagram of an embodiment of a resource transfer processing device provided in one or more embodiments of this specification; Figure 8 A schematic diagram of another resource transfer processing device embodiment provided for one or more embodiments of this specification; Fig. 9 A schematic diagram of the structure of a server provided for one or more embodiments of this specification; Fig.10 A schematic diagram of the structure of a user terminal provided in one or more embodiments of this specification. DETAILED DESCRIPTION
[0012] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this document.
[0013] The resource transfer processing method provided in one or more embodiments of this embodiment can be applied to the implementation scenario of the classification model. Figure 1 , the implementation environment at least includes: Feature processing module 101, clustering module 102, splicing module 103, encoding module 104, self-attention calculation module 105 and feedforward neural network 106; Among them, the feature processing module 101 is used to perform feature processing on the user's resource flow data and user identity data to obtain user features; the clustering module 102 is used to perform clustering processing on users according to user features to obtain type features; the splicing module 103 is used to splice user features and type features to obtain splicing features; the encoding module 104 is used to perform feature encoding to obtain a user sequence; the self-attention calculation module 105 is used to perform self-attention calculation on the user sequence to obtain attention features; the feedforward neural network 106 is used to perform resource flow processing according to the attention features to obtain user categories.
[0014] In this implementation, the user's resource flow data and user identity data are input into the feature processing module 101 for feature processing to output user features, the user features are input into the clustering module 102 for user clustering processing to output category features, further, the user features and category features are input into the splicing module 103 for feature splicing to output splicing features, the splicing features are input into the encoding module 104 for encoding processing to output user sequences, and then the self-attention calculation module 105 performs self-attention calculation on the user sequence to obtain attention features, and finally the attention features are input into the feedforward neural network 106 for category prediction to obtain the user category of the user, so as to remind the user according to the reminder strategy corresponding to the user category.
[0015] One or more embodiments of a resource transfer processing method provided in this embodiment are as follows: Reference Figure 2 The resource transfer processing method provided in this embodiment specifically includes steps S202 to S208.
[0016] Step S202 , extracting and merging features of resource flow data and user identity data of each user to obtain multiple user features.
[0017] In this embodiment, resource flow data refers to data on resource flow by users in an institution, where resources include funds, virtual resources and / or credit resources. Specifically, resource flow data may be relevant data on resources borrowed by users in an institution and / or relevant data on resources returned by users to an institution; for example: credit data at a financial institution; another example: the amount of resources borrowed, the time to return the resources, the number of overdue returns and / or the number of times resources are borrowed.
[0018] In specific implementation, the user whose category needs to be predicted can be determined first, and the resource flow data and user identity data of the user can be queried. Then, the feature extraction of the resource flow data and user identity data obtained by the query can be performed, and the extracted features can be merged at the user level to obtain user features corresponding to multiple users, including resource flow features and identity features. Specifically, feature extraction and feature merging can be performed through feature processing algorithms or feature processing tools; for example, feature extraction and feature merging can be performed through ETL (Extract-Transform-Load).
[0019] In practical applications, users for category prediction may be users in a state where resources are to be returned, for example, users who have not yet repaid within the repayment period of a financial institution, and the willingness rating of such users regarding their willingness to repay may be predicted; in this regard, users with resources to be returned and / or users in a state where resources are to be returned may be screened out from the user pool, and the user's historical resource data may be used as resource flow data, and the user's registered identity information may be queried as user identity information, so as to improve user prediction efficiency and enhance the pertinence of category prediction; in an optional implementation manner provided in this embodiment, the resource flow data and user identity data of each user may be obtained in the following manner: Filter out users whose resource return time is within a preset time range from the user pool according to a preset time frequency; or filter out users whose resource return time has not expired from the user pool according to a preset time frequency; The historical resource data of the user is obtained as the resource flow data, and the registered identity information of the user is searched in a user database as the user identity information.
[0020] For example, target users whose repayment time has not yet expired are filtered out from the user pool once a day, the historical credit data of the target users are obtained, and the registration information of the target users is queried in the user database as user identity information.
[0021] During the specific execution process, in order to improve data processing efficiency and data adaptability, feature extraction, feature processing and feature merging may be performed on resource flow data and user identity data. Specifically, the extracted features may be transformed into features with higher processing efficiency, such as: the features are divided into equal-frequency buckets, the number of features in each bucket is relatively small, and the transformed features are merged according to the user granularity; in an optional implementation manner provided in this embodiment, feature extraction and feature merging include: Extracting features from the resource flow data to obtain flow sub-features, and extracting features from the user identity data to obtain identity sub-features; The flow sub-features and the identity sub-features are subjected to feature transformation, and the transformed flow sub-features and identity sub-features corresponding to each of the users are subjected to feature merging to obtain user features of each of the users.
[0022] For example, feature extraction is performed on the resource flow data of each user to obtain the flow sub-features of each user, and feature extraction is performed on the user identity data of each user to obtain the identity sub-features of each user. The numerically related features in each flow sub-feature, such as the amount of borrowed resources, are subjected to equal frequency bucketing and then distribution transformation, and the numerically related features in each identity sub-feature, such as the user growth value, are subjected to equal frequency bucketing and then distribution transformation, and the original flow sub-features, transformed flow sub-features, original identity sub-features and transformed identity sub-features corresponding to each user are merged to obtain the user features of each user. Among them, feature transformation can be statistical processing of feature values, and feature transformation is performed according to the statistical results. For example, if the statistical results indicate that the feature values are right-skewed, quantile transformation is performed; in addition, feature transformation can also be normalization, or the features after distribution transformation are normalized.
[0023] It should be noted that the resource flow processing method provided in this embodiment can be implemented through a trained classification model; optionally, the resource flow processing method is applied to the classification model; based on this, the process of extracting features and merging features from the resource flow data and user identity data of each user can also input the resource flow data and user identity data into the classification model for feature extraction and feature merging. Figure 3 As shown, the resource flow data and user identity data are input into the classification model for feature extraction, feature transformation and feature merging to obtain the user features of each user.
[0024] Step S204: performing user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and performing feature conversion on the characteristic type label to obtain a type feature of each user.
[0025] In this embodiment, users are clustered according to their characteristics, and the type characteristics of the users are determined based on the clustering results and the type characteristics are incorporated into the user category prediction, which increases the data dimension of the category prediction, improves the accuracy and specificity of the user category prediction, and also improves the processing performance of the classification model.
[0026] In specific implementation, user features are input into a clustering algorithm to perform clustering processing on each user to obtain a cluster group of each user, and users in each cluster group are labeled according to the label of each cluster group, and the labeled results are converted into type features of each user. Specifically, each user can be clustered according to the feature value of the target sub-feature in the user features to obtain the type features of each user, so that the user category prediction result is more accurate; further, a more targeted prediction algorithm and / or classification model can be constructed according to the user category of each type of user.
[0027] In the specific implementation process, in order to improve the pertinence and accuracy of user clustering, clustering processing can be performed according to the feature value of the target sub-feature in the user feature. Specifically, the feature of interest can be preset as the target sub-feature, so as to perform user clustering according to the feature value interval of the target sub-feature, wherein the target sub-feature can be one feature or multiple features, for example: presetting user growth features and / or resource amount features as target sub-features; in an optional implementation manner provided in this embodiment, user clustering and feature conversion are performed, including: Inputting the user characteristics into a clustering algorithm to perform user clustering, and obtaining cluster groups corresponding to the users; Each cluster group is marked by a type, and each user is marked by a type according to the marking result, and the marking result of each user is converted into the type feature.
[0028] Specifically, each user feature can be sorted according to the feature value of the target sub-feature, and the cluster group corresponding to each user can be determined according to the feature value range. After the cluster group is marked by type, the users included in the cluster group are extracted, and the users included in the cluster group are marked by type according to the marking result of the cluster group, and the users in each cluster group are marked according to the marking method to obtain the marking result of each user, and the marking result is converted into the type feature of each user.
[0029] It should be noted that user clustering and feature conversion can also be performed through classification models; using the above example, Figure 3 As shown, the user features of each user are input into the clustering network of the classification model to perform user clustering to obtain clustering results, and the clustering results are subjected to feature conversion to obtain the type features of each user.
[0030] Step S206, performing feature splicing on the user features and type features corresponding to the respective users to obtain spliced features, and performing encoding processing on the spliced features.
[0031] After obtaining the user features and type features of each user, the user features and type features corresponding to each user are concatenated, and the user is represented by a concatenated feature containing the user features and the type features. The concatenated features of each user are marked by a global vector and / or a classification vector, and the marked concatenated features are encoded for subsequent self-attention calculations.
[0032] During the specific execution process, a CLS (classification) marking method may be introduced to randomly generate and mark a classification vector for each user's concatenated vector, so as to improve the accuracy of category prediction through subsequent self-attention calculations using the classification vector. In an optional implementation provided in this embodiment, feature encoding is performed, including: Generate a classification vector corresponding to each of the splicing features, and mark each of the splicing features according to the classification vector; Performing linear transformation on the marked concatenated features to obtain the encoded features of each user.
[0033] Specifically, after generating a classification vector for each user's splicing features, the splicing features are marked by the classification vector, that is, the classification vector is placed at the head of the splicing features, and the marked splicing features are linearly transformed once or multiple times according to a preset encoding method to obtain the encoded features.
[0034] It should be noted that the process of feature concatenation and feature encoding can also be performed through the classification model; using the above example, Figure 3 As shown, the user features and type features corresponding to the user are concatenated and the concatenated features are CLS marked, and the marked concatenated features are encoded to obtain the encoding result.
[0035] Step S208, performing self-attention calculation on the encoded features to obtain attention features, performing user category prediction based on the attention features to obtain the user category of each user, and performing resource transfer reminders according to the reminder strategies corresponding to the user categories.
[0036] This embodiment constructs features for category prediction from static features that characterize user identity information, dynamic features that characterize user resource flow data, and category features obtained after clustering, and can predict more accurate user categories through CLS tagging and self-attention calculation. It predicts user categories based on user data in multiple dimensions, and provides resource flow reminders to users based on reminder strategies corresponding to user categories, thereby improving the message reminder effect and the user's reminder experience.
[0037] During specific implementation, for each user's encoding result, the encoding result is input into the self-attention algorithm for self-attention calculation to obtain the attention feature corresponding to the user, and the user category is predicted based on the attention feature to obtain the user category of the user, so as to remind the user of resource transfer according to the reminder strategy corresponding to the user category. It should be noted that the user category prediction process provided for a single user can also be applied to the user category prediction of the remaining users among the users. The specific prediction process can be predicted by taking the prediction process of the single user as an example, and this embodiment will not be repeated here.
[0038] In this embodiment, the reminder strategy is a strategy for reminding users of resource transfers. The reminder strategy can be used to determine a strategy for reminding users to return resources. For example, the reminder strategy can be used to determine a reminder strategy for users to return funds to institutions. Specifically, the reminder strategy can be configured with a reminder channel, a reminder method, and / or a reminder frequency. Optionally, the reminder strategy includes a message reminder strategy for users to transfer resources according to a preset reminder frequency, reminder channel, and / or reminder method.
[0039] In the specific execution process, the query vector of the classification vector marked by the CLS can be calculated, and the key vector and the value vector corresponding to the encoded feature can be calculated, and the query vector, the key vector and the value vector are input into the self-attention algorithm for self-attention calculation to obtain the attention feature for characterizing the global feature of the user, so as to improve the accuracy of category prediction; in an optional implementation manner provided in this embodiment, the self-attention calculation of the encoded feature is performed to obtain the attention feature, including: Calculating a query vector of the classification vector of the encoded feature labels, and calculating a key vector and a value vector of the encoded features; The query vector, the key vector, and the value vector are input into a self-attention algorithm to obtain the attention feature.
[0040] Specifically, a query vector (Query) of the classification vector marked by CLS in the encoded feature is generated, and a key vector (Key) and a value vector (Value) of the classification vector and the remaining feature vectors in the encoded feature are generated. The query vector, the key vector and the value vector are input into the self-attention algorithm. Specifically, the attention weights corresponding to each vector are obtained by calculation based on the query vector and the key vector, and the attention features are obtained by calculation based on the corresponding attention weights and the value vector.
[0041] It should be noted that the self-attention calculation process provided above can be a single-round self-attention calculation or a multi-round self-attention calculation. In the multi-round self-attention calculation process, the calculation process for each round or each layer of self-attention can also be performed with reference to the self-attention calculation process provided above. The specific calculation process takes the self-attention calculation process provided above as an example, and this embodiment will not be repeated here.
[0042] In the specific category prediction process, feature transformation can be performed based on the attention feature, and probability calculation can be performed on the transformed feature to obtain the category probability of the user, and the user category can be determined based on the category probability to improve the prediction accuracy; in an optional implementation manner provided in this embodiment, user category prediction based on the attention feature includes: Inputting the attention features into a feedforward neural network for feature transformation and probability calculation to obtain the category probability of each user; The user category is determined according to the category probability.
[0043] Specifically, user category prediction can be performed through a classification model. Attention features can be input into a feedforward neural network, and one or more layers of linear transformation of the attention features can be performed through the fully connected layer of the feedforward neural network. The linear transformation results are input into the output layer of the feedforward neural network for probability calculation, and the features are converted into probability distributions. The user category of each user is determined based on the probability distribution.
[0044] It should be noted that the process of self-attention calculation can also be performed using a classification model; using the above example, Figure 3 As shown, the encoded features can be self-attention calculated to obtain attention features, and the attention features can be input into a feedforward neural network for feature transformation and probability calculation to obtain the user category of each user output by the classification model.
[0045] In actual applications, some users may not pay attention to the resource return deadline during the resource transfer process, which makes the institution providing resources to users face some problems, while some users may return the resources in a timely manner; in view of this, reminder strategies corresponding to user categories can be preset, for example: a light reminder strategy is adopted for users who return the resources in a timely manner, and an appropriately heavier reminder strategy is adopted for users who borrow a large amount of resources or fail to return the resources in a timely manner for many times, so as to improve the effectiveness of reminders and enhance user experience; in an optional implementation manner provided by this embodiment, resource transfer reminders are performed according to the reminder strategy, including: Querying the reminder frequency corresponding to the user category, and reminding the user to return resources according to the reminder frequency; Alternatively, the reminder channel corresponding to the user category is queried, and the user is reminded to return the resources through the reminder channel.
[0046] Specifically, the reminder policy corresponding to the user category can be queried according to the user category and the reminder frequency, reminder channel and / or reminder method corresponding to the reminder policy can be extracted, the user information of the user can be queried, and the user can be reminded of resource transfer through the reminder channel according to the reminder method and user information, and the reminder can be made according to the reminder frequency.
[0047] For example, if the user category of the user is weak repayment willingness, the reminder strategy corresponding to the user category is queried and the user information of the user is queried to determine that the reminder strategy for the user category with weak repayment willingness is call reminder. The user is reminded to repay through the number channel in the call reminder manner, and the reminder is made once a day before the user repays.
[0048] It should be noted that in this embodiment, the classification model can be obtained by pre-training, and the training of the classification model can be performed on a cloud server or offline; in an optional implementation manner provided in this embodiment, the classification model is trained in the following manner: Extract features from user sample data and merge features to obtain sample features; Inputting the sample features into the classification model to be trained to predict the user category, and obtaining the predicted category of the sample user; The classification model to be trained is adjusted in parameters according to the labels of the sample users and the losses calculated from the predicted categories to obtain the classification model.
[0049] Specifically, the classification model can use the sample resource data and sample identity data of the sample user as user sample data, and the classification of the sample user as a label, extract features from the user sample data and merge features to obtain sample features, and input the sample features into the classification model to be trained to predict the user category. In the specific prediction process, user clustering and feature conversion are performed according to the sample features to obtain the type features of each sample user, the sample features and the type features are concatenated, the self-attention calculation of the concatenated features is performed, and the user category is predicted through the obtained attention features to obtain the predicted category, the loss calculation is performed for the predicted categories and labels corresponding to each sample user, and the parameters of the classification model are adjusted according to the calculation results, and so on. The classification model is trained in the above training method until the difference between the predicted category predicted by the classification model and the label converges, and the training of the classification model is completed.
[0050] In the specific training process, the user sample data can be real historical data. In order to improve the reliability of the trained classification model, the user rating of the user can be determined first, and users with similar numbers can be selected from each user rating as sample users to ensure the diversity of sample users, and data cleaning is performed on the user sample data of the sample users to improve the high availability of the user sample data. Among them, the user rating of the user, that is, the rating of the willingness to return the resource, can be used as a user label. In an optional implementation manner provided in this embodiment, the user sample data is constructed in the following manner: Determine the user ratings of the users in the user pool according to the historical resource data of the users in the user pool, and adopt a sampling algorithm to sample the users corresponding to each user rating to obtain the sample users; Acquire sample resource data and sample identity data of multiple sample users, and perform data cleaning on the sample resource data and the sample identity data; The user sample data is constructed based on the sample resource data and sample identity data after data cleaning.
[0051] Specifically, data cleaning can be a cleaning method that removes, fits and / or replaces missing values and / or outliers in the data to ensure high availability of user sample data.
[0052] During the specific training process, the feature extraction and feature merging of the user sample data can be adaptively adjusted to improve the accuracy of the classification model and reduce the model illusion. Specifically, the distribution transformation of the features can be performed according to the data characteristics of the field to which the classification model belongs, for example, quantile transformation is performed for data with right-skewed characteristics. In an optional implementation manner provided in this embodiment, feature extraction and feature merging include: Extracting features and normalizing the sample resource data in the user sample data to obtain flow sub-features, and extracting features and normalizing the sample identity data in the user sample data to obtain identity sub-features; Merging the flow sub-feature and identity sub-feature corresponding to each sample user to obtain the first feature of each sample user; The eigenvalue distribution of the first feature is calculated and whether the eigenvalue distribution satisfies a transformation condition is detected. If so, the first feature is subjected to a feature distribution transformation according to a preset transformation strategy to obtain the sample feature.
[0053] For example, the characteristic value of the first characteristic of each sample user is counted to detect whether there is a right deviation in the peak value of the normal distribution of the characteristic value. If there is a right deviation, the first characteristic is quantile transformed according to the quantile transformation strategy to obtain the sample characteristics of each sample user.
[0054] In summary, the one or more resource flow processing methods provided in the present embodiment, in the process of performing resource flow reminder, feature extraction and feature merging are performed on the resource flow data and user identity data of each user to obtain multiple user features, user clustering is performed according to each user feature to obtain the feature type label of each user, and feature conversion is performed on the feature type label to obtain the type feature of each user. The dimension of user category prediction is increased by clustering, and the accuracy of category prediction is improved. The user features and type features corresponding to each user are feature spliced to obtain each spliced feature, and each spliced feature is encoded, and self-attention calculation is performed on the encoded features to obtain attention features. User category prediction is performed based on the attention features to obtain the user category of each user. Through self-attention calculation, user category prediction is performed from the overall multiple dimensional features of the user to improve the accuracy of user category prediction, and the reminder strategy of each user is determined according to the obtained user category, so as to remind each user of resource flow according to the reminder strategy, thereby improving the effectiveness of reminder and improving reminder efficiency. Furthermore, the concatenated features of each user can be marked with classification vectors through the CLS marking method, and self-attention calculation can be performed through the encoding results of the marked concatenated vectors. The attention calculation results corresponding to the classification vectors of the CLS are used as the overall feature description of the user. The distribution probability of user category prediction is calculated based on the attention features, and the user category is determined according to the distribution probability, so as to improve the accuracy and reliability of predicting user categories. Furthermore, user category prediction can be performed through the trained classification model. The resource flow data and user identity data of each user can be input into the classification model. The classification model performs feature extraction operations, feature merging operations, user clustering operations, feature conversion operations, feature splicing operations, feature encoding operations, self-attention calculation operations, and user category prediction operations, and then outputs the user category to perform resource flow reminders according to the reminder strategy corresponding to the user category. The accuracy and efficiency of user category prediction can be improved through the trained classification model.
[0055] It should be noted that the above-mentioned embodiments provide relevant content for processing the classification model in practical applications, and the following embodiments provide relevant content for training the classification model. Some corresponding content in the two embodiments can be read for reference, such as the training process of the classification model in the above-mentioned embodiments, the category prediction process of the classification model, and other related content. For ease of understanding, they can be read for reference in the process of reading the following embodiments. Similarly, in the process of reading the following embodiments, the relevant content in the above-mentioned embodiments can also be referred to.
[0056] The following takes the application of a resource flow processing method provided in this embodiment in a user category prediction scenario as an example, combined with Figure 4The resource flow processing method provided in this embodiment is further described. The resource flow processing method applied to the user category prediction scenario specifically includes the following steps.
[0057] Step S402: extracting and merging features of resource flow data and user identity data of each user to obtain multiple user features.
[0058] Step S404: Input each user's feature into a clustering algorithm to perform user clustering, and obtain a cluster group corresponding to each user.
[0059] Step S406: perform type tagging on each cluster group and perform type tagging on each user according to the tagging result, and convert the tagging result of each user into a type feature.
[0060] Step S408: performing feature splicing on the user features and type features corresponding to each user to obtain spliced features.
[0061] Step S410, generating a classification vector corresponding to each splicing feature, marking each splicing feature according to the classification vector, and performing a linear transformation on each marked splicing feature to obtain a coding result.
[0062] Step S412, calculating the query vector of the classification vector marked by the encoding result, and calculating the key vector and value vector of the encoding result.
[0063] Step S414, input the query vector, key vector and value vector into the self-attention algorithm to obtain the attention feature.
[0064] Step S416, predicting the user category based on the attention feature to obtain the user category of each user, so as to provide resource transfer reminders according to the reminder strategy corresponding to the user category.
[0065] It should be noted that any one of steps 402 to S416 or any combination of multiple steps can be combined with any one of steps S202 to S208 to form a new implementation method according to the needs of implementation deployment; in addition, according to the needs of actual deployment, any one or multiple technical features can be selected from steps 402 to S416 and combined with any one or multiple technical features provided by steps S202 to S208 to form a new implementation method; or, any one or multiple technical features in steps 402 to S416 can be replaced with any one or multiple technical features provided by steps S202 to S208 to form a new implementation method according to the needs of actual deployment, which will not be elaborated here.
[0066] One or more embodiments of a classification model training method provided in this specification are as follows: Reference Figure 5 , this embodiment provides a classification model training method, which specifically includes steps S502 to S506.
[0067] Step S502 : acquiring sample data, extracting features from resource flow data and user identity data of multiple sample users included in the sample data, and merging features to obtain multiple sample features.
[0068] In this embodiment, resource flow data refers to data on resource flow by users in an institution, where resources include funds, virtual resources and / or credit resources. Specifically, resource flow may be data related to users borrowing resources from an institution and / or data related to users returning resources to an institution; for example: credit data at a financial institution; another example: the amount of resources borrowed, the time to return the resources, the number of overdue returns and / or the number of times resources are borrowed.
[0069] In the specific implementation, sample data for training the classification model is obtained, and data preprocessing is performed on the sample data. Specifically, feature extraction is performed on the resource flow data of multiple sample users in the sample data and feature extraction is performed on the user identity data of multiple sample users. The extracted features are merged at the user level to obtain sample features corresponding to each sample user.
[0070] In the specific implementation process, the user sample data can be real historical data. In order to improve the reliability of the trained classification model, the user rating of the user can be determined first, and users with similar numbers can be selected from each user rating as sample users to ensure the diversity of sample users, and data cleaning is performed on the user sample data of the sample users to improve the high availability of the user sample data, wherein the user rating of the user, that is, the rating of the willingness to return the resource, can be used as a user label; in an optional implementation manner provided in this embodiment, the user sample data is constructed in the following manner: Determine the user ratings of the users in the user pool according to the historical resource data of the users in the user pool, and adopt a sampling algorithm to sample the users corresponding to each user rating to obtain the sample users; Acquire sample resource data and sample identity data of multiple sample users, and perform data cleaning on the sample resource data and the sample identity data; The user sample data is constructed based on the sample resource data and sample identity data after data cleaning.
[0071] Specifically, data cleaning can be a cleaning method that removes, fits and / or replaces missing values and / or outliers in the data to ensure high availability of user sample data.
[0072] During the specific training process, the feature extraction and feature merging of the user sample data can be adaptively adjusted to improve the accuracy of the classification model and reduce the model illusion. Specifically, the distribution transformation of the features can be performed according to the data characteristics of the field to which the classification model belongs, for example, quantile transformation is performed for data with right-skewed characteristics. In an optional implementation manner provided in this embodiment, feature extraction and feature merging include: Extracting features and normalizing the sample resource flow data to obtain flow sub-features, and extracting features and normalizing the sample identity data to obtain identity sub-features; Merging the flow sub-feature and identity sub-feature corresponding to each sample user to obtain the first feature of each sample user; The eigenvalue distribution of the first feature is calculated and whether the eigenvalue distribution satisfies a transformation condition is detected. If so, the first feature is subjected to a feature distribution transformation according to a preset transformation strategy to obtain the sample feature.
[0073] Step S504: input the sample features into the classification model to be trained to perform user category prediction, and obtain the predicted category of each sample user.
[0074] In specific implementation, the processed sample features can be input into the classification model to be trained through the training system to perform user category prediction, and the predicted category of each sample user output by the classification model to be trained can be obtained.
[0075] Specifically, the classification model can perform user category prediction through operations such as user clustering, feature conversion, feature concatenation, feature encoding, self-attention calculation, and user category prediction; optionally, user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain type features of each sample user, concatenating the sample features and the type features, performing self-attention calculation of the concatenated features, and performing user category prediction through the obtained attention features to obtain the predicted category.
[0076] In the specific prediction process, in order to improve the pertinence and accuracy of user clustering, clustering processing can be performed according to the feature value of the target sub-feature in the user feature. Specifically, the feature of interest can be preset as the target sub-feature, so as to perform user clustering according to the feature value interval of the target sub-feature, wherein the target sub-feature can be one feature or multiple features, for example: presetting user growth features and / or resource amount features as target sub-features; in an optional implementation manner provided in this embodiment, user clustering and feature conversion are performed, including: Inputting each sample feature into a clustering algorithm to perform user clustering, and obtaining a cluster group corresponding to each sample user; Each cluster group is marked by a type, and each sample user is marked by a type according to the marking result, and the marking result of each sample user is converted into the type feature.
[0077] Specifically, each sample feature can be sorted according to the feature value of the target sub-feature, and the cluster group corresponding to each sample user can be determined according to the feature value range. After the cluster group is type-marked, the sample users included in the cluster group are extracted, and the sample users included in the cluster group are type-marked according to the marking result of the cluster group, and the sample users in each cluster group are marked according to the marking method to obtain the marking result of each sample user, and the marking result is converted into the type feature of each sample user.
[0078] In the specific prediction process, a CLS (classification) labeling method can be introduced to randomly generate and label a classification vector for the splicing vector of each sample user, so as to perform subsequent self-attention calculation through the classification vector to improve the accuracy of category prediction; in an optional implementation manner provided by this embodiment, after feature splicing, the following is also included: Generate a classification vector corresponding to each splicing feature, and mark each splicing feature according to the classification vector; Performing linear transformation on the marked concatenated features to obtain the encoding results of the sample users.
[0079] Specifically, after generating a classification vector for the splicing features of each sample user, the splicing features are marked by the classification vector, that is, the classification vector is placed at the head of the splicing features, and the marked splicing features are linearly transformed once or multiple times according to a preset encoding method to obtain the encoded features.
[0080] In the specific prediction process, the query vector of the classification vector marked by the CLS can be calculated, and the key vector and value vector corresponding to the encoded feature can be calculated. The query vector, the key vector and the value vector are input into the self-attention algorithm for self-attention calculation to obtain the attention feature for characterizing the global feature of the user, so as to improve the accuracy of the category prediction; in an optional implementation manner provided in this embodiment, the self-attention calculation of the encoded feature is performed to obtain the attention feature, including: Calculating a query vector of the classification vector of the encoded feature labels, and calculating a key vector and a value vector of the encoded features; The query vector, the key vector, and the value vector are input into a self-attention algorithm to obtain the attention feature.
[0081] Specifically, a query vector (Query) of the classification vector marked by CLS in the encoded feature is generated, and a key vector (Key) and a value vector (Value) of the classification vector and the remaining feature vectors in the encoded feature are generated. The query vector, the key vector and the value vector are input into the self-attention algorithm. Specifically, the attention weights corresponding to each vector are obtained by calculation based on the query vector and the key vector, and the attention features are obtained by calculation based on the corresponding attention weights and the value vector.
[0082] It should be noted that the self-attention calculation process provided above can be a single-round self-attention calculation or a multi-round self-attention calculation. In the multi-round self-attention calculation process, the calculation process for each round or each layer of self-attention can also be performed with reference to the self-attention calculation process provided above. The specific calculation process takes the self-attention calculation process provided above as an example, and this embodiment will not be repeated here.
[0083] In the specific category prediction process, feature transformation can be performed based on the attention feature, and probability calculation can be performed on the transformed feature to obtain the category probability of the sample user, and the user category can be determined based on the category probability to improve the prediction accuracy; in an optional implementation manner provided in this embodiment, user category prediction based on the attention feature includes: Inputting the attention features into a feedforward neural network for feature transformation and probability calculation to obtain the category probability of each sample user; The user category is determined according to the category probability.
[0084] Specifically, user category prediction can be performed through a classification model. Attention features can be input into a feedforward neural network, and one or more layers of linear transformation of the attention features can be performed through the fully connected layer of the feedforward neural network. The linear transformation results are input into the output layer of the feedforward neural network for probability calculation, and the features are converted into probability distributions. The user category of each user is determined based on the probability distribution.
[0085] Step S506 , adjusting parameters of the classification model according to the labels of the sample users and the loss calculated by the predicted category to obtain a classification model.
[0086] This embodiment constructs features for category prediction from the user's static features, dynamic features, and category features obtained after clustering, and can predict more accurate user categories through CLS tagging and self-attention calculation. It predicts user categories based on user data in multiple dimensions, and reminds users of resource transfer according to the reminder strategy corresponding to the user category, thereby improving the message reminder effect and the user's reminder experience.
[0087] In the specific implementation, the label of each sample user in the sample data is extracted, and the training loss of the classification model to be trained is calculated according to the label and prediction category corresponding to each sample user. The parameters of the classification model are adjusted based on the training loss to obtain the trained classification model. Specifically, the training of the classification model can be performed on a cloud server or offline.
[0088] In the specific training process, the classification model can use the sample resource data and sample identity data of the sample user as the user sample data, and the classification of the sample user as the label, extract features from the user sample data and merge features to obtain sample features, and input the sample features into the classification model to be trained to predict the user category. In the specific prediction process, user clustering and feature conversion are performed according to the sample features to obtain the type features of each sample user, the sample features and the type features are concatenated, the self-attention calculation of the concatenated features is performed, and the user category is predicted through the obtained attention features to obtain the predicted category, the loss calculation is performed on the predicted categories and labels corresponding to each sample user, and the parameters of the classification model are adjusted according to the calculation results. By analogy, the classification model is trained in the above training method until the difference between the predicted category predicted by the classification model and the label converges, and the training of the classification model is completed.
[0089] In actual applications, the classification model can directly use the user's resource flow data and user identity data as input data, that is: the classification model performs feature extraction and feature merging processing to obtain user features, and performs user category prediction based on user features to improve the efficiency of user category prediction. In the specific implementation process, the user whose category needs to be predicted can be determined first, and the resource flow data and user identity data of the user can be queried. The user to be predicted can be determined based on the user status. For example, for users who have not repaid within the repayment period of a financial institution, the willingness rating of such users regarding repayment willingness can be predicted; in this regard, users with resources to be repaid and / or users in the resource to be repaid status can be screened out in the user pool, and the user's historical resource data can be used as resource flow data and the user's registered identity information can be queried as user identity information to improve user prediction efficiency and enhance the pertinence of category prediction; in an optional implementation manner provided in this embodiment, the resource flow data and user identity data of each user are obtained in the following manner: Filter out users whose resource return time is within a preset time range from the user pool according to a preset time frequency; or filter out users whose resource return time has not expired from the user pool according to a preset time frequency; The historical resource data of the user is obtained as the resource flow data, and the registered identity information of the user is searched in a user database as the user identity information.
[0090] In actual applications, some users may not pay attention to the resource return deadline during the resource transfer process, which makes the institution providing resources to users face some problems, while some users may return the resources in a timely manner; in view of this, reminder strategies corresponding to user categories can be preset, for example: a light reminder strategy is adopted for users who return the resources in a timely manner, and an appropriately heavier reminder strategy is adopted for users who borrow a large amount of resources or fail to return the resources in a timely manner for many times, so as to improve the effectiveness of reminders and enhance user experience; in an optional implementation manner provided by this embodiment, resource transfer reminders are performed according to the reminder strategy, including: Querying the reminder frequency corresponding to the user category, and reminding the user to return resources according to the reminder frequency; Alternatively, the reminder channel corresponding to the user category is queried, and the user is reminded to return the resources through the reminder channel.
[0091] In this embodiment, the reminder strategy is a strategy for reminding users of resource transfers. The reminder strategy can be used to determine a strategy for reminding users to return resources. For example, the reminder strategy can be used to determine a reminder strategy for users to return funds to institutions. Specifically, the reminder strategy can be configured with a reminder channel, a reminder method, and / or a reminder frequency. Optionally, the reminder strategy includes a message reminder strategy for users to transfer resources according to a preset reminder frequency, reminder channel, and / or reminder method.
[0092] In summary, the training method of one or more classification models provided in this embodiment, in the process of training the classification model, obtains sample data including labels of each sample user, sample resource data and sample identity data, extracts features from the sample resource data and the sample identity data and merges features to obtain multiple sample features, inputs each sample feature into the classification model to be trained to predict the user category, obtains the predicted category of each sample user, calculates the training loss based on the labels and predicted categories corresponding to each sample user, and adjusts the parameters of the classification model to be trained according to the training loss to obtain a trained classification model; In the process of user category prediction, users can be clustered according to the characteristics of each sample to obtain the characteristic type label of each sample user, and the characteristic type label can be converted to obtain the type characteristics of each sample user. The dimension of user category prediction is increased by clustering, and the accuracy of category prediction is improved. The sample characteristics and type characteristics corresponding to each sample user are concatenated to obtain each concatenated feature, and each concatenated feature is encoded. The self-attention calculation of the encoded features is performed to obtain the attention feature. The user category prediction is performed based on the attention feature to obtain the predicted category of each sample user. Through self-attention calculation, the user category prediction is performed from the overall multi-dimensional features of the user to improve the accuracy of user category prediction. Furthermore, the concatenated features of each sample user can be marked with a classification vector through the CLS marking method, and self-attention calculation can be performed through the encoding result of the marked concatenated vector. The attention calculation result corresponding to the classification vector of CLS is used as the feature description of the sample user as a whole, and the distribution probability of user category prediction is calculated based on the attention feature. The predicted category is determined according to the distribution probability, so as to improve the accuracy and reliability of predicting user categories.
[0093] The following takes the application of a classification model training method provided in this embodiment in a user category prediction scenario as an example, combined with Figure 6 The training method of the classification model provided in this embodiment is further described. The training method of the classification model applied to the user category prediction scenario specifically includes the following steps.
[0094] Step S602, obtaining sample data.
[0095] Optionally, the sample data includes: resource flow data of multiple sample users, user identity data and tags.
[0096] Step S604: extract features from resource flow data and normalize them to obtain flow sub-features, and extract features from user identity data and normalize them to obtain identity sub-features.
[0097] Step S606: Merge the flow sub-feature and identity sub-feature corresponding to each sample user to obtain the first sample feature of each sample user.
[0098] Step S608, calculating the eigenvalue distribution of the first sample feature and detecting whether the eigenvalue distribution meets the transformation condition; If yes, execute steps S610 to S614; If not, no action is required.
[0099] Step S610: Perform feature distribution transformation on the first sample feature according to a preset transformation strategy to obtain sample features corresponding to each sample user.
[0100] Step S612: input the sample features into the classification model to be trained to perform user category prediction, and obtain the predicted category of each sample user.
[0101] Optionally, user category prediction is performed, including: performing user clustering and feature conversion according to each sample feature to obtain type features of each sample user, splicing the sample features and the type features, performing self-attention calculation on the spliced features, and performing user category prediction through the obtained attention features to obtain a predicted category.
[0102] Step S614, adjusting the parameters of the classification model to be trained according to the loss calculated by the label of each sample user and the predicted category to obtain a classification model.
[0103] It should be noted that any one of steps S602 to S614 or any combination of multiple steps can be combined with any one of steps S502 to S506 to form a new implementation method according to the needs of implementation deployment; in addition, according to the needs of actual deployment, any one or multiple technical features can be selected from steps S602 to S614 and combined with any one or multiple technical features provided by steps S502 to S506 to form a new implementation method; or, any one or multiple technical features in steps S602 to S614 can be replaced with any one or multiple technical features provided by steps S502 to S506 to form a new implementation method according to the needs of actual deployment, which will not be repeated here.
[0104] An embodiment of a resource transfer processing device provided in this specification is as follows: In the above-mentioned embodiment, a resource flow processing method is provided, and correspondingly, a resource flow processing device is also provided, which is described below with reference to the accompanying drawings.
[0105] Reference Figure 7 , which shows a schematic diagram of an embodiment of a resource flow processing device provided in this embodiment.
[0106] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0107] This embodiment provides a resource transfer processing device, the device comprising: The feature processing module 702 is configured to extract and merge features from the resource flow data and user identity data of each user to obtain multiple user features; The clustering module 704 is configured to perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; The encoding module 706 is configured to perform feature splicing on the user features and type features corresponding to the respective users to obtain spliced features, and perform encoding processing on the spliced features; The category prediction module 708 is configured to perform self-attention calculation of the encoded features to obtain attention features, perform user category prediction based on the attention features to obtain the user category of each user, and perform resource transfer reminders according to the reminder strategy corresponding to the user category.
[0108] An embodiment of a training device for a classification model provided in this specification is as follows: In the above-mentioned embodiment, a classification model training method is provided, and correspondingly, a classification model training device is also provided, which is described below with reference to the accompanying drawings.
[0109] Reference Figure 8 , which shows a schematic diagram of an embodiment of a training device for a classification model provided in this embodiment.
[0110] Since the device embodiment corresponds to the method embodiment, the description is relatively simple, and the relevant parts can refer to the corresponding description of the method embodiment provided above. The device embodiment described below is only illustrative.
[0111] This embodiment provides a classification model training device, the device comprising: The sample feature processing module 802 is configured to obtain sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and perform feature merging to obtain multiple sample features; The category prediction module 804 is configured to input the sample features into the classification model to be trained to perform user category prediction and obtain the predicted category of each sample user; A parameter adjustment module 806 is configured to adjust the parameters of the classification model according to the labels of the sample users and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
[0112] An embodiment of a message reminder device provided in this specification is as follows: Corresponding to the resource flow processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a message reminder device, which is used to execute the resource flow processing method provided above. Fig. 9 A schematic diagram of the structure of a message reminder device provided in one or more embodiments of this specification.
[0113] A message reminder device provided in this embodiment includes: like Fig. 9 As shown, the message reminder device may have relatively large differences due to different configurations or performances, and may include one or more processors 901 and memory 902, and the memory 902 may store one or more storage applications or data. Among them, the memory 902 may be a short-term storage or a persistent storage. The application stored in the memory 902 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the message reminder device. Furthermore, the processor 901 may be configured to communicate with the memory 902 and execute a series of computer executable instructions in the memory 902 on the message reminder device. The message reminder device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input / output interfaces 905, and one or more keyboards 906.
[0114] In a specific embodiment, the message reminder device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the message reminder device, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following: Extract and merge features of each user's resource flow data and user identity data to obtain multiple user features; Perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; Performing feature splicing on the user features and type features corresponding to each of the users to obtain spliced features, and performing encoding processing on the spliced features; The self-attention calculation of the encoded features is performed to obtain the attention features, and the user category prediction is performed based on the attention features to obtain the user category of each user, so as to perform resource transfer reminders according to the reminder strategies corresponding to the user categories.
[0115] An embodiment of a classification model training device provided in this specification is as follows: Corresponding to the other resource flow processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a classification model training device, which is used to execute the other resource flow processing method provided above. Fig.10A schematic diagram of the structure of a classification model training device provided in one or more embodiments of this specification.
[0116] This embodiment provides a classification model training device, including: like Fig.10 As shown, the training device of the classification model may have relatively large differences due to different configurations or performances, and may include one or more processors 1001 and memory 1002, and the memory 1002 may store one or more storage applications or data. Among them, the memory 1002 may be a short-term storage or a persistent storage. The application stored in the memory 1002 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the training device of the classification model. Furthermore, the processor 1001 may be configured to communicate with the memory 1002, and execute a series of computer executable instructions in the memory 1002 on the training device of the classification model. The training device of the classification model may also include one or more power supplies 1003, one or more wired or wireless network interfaces 1004, one or more input / output interfaces 1005, and one or more keyboards 1006.
[0117] In a specific embodiment, the training device of the classification model includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the training device of the classification model, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following: Acquire sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and merge features to obtain multiple sample features; Inputting the sample features into the classification model to be trained to predict user categories, and obtaining the predicted category of each sample user; Adjusting parameters of the classification model according to the labels of each sample user and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
[0118] An embodiment of a computer-readable storage medium provided in this specification is as follows: Corresponding to the resource transfer processing method described above, based on the same technical concept, one or more embodiments of this specification also provide a computer-readable storage medium.
[0119] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions, and the computer-executable instructions implement the following process when executed: Extract and merge features of each user's resource flow data and user identity data to obtain multiple user features; Perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; Performing feature splicing on the user features and type features corresponding to each of the users to obtain spliced features, and performing encoding processing on the spliced features; The self-attention calculation of the encoded features is performed to obtain the attention features, and the user category prediction is performed based on the attention features to obtain the user category of each user, so as to perform resource transfer reminders according to the reminder strategies corresponding to the user categories.
[0120] Another computer-readable storage medium embodiment provided in this specification is as follows: Corresponding to the other resource transfer processing method described above, based on the same technical concept, one or more embodiments of this specification also provide another computer-readable storage medium.
[0121] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions, and the computer-executable instructions implement the following process when executed: Acquire sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and merge features to obtain multiple sample features; Inputting the sample features into the classification model to be trained to predict user categories, and obtaining the predicted category of each sample user; Adjusting parameters of the classification model according to the labels of each sample user and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
[0122] It should be noted that the embodiment of the computer-readable storage medium in this specification and the embodiment of the resource flow processing method in this specification are based on the same inventive concept, so the specific implementation of this embodiment can refer to the implementation of the aforementioned corresponding method, and the repeated parts will not be repeated.
[0123] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. For example, the device embodiment, equipment embodiment, and computer-readable storage medium embodiment are similar to the method embodiment, so the description is relatively simple. To read the relevant content in the device embodiment, equipment embodiment, and computer-readable storage medium embodiment, please refer to the partial description of the method embodiment.
[0124] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0125] In the 1930s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many of today's method flow improvements can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using hardware entity modules. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask chip manufacturers to design and produce dedicated integrated circuit chips. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0126] The controller may be implemented in any suitable manner, for example, the controller may take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (e.g., software or firmware) executable by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, and the memory controller may also be implemented as part of the control logic of the memory. It is also known to those skilled in the art that, in addition to implementing the controller in a purely computer-readable program code manner, the controller may be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, such a controller may be considered as a hardware component, and the devices for implementing various functions included therein may also be considered as structures within the hardware component. Or even, the devices for implementing various functions may be considered as both software modules for implementing the method and structures within the hardware component.
[0127] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0128] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing the embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0129] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present specification may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0130] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network live broadcast processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable network live broadcast processing device generate instructions for implementing the processes in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable network live broadcast processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] These computer program instructions may also be loaded onto a computer or other programmable network live processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0133] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0134] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0135] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.
[0136] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "includes at least one ..." do not exclude the presence of other identical elements in the process, method, commodity or device including the elements.
[0137] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0138] The above description is only an embodiment of this document and is not intended to limit this document. For those skilled in the art, this document may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this document should be included in the scope of the claims of this document.
Claims
1. A resource transfer processing method, the method comprising: Extract and merge features of each user's resource flow data and user identity data to obtain multiple user features; Perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; Performing feature splicing on the user features and type features corresponding to each of the users to obtain spliced features, and performing encoding processing on the spliced features; The self-attention calculation of the encoded features is performed to obtain the attention features, and the user category prediction is performed based on the attention features to obtain the user category of each user, so as to perform resource transfer reminders according to the reminder strategies corresponding to the user categories.
2. According to the resource flow processing method of claim 1, the feature extraction and feature merging of the resource flow data and user identity data of each user to obtain multiple user features includes: Extracting features from the resource flow data to obtain flow sub-features, and extracting features from the user identity data to obtain identity sub-features; The flow sub-feature and the identity sub-feature are subjected to feature transformation, and the transformed flow sub-feature and identity sub-feature corresponding to each user are subjected to feature merging to obtain user features of each user.
3. According to the resource flow processing method of claim 1, clustering users according to the characteristics of each user to obtain the characteristic type label of each user, and performing feature conversion on the characteristic type label to obtain the type characteristics of each user, comprising: Inputting the user characteristics into a clustering algorithm to perform user clustering, and obtaining cluster groups corresponding to the users; Each cluster group is type-labeled, and each user is type-labeled according to the labeling result to obtain the feature type label, and the feature type label of each user is converted into the type feature.
4. According to the resource transfer processing method of claim 1, the encoding processing of each splicing feature comprises: Generate a classification vector corresponding to each of the splicing features, and mark each of the splicing features according to the classification vector; Performing linear transformation on the marked concatenated features to obtain the encoded features of each user.
5. According to the resource flow processing method of claim 1, the self-attention calculation of the encoded features to obtain the attention features comprises: Calculating a query vector of the classification vector of the encoded feature labels, and calculating a key vector and a value vector of the encoded features; The query vector, the key vector, and the value vector are input into a self-attention algorithm to obtain the attention feature.
6. The resource transfer processing method according to claim 1, wherein the step of performing user category prediction based on the attention feature to obtain the user category of each user comprises: Inputting the attention features into a feedforward neural network for feature transformation and probability calculation to obtain the category probability of each user; The user category is determined according to the category probability.
7. According to the resource flow processing method of claim 1, the reminder strategy includes at least one of the following: a message reminder strategy for transferring resources to users according to a preset reminder frequency, and a message reminder strategy for transferring resources to users according to a preset reminder channel; Accordingly, the resource transfer reminder is performed according to the reminder strategy corresponding to the user category, including: Query the reminder frequency corresponding to the user category, and remind the user to return the resource according to the reminder frequency; And / or, query the reminder channel corresponding to the user category, and remind the user to return the resources through the reminder channel.
8. According to the resource flow processing method of claim 1, the resource flow data and user identity data of each user are obtained in the following manner: According to the preset time frequency, users whose resource return time is within the preset time range are filtered out from the user pool; The historical resource data of the user is obtained as the resource flow data, and the registered identity information of the user is queried in a user database as the user identity data.
9. The resource flow processing method according to claim 1, wherein the resource flow processing method is applied to a classification model; in, The classification model is trained in the following way: Extract features from user sample data and merge features to obtain sample features; Inputting the sample features into the classification model to be trained to predict the user category, and obtaining the predicted category of the sample user; The classification model to be trained is adjusted in parameters according to the loss calculated based on the label of the sample user and the predicted category to obtain the classification model.
10. According to the resource transfer processing method of claim 9, the user sample data is constructed in the following manner: Determine the user ratings of the users in the user pool according to the historical resource data of the users in the user pool, and adopt a sampling algorithm to sample the users corresponding to each user rating to obtain the sample users; Acquire sample resource data and sample identity data of multiple sample users, and perform data cleaning on the sample resource data and the sample identity data; The user sample data is constructed based on the sample resource data and sample identity data after data cleaning.
11. The resource transfer processing method according to claim 9, wherein the step of extracting and merging features of user sample data comprises: Extracting features and normalizing the sample resource data in the user sample data to obtain flow sub-features, and extracting features and normalizing the sample identity data in the user sample data to obtain identity sub-features; Merging the flow sub-feature and identity sub-feature corresponding to each sample user to obtain the first feature of each sample user; The eigenvalue distribution of the first feature is calculated and whether the eigenvalue distribution satisfies a transformation condition is detected. If so, the first feature is subjected to a feature distribution transformation according to a preset transformation strategy to obtain the sample feature.
12. A classification model training method, comprising: Acquire sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and merge features to obtain multiple sample features; Inputting the sample features into the classification model to be trained to predict user categories, and obtaining the predicted category of each sample user; Adjusting parameters of the classification model according to the labels of each sample user and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
13. The classification model training method according to claim 12, wherein the step of extracting features from resource flow data and user identity data of multiple sample users included in the sample data and merging features to obtain multiple sample features comprises: Extracting features and normalizing the resource flow data to obtain flow sub-features, and extracting features and normalizing the user identity data to obtain identity sub-features; Merging the flow sub-feature and identity sub-feature corresponding to each sample user to obtain the first feature of each sample user; The feature value distribution of the first feature is calculated and whether the feature value distribution satisfies the transformation condition is detected. If so, the feature distribution of the first feature is transformed according to a preset transformation strategy to obtain the sample features corresponding to each sample user.
14. According to the classification model training method of claim 12, the sample data is constructed in the following manner: Determine the user ratings of the users in the user pool according to the historical resource data of the users in the user pool, and adopt a sampling algorithm to sample the users corresponding to each user rating to obtain the sample users; Acquire sample resource data and sample identity data of multiple sample users, and perform data cleaning on the sample resource data and the sample identity data; The sample data is constructed based on the sample resource data and the sample identity data after data cleaning.
15. According to the classification model training method of claim 12, the step of clustering users and converting features according to the features of each sample to obtain the type features of each sample user comprises: Inputting each sample feature into a clustering algorithm to perform user clustering, and obtaining a cluster group corresponding to each sample user; Each cluster group is marked by a type, and each sample user is marked by a type according to the marking result, and the marking result of each sample user is converted into the type feature.
16. The training method of the classification model according to claim 12, wherein the self-attention calculation of the concatenated features comprises: Marking the spliced features with classification vectors, and encoding the marked spliced features to obtain encoding results; Calculating a query vector of the classification vector in the encoding result, and calculating a key vector and a value vector of the encoding result; The query vector, the key vector, and the value vector are input into a self-attention algorithm to obtain the attention feature.
17. The training method of the classification model according to claim 12, wherein the step of performing user category prediction using the acquired attention features to obtain the predicted category comprises: Inputting the attention features into a feedforward neural network for feature transformation and probability calculation to obtain the category probability of each sample user; The user category is determined according to the probability interval in which the category probability lies.
18. A resource transfer processing device, comprising: A feature processing module is configured to extract and merge features from resource flow data and user identity data of each user to obtain multiple user features; A clustering module is configured to perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; The encoding module is configured to perform feature splicing on the user features and type features corresponding to the respective users to obtain splicing features, and perform encoding processing on the splicing features; The category prediction module is configured to perform self-attention calculation of the encoded features to obtain attention features, perform user category prediction based on the attention features to obtain the user category of each user, and perform resource transfer reminders according to the reminder strategies corresponding to the user categories.
19. A training device for a classification model, comprising: A sample feature processing module is configured to obtain sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and merge features to obtain multiple sample features; A category prediction module is configured to input the sample features into a classification model to be trained to perform user category prediction and obtain a predicted category for each sample user; A parameter adjustment module, configured to adjust the parameters of the classification model according to the labels of each sample user and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
20. A resource flow processing device, comprising: processor; and a memory configured to store computer executable instructions, wherein the processor executes the computer executable instructions to implement the following process: Extract and merge features of each user's resource flow data and user identity data to obtain multiple user features; Perform user clustering according to the characteristics of each user to obtain a characteristic type label of each user, and perform feature conversion on the characteristic type label to obtain a type feature of each user; Performing feature splicing on the user features and type features corresponding to each of the users to obtain spliced features, and performing encoding processing on the spliced features; The self-attention calculation of the encoded features is performed to obtain the attention features, and the user category prediction is performed based on the attention features to obtain the user category of each user, so as to perform resource transfer reminders according to the reminder strategies corresponding to the user categories.
21. A training device for a classification model, comprising: processor; and a memory configured to store computer executable instructions, wherein the processor executes the computer executable instructions to implement the following process: Acquire sample data, extract features from resource flow data and user identity data of multiple sample users included in the sample data, and merge features to obtain multiple sample features; Inputting the sample features into the classification model to be trained to predict user categories, and obtaining the predicted category of each sample user; Adjusting parameters of the classification model according to the labels of each sample user and the loss calculated by the predicted category to obtain a classification model; Among them, the user category prediction includes: performing user clustering and feature conversion according to each sample feature to obtain the type feature of each sample user, splicing the sample feature and the type feature, performing self-attention calculation of the spliced feature, and performing user category prediction through the obtained attention feature to obtain the predicted category.
22. A computer-readable storage medium for storing computer-executable instructions, wherein the computer-executable instructions implement the steps of the method of claim 1 when executed.
23. A computer-readable storage medium for storing computer-executable instructions, wherein the computer-executable instructions implement the steps of the method of claim 12 when executed.
Citation Information
Patent Citations
Client positioning and analyzing method and server
CN105744005A
Data transfer output combination setting method and device and terminal device
CN110246026A
Gender classification method and device, electronic equipment and computer storage medium
CN112434136A
Risk detection method and device, computer equipment and storage medium
CN113807941A
Data determination method and device, computer readable storage medium and electronic equipment
CN114693428A