CN117972380A - Method and device for generating model input vector, storage medium and electronic equipment - Google Patents

Method and device for generating model input vector, storage medium and electronic equipment Download PDF

Info

Publication number
CN117972380A
CN117972380A CN202410125000.8A CN202410125000A CN117972380A CN 117972380 A CN117972380 A CN 117972380A CN 202410125000 A CN202410125000 A CN 202410125000A CN 117972380 A CN117972380 A CN 117972380A
Authority
CN
China
Prior art keywords
vector
vectors
target
transaction
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410125000.8A
Other languages
Chinese (zh)
Inventor
文弘扬
贾小茹
王一喆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202410125000.8A priority Critical patent/CN117972380A/en
Publication of CN117972380A publication Critical patent/CN117972380A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a method, a device, a storage medium and electronic equipment for generating a model input vector, and relates to the fields of big data, financial science and technology and other related technical fields, wherein the method comprises the following steps: obtaining M first vectors corresponding to a target user, wherein each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period, sorting the M first vectors according to the starting time of the preset period corresponding to each first vector to obtain a target sequence, generating a model input vector of a neural network model according to the target sequence, and predicting the amount of financial products purchased by the target user in a future time period based on the model input vector through prior knowledge learned in a model training process by the neural network model. The application solves the technical problem of low operation efficiency of the neural network model caused by more input data of the neural network model in the prior art.

Description

