Target object prediction method, device and electronic equipment
Through the target network model, feature extraction of customers' inherent attributes and time change information, and using multiple neural network algorithms to predict activity, solving the problem of low accuracy in customer activity prediction in the existing technology, achieving a more accurate sleep Customer identification and maintenance improves the economic benefits of the enterprise.
Patent Information
- Application Number
- CN202210843485.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-07-18
AI Technical Summary
In the prior art, the accuracy of customer activity prediction is low, making it difficult to effectively identify and awaken sleeping customers, resulting in loss of corporate profits and customer churn.
The target network model is used to extract the target data information of the predicted object, and combine the inherent attribute information and time-changing information, and is carried out through multiple neural network algorithms (such as fully connected neural network, LSTM, T-LSTM, S-LSTM) Feature extraction and activity prediction improve the accuracy and universality of the prediction model.
It improves the accuracy of customer activity prediction, helps enterprises identify sleeping customers in a timely manner and formulate maintenance strategies to avoid customer churn and increase economic benefits.
Smart Images

Figure CN115081736B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device and electronic device for predicting a target object. Background Art
[0002] With the rapid development of social economy, commercial competition among enterprises is becoming increasingly fierce, and the phenomenon of dormant customers of enterprises is becoming more and more likely to occur. Dormant customers will cause great losses to corporate profits. In addition, the cost of acquiring new customers is much higher than retaining existing customers. Customer dormancy prediction can help companies identify dormant customers in a timely manner so as to perform corresponding customer maintenance operations on them. At present, when predicting dormant customers, the existing prediction models in the prior art judge the data of customers within a fixed time period as a whole. The learning ability of the prediction model is low, and there is a problem of low accuracy in predicting customer activity.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and electronic device for predicting a target object, so as to at least solve the technical problem of low accuracy in predicting customer activity in the prior art.
[0005] According to one aspect of an embodiment of the present invention, a prediction method for a target object is provided, comprising: obtaining target data information of an object to be predicted, wherein the target data information consists of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information that changes over time for the object to be predicted; performing feature extraction on the first target data information based on a first target network model to obtain a first feature, and performing feature extraction on different categories of data in the second target data information based on a second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by inherent attribute information in sample data information, and the second target network model is trained by information that changes over time in the sample data information, the first feature represents attribute characteristics of the object to be predicted, the second feature represents behavioral characteristics of the object to be predicted, and the third feature represents transaction account characteristics of the object to be predicted; based on the first feature, the second feature and the third feature, performing activity prediction on the object to be predicted to obtain a prediction result, wherein the prediction result represents the degree of activity of the object to be predicted in transactions.
[0006] Furthermore, the prediction method of the target object also includes: based on the first sub-target network model of the second target network model, performing feature extraction on the first sub-category target data information in the second target data information to obtain a second feature; based on the second sub-target network model of the second target network model, performing feature extraction on the second sub-category target data information in the second target data information to obtain a third feature, wherein the neural network algorithms corresponding to the first sub-target network model and the second sub-target network model are different.
[0007] Furthermore, the prediction method of the target object also includes: averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain a prediction result.
[0008] Furthermore, the prediction method of the target object also includes: judging the prediction result by a target discriminant function to obtain a judgment result; and determining that the object to be predicted is the target object when the judgment result indicates that the prediction result is within a preset range.
[0009] Furthermore, the target object prediction method further includes: based on the periodicity of the target data information, classifying the target data information to obtain first target data information and second target data information.
[0010] Furthermore, the target object prediction method also includes: obtaining a target sample data set, and classifying the target sample data set to obtain a training set, a validation set and a test set, wherein the target sample data set consists of a first sample data set and a second sample data set, the first sample data set consists of multiple data with a target label, and the second sample data set consists of multiple data without a target label, wherein the object corresponding to the target label is a dormant object, and the activity of the dormant object is lower than a preset threshold; processing the initial object prediction model based on the training set, the validation set and the test set to obtain a first target network model and a second target network model, wherein the initial object prediction model consists of a first initial network model and a second initial network model, the first initial network model is used to train the inherent attribute information in the sample data information in the training set, the second initial network model is used to train the information that changes over time in the sample data information in the training set, and the second initial network model is composed of a first sub-initial network model and a second sub-initial network model, and the neural network algorithms corresponding to the first sub-initial network model and the second sub-initial network model are different.
[0011] Furthermore, the prediction method of the target object also includes: constructing a target similarity matrix of the first type of samples and the second type of samples based on the training set, and calculating the target similarity matrix to obtain a first constraint item, wherein the objects corresponding to the first type of samples are objects of the same type, and the objects corresponding to the second type of samples are objects of different types; calculating the training set based on a collaborative training algorithm to obtain a second constraint item, and obtaining a target loss function based on the first constraint item and the second constraint item; using the target loss function to iteratively train the initial object prediction model to obtain a first target network model and a second target network model.
[0012] Furthermore, the prediction method of the target object also includes: iteratively training the first initial network model through the target loss function to obtain the first target network model; iteratively training the first sub-initial network model through the target loss function to obtain the first sub-target network model; iteratively training the second sub-initial network model through the target loss function to obtain the second sub-target network model.
[0013] According to another aspect of an embodiment of the present invention, a prediction device for a target object is also provided, including: an acquisition module, used to acquire target data information of an object to be predicted, wherein the target data information is composed of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information that changes with time of the object to be predicted; an extraction module, used to perform feature extraction on the first target data information based on a first target network model to obtain a first feature, and perform feature extraction on different categories of data in the second target data information based on a second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by inherent attribute information in sample data information, and the second target network model is trained by information that changes with time in sample data information, the first feature represents attribute characteristics of the object to be predicted, the second feature represents behavioral characteristics of the object to be predicted, and the third feature represents transaction account characteristics of the object to be predicted; a prediction module, used to perform activity prediction on the object to be predicted based on the first feature, the second feature and the third feature to obtain a prediction result, wherein the prediction result represents the activity level of the object to be predicted in trading.
[0014] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned target object prediction method when running.
[0015] In an embodiment of the present invention, a method of extracting features from target data information through a target network model is adopted. First, the target data information of the object to be predicted is obtained. Then, based on the first target network model, feature extraction is performed on the first target data information to obtain the first feature. Feature extraction is performed on different categories of data in the second target data information based on the second target network model to obtain the second feature and the third feature. Then, based on the first feature, the second feature and the third feature, the activity of the object to be predicted is predicted to obtain a prediction result. Among them, the target data information is composed of the first target data information and the second target data information. The first target data information represents the inherent attribute information of the object to be predicted. The second target data information represents the information that changes over time for the object to be predicted. The first target network model is obtained by training the inherent attribute information in the sample data information. The second target network model is obtained by training the information that changes over time in the sample data information. The first feature represents the attribute characteristics of the object to be predicted. The second feature represents the behavioral characteristics of the object to be predicted. The third feature represents the transaction account characteristics of the object to be predicted. The prediction result represents the activity level of the object to be predicted in the transaction.
[0016] In the above process, by obtaining the target data information of the object to be predicted, an accurate data basis is provided for the subsequent feature extraction of the target data information; by extracting the features of the first target data information based on the first target network model, the first feature can be obtained, and by extracting the features of different categories of data in the second target data information based on the second target network model, the second feature and the third feature can be obtained. In the process of feature extraction, the differences in data distribution of the target data information are fully considered, and the feature extraction of data information with a changing trend in the target data information is realized. The characteristics of the object to be predicted are fully analyzed from multiple aspects, the accuracy of the prediction results is improved, and the versatility of the model is enhanced; by predicting the activity of the object to be predicted, the prediction results are obtained, so that business personnel can formulate corresponding customer maintenance strategies based on the prediction results, and wake up dormant customers in time, thereby avoiding customer loss and increasing economic benefits.
[0017] It can be seen that through the technical solution of the present invention, the purpose of improving the prediction ability of the prediction model is achieved, thereby achieving the technical effect of improving the accuracy of predicting customer activity, and further solving the technical problem of low accuracy of predicting customer activity in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1is a flowchart of an optional target object prediction method according to an embodiment of the present invention;
[0020] Figure 2 is a schematic diagram of an optional prediction model of a target object according to an embodiment of the present invention;
[0021] Figure 3 is a schematic diagram of an optional target object prediction device according to an embodiment of the present invention;
[0022] Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between the system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0026] Example 1
[0027] According to an embodiment of the present invention, a method embodiment of a method for predicting a target object is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 1 is a flowchart of an optional target object prediction method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0029] Step S101, obtaining target data information of the object to be predicted, wherein the target data information consists of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information about the object to be predicted that changes over time.
[0030] In the above steps, the target data information of the object to be predicted can be obtained through the application system, processor, electronic device and other devices. Optionally, the target data information can be obtained according to the timeline, for example, the target data information within 3 months or half a year can be obtained. The target data information can be customer transaction information, such as customer name, gender, work industry, balance, transaction time, transaction amount, transaction direction (income, expenditure), transaction venue and other information. Optionally, the work industry, transaction venue and the like can be one-hot encoded (One-Hot Encoding), for example, the work industry is one-hot encoded: 001 represents the construction industry, 010 represents the service industry, and 100 represents the education industry. Among them, the first target data information can be inherent attribute information such as customer name and gender, which can also be called non-serialized data; the second target data information can be information that changes over time, such as work industry, balance, transaction time, transaction amount, transaction direction (income, expenditure), transaction venue and other information, which can also be called serialized data.
[0031] It should be noted that, in the above process, by obtaining the target data information of the object to be predicted, an accurate data basis can be provided for subsequent feature extraction of the target data information.
[0032] Step S102, extracting features from the first target data information based on the first target network model to obtain a first feature, and extracting features from different categories of data in the second target data information based on the second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by inherent attribute information in the sample data information, and the second target network model is trained by information that changes over time in the sample data information, the first feature represents the attribute feature of the object to be predicted, the second feature represents the behavioral feature of the object to be predicted, and the third feature represents the transaction account feature of the object to be predicted.
[0033] In the above steps, the first target network model can extract the first feature from the first target data information, i.e., the inherent attribute information such as the customer's name and gender. Optionally, the first feature can be the customer's own feature; the second target network model can extract the second feature and the third feature from the second target data information, i.e., the work industry, balance, transaction time, transaction amount, transaction direction (income, expenditure), transaction venue, etc., which change over time. Optionally, the second feature can be the customer's transaction habit feature, and the third feature can be the customer's account information feature. The first target network model and the second target network model can be models that are stable after training and have achieved good convergence effects. Specifically, the first target network model can be a fully connected neural network model, and the second target network model can be an LSTM (Long Short-Term Memory) network model. Optionally, the model can be saved on the server side, and the target data information of the object to be predicted can be input into the network for prediction. Optionally, the sample data can be the data in the training set, and the above-mentioned inherent attribute information and the information that changes over time can be trained respectively to obtain the first target network model and the second target network model.
[0034] It should be noted that, in the above-mentioned feature extraction process of the target data information, the differences in data distribution of the target data information are fully considered, the feature extraction of data information with changing trends in the target data information is realized, the characteristics of the object to be predicted are fully analyzed from multiple aspects, and the accuracy of the prediction results is improved.
[0035] Step S103: Based on the first feature, the second feature and the third feature, activity prediction is performed on the object to be predicted to obtain a prediction result, wherein the prediction result represents the activity level of the object to be predicted in the transaction.
[0036] In the above steps, the prediction result may be a result calculated by using the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature. Optionally, the larger the numerical value of the prediction result, the more active the object to be predicted is in the transaction.
[0037] It should be noted that by predicting the activity of the predicted object, business personnel can formulate corresponding customer maintenance strategies based on the prediction results, so as to wake up dormant customers in time and effectively avoid customer loss.
[0038] Based on the scheme defined in the above steps S101 to S103, it can be known that in the embodiment of the present invention, the target data information is first obtained by extracting features from the target data information through the target network model, and then the first target data information is extracted based on the first target network model to obtain the first feature, and the data of different categories in the second target data information are extracted based on the second target network model to obtain the second feature and the third feature, and then the activity of the object to be predicted is predicted based on the first feature, the second feature and the third feature to obtain the prediction result. Wherein, the target data information is composed of the first target data information and the second target data information, the first target data information represents the inherent attribute information of the object to be predicted, the second target data information represents the information of the object to be predicted that changes over time, the first target network model is trained by the inherent attribute information in the sample data information, the second target network model is trained by the information of the sample data information that changes over time, the first feature represents the attribute characteristics of the object to be predicted, the second feature represents the behavior characteristics of the object to be predicted, the third feature represents the transaction account characteristics of the object to be predicted, and the prediction result represents the activity level of the object to be predicted in the transaction.
[0039] It is easy to notice that in the above process, by obtaining the target data information of the object to be predicted, an accurate data basis is provided for the subsequent feature extraction of the target data information; by extracting the features of the first target data information based on the first target network model, the first feature can be obtained, and by extracting the features of different categories of data in the second target data information based on the second target network model, the second feature and the third feature can be obtained. In the process of feature extraction, the differences in data distribution of the target data information are fully considered, and the feature extraction of data information with a changing trend in the target data information is realized. The characteristics of the object to be predicted are fully analyzed from multiple aspects, the accuracy of the prediction results is improved, and the versatility of the model is enhanced; by predicting the activity of the object to be predicted and obtaining the prediction results, business personnel can formulate corresponding customer maintenance strategies based on the prediction results, and wake up dormant customers in time, thereby avoiding customer loss and increasing economic benefits.
[0040] It can be seen that through the technical solution of the present invention, the purpose of improving the prediction ability of the prediction model is achieved, thereby achieving the technical effect of improving the accuracy of predicting customer activity, and further solving the technical problem of low accuracy of predicting customer activity in the prior art.
[0041] In an optional embodiment, in the process of extracting features of different categories of data in the second target data information based on the second target network model to obtain the second feature and the third feature, firstly, based on the first sub-target network model of the second target network model, feature extraction is performed on the first sub-category target data information in the second target data information to obtain the second feature, and then based on the second sub-target network model of the second target network model, feature extraction is performed on the second sub-category target data information in the second target data information to obtain the third feature, wherein the neural network algorithms corresponding to the first sub-target network model and the second sub-target network model are different.
[0042] Optionally, the first sub-target network model may be a T-LSTM model (Time-Aware LSTM, time-aware model), the second sub-target network model may be an S-LSTM model (Sentence-State LSTM, sentence state model), the first sub-category target data information may be information such as transaction time, transaction direction (income, expenditure), transaction venue, etc., and the second sub-category target data information may be information such as work industry, balance, transaction amount, etc. Optionally, for the second target data information, i.e., serialized data, two LSTM network models are used to extract the second feature, i.e., the customer's transaction habit feature, and the third feature, i.e., the customer's account information feature, respectively. The T-LSTM model mainly learns the customer's transaction habits, i.e., consumption habits, and the S-LSTM model mainly learns the customer's account information.
[0043] It should be noted that in the above process, through the two sub-target network models, feature extraction of information that changes over time is achieved, which improves the prediction accuracy of the model, thereby enabling accurate maintenance operations for dormant customers and improving customer experience.
[0044] In an optional embodiment, in the process of predicting the activity of the predicted object based on the first feature, the second feature and the third feature to obtain the prediction result, the data information corresponding to the first feature, the data information corresponding to the second feature and the data information corresponding to the third feature are averaged to obtain the prediction result.
[0045] Optionally, after extracting the customer's own characteristics, the customer's transaction habit characteristics and the customer's account information characteristics respectively through the three target network models, namely the fully connected neural network model, the T-LSTM model and the S-LSTM model, the data information corresponding to the three characteristics is averaged to obtain the prediction result of the object to be predicted. Optionally, the three target network models can be regarded as three sub-classifiers, and a total classifier is integrated through the three sub-classifiers. Optionally, the operation function for averaging the data information corresponding to the first feature, the data information corresponding to the second feature and the data information corresponding to the third feature is as follows:
[0046]
[0047] Among them, V is the number of perspectives, which is 3, namely the three perspectives of customer characteristics, customer transaction habit characteristics and customer account information characteristics; f v are the sub-classifiers in the vth perspective, namely, the fully connected neural network model, the T-LSTM model and the S-LSTM model. ω1 is the positive sample set, and the corresponding customers are dormant customers. ω2 is the negative sample set, and the corresponding customers are active customers.
[0048] It should be noted that in the above process, the prediction object is coordinated and learned from multiple perspectives, which makes the prediction results more accurate and improves the versatility of the model, thereby avoiding customer loss and increasing economic benefits.
[0049] In an optional embodiment, after averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain a prediction result, the prediction result is first judged by a target discriminant function to obtain a judgment result. When the judgment result indicates that the prediction result is within a preset range, the object to be predicted is determined to be the target object.
[0050] Optionally, the prediction result can be a numerical value, for example, 0.5, -0.5, etc. The target object refers to dormant customers. After obtaining the prediction result, the prediction result is judged by the following discriminant function:
[0051]
[0052] Optionally, if the prediction result is a number greater than or equal to zero, the object to be predicted belongs to ω1 (positive sample set), that is, the object to be predicted is a dormant customer; if the prediction result is a number less than zero, the object to be predicted belongs to ω2 (negative sample set), that is, the object to be predicted is an active customer.
[0053] It should be noted that in the above process, the judgment of whether the predicted object is a dormant customer is realized, so that the business personnel can formulate corresponding customer maintenance strategies according to the prediction results and wake up the dormant customers in time.
[0054] In an optional embodiment, after the target data information of the object to be predicted is acquired, the target data information is classified based on the periodicity of the target data information to obtain the first target data information and the second target data information.
[0055] Optionally, since the acquired target data information includes information that changes periodically over time, such as the customer's income, and information that does not change over time, such as the customer's gender, it is necessary to classify the target data information and divide the target data information into non-serialized data, i.e., the first target data information, and serialized data, i.e., the second target data information.
[0056] It should be noted that by classifying the target data information, the differences in data distribution of the target data information are fully considered, so that the features of the data information with changing trends in the target data information can be extracted, and the characteristics of the object to be predicted can be fully analyzed from multiple aspects, thereby improving the accuracy of the prediction results.
[0057] In an optional embodiment, the first target network model and the second target network model are generated by the following method: obtaining a target sample data set, and classifying the target sample data set to obtain a training set, a validation set and a test set, and then processing the initial object prediction model based on the training set, the validation set and the test set to obtain the first target network model and the second target network model, wherein the initial object prediction model is composed of a first initial network model and a second initial network model, the first initial network model is used to train the inherent attribute information in the sample data information in the training set, the second initial network model is used to train the information that changes over time in the sample data information in the training set, and the second initial network model is composed of a first sub-initial network model and a second sub-initial network model, and the neural network algorithms corresponding to the first sub-initial network model and the second sub-initial network model are different. The target sample data set is composed of a first sample data set and a second sample data set, the first sample data set is composed of a plurality of data with a target label, the second sample data set is composed of a plurality of data without a target label, the object corresponding to the target label is a sleeping object, and the activity of the sleeping object is lower than a preset threshold.
[0058] Optional, Figure 2It is a schematic diagram of an optional prediction model for a target object according to an embodiment of the present invention. The construction of the model can be divided into the following parts: for the inherent attribute information in the non-serialized data, i.e., the sample data information in the training set, a 3-layer fully connected neural network, i.e., the first initial network model, is used for training and learning; for the information that changes over time in the serialized data, i.e., the sample data information in the training set, an LSTM model, i.e., the second initial network model, is used for training and learning, wherein the first sub-initial network model is a T-LSTM model and the second sub-initial network model is an S-LSTM model; finally, the training and learning results of the three initial network models are fused in the loss layer.
[0059] Optionally, the first sample data set can be a sample data set with real dormant customers, the target label is the label of the dormant customer, and the second sample data set can be a sample data set without dormant customers. Optionally, the T-LSTM model and the S-LSTM model are used to learn the differences in sample data. Since the data used by the two models are consistent, the intra-class loss of the same data from different perspectives can be reduced through the intra-class perspective loss constraint. Optionally, the model is trained using a common iterative training method, and the input of the network is the sample data set X, where X is divided into (X a , X b ) Two parts of input, X a Indicates non-serialized data, X b It represents serialized data, and the label of the real dormant customer is set to Y. The specific training process is not described in detail in this embodiment.
[0060] It should be noted that by integrating the fully connected network model and the LSTM network model and learning the input sample data, the prediction accuracy of dormant customers can be improved; through the LSTM network model, accurate prediction of data information that has changed over a period of time can be achieved.
[0061] In an optional embodiment, in the process of processing the initial object prediction model based on the training set, the validation set and the test set to obtain the first target network model and the second target network model, firstly, a target similarity matrix of the first type of sample and the second type of sample is constructed based on the training set, and the target similarity matrix is calculated to obtain the first constraint item, and then the training set is calculated based on the collaborative training algorithm to obtain the second constraint item, and based on the first constraint item and the second constraint item, a target loss function is obtained, and then the initial object prediction model is iteratively trained using the target loss function to obtain the first target network model and the second target network model. Wherein, the objects corresponding to the first type of sample are objects of the same type, and the objects corresponding to the second type of sample are objects of different types.
[0062] Optionally, the sample data set X has many data, X1 and X2 are both dormant customers, X1 and X2 are called homogeneous samples, i.e., first-type samples. If one of X1 and X2 is a dormant customer and the other is a non-dormant customer, X1 and X2 are called heterogeneous samples, i.e., second-type samples. Optionally, within the three perspectives, i.e., the characteristics of the customer itself, the characteristics of the customer's transaction habits, and the characteristics of the customer's account information, it is necessary to fully consider the similarity relationship between neighboring samples. For homogeneous samples, the closer the spatial distribution, the closer the output space; for heterogeneous samples, the closer the spatial distribution, the more accurate and rich the discriminant information it contains. Optionally, based on the homogeneous neighbor and heterogeneous neighbor relationships of the samples, an inter-class similarity matrix, i.e., a target similarity matrix, is constructed, as follows:
[0063]
[0064] Among them, s i,j Represents sample x i With sample x j The similarity, N b (x) represents the k nearest neighbors of sample x (for example, k can be 5). If sample x i With x j Belong to the same type of samples, and sample x i is the sample x j k nearest neighbors or samples x j is the sample x i k nearest neighbors, then x i With x j The similarity is defined as 1; if the sample x i With x j Belong to heterogeneous samples, and sample x i is the sample x j k nearest neighbors or samples x j is the sample x i k nearest neighbors, then x i With x j The similarity of is defined as -1; in other cases x i With x j The similarity is defined as 0.
[0065] Furthermore, the inter-class similarity matrix, i.e., the target similarity matrix, is used to construct an inter-class similarity constraint, i.e., the first constraint, to constrain the outputs of neighboring samples of the same class to be as similar as possible, and the outputs of neighboring samples of different classes to be as different as possible. Optionally, the initial object prediction model, i.e., the three classifiers, is optimized using the neighboring spatial distribution information of samples of the same class and samples of different classes, so that the classifier learns the overall distribution information of the samples and the classification boundary passes through the middle area of the two classes of samples as much as possible. Specifically, the first constraint, i.e., the inter-class similarity constraint R bcs The calculation is as follows:
[0066]
[0067] Among them, V is the number of viewing angles, which is 3, N is the number of training samples, and f v is the sub-classifier in the v-th perspective, is the sample x in the vth viewing angle i With x j The similarity.
[0068] Furthermore, in order to fully utilize the advantages of multi-view learning, the training set is calculated based on the collaborative training algorithm to obtain the second constraint term, namely the multi-view contrastive learning constraint term R vcl , which is used to constrain the output space of the same training sample in different perspectives to be as close as possible, so that multiple perspectives can be optimized in pairs, and the collaborative learning between multiple perspectives can be used to improve the effect of multi-perspective learning. Specifically, the multi-perspective contrast learning constraint term R vcl The calculation is as follows:
[0069]
[0070] Furthermore, based on the first constraint, i.e., the inter-class similarity constraint R bcs and the second constraint, the multi-view contrastive learning constraint R vcl , the target loss function is as follows:
[0071] L=R emp +α·R bcs +γ·R vcl
[0072] Among them, R emp is the empirical loss, α and γ are hyperparameters used to adjust the weights of the above items. The objective loss function is expanded as follows:
[0073]
[0074] In an optional embodiment, in the process of iteratively training the initial object prediction model using the target loss function to obtain the first target network model and the second target network model, the first initial network model is first iteratively trained using the target loss function to obtain the first target network model, and then the first sub-initial network model is iteratively trained using the target loss function to obtain the first sub-target network model, and then the second sub-initial network model is iteratively trained using the target loss function to obtain the second sub-target network model.
[0075] Optionally, after obtaining the target loss function, the target loss function is used to iteratively train the initial object prediction model to obtain the first target network model and the second target network model. Optionally, the commonly used gradient descent method is used to optimize the initial object prediction model, i.e., the first initial network model, the first sub-initial network model and the second sub-initial network model. Specifically, the final sub-classifiers f1, f2 and f3 are obtained by minimizing the target loss function until a preset number of iterations is reached or the difference between the loss values of the two loss functions is less than a preset threshold, i.e., the first target network model, the first sub-target network model and the second sub-target network model are obtained.
[0076] It should be noted that in the above process, by processing the initial object prediction model, that is, optimizing the initial object prediction model, the first target network model and the second target network model that are stable after training and have a good convergence effect can be obtained. After learning the data from different perspectives, the model is optimized through similarity and consistency constraints, which can enable the model to achieve better prediction results.
[0077] It can be seen that through the technical solution of the present invention, the purpose of improving the prediction ability of the prediction model is achieved, thereby achieving the technical effect of improving the accuracy of predicting customer activity, and further solving the technical problem of low accuracy of predicting customer activity in the prior art.
[0078] Example 2
[0079] According to an embodiment of the present invention, an embodiment of a prediction device for a target object is provided, wherein: Figure 3 is a schematic diagram of an optional target object prediction device according to an embodiment of the present invention. Figure 3As shown, the device includes: an acquisition module 301, which is used to acquire target data information of an object to be predicted, wherein the target data information is composed of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information that changes with time of the object to be predicted; an extraction module 302, which is used to perform feature extraction on the first target data information based on the first target network model to obtain a first feature, and to perform feature extraction on different categories of data in the second target data information based on the second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by the inherent attribute information in the sample data information, and the second target network model is trained by the information that changes with time in the sample data information, the first feature represents the attribute feature of the object to be predicted, the second feature represents the behavior feature of the object to be predicted, and the third feature represents the transaction account feature of the object to be predicted; a prediction module 303, which is used to perform activity prediction on the object to be predicted based on the first feature, the second feature and the third feature to obtain a prediction result, wherein the prediction result represents the activity level of the object to be predicted in the transaction.
[0080] It should be noted that the acquisition module 301, extraction module 302 and prediction module 303 correspond to steps S101 to S103 in the above embodiment, and the examples and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment 1.
[0081] Optionally, the prediction device for the target object also includes: a first extraction module, used to perform feature extraction on the first subcategory target data information in the second target data information based on the first subtarget network model of the second target network model to obtain a second feature; a second extraction module, used to perform feature extraction on the second subcategory target data information in the second target data information based on the second subtarget network model of the second target network model to obtain a third feature, wherein the neural network algorithms corresponding to the first subtarget network model and the second subtarget network model are different.
[0082] Optionally, the prediction module includes: a calculation module, used to perform average calculation on the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain a prediction result.
[0083] Optionally, the prediction device for the target object also includes: a judgment module, used to judge the prediction result through a target discriminant function to obtain a judgment result; and a determination module, used to determine that the object to be predicted is the target object when the judgment result indicates that the prediction result is within a preset range.
[0084] Optionally, the target object prediction device further includes: a classification module, configured to classify the target data information based on the periodicity of the target data information to obtain first target data information and second target data information.
[0085] Optionally, the prediction device for the target object also includes: a first acquisition module, used to acquire a target sample data set, and classify the target sample data set to obtain a training set, a validation set and a test set, wherein the target sample data set consists of a first sample data set and a second sample data set, the first sample data set consists of multiple data with a target label, and the second sample data set consists of multiple data without a target label, wherein the object corresponding to the target label is a dormant object, and the activity of the dormant object is lower than a preset threshold; a processing module, used to process the initial object prediction model based on the training set, the validation set and the test set to obtain a first target network model and a second target network model, wherein the initial object prediction model consists of a first initial network model and a second initial network model, the first initial network model is used to train the inherent attribute information in the sample data information in the training set, the second initial network model is used to train the information that changes over time in the sample data information in the training set, and the second initial network model is composed of a first sub-initial network model and a second sub-initial network model, and the neural network algorithms corresponding to the first sub-initial network model and the second sub-initial network model are different.
[0086] Optionally, the processing module includes: a construction module, which is used to construct a target similarity matrix of the first type of samples and the second type of samples based on the training set, and calculate the target similarity matrix to obtain a first constraint item, wherein the objects corresponding to the first type of samples are objects of the same type, and the objects corresponding to the second type of samples are objects of different types; a calculation module, which is used to calculate the training set based on a collaborative training algorithm to obtain a second constraint item, and obtain a target loss function based on the first constraint item and the second constraint item; a training module, which is used to iteratively train the initial object prediction model using the target loss function to obtain a first target network model and a second target network model.
[0087] Optionally, the training module includes: a first training module, used to iteratively train the first initial network model through a target loss function to obtain a first target network model; a second training module, used to iteratively train the first sub-initial network model through a target loss function to obtain a first sub-target network model; and a third training module, used to iteratively train the second sub-initial network model through a target loss function to obtain a second sub-target network model.
[0088] Example 3
[0089] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Figure 4 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Figure 4 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors are implemented for running the programs, wherein the programs are set to execute the above-mentioned prediction method of the target object when running. When the processor executes the program, the following steps are implemented: obtaining the target data information of the object to be predicted, wherein the target data information is composed of the first target data information and the second target data information, the first target data information represents the inherent attribute information of the object to be predicted, and the second target data information represents the information of the object to be predicted that changes over time; based on the first target network model, the first target data information is subjected to feature extraction to obtain the first feature, and based on the second target network model, the data of different categories in the second target data information is subjected to feature extraction to obtain the second feature and the third feature, wherein the first target network model is obtained by training the inherent attribute information in the sample data information, and the second target network model is obtained by training the information of the sample data information that changes over time, the first feature represents the attribute feature of the object to be predicted, the second feature represents the behavior feature of the object to be predicted, and the third feature represents the transaction account feature of the object to be predicted; based on the first feature, the second feature and the third feature, the activity of the object to be predicted is predicted to obtain a prediction result, wherein the prediction result represents the activity of the object to be predicted in the transaction.
[0090] Optionally, when executing the program, the processor also implements the following steps: based on the first sub-target network model of the second target network model, performing feature extraction on the first sub-category target data information in the second target data information to obtain a second feature; based on the second sub-target network model of the second target network model, performing feature extraction on the second sub-category target data information in the second target data information to obtain a third feature, wherein the neural network algorithms corresponding to the first sub-target network model and the second sub-target network model are different.
[0091] Optionally, when the processor executes the program, the following steps are also implemented: averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain a prediction result.
[0092] Optionally, the processor also implements the following steps when executing the program: after averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain a prediction result, the prediction result is judged by a target discriminant function to obtain a judgment result; when the judgment result indicates that the prediction result is within a preset range, the object to be predicted is determined to be the target object.
[0093] Optionally, when the processor executes the program, the following steps are further implemented: after acquiring the target data information of the object to be predicted, based on the periodicity of the target data information, classifying the target data information to obtain first target data information and second target data information.
[0094] Optionally, when the processor executes the program, the following steps are also implemented: obtaining a target sample data set, and classifying the target sample data set to obtain a training set, a validation set, and a test set, wherein the target sample data set consists of a first sample data set and a second sample data set, the first sample data set consists of multiple data with a target label, and the second sample data set consists of multiple data without a target label, wherein the object corresponding to the target label is a sleeping object, and the activity of the sleeping object is lower than a preset threshold; processing the initial object prediction model based on the training set, the validation set, and the test set to obtain a first target network model and a second target network model, wherein the initial object prediction model consists of a first initial network model and a second initial network model, the first initial network model is used to train the inherent attribute information in the sample data information in the training set, the second initial network model is used to train the information that changes over time in the sample data information in the training set, and the second initial network model is composed of a first sub-initial network model and a second sub-initial network model, and the neural network algorithms corresponding to the first sub-initial network model and the second sub-initial network model are different.
[0095] Optionally, when the processor executes the program, the following steps are also implemented: constructing a target similarity matrix for the first type of samples and the second type of samples based on the training set, and calculating the target similarity matrix to obtain a first constraint item, wherein the objects corresponding to the first type of samples are objects of the same type, and the objects corresponding to the second type of samples are objects of different types; calculating the training set based on a collaborative training algorithm to obtain a second constraint item, and obtaining a target loss function based on the first constraint item and the second constraint item; and iteratively training the initial object prediction model using the target loss function to obtain a first target network model and a second target network model.
[0096] Optionally, when the processor executes the program, the following steps are also implemented: iteratively training the first initial network model through a target loss function to obtain a first target network model; iteratively training the first sub-initial network model through a target loss function to obtain a first sub-target network model; iteratively training the second sub-initial network model through a target loss function to obtain a second sub-target network model.
[0097] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0098] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0099] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0100] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0102] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0103] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0104] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for predicting a target object, characterized in that: include: Acquire target data information of the object to be predicted, wherein the target data information is composed of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information of the object to be predicted that changes over time; Performing feature extraction on the first target data information based on the first target network model to obtain a first feature, and performing feature extraction on different categories of data in the second target data information based on the second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by inherent attribute information in the sample data information, and the second target network model is trained by information that changes over time in the sample data information, the first feature represents the attribute feature of the object to be predicted, the second feature represents the behavior feature of the object to be predicted, and the third feature represents the transaction account feature of the object to be predicted; Based on the first feature, the second feature, and the third feature, an activity prediction is performed on the object to be predicted to obtain a prediction result, wherein the prediction result represents the activity level of the object to be predicted in the transaction; The target object prediction method further includes: constructing a target similarity matrix of first-type samples and second-type samples based on a training set, and calculating the target similarity matrix to obtain a first constraint item, wherein the objects corresponding to the first-type samples are objects of the same type, and the objects corresponding to the second-type samples are objects of different types, wherein the first constraint item is used to constrain the similarity of neighboring samples to be positively correlated with the similarity of output contents of the neighboring samples; The training set is calculated based on a collaborative training algorithm to obtain a second constraint item, and a target loss function is obtained based on the first constraint item and the second constraint item, wherein the second constraint item is used to constrain the similarity of the same training sample in the output space in different perspectives; The target loss function is used to iteratively train the initial object prediction model to obtain the first target network model and the second target network model.
2. The method according to claim 1, characterized in that: Based on the second target network model, feature extraction is performed on different categories of data in the second target data information to obtain second features and third features, including: Based on the first sub-target network model of the second target network model, extracting features of the first sub-category target data information in the second target data information to obtain the second features; Based on the second sub-target network model of the second target network model, feature extraction is performed on the second subcategory target data information in the second target data information to obtain the third feature, wherein the neural network algorithms corresponding to the first sub-target network model and the second sub-target network model are different.
3. The method according to claim 1, characterized in that Based on the first feature, the second feature, and the third feature, activity prediction is performed on the object to be predicted to obtain a prediction result, including: The prediction result is obtained by averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature.
4. The method according to claim 3, characterized in that After averaging the data information corresponding to the first feature, the data information corresponding to the second feature, and the data information corresponding to the third feature to obtain the prediction result, the method further includes: The prediction result is judged by a target discriminant function to obtain a judgment result; When the judgment result indicates that the prediction result is within a preset range, the object to be predicted is determined to be the target object.
5. The method according to claim 1, characterized in that After obtaining the target data information of the object to be predicted, the method further includes: Based on the periodicity of the target data information, the target data information is classified and processed to obtain the first target data information and the second target data information.
6. The method according to claim 1, characterized in that The first target network model and the second target network model are generated by the following method: Obtain a target sample data set, and classify the target sample data set to obtain a training set, a validation set, and a test set, wherein the target sample data set consists of a first sample data set and a second sample data set, the first sample data set consists of a plurality of data with a target label, and the second sample data set consists of a plurality of data without a target label, wherein the object corresponding to the target label is a sleeping object, and the activity of the sleeping object is lower than a preset threshold; The initial object prediction model is processed based on the training set, the validation set and the test set to obtain the first target network model and the second target network model, wherein the initial object prediction model is composed of a first initial network model and a second initial network model, the first initial network model is used to train the inherent attribute information in the sample data information in the training set, the second initial network model is used to train the information that changes over time in the sample data information in the training set, the second initial network model is composed of a first sub-initial network model and a second sub-initial network model, and the first sub-initial network model and the second sub-initial network model have different corresponding neural network algorithms.
7. The method according to claim 6, characterized in that Iteratively training the initial object prediction model using the target loss function to obtain the first target network model and the second target network model includes: Iteratively training the first initial network model using the target loss function to obtain the first target network model; Iteratively training the first sub-initial network model using the target loss function to obtain the first sub-target network model; The second sub-initial network model is iteratively trained using the target loss function to obtain the second sub-target network model.
8. A prediction device for a target object, characterized in that: include: An acquisition module, used to acquire target data information of the object to be predicted, wherein the target data information is composed of first target data information and second target data information, the first target data information represents inherent attribute information of the object to be predicted, and the second target data information represents information of the object to be predicted that changes over time; An extraction module, configured to perform feature extraction on the first target data information based on a first target network model to obtain a first feature, and perform feature extraction on different categories of data in the second target data information based on a second target network model to obtain a second feature and a third feature, wherein the first target network model is trained by inherent attribute information in the sample data information, the second target network model is trained by information that changes over time in the sample data information, the first feature represents the attribute feature of the object to be predicted, the second feature represents the behavior feature of the object to be predicted, and the third feature represents the transaction account feature of the object to be predicted; A prediction module, configured to perform activity prediction on the object to be predicted based on the first feature, the second feature, and the third feature to obtain a prediction result, wherein the prediction result represents the activity level of the object to be predicted in the transaction; The target object prediction device also includes: A construction module is used to construct a target similarity matrix of first type samples and second type samples based on a training set, and calculate the target similarity matrix to obtain a first constraint item, wherein the objects corresponding to the first type samples are objects of the same type, and the objects corresponding to the second type samples are objects of different types, wherein the first constraint item is used to constrain the similarity of neighboring samples to be positively correlated with the similarity of output contents of the neighboring samples; a calculation module is used to calculate the training set based on a collaborative training algorithm to obtain a second constraint item, and obtain a target loss function based on the first constraint item and the second constraint item, wherein the second constraint item is used to constrain the similarity of the same training sample in the output space within different perspectives; a training module is used to iteratively train the initial object prediction model using the target loss function to obtain the first target network model and the second target network model.
9. An electronic device, characterized in that: The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the program is configured to execute the target object prediction method described in any one of claims 1 to 7 when running.
