Information generation method and device, prediction model training method and device, equipment and medium
By combining a prediction model with a deep convolutional neural network and an attention-based long short-term memory network, and optimizing the double loss values of the first and second training samples, the problem of declining prediction accuracy of traditional models when faced with new data is solved, and more stable prediction results are achieved.
Patent Information
- Application Number
- CN202511042846.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2025-11-07
AI Technical Summary
Traditional forecasting models struggle to adapt to dynamic changes in the business environment when faced with new data, leading to decreased forecast accuracy and insufficient reliability of forecast results.
A parallel structure prediction model based on deep convolutional neural networks and attention long short-term memory networks is adopted. By introducing dual loss values of the first and second training samples for optimization, the prediction model parameters are adjusted to learn the differences in data distribution at different times.
This improves the reliability and stability of the prediction model under dynamic changes in the business environment, ensuring accurate prediction of data in the new era.
Smart Images

Figure CN120912256A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence, in particular to the field of data processing, and more particularly to an information generation method, a prediction model training method, an apparatus, a device and a medium. BACKGROUND
[0002] In the prediction of the stability of the number of potential resources of a target business, due to the difference in the distribution of business data in different periods, the traditional prediction model often has a problem of decreased prediction accuracy when facing new period data, and is difficult to effectively adapt to the dynamic changes of the business environment, resulting in insufficient reliability of the prediction result. SUMMARY
[0003] In view of the above problems, the present application provides an information generation method, a prediction model training method, an apparatus, a device and a medium.
[0004] According to a first aspect of the present application, an information generation method is provided, comprising:
[0005] obtaining target data of a target business;
[0006] inputting the target data into a prediction model to obtain target information output by the prediction model, the target information representing the stability of the number of potential resources of the target business;
[0007] wherein the prediction model is trained based on training samples of the target business, the training samples including first training samples and second training samples; the generation time of the first training samples is earlier than that of the second training samples; the first training samples are used to determine a first loss value with a sample label; a first feature vector of the first training samples is used to determine a second loss value with a second feature vector of the second training samples; and the first loss value and the second loss value are used to adjust the parameters of an initial prediction model to obtain the prediction model.
[0008] According to an embodiment of the present application, the prediction model includes a feature extraction module and a prediction module, and the inputting of the target data into the prediction model to obtain the target information output by the prediction model includes:
[0009] extracting target features from the prediction module through the feature extraction module;
[0010] predicting the target features through the prediction module to obtain the target information.
[0011] According to an embodiment of the present application, the prediction module includes a deep convolutional neural network path and an attention long short-term memory network path in parallel; and the predicting of the target features through the prediction module to obtain the target information includes:
[0012] convolve the target feature through the deep convolutional neural network path to obtain a first path result;
[0013] perform attention mechanism processing on the target feature through the attention long short-term memory network path to obtain a second path result;
[0014] combine the first path result and the second path result to obtain the target information.
[0015] According to an embodiment of the present application, the second loss value represents a distribution difference between the first feature vector and the second feature vector.
[0016] A second aspect of the present application provides a prediction model training method, comprising:
[0017] obtaining training samples, the training samples comprising first training samples and second training samples, the first training samples being generated earlier than the second training samples, and the training samples representing service data of a target service;
[0018] extracting a first feature vector of the first training samples and a second feature vector of the second training samples through an initial prediction model respectively;
[0019] outputting a sample prediction result based on the first feature vector through the initial prediction model;
[0020] determining a first loss value based on the sample prediction result and a sample label;
[0021] determining a second loss value based on the first feature vector and the second feature vector;
[0022] adjusting the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
[0023] According to an embodiment of the present application, the prediction model comprises a feature extraction module, the feature extraction module comprising a long short-term memory network layer and a random inactivation layer; the extracting the first feature vector of the first training samples and the second feature vector of the second training samples through the initial prediction model comprises:
[0024] performing feature extraction on the first training samples through the long short-term memory network layer to obtain a first intermediate feature representation; and performing regularization processing on the first intermediate feature representation through the random inactivation layer to obtain the first feature vector;
[0025] The second training sample is subjected to feature extraction by the long short-term memory network layer to obtain a second intermediate feature representation; and the second intermediate feature representation is subjected to regularization processing by the random dropout layer to obtain a second feature vector.
[0026] According to an embodiment of the present application, the first training sample and the second training sample share model parameters in the feature extraction module, and the first feature vector and the second feature vector have the same feature dimension.
[0027] According to an embodiment of the present application, the prediction model comprises a prediction module, and a parallel deep convolutional neural network path and an attention long short-term memory network path; and the outputting of a sample prediction result by the initial prediction model based on the first feature vector comprises:
[0028] The first feature vector is subjected to convolution processing by the deep convolutional neural network path to obtain a first sample path result;
[0029] The first feature vector is subjected to attention mechanism processing by the attention long short-term memory network path to obtain a second sample path result;
[0030] The first sample path result and the second sample path result are combined to obtain the sample prediction result.
[0031] According to an embodiment of the present application, the determining of a second loss value based on the first feature vector and the second feature vector comprises:
[0032] The distribution difference between the first feature vector and the second feature vector is calculated to obtain the second loss value.
[0033] A third aspect of the present application provides an information generation device, comprising:
[0034] A data acquisition module is configured to acquire target data of a target service;
[0035] An information generation module is configured to input the target data into a prediction model to obtain target information output by the prediction model, the target information representing the stability of the potential resource quantity of the target service.
[0036] The prediction model is trained based on training samples of the target service, the training samples comprising a first training sample and a second training sample; the first training sample is generated earlier than the second training sample; the first training sample is used to determine a first loss value with a sample label; a first feature vector of the first training sample is used to determine a second loss value with a second feature vector of the second training sample; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model.
[0037] A fourth aspect of the present application provides a prediction model training apparatus, comprising:
[0038] a sample obtaining module configured to obtain training samples, the training samples comprising first training samples and second training samples, the first training samples being generated earlier than the second training samples, and the training samples representing service data of a target service;
[0039] a feature extracting module configured to extract a first feature vector of the first training samples and a second feature vector of the second training samples respectively by an initial prediction model;
[0040] a sample predicting module configured to output a sample prediction result based on the first feature vector by the initial prediction model;
[0041] a first loss determining module configured to determine a first loss value based on the sample prediction result and a sample label;
[0042] a second loss determining module configured to determine a second loss value based on the first feature vector and the second feature vector;
[0043] a model training module configured to adjust the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
[0044] A fifth aspect of the present application provides an electronic device, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0045] A sixth aspect of the present application further provides a computer-readable storage medium having stored thereon a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the above method. BRIEF DESCRIPTION OF DRAWINGS
[0046] The above content of the present application and other purposes, features and advantages will be more apparent through the following description of the embodiments of the present application with reference to the accompanying drawings, in which:
[0047] Figure 1 application scenarios of the information generation method, apparatus, device, medium and program product according to the embodiments of the present application are schematically shown;
[0048] Figure 2 a flowchart of an information generation method according to an embodiment of the present application is schematically shown;
[0049] Figure 3A flowchart of a prediction model training method according to an embodiment of the present application is schematically shown.
[0050] Figure 4 A training architecture diagram of a prediction model training according to an embodiment of the present application is schematically shown.
[0051] Figure 5 A structure block diagram of an information generation apparatus according to an embodiment of the present application is schematically shown.
[0052] Figure 6 A structure block diagram of an information generation apparatus according to an embodiment of the present application is schematically shown.
[0053] Figure 7 A block diagram of an electronic device suitable for implementing an information generation method according to an embodiment of the present application is schematically shown. DETAILED DESCRIPTION
[0054] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that the description is merely exemplary of the present application, and is not intended to limit the scope of the present application. In the following detailed description of the embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present application.
[0055] The terms used herein are merely used to describe specific embodiments, and are not intended to limit the present application. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
[0056] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or overly formal manner.
[0057] In the case of using expressions similar to "at least one of A, B, and C, etc.", it is generally to be interpreted as including one or more of the same. For example, "a system having at least one of A, B, and C" should be interpreted as including a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.
[0058] In the technical solutions of the present application, the user information (including but not limited to user personal information, user image information, user equipment information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and corresponding operation entrances are provided for the user to choose authorization or refusal.
[0059] In the scenario of making automatic decisions by using personal information, the information generation method, device and system provided by the embodiments of the present application all provide corresponding operation entrances for the user to choose to agree or refuse the automatic decision result; if the user chooses to refuse, the expert decision process is entered. The expression "automatic decision" here refers to the activity of automatically analyzing, evaluating the behavior habits, interests and hobbies or economic, health, credit status of a person by a computer program and making decisions. The expression "expert decision" here refers to the activity of making decisions by personnel who are engaged in a certain field, have special experience, knowledge and skills and reach a certain professional level.
[0060] The embodiments of the present application provide an information generation method, comprising:
[0061] obtaining target data of a target business;
[0062] inputting the target data into a prediction model to obtain target information output by the prediction model, the target information representing the stability of the number of potential resources of the target business;
[0063] The prediction model is trained based on training samples of the target business, and the training samples include first training samples and second training samples; the generation time of the first training samples is earlier than that of the second training samples; the first training samples are used to determine a first loss value with a sample label; a first feature vector of the first training samples is used to determine a second loss value with a second feature vector of the second training samples; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model.
[0064] By adopting the embodiment of the present application, the target information representing the stability of the potential resource quantity of the target business can be obtained by inputting the target data of the target business into the prediction model obtained based on the specific training manner. In the training process of the prediction model, the first loss value is determined by using the first training sample generated earlier than the second training sample and the sample label to learn the prediction task, and the second loss value is determined by using the first feature vector of the first training sample and the second feature vector of the second training sample to reduce the distribution difference between data in different periods, and the first loss value and the second loss value are used together to adjust the initial prediction model parameters. The training manner of the prediction model makes the prediction model not only learn the prediction task itself, but also adapt to the change of the distribution of business data in different periods, thereby effectively solving the problem of the decline of the prediction accuracy of the traditional prediction model when facing new period data, and improving the reliability and stability of the prediction result under the dynamic change of the business environment.
[0065] Figure 1 An application scenario diagram of the information generation method, apparatus, device, medium and program product according to the embodiments of the present application is schematically shown.
[0066] As shown in Figure 1 The application scenario 100 according to the embodiment can include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104 and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0067] The user can use the first terminal device 101, the second terminal device 102, the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0068] The first terminal device 101, the second terminal device 102, the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.
[0069] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0070] It should be noted that the information generation method provided in this application embodiment can generally be executed by server 105. Correspondingly, the information generation device provided in this application embodiment can generally be located in server 105. The information generation method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the information generation device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0071] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0072] The following will be based on Figure 1 The described scenario provides a detailed description of the information generation method according to embodiments of this application.
[0073] Figure 2 The flowchart illustrating an information generation method provided according to an embodiment of this application is shown schematically.
[0074] like Figure 2 As shown, the information generation method of this embodiment includes operations S210 to S220, and the information generation method can be executed by a server.
[0075] Operate S210 to obtain the target data for the target business;
[0076] Operation S220 inputs the target data into the prediction model to obtain the target information output by the prediction model. The target information characterizes the stability of the potential resource quantity of the target business.
[0077] The prediction model is trained based on training samples of the target service, and the training samples include first training samples and second training samples; the first training samples are earlier than the second training samples in generation time; the first training samples are used to determine a first loss value with sample labels; a first feature vector of the first training samples is used to determine a second loss value with a second feature vector of the second training samples; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model.
[0078] In the embodiment of the present application, before the operation S210 of obtaining the target data of the target service, if the target data involves user information, the consent or authorization of the user can be obtained. For example, before the operation S210, a request for obtaining user information can be sent to the user. In the case where the user agrees or authorizes to obtain the user information, the operation S210 is performed.
[0079] In the operation S210, the target service refers to a specific business scenario that needs to be predicted and analyzed for customer churn, which can be understood in the embodiment of the present application as a business service such as a bank, a telecom, an e-commerce, etc. that has a customer relationship management requirement, for identifying and predicting customer churn risk and formulating customer retention strategy.
[0080] Exemplarily, the target service includes but is not limited to a bank retail service, a credit card service, a telecom operator service, an e-commerce platform service, an insurance service, an internet financial service, etc.
[0081] Correspondingly, the target data refers to a data set reflecting customer behavior characteristics and business interaction history, which can be understood in the embodiment of the present application as time series data containing multi-dimensional features such as customer transaction records, behavior trajectories, attribute information, etc., for being input to a prediction model to predict customer churn probability in a future period.
[0082] Exemplarily, the target data includes but is not limited to customer transaction flow data, account balance change data, product usage frequency data, customer service contact record data, channel access behavior data, customer basic attribute information, etc.
[0083] In a feasible implementation, the historical transaction flow data of the customer can be extracted from a database system of the target service, and the historical transaction flow data includes field information such as transaction time, transaction amount, transaction type, transaction channel, etc.; the extracted historical transaction flow data is divided into time windows to form sequence data segments with fixed time length; and the sequence data segments are standardized, including numerical normalization and missing value filling, to obtain the target data for model input.
[0084] In another possible implementation, multi-dimensional behavior data of customers in the target business can be collected, the multi-dimensional behavior data including at least one of account balance change data, product use frequency data, customer service contact record data, and channel access behavior data; the collected multi-dimensional behavior data is aggregated according to customer identifiers to form a comprehensive behavior feature matrix in units of customers; and the comprehensive behavior feature matrix is subjected to feature engineering processing including feature selection, feature combination, and feature transformation to generate target data suitable for a prediction model.
[0085] In yet another possible implementation, customer behavior data streams of the target business are acquired in real time through an application program interface; the acquired customer behavior data streams are subjected to stream processing including data cleaning, outlier detection, and data format unification; the processed data streams are divided into batches according to a preset time interval, each batch corresponding to a customer behavior snapshot in a time period; and the customer behavior snapshots after batch division are converted into an input format required by the prediction model to obtain the target data.
[0086] It should be noted that the above implementations can be used alone or in combination. For example, historical data can be extracted from a database system and real-time data can be acquired through an API at the same time, and the two are fused to form more comprehensive target data. In addition, in the process of acquiring target data, specific parameters of data processing, such as time window size, feature selection strategy, etc., can be adjusted according to specific business needs and data characteristics to optimize the performance of the prediction model.
[0087] In operation S220, the prediction model refers to a neural network model based on deep learning technology that can process time series data and realize cross-domain knowledge transfer, which can be understood in the embodiments of the present application as an end-to-end learning framework integrating a feature extraction module and a prediction module, used to learn customer behavior patterns from business data in different time periods and accurately predict target information in a target period.
[0088] For example, the prediction model includes but is not limited to a deep neural network model composed of a feature extraction module based on a long short-term memory network, a prediction module based on a deep convolutional neural network and an attention long short-term memory network in parallel structure, and a domain adaptation mechanism based on a maximum mean difference method.
[0089] Correspondingly, the target information refers to a quantitative evaluation result about customer churn risk analyzed by the prediction model based on the target data, which can be understood in the embodiments of the present application as a prediction index representing the stability of the number of potential customer resources in the target business, used to help the business side identify customers with high churn risk, evaluate the overall stability of the customer group, and provide data support for the formulation of customer retention strategies.
[0090] Exemplarily, the target information includes, but is not limited to, a customer churn probability value, a customer churn risk level classification, a customer group churn rate prediction value, a customer life cycle estimation length, a customer value churn early warning index, and a customer retention difficulty score.
[0091] Further, the prediction model is trained based on training samples of the target business, and the training samples include first training samples and second training samples. The first training samples refer to a historical customer data set generated relatively early in time and having an explicit churn label in the target business. In the embodiments of the present application, the first training samples can be understood as a labeled training set as source domain data, which is used to train the prediction model to learn the basic rules and feature patterns of customer churn, and provide a basis for supervised learning of the model.
[0092] Correspondingly, the second training samples refer to a customer data set generated relatively late in time in the target business. In the embodiments of the present application, the second training samples can be understood as time evolution samples as target domain data, which are used to help the prediction model adapt to the latest change trend of customer behavior and improve the prediction accuracy and generalization ability of the model in the current period.
[0093] The main difference between the first training samples and the second training samples lies in the generation time and the availability of labels. The first training samples are generated earlier than the second training samples, reflect the historical state of customer behavior, and have explicit churn label information. The second training samples reflect the latest state of customer behavior, but often lack immediate available churn labels in actual application. The connection between the two lies in that they are both derived from the same target business scenario, have similar data structures and business meanings, but there may be changes in data distribution due to time difference.
[0094] The reason for training the prediction model using the first training samples and the second training samples is that customer behavior has a time evolution characteristic, and a model trained purely relying on historical data often cannot accurately predict the customer churn in the current period. By introducing the first training samples, the prediction model can learn the basic patterns of customer churn, and the first training samples and their corresponding sample labels are used to calculate a first loss value, which measures the prediction accuracy of the model on known label data. At the same time, by introducing the second training samples, the model can perceive the latest changes in customer behavior, and the first feature vector of the first training samples and the second feature vector of the second training samples are used to calculate a second loss value, which measures the distribution difference between data in different periods. The joint optimization of the first loss value and the second loss value ensures that the prediction model can not only master the general rules of customer churn, but also adapt to the dynamic changes of behavior patterns, thereby maintaining stable prediction performance when facing time-evolving customer data.
[0095] By adopting the embodiment of the present application, the target information representing the stability of the potential resource quantity of the target business can be obtained by inputting the target data of the target business into the prediction model obtained based on the specific training manner. In the training process of the prediction model, the first loss value is determined by using the first training sample generated earlier than the second training sample and the sample label to learn the prediction task, and the second loss value is determined by using the first feature vector of the first training sample and the second feature vector of the second training sample to reduce the distribution difference between the data of different periods, and the first loss value and the second loss value are used together to adjust the initial prediction model parameters. The training manner of the prediction model makes the prediction model not only learn the prediction task itself, but also adapt to the change of the distribution of business data of different periods.
[0096] The training method of the prediction model is introduced as follows.
[0097] Figure 3 A flowchart of a prediction model training method according to an embodiment of the present application is schematically shown.
[0098] As shown in Figure 3 The prediction model training method of the embodiment includes operations S310-S360.
[0099] Operation S310, obtaining training samples, the training samples including first training samples and second training samples, the generation time of the first training samples being earlier than the generation time of the second training samples, and the training samples representing business data of a target business;
[0100] Operation S320, extracting a first feature vector of the first training sample and a second feature vector of the second training sample by an initial prediction model respectively;
[0101] Operation S330, outputting a sample prediction result based on the first feature vector by the initial prediction model;
[0102] Operation S340, determining a first loss value based on the sample prediction result and a sample label;
[0103] Operation S350, determining a second loss value based on the first feature vector and the second feature vector;
[0104] Operation S360, adjusting the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
[0105] In operation S320, the initial prediction model refers to a deep neural network model with randomly initialized parameters, which can be understood in the embodiment of the application as an end-to-end learning framework containing a feature extraction module and capable of automatically learning an abstract feature representation of customer behavior from time series data. The first feature vector refers to a high-dimensional vector representation obtained by the initial prediction model after feature extraction on the first training sample, which can be understood in the embodiment of the application as a feature vector encoding the customer behavior pattern in the historical period and containing potential information related to customer churn. The second feature vector refers to a high-dimensional vector representation obtained by the initial prediction model after feature extraction on the second training sample, which can be understood in the embodiment of the application as a feature vector encoding the customer behavior pattern in the current period and reflecting the latest trend of customer behavior. Since the first training sample and the second training sample share the same model parameters in the feature extraction module of the initial prediction model, the first feature vector and the second feature vector extracted have the same feature dimension.
[0106] In operation S330, the sample prediction result refers to a prediction value of the customer churn probability calculated by the initial prediction model based on the first feature vector, which can be understood in the embodiment of the application as a quantitative evaluation result representing the customer churn risk of the first training sample and used for comparison with the real sample label to evaluate the prediction accuracy of the model. In this process, the initial prediction model maps the high-dimensional feature vector to the numerical output of the customer churn probability through the nonlinear transformation of the prediction module on the first feature vector. The reason for using the first feature vector instead of the second feature vector for prediction is that the first training sample has a clear sample label and can provide the necessary target value for supervised learning, while the second training sample often lacks an immediately available churn label in actual application.
[0107] In operation S340, the first loss value refers to a numerical indicator quantifying the difference between the sample prediction result and the real sample label, which can be understood in the embodiment of the application as a prediction error in supervised learning and used to guide the optimization direction of the model parameters. The sample label refers to the real customer churn state label corresponding to the first training sample, which can be understood in the embodiment of the application as the real customer churn obtained through historical observation and provides a learning goal for the prediction model. The calculation of the first loss value usually uses loss functions such as mean square error or cross-entropy to quantify the deviation between the predicted value and the real value and provide direction guidance for the gradient descent optimization of the model parameters. The minimization process of the first loss value enables the prediction model to learn the basic rules and feature patterns of customer churn prediction.
[0108] In operation S350, the second loss value refers to a numerical indicator quantifying the degree of distribution difference between the first feature vector and the second feature vector, which can be understood in the embodiment of the application as a distribution alignment loss in domain adaptation, used to force the model to learn invariant feature representation across time periods. The calculation of the second loss value uses the maximum mean difference method to quantify the degree of difference between the two groups of feature vectors by comparing their statistical distribution characteristics in high-dimensional space. The reason for introducing the second loss value is that customer behavior has time evolution characteristics, and the data distribution in different periods may be offset. The model trained purely relying on the first loss value often has decreased prediction accuracy when facing new data with changed distribution. By minimizing the second loss value, the prediction model is forced to learn invariant feature representation that can span different time periods, thereby improving the prediction stability on new period data.
[0109] In operation S360, adjusting the initial prediction model refers to updating the network parameters of the initial prediction model by an optimization algorithm such as gradient descent, which can be understood in the embodiment of the application as a multi-objective learning process of optimizing prediction accuracy and cross-domain generalization ability. The first loss value and the second loss value are combined by weighting to form a total loss function, wherein the first loss value ensures the prediction accuracy of the model on known label data, and the second loss value ensures the feature consistency of the model on data in different periods. The trained prediction model refers to a deep neural network model whose parameters converge after sufficient training, which can be understood in the embodiment of the application as an end-to-end learning model that has both accurate prediction ability and good generalization performance, and can effectively process time-evolving customer data and output reliable churn prediction results.
[0110] By using the embodiment of the application, the prediction model not only learns the basic task of customer churn prediction in the training process, but also adapts to the distribution changes of customer behavior in different periods through the domain adaptation mechanism. The optimization of the first loss value ensures the prediction accuracy of the model on historical data, establishing the basic ability of customer churn prediction, while the optimization of the second loss value reduces the feature distribution difference between data in different periods, improving the adaptability of the model to time-evolving data. The joint optimization strategy of the above-mentioned double loss function makes the trained prediction model not only master the general rules of customer churn, but also effectively cope with the dynamic changes of customer behavior patterns, thereby maintaining stable prediction performance in actual business applications, effectively solving the problem of decreased prediction accuracy of the prediction model in related technologies when facing new period data.
[0111] Figure 4 A training architecture diagram of a prediction model training is schematically shown according to an embodiment of the application.
[0112] As Figure 4As shown, based on the above embodiments, as an optional embodiment, the prediction model comprises a feature extraction module, the feature extraction module comprises a long short-term memory network layer and a random dropout layer; the operation S320 can further comprise the following operations:
[0113] In operation S410, the long short-term memory network layer refers to a recurrent neural network structure that can effectively process time series data, which can be understood in the embodiment of the application as a network layer specially designed to capture long-term dependencies in customer behavior time series, and through its gating mechanism it can selectively remember and forget information at different time steps.
[0114] In operation S420, the long short-term memory network layer is used to extract features from the second training sample to obtain a second intermediate feature representation; and the random dropout layer is used to regularize the second intermediate feature representation to obtain a second feature vector.
[0115] In operation S410, the long short-term memory network layer refers to a recurrent neural network structure that can effectively process time series data, which can be understood in the embodiment of the application as a network layer specially designed to capture long-term dependencies in customer behavior time series, and through its gating mechanism it can selectively remember and forget information at different time steps.
[0116] The first intermediate feature representation refers to the original feature vector obtained after the long short-term memory network layer processes the first training sample, which can be understood in the embodiment of the application as a high-dimensional vector representation that encodes the time series information of the first training sample, containing abstract feature information of customer historical behavior patterns. In a multi-layer architecture, after the first intermediate feature representation is processed by the first layer of long short-term memory network layer and random dropout layer, it will be used as the input of the second layer of long short-term memory network layer, and through layer-by-layer feature extraction and regularization processing, a more refined and abstract feature representation will be obtained. However, the first intermediate feature representation may have the risk of overfitting, especially when the training data is limited or the model complexity is high, the model may overfit the noise information in the training data, resulting in a decline in generalization performance on new data. To solve this problem, regularization processing is needed through the random dropout layer. The random dropout layer refers to a regularization technique that randomly sets the output of some neurons to zero during training, which can be understood in the embodiment of the application as an effective means to prevent model overfitting, and the generalization ability of the model is improved by introducing randomness. The random dropout layer randomly selects some neurons to be deactivated according to a pre-set deactivation probability during training, and this randomness forces the network not to rely too much on specific neuron combinations, so as to learn more robust feature representations. Through the regularization processing of the random dropout layer, the first feature vector is obtained, which has better generalization performance and lower overfitting risk than the first intermediate feature representation.
[0117] It should be noted that the combination of the long short-term memory network layer and the random dropout layer in the feature extraction module can be one or more, such as Figure 4 The architecture shown contains two combinations of long short-term memory network layers and random dropout layers. The reason for using multiple layers of long short-term memory network layers and random dropout layer combinations is that deep network structures can learn more complex and abstract feature representations. The first layer of long short-term memory network layer is mainly responsible for capturing the basic timing patterns and short-term dependencies in the customer behavior sequence, and the second layer of long short-term memory network layer further extracts higher-level abstract features and long-term dependencies based on the output of the first layer. Each long short-term memory network layer is configured with a corresponding random dropout layer. This design ensures that while the network depth increases, the feature representation of each layer is properly regularized, effectively preventing the overfitting problem that deep networks are prone to. The advantage of the multi-layer architecture is that it can progressively learn different abstract levels of customer behavior features from the bottom layer of raw timing patterns to the high-level complex behavior patterns, thereby obtaining more rich and effective feature representations.
[0118] In operation S420, the operation remains consistent with operation S410 in terms of technical implementation, and also uses a combination of multiple layers of long short-term memory network layers and random dropout layers, but the object of processing is the second training sample.
[0119] By using the embodiments of the present application, the prediction model can better handle the complex time series data characteristics in the customer churn prediction task. The introduction of multiple layers of long short-term memory network layers enables the model to learn time series features at different abstract levels, from basic timing patterns to complex customer behavior patterns, and the accompanying random dropout layer effectively prevents overfitting of deep networks, improving the generalization ability of feature representation. The parameter sharing mechanism ensures that the feature vectors of data at different times are comparable. The design of the above multi-layer feature extraction architecture significantly improves the processing capability of the prediction model for complex time series data and the adaptability to time evolution data.
[0120] On the basis of the above embodiments, as an optional embodiment, the first training sample and the second training sample share model parameters in the feature extraction module, and the first feature vector and the second feature vector have the same feature dimension.
[0121] The shared model parameters refer to that the first training sample and the second training sample use completely same network weights and bias parameters when performing feature extraction through the feature extraction module, which can be understood as that the training samples of two different periods are subjected to the same network transformation function in the feature extraction process in the embodiments of the present application, ensuring the consistency and comparability of feature extraction. The reason for using the shared model parameter mechanism is that the customer churn prediction task needs to compare and analyze the customer behavior data of different periods. If the first training sample and the second training sample use different feature extraction parameters, the feature vectors extracted will lack comparability, and the distribution difference between the data of different periods cannot be accurately measured. Through the parameter sharing mechanism, the prediction model can use a unified feature representation space to encode the customer behavior patterns of different periods.
[0122] Specifically, when the first training sample is input into the feature extraction module, the long short-term memory network layer and the random inactivation layer in the feature extraction module use the current network parameter θ to transform the input data to obtain a first intermediate feature representation, and obtain a first feature vector after regularization processing of the random inactivation layer; when the second training sample is input into the feature extraction module, the module uses the same network parameter θ to perform feature transformation to obtain a second intermediate feature representation, and also obtains a second feature vector after processing of the random inactivation layer. In the training process, the parameter θ of the feature extraction module is updated according to the overall loss function containing the first loss value and the second loss value, and the above update simultaneously affects the feature extraction process of the first training sample and the second training sample, so that the model can learn a general feature representation applicable to both the historical period and the current period. The implementation of the parameter sharing mechanism usually uses the same network instance to process different input data in the model training framework, or mixes the first training sample and the second training sample into the same feature extraction network for parallel processing in the batch processing process.
[0123] Further, since the first training sample and the second training sample are subjected to feature extraction through the same network architecture and parameters, the output feature vectors have the same dimension size. Specifically, if the output dimension of the last layer of the feature extraction module is set to d dimensions, both the first feature vector and the second feature vector will be d-dimensional vector representations. Because the maximum mean discrepancy method needs to compare the statistical distribution characteristics of two groups of feature vectors with the same dimension in a high-dimensional space. If the dimensions of the first feature vector and the second feature vector are different, effective distribution difference calculation cannot be performed, and the goal of domain adaptation cannot be achieved.
[0124] In calculating the second loss value, statistical analysis needs to be performed on the first feature vector and the second feature vector, including calculating statistical quantities such as mean and variance, and distance measurement between vectors. Only when the two feature vectors have the same dimension, these mathematical operations have clear physical meaning and calculation feasibility. In addition, the same feature dimension also provides a unified input format for the subsequent prediction module, whether it is processing the first feature vector from the first training sample or the second feature vector from the second training sample, the prediction module can be processed in the same way.
[0125] By adopting the embodiments of the present application, the prediction model establishes a unified feature representation space through the parameter sharing mechanism and the design of the same feature dimension, so that the customer behavior data of different periods can be effectively compared and analyzed in the same feature space. The parameter sharing mechanism ensures the consistency of feature extraction, and avoids the feature representation deviation caused by using different parameters.
[0126] As shown in Figure 4 On the basis of the above embodiments, as an optional embodiment, the prediction model includes a prediction module, a parallel deep convolutional neural network path and an attention long short-term memory network path; operation S330 can further include the following operations:
[0127] Operation S510, convolve the first feature vector through the deep convolutional neural network path to obtain a first sample path result;
[0128] Operation S520, perform attention mechanism processing on the first feature vector through the attention long short-term memory network path to obtain a second sample path result;
[0129] Operation S530, combine the first sample path result and the second sample path result to obtain a sample prediction result.
[0130] In operation S510, the deep convolutional neural network path refers to a deep learning network structure composed of multiple convolutional layers, activation layers and pooling layers, which can be understood in the embodiments of the present application as a network branch specially designed for extracting local patterns and spatial relationships in the feature vector, and through its multi-level feature abstraction ability to recognize complex patterns in customer behavior data.
[0131] Specifically, when the first feature vector is input to the deep convolutional neural network path, it is first processed by the first layer of convolutional layers, which use multiple different convolutional kernels to perform convolution operations on the input feature vector, each convolutional kernel being responsible for detecting a specific local feature pattern, such as a sudden change in customer transaction frequency, periodic fluctuations in account balance, and other combinations of behavioral features. The results of the convolution operation are processed by a nonlinear activation function and then down-sampled by a pooling layer, which reduces computational complexity while preserving the most important feature information. Subsequently, the processing results continue to be input to deeper convolutional layers, which can further identify more complex and abstract feature patterns based on the basic features extracted by the previous layer, such as long-term trend changes in customer behavior, interaction relationships between multiple dimensions, and other high-level semantic features.
[0132] In operation S520, the attention long short-term memory network path refers to a neural network structure that integrates an attention mechanism on the basis of a traditional long short-term memory network, which in the embodiments of the present application can be understood as a network branch that can adaptively focus on the importance of different time steps or different feature dimensions in the feature vector, highlighting the feature information most relevant to customer churn through its selective attention ability.
[0133] Specifically, when the first feature vector is input to the attention long short-term memory network path, it is first processed by a long short-term memory network layer to model the time sequence of the feature vector and capture the time-dependent relationships and dynamic change patterns in the customer behavior sequence. On this basis, the attention mechanism determines the attention weight of each time step or feature dimension by calculating the similarity between the query vector, key vector, and value vector, where the query vector typically represents the target information to be predicted, and the key vector and value vector represent the index information and actual feature values of each position in the feature vector, respectively. The calculation process of the attention weight is essentially a soft selection process, in which the network automatically learns which time node of customer behavior change and which feature dimension of numerical fluctuation have a greater influence on the final churn prediction result. By weighting and combining the calculated attention weight with the corresponding feature value, the attention long short-term memory network path can generate a feature representation that highlights important information and suppresses noise interference, and finally outputs the second sample path result.
[0134] In operation S530, combining the first sample path result and the second sample path result refers to the fusion processing of the output results from the deep convolutional neural network path and the attention long short-term memory network path, which in the embodiments of the present application can be understood as merging the two different types of feature representations into a unified prediction input through a specific fusion strategy, thereby fully utilizing the respective advantages of the two network paths.
[0135] Specifically, the first sample path result and the second sample path result are spliced in the feature dimension to form an extended feature vector containing two types of feature information. Before splicing, dimension alignment and numerical normalization processing are usually required for the two path results to ensure that the feature values output by different paths have similar numerical ranges and statistical distribution characteristics, avoiding the phenomenon that the result of a certain path is dominant or ignored in the fusion process due to excessively large or small values. The result of the combination operation is usually input into one or more fully connected layers for further nonlinear transformation and feature integration, and finally the sample prediction result is output, which is a numerical output representing the customer churn probability, comprehensively reflecting the prediction information from the two aspects of convolution feature extraction and attention time series modeling.
[0136] By adopting the embodiments of the present application, the prediction model fully utilizes the advantages of different network structures through the parallel double-path architecture. The deep convolutional neural network path effectively extracts the local pattern and spatial structure information in the feature vector, and the attention long short-term memory network path accurately captures the time series dynamic characteristics and the importance weight of key features. The organic combination of the two makes the prediction model able to comprehensively analyze customer behavior characteristics from multiple angles, improving the recognition accuracy and prediction stability of customer churn risk.
[0137] On the basis of the above-mentioned embodiments, as an optional implementation manner, operation S350 can further be the following operation:
[0138] Calculate the distribution difference between the first feature vector and the second feature vector to obtain a second loss value.
[0139] Specifically, in the embodiments of the present application, the maximum mean difference method is used to measure the distribution shift degree of customer behavior data in different periods in the feature representation space after feature extraction, which is used to guide the prediction model to learn the invariant feature representation across periods.
[0140] Specifically, the calculation of the distribution difference adopts the maximum mean difference method, which quantifies the distribution difference between two groups of feature vectors by comparing the mean distance in the reproducing kernel Hilbert space. The core idea of the maximum mean difference method is to map the feature vectors in the original feature space to a high-dimensional reproducing kernel Hilbert space through a kernel function, and then calculate the mean difference of the two groups of data in this high-dimensional space. Since the reproducing kernel Hilbert space has rich expression ability, even if the distribution difference of the data is not obvious in the original space, it can also exhibit clear difference characteristics in the high-dimensional space.
[0141] Further, the specific calculation of the maximum mean discrepancy includes the summation operation of three main parts, the first part is the kernel function calculation within the first feature vector set, that is, the kernel function value between any two feature vectors in the set is calculated and averaged, which reflects the internal structure characteristics of the first feature vector set in the kernel space. The second part is the kernel function calculation within the second feature vector set, which obtains the internal structure characteristics of the second feature vector set in the same way. The third part is the cross-kernel function calculation between the first feature vector set and the second feature vector set, which measures the similarity between the two sets by calculating the kernel function value of the feature vectors between them. The maximum mean discrepancy value is calculated by the sum of the first part and the second part minus twice the third part. When the distribution of the two groups of feature vectors is more similar, the maximum mean discrepancy value is smaller, and vice versa.
[0142] The calculated maximum mean discrepancy value is directly used as the second loss value and integrated into the overall loss function of the prediction model, which guides the optimization process of the model parameters together with the first loss value. In the backpropagation process, the gradient of the second loss value will propagate to each level of the feature extraction module, prompting the network parameters to adjust in the direction of reducing the distribution difference between the first feature vector and the second feature vector. The above optimization process is essentially a feature alignment learning process, and the model is forced to learn a feature transformation function that can eliminate the distribution difference of data in different periods, so that the first feature vector and the second feature vector after feature extraction tend to be consistent in statistical distribution. As the training proceeds, the second loss value will gradually decrease, indicating that the feature representation learned by the model is more and more capable of crossing the distribution changes of data in different periods, thereby having stronger time generalization ability.
[0143] By using the embodiments of the present application, the prediction model realizes accurate quantification and effective control of the distribution difference of customer behavior data in different periods through the maximum mean discrepancy method, and the introduction of the second loss value enables the model to learn the customer churn prediction task while actively adapting to the time evolution characteristics of the data distribution.
[0144] On the basis of the above-mentioned embodiments, as an optional embodiment, the operation S210 can further include the following operations:
[0145] Operation S610, performing feature extraction on the prediction module through the feature extraction module to obtain target features;
[0146] Operation S620, predicting the target features through the prediction module to obtain target information.
[0147] On the basis of the above-mentioned embodiments, as an optional embodiment, operation S620 can further include the following operations:
[0148] The target feature is processed by a deep convolutional neural network path to obtain a first path result, in operation S710.
[0149] The target feature is processed by an attention long short-term memory network path to obtain a second path result, in operation S720.
[0150] The first path result and the second path result are combined to obtain target information, in operation S730.
[0151] As an optional embodiment, the second loss value represents a distribution difference between the first feature vector and the second feature vector.
[0152] It should be noted that the embodiments of operation S610 and operation S620 are the application process of the prediction model, and the implementation principle is basically the same as the training process of the prediction model, which will not be described in detail here.
[0153] The network architecture used by the feature extraction module in operation S610 in the application stage is completely consistent with that in the training stage, including the same number of long short-term memory network layers and random inactivation layer combinations, but the inactivation probability of the random inactivation layer is usually set to 0 at this time, that is, no random inactivation operation is performed, to ensure the stability and consistency of the prediction result.
[0154] The target data uses the fixed network parameters after training when passing through the feature extraction module. These parameters have learned the feature transformation function that can accurately predict customer churn and adapt to different period data distribution through the joint optimization of the first loss value and the second loss value.
[0155] The prediction module in operation S620 also maintains the same parallel architecture as in the training stage. The deep convolutional neural network path and the attention long short-term memory network path both use the trained parameters to process the target feature. The specific implementation of operation S710 and operation S730 is completely consistent with operation S510~operation S530 in the training stage in terms of technical principle and calculation process. The difference is only that the application stage processes target data to be predicted rather than sample data used for training, and the entire inference process does not involve gradient calculation and parameter update operations. The second loss value is no longer involved in the calculation in the application stage, but its distribution alignment role in the training stage has been fixed in the model parameters, enabling the prediction model to handle time-evolving data. Even if there is a certain distribution difference between the target data and the training data, the model can still output stable and reliable target information.
[0156] Based on the above information generation method, the application also provides an information generation device. The following will be combined Figure 5 The device will be described in detail.
[0157] Figure 5 Fig. 1 schematically shows a structural block diagram of an information generation apparatus according to an embodiment of the present application.
[0158] As shown in Fig. 1, the information generation apparatus 500 of this embodiment includes a data acquisition module 510 and an information generation module 520. Figure 5 The acquisition module 510 is configured to acquire target data of a target service.
[0159] The determination module 520 is configured to input the target data into a prediction model, and obtain target information output by the prediction model, the target information representing stability of a potential resource quantity of the target service.
[0160] The prediction model is trained based on training samples of the target service, the training samples including first training samples and second training samples; the first training samples are generated earlier than the second training samples; the first training samples are used to determine a first loss value with a sample label; a first feature vector of the first training samples is used to determine a second loss value with a second feature vector of the second training samples; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model.
[0161] According to an embodiment of the present application, the determination module 520 is further configured to perform feature extraction on the prediction module by a feature extraction module to obtain target features; and perform prediction on the target features by the prediction module to obtain the target information.
[0162] According to an embodiment of the present application, the determination module 520 is further configured to perform convolution processing on the target features by a deep convolutional neural network path to obtain a first path result; perform attention mechanism processing on the target features by an attention long short-term memory network path to obtain a second path result; and combine the first path result and the second path result to obtain the target information.
[0163] Based on the above prediction model training method, the present application further provides a model training apparatus. The apparatus will be described in detail below.
[0164] Figure 6 Fig. 1 schematically shows a structural block diagram of an information generation apparatus according to an embodiment of the present application.
[0165] Figure 6 As shown in Fig. 1, the information generation apparatus 500 of this embodiment includes a data acquisition module 510 and an information generation module 520.
[0166] As shown in Fig. 1, the information generation apparatus 500 of this embodiment includes a data acquisition module 510 and an information generation module 520. Figure 6 As shown in Fig. 1, the information generation apparatus 500 of this embodiment includes a data acquisition module 510 and an information generation module 520.
[0167] The sample obtaining module 610 is configured to obtain training samples, the training samples including first training samples and second training samples, the first training samples being earlier in generation time than the second training samples, and the training samples representing service data of target services.
[0168] The feature extraction module 620 is configured to extract, by an initial prediction model, a first feature vector of the first training samples and a second feature vector of the second training samples respectively.
[0169] The sample prediction module 630 is configured to output, by the initial prediction model, a sample prediction result based on the first feature vector.
[0170] The first loss determination module 640 is configured to determine a first loss value based on the sample prediction result and a sample label.
[0171] The second loss determination module 650 is configured to determine a second loss value based on the first feature vector and the second feature vector.
[0172] The model training module 660 is configured to adjust the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
[0173] According to an embodiment of the present application, the feature extraction module 620 is further configured to extract, by a long short-term memory network layer, a first intermediate feature representation from the first training samples, and to obtain the first feature vector by performing regularization processing on the first intermediate feature representation by a random dropout layer; and to extract, by the long short-term memory network layer, a second intermediate feature representation from the second training samples, and to obtain the second feature vector by performing regularization processing on the second intermediate feature representation by the random dropout layer.
[0174] According to an embodiment of the present application, the sample prediction module 630 is configured to perform convolution processing on the first feature vector by a deep convolutional neural network path to obtain a first sample path result, to perform attention mechanism processing on the first feature vector by an attention long short-term memory network path to obtain a second sample path result, and to combine the first sample path result and the second sample path result to obtain the sample prediction result.
[0175] According to an embodiment of the present application, the second loss determination module 650 is further configured to calculate a distribution difference between the first feature vector and the second feature vector to obtain the second loss value.
[0176] According to embodiments of the present application, any one or more of the data acquisition module 510 and the information generation module 520, or the sample acquisition module 610, the feature extraction module 620, the sample prediction module 630, the first loss determination module 640, the second loss determination module 650, and the model training module 660 can be combined in one module, or any one of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to embodiments of the present application, at least one of the data acquisition module 510 and the information generation module 520, or the sample acquisition module 610, the feature extraction module 620, the sample prediction module 630, the first loss determination module 640, the second loss determination module 650, and the model training module 660 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. hardware or firmware, or any one of the three implementation ways of software, hardware and firmware or any appropriate combination of any of them. Alternatively, at least one of the data acquisition module 510 and the information generation module 520, or the sample acquisition module 610, the feature extraction module 620, the sample prediction module 630, the first loss determination module 640, the second loss determination module 650, and the model training module 660 can be at least partially implemented as a computer program module which can perform corresponding functions when it is run.
[0177] Figure 7 A block diagram of an electronic device suitable for implementing the information generation method according to embodiments of the present application is schematically shown.
[0178] As Figure 7 shown, the electronic device 700 according to embodiments of the present application includes a processor 701 which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 702 or loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (e.g., an application specific integrated circuit (ASIC)), etc. The processor 701 can also include an on-board memory for cache use. The processor 701 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present application.
[0179] In the RAM 703, various programs and data required for the operation of the electronic device 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via the bus 704. The processor 701 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 702 and / or the RAM 703. It should be noted that the programs can also be stored in one or more memories other than the ROM 702 and the RAM 703. The processor 701 can also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.
[0180] According to the embodiments of the present application, the electronic device 700 can further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 can further include one or more of the following components connected to the input / output (I / O) interface 705: an input part 706 including a keyboard, a mouse, and the like; an output part 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the like, and a speaker, and the like; a storage part 708 including a hard disk, and the like; and a communication part 709 including a network interface card such as a LAN card, a modem, and the like. The communication part 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as necessary. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is mounted on the drive 710 as necessary, so that a computer program read therefrom is installed in the storage part 708 as necessary.
[0181] The present application also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, when the one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0182] According to an embodiment of the present application, the computer readable storage medium can be a non-transitory computer readable storage medium, for example, can include but not limited to: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this application, a computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer readable storage medium can include the ROM 702 and / or the RAM 703 described above and / or one or more memory other than the ROM 702 and the RAM 703.
[0183] Embodiments of the present application also include a computer program product, which includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the information generation method provided by the embodiments of the present application.
[0184] The above functions defined in the system / device / apparatus of the embodiments of the present application are performed when the computer program is executed by the processor 701. According to an embodiment of the present application, the system, device, module, unit, etc. described above can be implemented by computer program modules.
[0185] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of signals on a network medium, and be downloaded and installed through the communication part 707, and / or installed from the detachable medium 711. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
[0186] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 707, and / or installed from the detachable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiments of the present application are performed. According to an embodiment of the present application, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0187] According to embodiments of the present application, program code for implementing the computer programs provided by embodiments of the present application can be written in any combination of one or more programming languages, and can be implemented in a high-level procedural and / or object-oriented programming language, and / or in assembly / machine language. Programming languages include, but are not limited to, Java, C++, python, "C", or the like. Program code can execute entirely on a user's computing device, partly on the user's device, as a stand-alone software package, partly on a remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0188] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0189] Those skilled in the art will appreciate that features recited in the various embodiments of the present application can be combined and / or integrated in various combinations, even if such combinations have not been explicitly recited in the present application. In particular, the features recited in the various embodiments of the present application can be combined and / or integrated in various combinations, without departing from the spirit and teachings of the present application. All such combinations are within the scope of the present application.
Claims
1. An information generation method characterized by comprising: The method comprises: obtaining target data of a target business; inputting the target data into a prediction model to obtain target information output by the prediction model, the target information representing stability of a potential resource quantity of the target business; wherein the prediction model is trained based on training samples of the target business, the training samples comprising first training samples and second training samples; the first training samples are generated earlier than the second training samples; the first training samples are used to determine a first loss value with sample labels; a first feature vector of the first training samples is used to determine a second loss value with a second feature vector of the second training samples; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model.
2. The method of claim 1, wherein, The prediction model comprises a feature extraction module and a prediction module, and the inputting of the target data into the prediction model to obtain the target information output by the prediction model comprises: extracting target features from the prediction module through the feature extraction module; predicting the target features through the prediction module to obtain the target information.
3. The method of claim 2, wherein, The prediction module comprises a deep convolutional neural network path and an attention long short-term memory network path in parallel; and the predicting of the target features through the prediction module to obtain the target information comprises: performing convolution processing on the target features through the deep convolutional neural network path to obtain a first path result; performing attention mechanism processing on the target features through the attention long short-term memory network path to obtain a second path result; combining the first path result and the second path result to obtain the target information.
4. The method of claim 3, wherein the second loss value represents a distribution difference between the first feature vector and the second feature vector.
5. A method for training a predictive model, the method comprising: The method comprises: obtaining training samples, the training samples comprising first training samples and second training samples, the first training samples being generated earlier than the second training samples, the training samples representing business data of a target business; extracting a first feature vector of the first training samples and a second feature vector of the second training samples through an initial prediction model; outputting a sample prediction result based on the first feature vector through the initial prediction model; determining a first loss value based on the sample prediction result and a sample label; determining a second loss value based on the first feature vector and the second feature vector; adjusting the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
6. The method of claim 1, wherein, The prediction model comprises a feature extraction module, the feature extraction module comprising a long short-term memory network layer and a random inactivation layer; and the extracting of the first feature vector of the first training samples and the second feature vector of the second training samples through the initial prediction model comprises: extracting a first intermediate feature representation from the first training samples through the long short-term memory network layer; and performing regularization processing on the first intermediate feature representation through the random inactivation layer to obtain the first feature vector; The second training sample is subjected to feature extraction by the long short-term memory network layer to obtain a second intermediate feature representation; and the second intermediate feature representation is subjected to regularization processing by the random dropout layer to obtain a second feature vector.
7. The method of claim 6, wherein, The first training sample and the second training sample share model parameters in the feature extraction module, and the first feature vector and the second feature vector have the same feature dimension.
8. The method of claim 5, wherein, The prediction model includes a prediction module, a deep convolutional neural network path, and an attention long short-term memory network path in parallel; and the outputting of a sample prediction result based on the first feature vector by the initial prediction model includes: The first feature vector is subjected to convolution processing by the deep convolutional neural network path to obtain a first sample path result; The first feature vector is subjected to attention mechanism processing by the attention long short-term memory network path to obtain a second sample path result; The first sample path result and the second sample path result are combined to obtain the sample prediction result.
9. The method of claim 5, wherein, The determining of a second loss value based on the first feature vector and the second feature vector includes: The distribution difference between the first feature vector and the second feature vector is calculated to obtain the second loss value.
10. An information generation apparatus characterized by comprising: It includes: A data acquisition module is configured to acquire target data of a target service; An information generation module is configured to input the target data into a prediction model to obtain target information output by the prediction model, the target information representing the stability of the potential resource quantity of the target service; The prediction model is trained based on training samples of the target service, the training samples including a first training sample and a second training sample; the first training sample is generated earlier than the second training sample; the first training sample is used to determine a first loss value with a sample label; a first feature vector of the first training sample is used to determine a second loss value with a second feature vector of the second training sample; and the first loss value and the second loss value are used to adjust parameters of an initial prediction model to obtain the prediction model. 11.A prediction model training apparatus, characterized by comprising: It includes: A sample acquisition module is configured to acquire training samples, the training samples including a first training sample and a second training sample, the first training sample being generated earlier than the second training sample, and the training samples representing service data of a target service; A feature extraction module is configured to extract a first feature vector of the first training sample and a second feature vector of the second training sample by an initial prediction model; A sample prediction module is configured to output a sample prediction result based on the first feature vector by the initial prediction model; A first loss determination module is configured to determine a first loss value based on the sample prediction result and a sample label; A second loss determination module is configured to determine a second loss value based on the first feature vector and the second feature vector; A model training module is configured to adjust the initial prediction model based on the first loss value and the second loss value to obtain a trained prediction model.
12. An electronic device, comprising: one or more processors; a memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-9.
13. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, the computer program or instructions, when executed by a processor, implement the steps of the method according to any one of claims 1-9.