Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
In order to solve the above problems, embodiments of the present specification provide a model training method and a red-envelope material laying prediction method based on a model, and the two methods are described in detail as follows.
First, the following embodiments are shown to explain the model training method provided in the embodiments of the present specification:
the first embodiment is as follows:
referring to fig. 1, a flow chart of an embodiment of a model training method shown as an exemplary embodiment of the present disclosure may include the following steps:
step 102: and acquiring at least one piece of code scanning tie-in red packet data and at least one piece of code scanning payment data.
In the embodiment of the specification, data related to the behavior that a user draws a red packet by scanning a two-dimensional code is called code scanning red packet drawing data, and data related to the behavior that the user pays by scanning the two-dimensional code is called code scanning payment data, so that one piece of code scanning red packet drawing data is generated when the behavior that the user draws the red packet by scanning the two-dimensional code occurs once, and one piece of code scanning payment data is generated when the behavior that the user pays by scanning the two-dimensional code occurs once.
In an embodiment, the code scanning red packet data at least includes: red envelope identification, red envelope getting position, red envelope getting time, red envelope amount and the like.
In one embodiment, the code scanning payment data can be divided into two types, wherein one type is code scanning payment data of unused red packets, which at least includes: collection information, payment location, payment time, payment amount, etc.; another type is using code-scanned payment data with red packets, which may include at least: collection information, payment location, payment time, payment amount, red envelope identification, and the like.
It should be noted that, in the embodiment of this specification, the red packet identifier is composed of two parts, which are a red packet code value and a red packet number, respectively, where the red packet code value may also be referred to as a code value of a two-dimensional code, that is, if different users or the same user is in different time, red packets received by scanning the same two-dimensional code have the same red packet code value, but have different red packet numbers, so as to identify different red packets by different red packet numbers; and the red packet received by the same user or different users by scanning different two-dimensional codes has different red packet code values.
In the present specification embodiment, a specified period, for example, 6 months, 21 days 0: code scanning and red packet data and code scanning payment data generated in the period of 00-6 months, 23 days and 0: 00.
Step 104: and respectively performing feature extraction on each piece of acquired data according to the relevant information of the set merchant aiming at any set merchant in at least one set merchant, and acquiring a training sample corresponding to the set merchant, wherein the training sample takes the extracted feature value as an input value.
In this embodiment of the present disclosure, for convenience of description, merchants who have a collaborative agreement with a marketing team of an application in advance are referred to as configured merchants, and these configured merchants may be distributed in different locations of a same city, or distributed in multiple cities, which is not limited in this embodiment of the present disclosure.
In this embodiment of the present specification, for each set merchant, according to the relevant information of the set merchant, feature extraction may be performed on each piece of data acquired in step 102, that is, each piece of code scanning payment data and each piece of code scanning red packet data, and the extracted feature value is used as an input value to obtain a training sample corresponding to the set merchant.
In this embodiment, two types of feature values may be set, where one type is a feature value related to a location, and the other type is a feature value related to a red envelope verification sale situation, and based on the two types of feature values, the relevant information of the configured merchant at least may include: setting the position information of the merchant and setting the collection information of the merchant.
(1) For the feature value related to the position, a process of extracting the feature value is described:
firstly, the position information of a set merchant can be matched with the red packet getting position in each piece of code scanning red packet data by using a GeoHash algorithm, the total number of red packets to be got in a specified range of the set merchant, such as a range of 1 kilometer, is determined, and as can be known from the description, one piece of code scanning red packet data is generated when each two-dimensional code scanning red packet getting action occurs, namely, one piece of code scanning red packet data is generated when each red packet getting event occurs, so that the total number of red packets to be got in the specified range of the set merchant is the number of red packet getting events occurring in the specified range of the set merchant, namely the number of red packet getting data of which the red packet getting position is in the specified range.
Similarly, the GeoHash algorithm can be used to match the position information of the set merchant with the payment position in each piece of code-scanning payment data, and determine the total number of transactions paid within the specified range, that is, the number of code-scanning payment data with the payment position within the specified range.
Subsequently, the ratio between the total number of the received red packages and the total number of the payment transactions can be further calculated, and the ratio is used as the red package receiving ratio in the specified range.
Secondly, the number of merchants of other set merchants in the designated range of the set merchant can be determined according to the position information of the set merchant and the position information of other set merchants, and those skilled in the art can understand that the number of the merchants can reflect the density of the merchants in the designated range of the set merchant, and further, the ratio between the total number of the received red parcels and the number of the merchants can be further calculated, and the ratio is used as the red parcel receiving density in the designated range.
In this embodiment, the total number of the received red parcels, the total number of the payment transactions, the red parcel receiving ratio, the number of the merchants, and the red parcel receiving density may be used as the extracted characteristic values.
In addition, in this embodiment of the present specification, feature values for a plurality of specified ranges may also be obtained, for example, a red envelope pickup ratio in a range of 10 meters, 30 meters, 100 meters, 300 meters, or 500 meters of a set merchant may also be obtained, which is not limited in this embodiment of the present specification.
(2) For the characteristic value related to the red packet verification cancellation condition, the process of extracting the characteristic value is described as follows:
in this embodiment of the present specification, for a set merchant, a red envelope consumed in the set merchant may be determined, specifically, the collection information of the set merchant may be matched with the collection information in each piece of code scanning payment data, code scanning payment data in which the collection information is consistent with the collection information of the set merchant is obtained, and for convenience of description, the obtained code scanning payment data is referred to as code scanning payment data corresponding to the set merchant; further, code scanning payment data using the red packet, namely code scanning payment data comprising a red packet identifier, is screened from the code scanning payment data corresponding to the set merchant, and for convenience in description, the screened code scanning payment data comprising the red packet identifier is determined as target code scanning payment data, so that payment transaction in the set merchant is determined, and the target code scanning payment data using the red packet is used; subsequently, the characteristic value related to the red envelope verification and cancellation condition may be extracted according to the target code scanning payment data, and the method may include: the transaction proportion of the red envelope, the dispersion of the distance of red envelope verification and reimbursement, the average time interval of red envelope verification and reimbursement, the contribution degree of the optimal red envelope value, the transaction proportion of the optimal red envelope value, and the like.
Wherein, i: the proportion of red envelope transactions can be extracted by the following process:
the ratio of the number of the target code scanning payment data to the code scanning payment data corresponding to the set merchant can be calculated, and the ratio can be the red packet transaction ratio of the set merchant.
ii: the red envelope verification distance dispersion and the red envelope verification average time interval can be extracted through the following processes:
for any piece of target code scanning payment data, matching the red packet identification in the target code scanning payment data with the red packet identification in each piece of code scanning red packet data, and taking the code scanning red packet data which has the same red packet identification with the target code scanning payment data as the corresponding code scanning red packet data.
Further, the red packet verification and cancellation time interval can be determined according to the payment time in the target code scanning payment data and the red packet receiving time in the code scanning red packet data corresponding to the payment time, and a person skilled in the art can understand that the red packet verification and cancellation time interval reflects the time interval from receiving to consuming of the red packet; correspondingly, the red packet checking and selling distance interval can be determined according to the payment position in the target code scanning payment data and the red packet getting position in the code scanning red packet data corresponding to the payment position, and a person skilled in the art can understand that the red packet checking and selling distance interval reflects the distance between the getting position and the consumption position of the red packet.
As can be seen from the above description, for each piece of target code scanning payment data, one red packet verification and cancellation time interval and one red packet verification and cancellation distance interval may be calculated, and then, in this specification embodiment, an average value of all red packet verification and cancellation time intervals may be calculated, and the average value is used as a red packet verification and cancellation average time interval; accordingly, the variance of the distance intervals of all the red envelope pins can be calculated, and the variance is taken as the dispersion of the distance intervals of the red envelope pins.
iii: the contribution degree of the optimal red envelope value and the transaction proportion of the optimal red envelope value can be extracted through the following processes:
as can be seen from the above description, the red packets received by scanning the same two-dimensional code have the same red packet code value, and then, the verification and cancellation condition of the red packets with the same red packet code value can reflect the laying condition of the two-dimensional code corresponding to the red packets, that is, the laying condition of the red packet material, for example, the better the verification and cancellation condition of the red packets with the same red packet code value is, the better the laying position of the two-dimensional code corresponding to the red packet is, and the better the user acceptance is.
Based on this, in the embodiment of the present specification, the target code scanning payment data may be grouped according to the value of the red envelope code in the red envelope identifier, where the value of the red envelope code in the target code scanning payment data of each group is the same, and the values of the red envelope codes in the target code scanning payment data of different groups are different, that is, the target code scanning payment data in the same group are all related to the same two-dimensional code, and one group corresponds to one value of the red envelope code.
Then, according to the sequence from high to low of the number of target code scanning payment data in each group, sorting the red packet values corresponding to each group, and determining a first-ranked red packet value and a second-ranked red packet value according to the sorting result.
Subsequently, the number of target code-scanning payment data having the first red envelope value may be determined, which is referred to as a first number for descriptive convenience, and the number of target code-scanning payment data having the second red envelope value may be determined, which is referred to as a second number for descriptive convenience, respectively.
And subsequently, taking the ratio of the first quantity to the quantity of the code scanning payment data corresponding to the set merchant as the transaction proportion of the optimal red envelope value, and taking the ratio of the first quantity to the second quantity as the contribution degree of the optimal red envelope value.
Based on the description in step 104, the characteristic values in the embodiment of the present specification may be as shown in table 1 below:
TABLE 1
Step 106: and training with the obtained training sample by using an unsupervised learning algorithm to obtain a prediction model, wherein the prediction model takes the characteristic value of code scanning red packet data and the characteristic value of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
As can be seen from the above description of the steps, in the embodiment of the present specification, the obtained training sample only has an input value and does not have a label value, and therefore, in the embodiment of the present specification, an unsupervised learning algorithm, for example, a PCA (Principal Component Analysis) algorithm, may be adopted to train the obtained training sample, so as to obtain a prediction model, where the prediction model takes a feature value of code scanning red packet data and a feature value of code scanning payment data as input values, and sets a probability that a merchant lays red packet materials as an output value.
Furthermore, as can be seen from the description in the step 104, for each set merchant, a sequence related to the value of the red envelope code may be obtained, and then, in this embodiment of the present specification, the two-dimensional code value of the red envelope material laid by the set merchant may also be predicted according to the sequence, for example, the optimal value of the red envelope code described in the step 104 is predicted to be the two-dimensional code value of the red envelope material laid by the set merchant, and thus, the output value of the prediction model may further include the two-dimensional code value of the red envelope material laid by the set merchant.
According to the technical scheme provided by the embodiment of the specification, at least one piece of scanned red packet leading data and at least one piece of code scanning payment data are obtained, feature extraction is respectively carried out on each piece of obtained data according to relevant information of a set merchant aiming at any set merchant in at least one set merchant, a training sample corresponding to the set merchant is obtained, wherein the training sample takes the extracted feature value as an input value, an unsupervised learning algorithm is utilized to train with the obtained training sample to obtain a prediction model, the prediction model takes the feature value of the code scanning red packet leading data and the feature value of the code scanning payment data as input values, the probability that the merchant lays red packet materials is set as an output value, and then the laying condition of the red packet materials of the merchant can be predicted through the prediction model, so that the cost of manpower and material resources can be saved through the processing, meanwhile, a relatively accurate prediction result can be obtained by predicting based on accurate data, and the red packet material laying condition of each set merchant can be comprehensively predicted without being limited by regions and influenced by people.
The description of the first embodiment is completed.
Next, the following embodiments are shown to explain the model-based red-envelope material laying prediction method provided in the embodiments of the present specification:
example two:
referring to fig. 2, a flow chart of an embodiment of a model-based red envelope material laying prediction method is shown for an exemplary embodiment of the present disclosure, which may include the following steps:
step 202: and acquiring at least one piece of code scanning tie-in red packet data and at least one piece of code scanning payment data.
Step 204: and respectively extracting the characteristics of the acquired code scanning red packet data and the code scanning payment data to obtain the characteristic value of the code scanning red packet data and the characteristic value of the code scanning payment data.
The detailed description of step 202 and step 204 can be referred to the related description of one of the above embodiments, and this detailed description will not be repeated in this specification.
Step 206: and inputting the obtained characteristic values into a prediction model to obtain corresponding output values, wherein the prediction model takes the characteristic values of code scanning red packet data and the characteristic values of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
So far, the description of the second embodiment is completed.
The technical scheme provided by the embodiment of the specification comprises the steps of obtaining at least one code scanning and red packet data and at least one code scanning and payment data, respectively extracting the characteristics of the code scanning red packet data and the code scanning payment data to obtain the characteristic value of the code scanning red packet data and the characteristic value of the code scanning payment data, inputting the obtained characteristic values into a prediction model to obtain corresponding output values, the forecasting model takes the characteristic value of code scanning red packet data and the characteristic value of code scanning payment data as input values, takes the probability of laying red packet materials by a set merchant as an output value, can predict the red packet material laying condition of a merchant through a prediction model, saves the cost of manpower and material resources, meanwhile, a relatively accurate prediction result can be obtained by predicting based on accurate data, and the red packet material laying condition of each set merchant can be comprehensively predicted without being limited by regions and influenced by people.
Corresponding to the above embodiment of the model training method, an embodiment of the present specification further provides a model training apparatus, as shown in fig. 3, the apparatus may include: a first acquisition module 310, a first extraction module 320, and a training module 330.
The first obtaining module 310 may be configured to obtain at least one code scanning tie-wrap data and at least one code scanning payment data;
the first extraction module 320 may be configured to, for any one set merchant of at least one set merchant, respectively perform feature extraction on each piece of acquired data according to relevant information of the set merchant, and obtain a training sample corresponding to the set merchant, where the training sample uses an extracted feature value as an input value;
the training module 330 may be configured to train the obtained training samples with an unsupervised learning algorithm to obtain a prediction model, where the prediction model takes a feature value of code-scanning red packet data and a feature value of code-scanning payment data as input values, and takes a probability that a merchant lays red packet materials as an output value.
In one embodiment, the information related to the set merchant at least includes: the position information of the set merchant and the collection information of the set merchant;
the code scanning collar red packet data at least comprises: the method comprises the steps of a red packet identification, a red packet getting position and a red packet getting time, wherein the red packet identification comprises a red packet code value and a red packet number, red packets got by the same two-dimensional code have the same red packet code value and different red packet numbers, and red packets got by different two-dimensional codes have different red packet code values;
the code scanning payment data at least comprises: collection information, payment position and payment time; or the like, or, alternatively,
collection information, payment position, payment time and red packet identification.
In an embodiment, the first extraction module 320 may include (not shown in fig. 3):
the first matching submodule is used for matching the position information of the set merchant with the red packet getting positions in each piece of code scanning red packet data and determining the total number of the red packets to be got in the specified range of the set merchant;
the second matching submodule is used for matching the position information of the set merchant with the payment position in each piece of code scanning payment data and determining the total number of the payment transactions in the specified range;
the first determining submodule is used for taking the ratio of the total number of the received red packets to the total number of the payment transactions as the red packet receiving proportion in the specified range;
the second determining submodule is used for determining the number of merchants within the specified range according to the position information of the set merchants and the position information of other set merchants, and taking the ratio of the total number of the received red parcels to the number of the merchants as the red parcel receiving density within the specified range;
and the first characteristic determining submodule is used for taking the total number of the received red packets, the total number of the payment transactions, the red packet receiving ratio, the number of the merchants and the red packet receiving density as the extracted characteristic values.
In an embodiment, the first extraction module 320 may include (not shown in fig. 3):
the third matching sub-module is used for matching the collection information of the set merchant with the collection information in each piece of code scanning payment data, and taking the code scanning payment data with the collection information consistent with the collection information of the set merchant as the code scanning payment data corresponding to the set merchant;
the third determining submodule is used for determining code scanning payment data comprising the red packet identifier as target code scanning payment data in the code scanning payment data corresponding to the set merchant;
the fourth determining submodule is used for determining the transaction ratio of the red envelope, the dispersion of the red envelope verification distance, the average time interval of the red envelope verification and cancellation, the contribution degree of the optimal red envelope code value and the transaction ratio of the optimal red envelope code value according to the target code scanning payment data;
and the second characteristic determining submodule is used for taking the red packet transaction ratio, the red packet verification distance dispersion, the red packet verification average time interval, the contribution degree of the optimal red packet code value and the transaction ratio of the optimal red packet code value as the extracted characteristic values.
In an embodiment, the fourth determining submodule may be specifically configured to:
and taking the ratio of the number of the target code scanning payment data to the number of the code scanning payment data corresponding to the set merchant as the ratio of the red envelope transaction of the set merchant.
In an embodiment, the fourth determination submodule may include (not shown in fig. 3):
the fourth matching sub-module is used for matching the red packet identification in the target code scanning payment data with the red packet identification in each piece of code scanning red packet data aiming at any one piece of target code scanning payment data, and taking the code scanning red packet data which has the same red packet identification as the target code scanning payment data as the code scanning red packet data corresponding to the target code scanning payment data;
a fifth determining submodule, configured to determine a red packet verification and cancellation time interval according to the payment time in the target code scanning payment data and the red packet obtaining time in the code scanning red packet data corresponding to the payment time;
a sixth determining submodule, configured to determine a red packet verification and cancellation distance interval according to the payment position in the target code scanning payment data and the red packet obtaining position in the code scanning red packet data corresponding to the payment position;
the first calculation submodule is used for calculating the average value of all the determined red packet verification and cancellation time intervals, and the average value is used as the red packet verification and cancellation average time interval;
and the second calculation submodule is used for calculating the variance of the distance intervals of all the red envelope verification pins and taking the variance as the dispersion of the distance of the red envelope verification pins.
In an embodiment, the fourth determination submodule may include (not shown in fig. 3):
the grouping submodule is used for grouping the target code scanning payment data according to the red packet code value in the red packet identification, wherein the red packet code value in the target code scanning payment data of each group is the same, and the red packet code values in the target code scanning payment data of different groups are different;
the sorting submodule is used for sorting the red packet code values corresponding to the groups according to the sequence from high to low of the quantity of the target code scanning payment data in each group, and determining a first red packet code value at the first position of the ranking and a second red packet code value at the second position of the ranking according to a sorting result;
the quantity determining submodule is used for respectively determining a first quantity of target code scanning payment data with the first red envelope code value and a second quantity of target code scanning payment data with the second red envelope code value;
and a seventh determining submodule, configured to use a ratio between the first quantity and the quantity of the code scanning payment data corresponding to the set merchant as a transaction proportion of an optimal red envelope value, and use the ratio between the first quantity and the second quantity as a contribution degree of the optimal red envelope value, where the optimal red envelope value is the first red envelope value.
In one embodiment, the unsupervised learning algorithm comprises:
principal Component Analysis (PCA) algorithm.
In one embodiment, the output values of the prediction model further include:
and setting the red envelope code value of the red envelope material laid by the merchant.
It should be understood that the first obtaining module 310, the first extracting module 320, and the training module 330 may be configured in the apparatus at the same time as shown in fig. 3, or may be configured in the apparatus separately, and therefore the structure shown in fig. 3 should not be construed as a limitation to the embodiments of the present specification.
In addition, the implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Corresponding to the above embodiment of the method for predicting red envelope material laying based on the model, an embodiment of the present specification further provides a device for predicting red envelope material laying based on the model, and as shown in fig. 4, the device may include: a second obtaining module 410, a second extracting module 420, and an input module 430.
The second obtaining module 410 may be configured to obtain at least one code scanning tie-wrap data and at least one code scanning payment data;
the second extraction module 420 may be configured to perform feature extraction on the obtained code scanning red packet data and the obtained code scanning payment data, respectively, to obtain a feature value of the code scanning red packet data and a feature value of the code scanning payment data;
the input module 430 may be configured to input the obtained feature value into a prediction model to obtain a corresponding output value, where the prediction model takes the feature value of the code scanning red packet data and the feature value of the code scanning payment data as input values, and takes the probability that the merchant has laid red packet materials as an output value.
It should be understood that the second obtaining module 410, the second extracting module 420, and the input module 430 may be configured in the apparatus at the same time as shown in fig. 4, or may be configured in the apparatus separately, and therefore the structure shown in fig. 4 should not be construed as a limitation to the embodiments of the present specification.
In addition, the implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
Embodiments of the present specification further provide a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the aforementioned model training method when executing the program, and the method at least includes: acquiring at least one code scanning tie red packet data and at least one code scanning payment data; respectively extracting the characteristics of each piece of acquired data according to the relevant information of a set merchant and aiming at any set merchant in at least one set merchant, and acquiring a training sample corresponding to the set merchant, wherein the training sample takes the extracted characteristic value as an input value; and training with the obtained training sample by using an unsupervised learning algorithm to obtain a prediction model, wherein the prediction model takes the characteristic value of code scanning red packet data and the characteristic value of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
Embodiments of the present specification further provide another computer device, which at least includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the program to implement the aforementioned method for predicting red envelope material paving based on a model, and the method at least includes: acquiring at least one code scanning tie red packet data and at least one code scanning payment data; respectively extracting the characteristics of the acquired code scanning red packet data and the code scanning payment data to obtain the characteristic value of the code scanning red packet data and the characteristic value of the code scanning payment data; and inputting the obtained characteristic values into a prediction model to obtain corresponding output values, wherein the prediction model takes the characteristic values of code scanning red packet data and the characteristic values of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
Fig. 5 is a schematic diagram illustrating a more specific hardware structure of a computing device according to an embodiment of the present disclosure, where the computing device may include: a processor 510, a memory 520, an input/output interface 530, a communication interface 540, and a bus 550. Wherein processor 510, memory 520, input/output interface 530, and communication interface 540 are communicatively coupled to each other within the device via bus 550.
The processor 510 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present specification.
The Memory 520 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 520 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 520 and called by the processor 510 for execution.
The input/output interface 530 is used for connecting an input/output module to realize information input and output. The input/output/module may be configured as a component within the device (not shown in fig. 5) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 540 is used for connecting a communication module (not shown in fig. 5) to realize communication interaction between the device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 550 includes a pathway to transfer information between various components of the device, such as processor 510, memory 520, input/output interface 530, and communication interface 540.
It should be noted that although the above-mentioned device only shows the processor 510, the memory 520, the input/output interface 530, the communication interface 540 and the bus 550, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
Embodiments of the present specification further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the foregoing model training method, and the method at least includes: acquiring at least one code scanning tie red packet data and at least one code scanning payment data; respectively extracting the characteristics of each piece of acquired data according to the relevant information of a set merchant and aiming at any set merchant in at least one set merchant, and acquiring a training sample corresponding to the set merchant, wherein the training sample takes the extracted characteristic value as an input value; and training with the obtained training sample by using an unsupervised learning algorithm to obtain a prediction model, wherein the prediction model takes the characteristic value of code scanning red packet data and the characteristic value of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
Embodiments of the present specification also provide another computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the foregoing model-based red envelope material laying prediction method, where the method at least includes: acquiring at least one code scanning tie red packet data and at least one code scanning payment data; respectively extracting the characteristics of the acquired code scanning red packet data and the code scanning payment data to obtain the characteristic value of the code scanning red packet data and the characteristic value of the code scanning payment data; and inputting the obtained characteristic values into a prediction model to obtain corresponding output values, wherein the prediction model takes the characteristic values of code scanning red packet data and the characteristic values of code scanning payment data as input values, and takes the probability of laying red packet materials by a merchant as an output value.
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 computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
From the above description of the embodiments, it is clear to those skilled in the art that the embodiments of the present disclosure can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the embodiments of the present specification may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments of the present specification.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points. The above-described apparatus embodiments are merely illustrative, and the modules described as separate components may or may not be physically separate, and the functions of the modules may be implemented in one or more software and/or hardware when implementing the embodiments of the present disclosure. And part or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
The foregoing is only a specific embodiment of the embodiments of the present disclosure, and it should be noted that, for those skilled in the art, a plurality of modifications and decorations can be made without departing from the principle of the embodiments of the present disclosure, and these modifications and decorations should also be regarded as the protection scope of the embodiments of the present disclosure.