Method and device for generating model input vector, storage medium and electronic equipment
Technical Field
The application relates to the field of big data, the field of financial science and technology and other related technical fields, in particular to a method and a device for generating a model input vector, a storage medium and electronic equipment.
Background
In the field of big data, a technician generally inputs a plurality of data (e.g., financial data with a time sequence relationship) with the same service characteristics corresponding to a user into a neural network model for analysis, so as to predict a certain behavior characteristic of the user in a future time period, however, the data with the same service characteristics corresponding to a plurality of users often have higher information redundancy, so in the prior art, the technician directly inputs a plurality of data with the same service characteristics into the neural network model, and under the condition that the quantity of the input data of the neural network model is too large, the calculated data volume of the neural network model is increased, thereby causing the problem of overtime or operation interruption of the neural network model, and further causing the technical problem of low operation efficiency of the neural network model.
In view of the above technical problems, no effective solution has been proposed at present.
Disclosure of Invention
The application provides a method, a device, a storage medium and electronic equipment for generating a model input vector, which at least solve the technical problem of low operation efficiency of a neural network model caused by more input data of the neural network model in the prior art.
According to an aspect of the present application, there is provided a method of generating a model input vector, including: obtaining M first vectors corresponding to a target user, wherein M is an integer greater than 1, and each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period; sequencing the M first vectors according to the starting time of a preset period corresponding to each first vector to obtain a target sequence; generating a model input vector of a neural network model according to the target sequence, wherein the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the purchase amount of a target user for a financial product in a future time period based on the model input vector through priori knowledge learned in a model training process.
Optionally, the generating method of the model input vector further includes: obtaining L transaction data corresponding to a target user, wherein L is an integer greater than 1, and each transaction data in the L transaction data at least comprises payment amount and payment time corresponding to the purchase of a financial product by the target user; dividing L transaction data according to the payment time corresponding to each transaction data to obtain M+1 transaction sets, wherein each transaction set in the M+1 transaction sets comprises at least two transaction data in the L transaction data, and the difference of the payment time between any two transaction data in each transaction set is smaller than or equal to a preset period; m first vectors are determined from the M+1 transaction sets.
Optionally, the generating method of the model input vector further includes: generating M+1 transaction vectors based on the M+1 transaction sets, wherein each transaction vector of the M+1 transaction vectors corresponds to one transaction set of the M+1 transaction sets, and each transaction vector is used for representing the sum of payment amounts corresponding to all transaction data included in the transaction set corresponding to the transaction vector; determining a target transaction vector in M+1 transaction vectors according to the starting time of a preset period corresponding to each transaction vector, wherein the target transaction vector is the transaction vector with the latest starting time of the preset period in the M+1 transaction vectors; m transaction vectors other than the target transaction vector among the M+1 transaction vectors are determined as M first vectors.
Optionally, the generating method of the model input vector further includes: determining first target vectors in the M first vectors according to the starting time of the preset period corresponding to each first vector, wherein the first target vectors are the first vectors with the latest starting time of the preset period in the M first vectors; obtaining M storage units corresponding to the M first vectors, wherein the M storage units are in one-to-one correspondence with the M first vectors; storing the first target vector into an ith storage unit in M storage units, wherein i-1 is equal to a target value, and the target value is an integer value obtained by dividing M by 2 and rounding downwards; according to the time interval between the starting time of the preset period corresponding to each first vector in the M first vectors and the starting time of the preset period of the first target vector, and forming M-1 first vectors except the first target vector in the M first vectors into a first sequence; and sequentially filling M-1 first vectors in the first sequence into M-1 storage units except for the ith storage unit in the M storage units according to the principle of filling the first vectors into the storage units nearest to the ith storage unit, wherein the M-1 first vectors in the first vector set are in one-to-one correspondence with the M-1 storage units.
Optionally, the generating method of the model input vector further includes: performing convolution operation on M first vectors corresponding to the target sequence through a convolution submodel to obtain a convolution result, wherein the convolution submodel at least comprises a target convolution kernel, and the dimension of the target convolution kernel is equal to the product of M and a preset threshold; generating a first characteristic vector according to a convolution result through a pooling sub-model connected with the convolution sub-model, wherein the first characteristic vector is used for representing the average amount of financial products purchased by a target user in a preset period; and determining a model input vector corresponding to the future time period according to the corresponding relation between the first characteristic vector and the preset period through an output sub-model connected with the convolution sub-model, wherein the output sub-model is connected with the neural network model, and the output sub-model is also used for inputting the model input vector into the neural network model.
Optionally, the generating method of the model input vector further includes: determining Y second vectors corresponding to each user in the X users according to transaction information corresponding to the user, wherein Y is an integer greater than 1, and the second vectors corresponding to each user are used for representing the total amount of financial products purchased by the user in a preset period; determining a second target vector in Y second vectors corresponding to each user in the X users, wherein the second target vector corresponding to each user is the second vector with the latest starting moment of a preset period in the Y second vectors corresponding to the user; taking the second target vector corresponding to each user as a predictive label corresponding to the user; and generating a first model according to the Y-1 second vectors except the second target vector and the predictive labels corresponding to each user.
Optionally, the generating method of the model input vector further includes: and inputting the model input vector, the target transaction vector and the types of the financial products into the neural network model to obtain a user portrait corresponding to the target user output by the neural network model, wherein the user portrait is used for representing an order interval corresponding to the purchase amount of each financial product by the target user in a future time period.
According to another aspect of the present application, there is also provided a generating apparatus of a model input vector, including: the acquisition unit is used for acquiring M first vectors corresponding to the target user, wherein M is an integer greater than 1, and each first vector in the M first vectors is used for representing the total amount of the financial product purchased by the target user in a preset period; the sequencing unit is used for sequencing the M first vectors according to the starting time of the preset period corresponding to each first vector to obtain a target sequence; the first generation unit is used for generating a model input vector of the neural network model according to the target sequence, wherein the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the purchase amount of the target user for the financial product in a future time period based on the model input vector through prior knowledge learned in the model training process.
According to another aspect of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer-readable storage medium is controlled to execute the method for generating the model input vector of any one of the above items by a device in which the computer-readable storage medium is located when the computer program is run.
According to another aspect of the present application, there is also provided an electronic device, wherein the electronic device includes one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for generating a model input vector of any of the above.
In the method, M first vectors corresponding to a target user are firstly obtained, wherein M is an integer larger than 1, each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period, then the M first vectors are sequenced according to the starting time of the preset period corresponding to each first vector to obtain a target sequence, then a model input vector of a neural network model is generated according to the target sequence, the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the amount of financial products purchased by the target user in a future time period based on the model input vector through priori knowledge learned in a model training process.
As can be seen from the above, after obtaining the M first vectors corresponding to the target user, the method does not directly input the M first vectors into the neural network model, but orders the M first vectors according to the start time of the preset period corresponding to each first vector to obtain the target sequence, and then determines a one-dimensional model input vector according to the target sequence, thereby achieving the purpose of reducing the dimension of the original M-dimensional input data (i.e., the M first vectors).
Therefore, the technical scheme of the application realizes the purpose of reducing the quantity of the input data of the neural network model by reducing the dimension of M first vectors into one model input vector, thereby realizing the technical effect of improving the operation efficiency of the neural network model and further solving the technical problem of low operation efficiency of the neural network model caused by more quantity of the input data of the neural network model in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flow chart of an alternative method of generating model input vectors in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of an alternative target sequence generation method according to an embodiment of the application;
FIG. 3 is a flow chart of an alternative method of generating model input vectors from a target sequence in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of an alternative model input vector generation apparatus in accordance with an embodiment of the present application;
Fig. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be further noted that, the related information (including the transaction information corresponding to the user) and the data (including, but not limited to, the data for presentation and the analyzed data) related to the present application are both information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
According to an embodiment of the present application, there is provided a method embodiment of generating a model input vector, it being noted that the steps shown in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is shown in the flowchart, in some cases the steps shown or described may be performed in an order different from that herein.
The application provides a generating method system (generating system for short) for generating a model input vector, which is used for executing the generating method of the model input vector in the application, and fig. 1 is a flowchart of an alternative generating method of the model input vector according to an embodiment of the application, as shown in fig. 1, the method comprises the following steps:
Step S101, M first vectors corresponding to a target user are obtained.
In step S101, M is an integer greater than 1, and each of the M first vectors is used to characterize a total amount of money for the target user to purchase the financial product in a preset period.
Optionally, the first vector may also be used to characterize a time point class feature of other types of target users, where the time point class feature is used to characterize a user feature that has a correlation with time. In the field of financial science and technology, a credit class business model generally has high requirements on the extraction of time point class features, for example, the time point class features extracted in a non-recent minimum time unit cannot be used as input data of the credit class business model.
For example, the current 3 time point class features are respectively extracted in 1 month and 1 day, 1 month and 2 days and 1 month and 3 days, and the current date is 1 month and 4 days, so that the technical scheme of the prior art is adopted, and the timeliness of the time point class features extracted in 1 month and 1 day and 1 month and 2 days is weak, so that a technician can only take the time point class features extracted in 1 month and 3 days as the input data of credit class business, thereby causing the problem that the time point class features extracted in 1 month and 2 days cannot be utilized, and further causing the technical problem that the utilization efficiency of the time point class features is low in the prior art.
In the application, the generating system can convert 3 time point class features extracted from 1 month, 1 day, 1 month, 2 days and 1 month, 3 days into 3 first vectors, then the generating system generates model input vectors corresponding to the 3 first vectors, and the model input vectors corresponding to the 3 first vectors are used as input data of a credit class business model, thereby improving the utilization efficiency of the time point class features and further solving the technical problem of low utilization efficiency of the time point class features in the prior art.
Step S102, the M first vectors are ordered according to the starting time of the preset period corresponding to each first vector, and a target sequence is obtained.
Optionally, compared with the prior art, in which the M first vectors are ordered according to the starting time of the preset period corresponding to each first vector in the order from the morning to the evening (or from the evening to the morning), the generating system arranges the first vector with the latest starting time of the preset period in the M first vectors to an intermediate position in the first sequence, instead of arranging the first vector with the latest starting time of the preset period to the last position (or the first position) of the first sequence, so that when the convolution operation is performed on the M first vectors according to the first sequence, the technical effect of increasing the frequency of participation of the first vector with the latest starting time of the preset period in the convolution kernel calculation is achieved.
Step S103, generating a model input vector of the neural network model according to the target sequence.
In step S103, the model input vector is a vector in one-dimensional form, and the neural network model is used to predict the purchase amount of the target user for the financial product in the future time period based on the model input vector through a priori knowledge learned in the model training process.
Optionally, the generating system reduces the data size of the input data of the neural network model by taking the model input vector in a one-dimensional form as the input data of the neural network model used subsequently, and meanwhile avoids the operation step that the neural network model carries out convolution calculation on M first vectors one by one, so that the running speed of the neural network model is improved.
As can be seen from the above, after obtaining the M first vectors corresponding to the target user, the method does not directly input the M first vectors into the neural network model, but orders the M first vectors according to the start time of the preset period corresponding to each first vector to obtain the target sequence, and then determines a one-dimensional model input vector according to the target sequence, thereby achieving the purpose of reducing the dimension of the original M-dimensional input data (i.e., the M first vectors).
Therefore, the technical scheme of the application realizes the purpose of reducing the quantity of the input data of the neural network model by reducing the dimension of M first vectors into one model input vector, thereby realizing the technical effect of improving the operation efficiency of the neural network model and further solving the technical problem of low operation efficiency of the neural network model caused by more quantity of the input data of the neural network model in the prior art.
In an alternative embodiment, the generating system firstly obtains L transaction data corresponding to the target user, where L is an integer greater than 1, each transaction data in the L transaction data at least includes a payment amount and a payment time corresponding to the target user purchasing the financial product, then the generating system divides the L transaction data according to the payment time corresponding to each transaction data to obtain m+1 transaction sets, where each transaction set in the m+1 transaction sets includes at least two transaction data in the L transaction data, and a difference between the payment times of any two transaction data in each transaction set is less than or equal to a preset period, and finally the generating system determines M first vectors according to the m+1 transaction sets.
Optionally, the generating system performs data cleaning on a plurality of transaction data included in each set, where the data cleaning is used to delete sensitive data (for example, an identification card number and a phone number of a target user) in each transaction data, then the generating system performs word segmentation operation on the plurality of transaction data included in each set to obtain Q keywords corresponding to each transaction data, Q is a positive integer, and then the generating system generates a first vector corresponding to each set according to the Q keywords corresponding to each transaction data in the plurality of transaction data included in each set.
In an alternative embodiment, the generating system first generates m+1 transaction vectors based on m+1 transaction sets, wherein each transaction vector of the m+1 transaction vectors corresponds to one transaction set of the m+1 transaction sets, and each transaction vector is used for representing a sum of payment amounts corresponding to all transaction data included in the transaction set corresponding to the transaction vector, and then the generating system determines a target transaction vector of the m+1 transaction vectors according to a start time of a preset period corresponding to each transaction vector, wherein the target transaction vector is a transaction vector with a latest start time of a preset period of the m+1 transaction vectors, and finally the generating system determines M transaction vectors except for the target transaction vector of the m+1 transaction vectors as M first vectors.
Optionally, after the target transaction vector and the model input vector are acquired, the generating system inputs both the target transaction vector and the model input vector to the neural network model, then the generating system determines a prediction tag of the user portrait of the target user according to the target transaction vector, and finally the generating system generates the user portrait corresponding to the target user based on the prediction tag and the model input vector through the neural network model.
Optionally, the generating system may further perform magnitude conversion on the target transaction vector by means of an incremental duty cycle, where the incremental duty cycle is used to map data from one magnitude to another magnitude in a certain proportion. For example, the generation system converts the incremental data from millions to tens of millions of data according to the proportion of the original data, so as to achieve the purpose of assisting technicians in acquiring the change trend of the data.
In an alternative embodiment, the generating system firstly determines a first target vector in the M first vectors according to the starting time of the preset period corresponding to each first vector, wherein the first target vector is a first vector with the latest starting time of the preset period in the M first vectors, then the generating system acquires M storage units corresponding to the M first vectors, wherein the M storage units are in one-to-one correspondence with the M first vectors, secondly the generating system stores the first target vector in an ith storage unit in the M storage units, wherein i-1 is equal to a target value, the target value is obtained by dividing M by 2 by a downward integer, then the generating system fills M-1 storage units in the M first vectors except for the first target vector into a first sequence according to a time interval between the starting time of the preset period in the M first vectors and the starting time of the preset period in the first target vector, and finally the generating system fills M-1 storage units in the M-first storage units except for the M-1 storage units in the M first sequence in the M first storage units according to a rule of preferentially filling M-1 storage units in the M storage units in the first sequence, wherein M-1 storage units except for the M storage units in the first sequence.
Optionally, the generating system firstly forms M-1 first vectors except for the first target vector in the M first vectors into a first vector set, secondly, the generating system determines a time interval between a starting time of a preset period corresponding to each first vector in the first vector set and a starting time of a preset period of the first target vector, and then the generating system stores each first vector in the first vector set into M-1 storage units except for an i-th storage unit in the M storage units according to the time interval between the starting time of the preset period corresponding to each first vector and the starting time of the preset period of the first target vector, wherein the M-1 first vectors in the first vector set and the M-1 storage units are in one-to-one correspondence, and the number of the storage units spaced between the storage units corresponding to each first vector in the first vector set and the i-th storage unit is in positive correlation with the time interval between the starting time of the preset period corresponding to the first vector and the starting time of the preset period of the first target vector.
For example, fig. 2 is a flowchart of an alternative target sequence generating method according to an embodiment of the present application, assuming that M is equal to 5, V1, V2, V3, V4, and V5 are 5 first vectors, where T1 is a start time of a preset period corresponding to V1, T2 is a start time of a preset period corresponding to V2, T3 is a start time of a preset period corresponding to V3, T4 is a start time of a preset period corresponding to V4, T5 is a start time of a preset period corresponding to V5, and T1> T2> T3> T4> T5.
As shown in fig. 2, the generating system first stores the first target vector V1 of the 5 first vectors to an intermediate position of 5 storage units (i.e., 3 rd storage unit in the figure), then the generating system stores V2, which is the largest in start time of a preset period of V2 to V5, to a position near T1, for example, a2 nd storage position or a 4 th storage position of the 5 storage units (fig. 2 stores V2 to 2 nd storage position), and then the generating system sequentially stores V3, V4, and V5.
Optionally, the generating system generates the target sequence based on a time sequence relation between each first vector of the M first vectors, and since a starting time of a preset period corresponding to each first vector of the M first vectors is in direct proportion to timeliness corresponding to the first vector, the higher the convolution number of the first vector with high timeliness, the better the effect of a convolution result obtained by the convolution operation. Therefore, in the target sequence, the middle position of the target sequence is used for storing the data with highest timeliness (namely the first vector with the latest starting moment of the preset period), so that the frequency of the data with high timeliness participating in convolution calculation is improved.
In an alternative embodiment, the generating system firstly executes convolution operation on M first vectors corresponding to the target sequence through a convolution sub-model to obtain a convolution result, wherein the convolution sub-model at least comprises a target convolution kernel, the dimension of the target convolution kernel is equal to the product of M and a preset threshold value, then the generating system generates a first characteristic vector according to the convolution result through a pooling sub-model connected with the convolution sub-model, the first characteristic vector is used for representing the average amount of a financial product purchased by a target user in a preset period, and then the generating system determines a model input vector corresponding to a future time period according to the corresponding relation between the first characteristic vector and the preset period through an output sub-model connected with the convolution sub-model, wherein the output sub-model is connected with a neural network model, and the output sub-model is further used for inputting the model input vector into the neural network model.
Optionally, fig. 3 is a flowchart of an alternative method for generating a model input vector according to a target sequence according to an embodiment of the present application, where M is equal to 7 as shown in fig. 3, a first number column in fig. 3 is used to represent 7 first vectors ordered from late to early according to a start time of a preset period corresponding to each first vector, where a first vector stored in a first position in the first number column is a first target vector in the 7 first vectors, a second number column in fig. 3 is used to represent the target sequence, then the generating system inputs the target sequence to a convolution sub-model with a target convolution kernel of 3*1 to obtain a convolution result, then the generating system inputs the convolution result to a pooling sub-model to obtain a first feature vector (i.e. a pooling result in fig. 3), and finally, the generating system converts the first feature vector to the model input vector.
In an alternative embodiment, the generating system forms a first model according to the convolution sub-model, the pooling sub-model and the output sub-model, wherein the first model is obtained through training by the following steps: the generation system firstly determines Y second vectors corresponding to each user in X users according to transaction information corresponding to each user, wherein Y is an integer larger than 1, the second vectors corresponding to each user are used for representing the total amount of financial products purchased by the user in a preset period, secondly, the generation system determines second target vectors in the Y second vectors corresponding to each user in X users, wherein the second target vectors corresponding to each user are second vectors with the latest starting time of the preset period in the Y second vectors corresponding to each user, then the generation system takes the second target vectors corresponding to each user as predictive labels corresponding to the user, and then the generation system generates a first model according to Y-1 second vectors corresponding to each user except the second target vectors and the predictive labels.
Optionally, the generating system reorders the M first vectors, so as to achieve the purpose that in the new sequence obtained by ordering, the data approaching the middle position of the new sequence approaches the current moment in the time dimension, then the generating system sets convolution kernels of different dimensions to construct a convolution submodel and a pooling submodel in the first model, when the number of the first vectors is large, the size of the first layer target convolution kernel cannot be smaller than 3*1, the size of the first layer target convolution kernel is preferably set to be the product of the dimension of the first vector and a preset threshold value, then the generating system constructs a pooling layer, and when the number of the first vectors is smaller than 7, the generating system prohibits the operation of the pooling submodel, and when the number of the first vectors is larger than or equal to 7, the generating system can select the convolution kernel of the dimension of 2×1 as the convolution kernel of the pooling submodel.
Optionally, the application generates the one-dimensional derivative vectors (i.e. the model input vectors) corresponding to the M first vectors through the first model, and achieves the purpose of compressing and integrating the multidimensional financial data with the same attribute features by means of reordering and quantizing and integrating the multidimensional financial data with the same attribute features (i.e. the M first vectors). In addition, the user characteristic information quantity included in the one-dimensional derivative vector obtained by the first model is richer than the user characteristic information quantity included in the original one first vector, and compared with the mode that a single first vector is used as input data of the neural network model in the prior art, the method and the device have the advantage that the one-dimensional derivative vector is used as the input data of the neural network model, so that the technical effect of improving the richness of the user characteristic information included in the input data of the neural network model is achieved.
In an alternative embodiment, the generating system inputs the model input vector, the target transaction vector and the type of the financial product into the neural network model to obtain a user portrait corresponding to the target user output by the neural network model, wherein the user portrait is used for representing an order interval corresponding to the purchase amount of each financial product by the target user in a future time period.
In the method, M first vectors corresponding to a target user are firstly obtained, wherein M is an integer larger than 1, each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period, then the M first vectors are sequenced according to the starting time of the preset period corresponding to each first vector to obtain a target sequence, then a model input vector of a neural network model is generated according to the target sequence, the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the amount of financial products purchased by the target user in a future time period based on the model input vector through priori knowledge learned in a model training process.
As can be seen from the above, after obtaining the M first vectors corresponding to the target user, the method does not directly input the M first vectors into the neural network model, but orders the M first vectors according to the start time of the preset period corresponding to each first vector to obtain the target sequence, and then determines a one-dimensional model input vector according to the target sequence, thereby achieving the purpose of reducing the dimension of the original M-dimensional input data (i.e., the M first vectors).
Therefore, the technical scheme of the application realizes the purpose of reducing the quantity of the input data of the neural network model by reducing the dimension of M first vectors into one model input vector, thereby realizing the technical effect of improving the operation efficiency of the neural network model and further solving the technical problem of low operation efficiency of the neural network model caused by more quantity of the input data of the neural network model in the prior art.
According to an embodiment of the present application, there is further provided an embodiment of a generating apparatus of a model input vector, and fig. 4 is a schematic diagram of an alternative generating apparatus of a model input vector according to an embodiment of the present application, as shown in fig. 4, the generating apparatus of a model input vector includes: an acquisition unit 401, a sorting unit 402, and a first generation unit 403.
Optionally, the acquiring unit is configured to acquire M first vectors corresponding to the target user, where M is an integer greater than 1, and each first vector in the M first vectors is used to characterize a total amount of money for the target user to purchase the financial product in a preset period; the sequencing unit is used for sequencing the M first vectors according to the starting time of the preset period corresponding to each first vector to obtain a target sequence; the first generation unit is used for generating a model input vector of the neural network model according to the target sequence, wherein the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the purchase amount of the target user for the financial product in a future time period based on the model input vector through prior knowledge learned in the model training process.
In an alternative embodiment, the acquisition unit comprises: the first acquisition subunit, the division subunit and the first determination subunit.
Optionally, the first obtaining subunit is configured to obtain L transaction data corresponding to the target user, where L is an integer greater than 1, and each transaction data in the L transaction data at least includes a payment amount and a payment time corresponding to the purchase of the financial product by the target user; dividing sub-units, configured to divide L transaction data according to a payment time corresponding to each transaction data, to obtain m+1 transaction sets, where each transaction set of the m+1 transaction sets includes at least two transaction data of the L transaction data, and a difference between payment times of any two transaction data of each transaction set is less than or equal to a preset period; a first determining subunit, configured to determine M first vectors according to the m+1 transaction sets.
In an alternative embodiment, the first determining subunit further comprises: the device comprises a generating module, a first determining module and a second determining module.
Optionally, the generating module is configured to generate m+1 transaction vectors based on the m+1 transaction sets, where each transaction vector of the m+1 transaction vectors corresponds to one transaction set of the m+1 transaction sets, and each transaction vector is configured to characterize a sum of payment amounts corresponding to all transaction data included in the transaction set corresponding to the transaction vector; the first determining module is used for determining a target transaction vector in M+1 transaction vectors according to the starting time of a preset period corresponding to each transaction vector, wherein the target transaction vector is the transaction vector with the latest starting time of the preset period in the M+1 transaction vectors; and the second determining module is used for determining M transaction vectors except the target transaction vector in the M+1 transaction vectors as M first vectors.
In an alternative embodiment, the sorting unit further comprises: the second determining subunit, the second acquiring subunit, the first storing subunit, the first sequence composing subunit and the filling subunit.
Optionally, the second determining subunit is configured to determine a first target vector in the M first vectors according to a start time of a preset period corresponding to each first vector, where the first target vector is a first vector with a latest start time of the preset period in the M first vectors; the second acquisition subunit is used for acquiring M storage units corresponding to the M first vectors, wherein the M storage units are in one-to-one correspondence with the M first vectors; the first storage subunit is configured to store a first target vector into an ith storage unit in the M storage units, where i-1 is equal to a target value, and the target value is an integer value obtained by dividing M by 2 and rounding down; a first sequence composing subunit configured to compose a first sequence from M-1 first vectors other than the first target vector among the M first vectors according to a time interval between a start time of a preset period corresponding to each of the M first vectors and a start time of a preset period of the first target vector; and the filling subunit is used for sequentially filling M-1 first vectors in the first sequence into M-1 storage units except the ith storage unit in the M storage units according to the principle of filling the first vectors into the storage units nearest to the ith storage unit, wherein the M-1 first vectors in the first vector set are in one-to-one correspondence with the M-1 storage units.
In an alternative embodiment, the first generating unit further comprises: a convolution subunit, a pooling subunit, and an output subunit.
Optionally, the convolution subunit is configured to perform a convolution operation on M first vectors corresponding to the target sequence through a convolution sub-model, so as to obtain a convolution result, where the convolution sub-model at least includes a target convolution kernel, and a dimension of the target convolution kernel is equal to a product of M and a preset threshold; chi Huazi unit, configured to generate a first feature vector according to a convolution result through a pooling sub-model connected to the convolution sub-model, where the first feature vector is used to characterize an average amount of money of a target user for purchasing a financial product in a preset period; and the output sub-unit is used for determining a model input vector corresponding to the future time period according to the corresponding relation between the first characteristic vector and the preset period through an output sub-model connected with the convolution sub-model, wherein the output sub-model is connected with the neural network model, and the output sub-model is also used for inputting the model input vector into the neural network model.
In an alternative embodiment, the generating device of the model input vector further includes: the device comprises a first determining unit, a second determining unit, a third determining unit and a second generating unit.
Optionally, the first determining unit is configured to determine Y second vectors corresponding to each of the X users according to transaction information corresponding to the user, where Y is an integer greater than 1, and the second vectors corresponding to each user are used to represent a total amount of financial products purchased by the user in a preset period; a second determining unit, configured to determine a second target vector of Y second vectors corresponding to each of the X users, where the second target vector corresponding to each user is a second vector with a latest start time of a preset period of the Y second vectors corresponding to the user; a third determining unit, configured to use the second target vector corresponding to each user as a prediction tag corresponding to the user; and the second generation unit is used for generating a first model according to the Y-1 second vectors corresponding to each user except the second target vector and the predictive labels.
In an alternative embodiment, the generating device of the model input vector further includes: an input unit.
Optionally, the input unit is configured to input the model input vector, the target transaction vector, and the type of the financial product into the neural network model, so as to obtain a user portrait corresponding to the target user output by the neural network model, where the user portrait is used to characterize an order interval corresponding to the purchase amount of each financial product by the target user in a future time period.
In the method, M first vectors corresponding to a target user are firstly obtained, wherein M is an integer larger than 1, each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period, then the M first vectors are sequenced according to the starting time of the preset period corresponding to each first vector to obtain a target sequence, then a model input vector of a neural network model is generated according to the target sequence, the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the amount of financial products purchased by the target user in a future time period based on the model input vector through priori knowledge learned in a model training process.
As can be seen from the above, after obtaining the M first vectors corresponding to the target user, the method does not directly input the M first vectors into the neural network model, but orders the M first vectors according to the start time of the preset period corresponding to each first vector to obtain the target sequence, and then determines a one-dimensional model input vector according to the target sequence, thereby achieving the purpose of reducing the dimension of the original M-dimensional input data (i.e., the M first vectors).
Therefore, the technical scheme of the application realizes the purpose of reducing the quantity of the input data of the neural network model by reducing the dimension of M first vectors into one model input vector, thereby realizing the technical effect of improving the operation efficiency of the neural network model and further solving the technical problem of low operation efficiency of the neural network model caused by more quantity of the input data of the neural network model in the prior art.
According to another aspect of the embodiment of the present application, there is also provided a computer readable storage medium, where the computer readable storage medium includes a stored computer program, where the computer program when executed controls a device in which the computer readable storage medium is located to execute the method for generating the model input vector of any one of the above.
According to another aspect of the embodiment of the present application, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of generating a model input vector of any of the above via execution of the executable instructions.
Fig. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the present application, and as shown in fig. 5, an embodiment of the present application provides an electronic device, where the electronic device includes a processor, a memory, and a program stored on the memory and capable of running on the processor, and the processor implements a method for generating a model input vector according to any one of the above when executing the program.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. A method for generating a model input vector, comprising:
obtaining M first vectors corresponding to a target user, wherein M is an integer greater than 1, and each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period;
Sequencing the M first vectors according to the starting time of a preset period corresponding to each first vector to obtain a target sequence;
Generating a model input vector of a neural network model according to the target sequence, wherein the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the purchase amount of the target user for the financial product in a future time period based on the model input vector through prior knowledge learned in a model training process.
2. The method for generating model input vectors according to claim 1, wherein obtaining M first vectors corresponding to the target user comprises:
Acquiring L transaction data corresponding to the target user, wherein L is an integer greater than 1, and each transaction data in the L transaction data at least comprises payment amount and payment time corresponding to the target user purchasing a financial product;
Dividing the L transaction data according to the payment time corresponding to each transaction data to obtain M+1 transaction sets, wherein each transaction set in the M+1 transaction sets comprises at least two transaction data in the L transaction data, and the difference of the payment time between any two transaction data in each transaction set is smaller than or equal to the preset period;
and determining the M first vectors according to the M+1 transaction sets.
3. The method of generating model input vectors of claim 2, wherein determining the M first vectors from the m+1 transaction sets comprises:
Generating m+1 transaction vectors based on the m+1 transaction sets, wherein each transaction vector of the m+1 transaction vectors corresponds to one transaction set of the m+1 transaction sets, and each transaction vector is used for representing the sum of payment amounts corresponding to all transaction data included in the transaction set corresponding to the transaction vector;
Determining a target transaction vector in the M+1 transaction vectors according to the starting time of the preset period corresponding to each transaction vector, wherein the target transaction vector is the latest transaction vector in the M+1 transaction vectors;
M transaction vectors other than the target transaction vector among the M+1 transaction vectors are determined as the M first vectors.
4. The method for generating model input vectors according to claim 1, wherein the ordering the M first vectors according to the start time of the preset period corresponding to each first vector to obtain the target sequence includes:
determining a first target vector in the M first vectors according to the starting time of the preset period corresponding to each first vector, wherein the first target vector is the first vector with the latest starting time of the preset period in the M first vectors;
Obtaining M storage units corresponding to the M first vectors, wherein the M storage units are in one-to-one correspondence with the M first vectors;
Storing the first target vector to an ith memory location of the M memory locations, wherein,
I-1 is equal to a target value, wherein the target value is an integer value obtained by dividing M by 2 and rounding downwards;
forming a first sequence from M-1 first vectors except for the first target vector in the M first vectors according to a time interval between a starting time of a preset period corresponding to each first vector in the M first vectors and a starting time of the preset period of the first target vector;
And sequentially filling M-1 first vectors in the first sequence into M-1 storage units except for the ith storage unit in the M storage units according to the principle of filling the first vectors into the storage units nearest to the ith storage unit, wherein the M-1 first vectors in the first vector set are in one-to-one correspondence with the M-1 storage units.
5. The method of generating model input vectors of claim 1, wherein generating model input vectors of a neural network model from the target sequence comprises:
performing convolution operation on M first vectors corresponding to the target sequence through a convolution submodel to obtain a convolution result, wherein the convolution submodel at least comprises a target convolution kernel, and the dimension of the target convolution kernel is equal to the product of M and a preset threshold;
Generating a first characteristic vector according to the convolution result through a pooling sub-model connected with the convolution sub-model, wherein the first characteristic vector is used for representing the average amount of financial products purchased by the target user in a preset period;
Determining a model input vector corresponding to the future time period according to the corresponding relation between the first feature vector and the preset period through an output sub-model connected with the convolution sub-model, wherein the output sub-model is connected with the neural network model, and the output sub-model is further used for inputting the model input vector into the neural network model.
6. The method of generating model input vectors according to claim 5, wherein the convolution sub-model, the pooling sub-model and the output sub-model form a first model, wherein the first model is trained by:
Determining Y second vectors corresponding to each user in the X users according to transaction information corresponding to the user, wherein Y is an integer greater than 1, and the second vectors corresponding to each user are used for representing the total amount of financial products purchased by the user in a preset period;
Determining a second target vector in Y second vectors corresponding to each user in the X users, wherein the second target vector corresponding to each user is a second vector with the latest starting moment of a preset period in the Y second vectors corresponding to the user;
taking the second target vector corresponding to each user as a prediction tag corresponding to the user;
and generating the first model according to the Y-1 second vectors corresponding to each user and except the second target vector and the predictive label.
7. A method of generating model input vectors according to claim 3, characterized in that after generating model input vectors of a neural network model from the target sequence, the method of generating model input vectors further comprises:
And inputting the model input vector, the target transaction vector and the type of the financial product into the neural network model to obtain a user portrait corresponding to the target user output by the neural network model, wherein the user portrait is used for representing an order interval corresponding to the purchase amount of each financial product of the target user in a future time period.
8. A model input vector generation apparatus, comprising:
The acquisition unit is used for acquiring M first vectors corresponding to a target user, wherein M is an integer greater than 1, and each first vector in the M first vectors is used for representing the total amount of financial products purchased by the target user in a preset period;
The sequencing unit is used for sequencing the M first vectors according to the starting time of the preset period corresponding to each first vector to obtain a target sequence;
The first generation unit is used for generating a model input vector of a neural network model according to the target sequence, wherein the model input vector is a vector in a one-dimensional form, and the neural network model is used for predicting the purchase amount of the target user for the financial product in a future time period based on the model input vector through priori knowledge learned in a model training process.
9. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and wherein the computer program when run controls a device in which the computer readable storage medium is located to perform the method for generating a model input vector according to any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of generating a model input vector of any of claims 1-7.
CN202410125000.8A 2024-01-29 2024-01-29 Method and device for generating model input vector, storage medium and electronic equipment Pending CN117972380A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410125000.8A CN117972380A (en) 2024-01-29 2024-01-29 Method and device for generating model input vector, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410125000.8A CN117972380A (en) 2024-01-29 2024-01-29 Method and device for generating model input vector, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117972380A true CN117972380A (en) 2024-05-03

Family

ID=90860695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410125000.8A Pending CN117972380A (en) 2024-01-29 2024-01-29 Method and device for generating model input vector, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117972380A (en)

Similar Documents

Publication Publication Date Title
WO2022037337A1 (en) Distributed training method and apparatus for machine learning model, and computer device
US9015083B1 (en) Distribution of parameter calculation for iterative optimization methods
CN110008973B (en) Model training method, method and device for determining target user based on model
CN110457577B (en) Data processing method, device, equipment and computer storage medium
CN109710402A (en) Method, apparatus, computer equipment and the storage medium of process resource acquisition request
CN112256720B (en) Data cost calculation method, system, computer device and storage medium
CN112765230B (en) Payment big data analysis method and big data analysis system based on internet finance
CN111340240A (en) Method and device for realizing automatic machine learning
US10839420B2 (en) Constrained large-data markdown optimizations based upon markdown budget
CA2952154A1 (en) Method and system for generating a split questionnaire
CN116303459A (en) Method and system for processing data table
CN112381216A (en) Training and predicting method and device for mixed graph neural network model
CN110569190A (en) Transaction pressure testing method and device, electronic device and readable storage medium
CN113886033A (en) Task processing method and device
CN117972380A (en) Method and device for generating model input vector, storage medium and electronic equipment
CN116680494A (en) Method and device for generating application recommendation page, storage medium and electronic equipment
CN113837878B (en) Data comparison method, device, equipment and storage medium
CN112418975A (en) Service processing system, method and device for determining service processing mode
CN111105274A (en) Data processing method, device, medium and electronic equipment
CN109947564A (en) Method for processing business, device, equipment and storage medium
CN110837596A (en) Intelligent recommendation method and device, computer equipment and storage medium
CN117519652A (en) Execution method and device of development data, computer storage medium and electronic equipment
CN113094589A (en) Intelligent service recommendation method and device
CN113887596A (en) Model training and information pushing method and device
CN116701587A (en) Question and answer method and device based on machine learning

Legal Events

Date Code Title Description
PB01 Publication