Disclosure of Invention
The invention mainly aims to provide a method, a device, computer equipment and a storage medium for analyzing user consumption behaviors based on oil product order data, and aims to solve the technical problem that corresponding strategies cannot be purposefully adopted according to user characteristics in the prior art.
Based on the above object, the present invention provides a method for analyzing user consumption behavior based on oil product order data, comprising:
acquiring oil product order data of a plurality of users, wherein the oil product order data comprises member attributes and refueling attributes of the users;
extracting index label data of each attribute from each oil product order data, and marking the corresponding user according to the index label data;
analyzing user consumption behaviors corresponding to the user according to the index tag data of each attribute, wherein the user consumption behaviors are represented by refueling trend data, frequency trend data and price sensitive data;
screening out users needing to be recalled from the plurality of users according to the user consumption behaviors;
and selecting a preset coupon and sending the coupon to the user needing to be recalled.
Further, the step of screening users needing recall from a plurality of users according to the user consumption behaviors comprises:
judging whether the user is a low-dependence user or not according to the user consumption behavior;
if yes, the user is judged to be the user needing recalling, and if not, the user is judged to be the user not needing recalling.
Further, after the step of extracting the index tag data of each attribute from each oil product order data and marking the corresponding user according to the index tag data, the method includes:
and respectively storing the user, the index tag data and the incidence relation between the user and the index tag data into a designated storage database and a query database.
Further, after the step of storing the user, the index tag data, and the association relationship between the user and the index tag data in a designated storage database and a query database, respectively, the method includes:
receiving incoming parameters corresponding to the query rules, wherein the incoming parameters are used for representing query conditions of users required by query, and different incoming parameters correspond to different index tag data;
and screening out users of the index tag data corresponding to the incoming parameters according to the incoming parameters, and displaying the screened-out users.
Further, after the step of selecting the preset coupon and sending the selected preset coupon to the user needing to be recalled, the method includes:
classifying the users according to the index label data to obtain a plurality of classified users with common labels, wherein different common labels correspond to different specific coupons;
and acquiring a corresponding specific coupon according to the common label, and sending the specific coupon to the user with the corresponding classification.
The invention also provides a device for analyzing the consumption behavior of a user based on the oil product order data, which comprises the following components:
the oil product order data acquisition unit is used for acquiring oil product order data of a plurality of users, wherein the oil product order data comprises member attributes and refueling attributes of the users;
the extraction index unit is used for extracting index label data of each attribute from each oil product order data and marking the corresponding user according to the index label data;
the analysis behavior unit is used for analyzing the user consumption behavior corresponding to the user according to the index tag data of each attribute, and the user consumption behavior is represented by refueling trend data, frequency trend data and price sensitive data;
the screening user unit is used for screening users needing to be recalled from the plurality of users according to the user consumption behaviors;
and the sending discount unit is used for selecting a preset discount coupon and sending the preset discount coupon to the user needing to be recalled.
Further, the screening subscriber unit includes:
the judging user subunit is used for judging whether the user is a low-dependence user according to the user consumption behavior;
and the recall user subunit is used for judging that the user is a low-dependence user, judging that the user is a user needing recall, and otherwise, judging that the user is a user not needing recall.
Further, the method comprises the following steps:
and the storage data unit is used for respectively storing the user, the index tag data and the incidence relation between the user and the index tag data into a designated storage database and a designated query database.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method of analyzing user consumption behaviour based on oil order data.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method of analyzing user consumption behaviour based on oil order data.
The invention has the beneficial effects that: index label data of the user is obtained through the user order data, and then the consumption behavior of the user is analyzed based on the index label, so that the coupon is sent in a targeted mode, the purpose of attracting the user with low viscosity to oil station enterprises is achieved, the user range is greatly reduced, and accurate delivery is achieved.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, the method for analyzing the consumption behavior of the user based on the oil product order data in the embodiment includes:
step S1: acquiring oil product order data of a plurality of users, wherein the oil product order data comprises member attributes and refueling attributes of the users;
step S2: extracting index label data of each attribute from each oil product order data, and marking the corresponding user according to the index label data;
step S3: analyzing user consumption behaviors corresponding to the user according to the index tag data of each attribute, wherein the user consumption behaviors are represented by refueling trend data, frequency trend data and price sensitive data;
step S4: screening out users needing to be recalled from the plurality of users according to the user consumption behaviors;
step S5: selecting preset coupons to be sent to the users needing to be recalled
The method for analyzing the consumption behavior of the user based on the oil product order data is realized based on an order system, the system comprises three service subsystems which are an order service system, a label service system and a recall service system respectively, wherein the order service system is used for generating corresponding order data according to user operation, the order is oil product order data for refueling the user, the order specifically comprises information such as a user account number, a refueling volume, a refueling price and a fuel station, and then the order data is stored in HBase; the label service system comprises the steps of acquiring index label data at regular time, specifically extracting different index label data from order data, adding the different index label data into a user label, and then storing the user label data into a query database Solr; the recall service system comprises a recall coupon sending module, a recall response module and other customized services, wherein the recall coupon is sent to a specific user according to service requirements, the recall response times are counted after the recall coupon is sent, and the recall response times are recorded in a user label.
As the step S1, oil order data of a plurality of users are obtained by the ordering system, where the oil order data includes member attributes, fueling consumption attributes and prediction attributes of the users, and the member attributes include basic information of the users, such as gender, address, contact information, and general information, such as vehicle type, time to first fuel, maximum number of upgrades to fuel, number of recalls and coupon availability, and consumed fuel stations. The refueling consumption attributes comprise common oil products, common oil stations, refueling times/liter number in nearly XX days and the like. The predictive attributes may be used to direct recalls or direct continued consumption, such as predicted user consumption behavior data, based on user consumption habits.
As described in step S2, index tag data of each attribute, for example, attribute information such as gender, vehicle type of the stock, maximum fueling quantity of 50 liters, and common fuel station of xx-zone fuel station, is extracted from the oil order data, and the index tag data at this time is "woman, stock, maximum fueling quantity of 50 liters, and xx-zone fuel station", and then the user is marked according to the index tag data, and the tag data is bound and associated with the user.
Preferably, the user, the index tag data and the association relationship between the user and the index tag data are respectively stored in a designated storage database and a designated query database, for example, distributed to the MySQL database and the Solr, so that the user and the index tag data can be called from the storage database at any time later, or the user and the index tag data can be queried based on the query database.
As described in step S3, the user consumption behavior of the corresponding user is analyzed according to the index label data of each attribute, and specifically, the user consumption behavior may be characterized by fueling trend data, frequency trend data, and price sensitive data, the fueling trend data is data predicted according to the fueling status of the user in the near future (e.g., within the last three months), for example, the user member attribute may be input into a preset prediction model for prediction to obtain a prediction result, the prediction result includes the user consumption behavior, such as fueling time, fueling amount, and the like, the prediction model may be a hidden markov model, and is trained based on the user member attribute and the recent fueling history data of the user as training data, the prediction model is a current mature technology, and the training process and the prediction calculation process are not repeated here, at this point, the fuel filling trend data can be directly used for representing the user consumption behaviors.
In addition, a fueling trend curve can be obtained according to the fueling interval duration and the fueling amount in the latest period of time, so that a corresponding fueling trend index, namely the fueling trend data, can be obtained, and predicted fueling data in a later period of time, including future fueling time, fueling amount and the like, can be obtained from the fueling trend curve. The frequency trend data is obtained by a user at a recent fueling frequency, for example, a frequency curve is obtained according to fueling time and fueling frequency in historical data, so as to obtain a frequency trend index, which is also the fueling trend data, so as to obtain the fueling frequency of the user in a future period of time, the price sensitive data represents the influence of the change of the fuel price on the behavior of the user, and specifically, the consumption behavior of the user is determined by the change of the historical fuel price and the change of the fueling behavior corresponding to the user, for example, the price sensitive index obtained by the change rate of the fuel price and the change of the fueling amount of the user in the same time, and the fueling trend index, the frequency trend index and the price sensitive index.
As described in step S4, users who need to be recalled are screened out from multiple users according to the user consumption behavior, for example, users who have not been refueled for a long time and have too low refueling frequency, such as users who have the refueling tendency index value below or above a preset range and users who have the refueling tendency index value below a preset frequency tendency index value, are screened out from the refueling tendency data, the frequency tendency data and the price sensitive data.
As described in step S5, the preset coupons are selected and sent to the users who need to recall, for example, the coupons with the specified amount are sent, or the coupons are fully reduced, corresponding strategies are pertinently adopted to send the coupons, users with low stickiness to the oil station enterprises are attracted, the user range is greatly reduced, and accurate delivery is achieved.
In one embodiment, the step S4 includes:
step S41: judging whether the user is a low-dependence user or not according to the user consumption behavior;
step S42: if yes, the user is judged to be the user needing recalling, and if not, the user is judged to be the user not needing recalling.
In this embodiment, it is determined according to user consumption behavior that a user is a low-dependence user or a high-dependence user, where the low-dependence user is a user who does not refuel at a fuel station of a fuel station enterprise for a long time or whose refueling frequency is too low, and the high-dependence user is a user who frequently refuels at a fuel station of a fuel station enterprise and whose refueling frequency is relatively high, for example, it may be determined whether the user is a low-dependence user based on the refueling trend data obtained by the prediction model and the refueling trend data, or it may be determined whether the user is a low-dependence user specifically according to the refueling trend data, the frequency trend data, and the price sensitivity data, for example, the refueling trend index value, the frequency trend index value, and the price sensitivity index are all lower than a preset range, and it may be determined that the user is a user who needs to recall, otherwise it is determined that the user does not need to recall.
In one embodiment, after the step S2, the method further includes:
step S22: receiving incoming parameters corresponding to the query rules, wherein the incoming parameters are used for representing query conditions of users required by query, and different incoming parameters correspond to different index tag data;
step S23: and screening out users of the index tag data corresponding to the incoming parameters according to the incoming parameters, and displaying the screened-out users.
In this embodiment, the query rule is a rule that determines a query condition according to an incoming parameter and screens out a corresponding user according to the query condition. The incoming parameters are used for representing the query conditions of the users required by the query, different incoming parameters correspond to different index tag data, for example, the query conditions are users with male gender and the first refueling time of 2021 year 11 month, the incoming parameters are male, the first refueling time of 2021 year 11 month, the corresponding index tag data are male and the first refueling time of 2021/11, the corresponding index tag data are matched through the incoming parameters, for example, "male" is screened out from a gender tag, then "the first refueling time of 2021/11" is screened out from a "male" tag, corresponding users are obtained, and then the users are displayed.
Parameters are transmitted in through the label service system according to the input query rule, so that the query conditions are spliced freely, and users meeting the conditions are screened out.
In one embodiment, after the step S5, the method further includes:
step S6: classifying the users according to the index label data to obtain a plurality of classified users with common labels, wherein different common labels correspond to different specific coupons;
step S7: and acquiring a corresponding specific coupon according to the common label, and sending the specific coupon to the user with the corresponding classification.
In this embodiment, the users are classified according to the index tag data, for example, into male and female categories according to gender, for example, into categories according to car types, so that users having the same attribute belong to the same category and have a common tag. Then, corresponding specific coupons are obtained according to the common labels, for example, for users classified by females, the corresponding specific coupons are gift coupons, for users classified by males, the corresponding specific coupons are coupons, for users of different vehicle types, the corresponding specific coupons are gift coupons of corresponding vehicle types, and then the specific coupons are sent to user accounts of corresponding users. Therefore, under different labels, the oil station can be used for directionally serving different users, and the operability and feasibility are greatly improved.
Referring to fig. 2, in this embodiment, there is provided an apparatus for analyzing a user consumption behavior based on oil product order data, where the apparatus corresponds to the method for analyzing a user consumption behavior based on oil product order data, and the apparatus includes:
the order obtaining unit 1 is used for obtaining oil product order data of a plurality of users, wherein the oil product order data comprises member attributes and refueling attributes of the users;
an index extracting unit 2, configured to extract index tag data of each attribute from each oil order data, and mark the corresponding user according to the index tag data;
the analysis behavior unit 3 is used for analyzing the user consumption behavior corresponding to the user according to the index tag data of each attribute, and the user consumption behavior is represented by refueling trend data, frequency trend data and price sensitive data;
the screening user unit 4 is used for screening users needing to be recalled from the plurality of users according to the user consumption behaviors;
and the sending coupon unit 5 is used for selecting a preset coupon and sending the coupon to the user needing to recall.
The device for analyzing the consumption behavior of the user based on the oil product order data is realized based on an order system, and the system comprises three service subsystems which are an order service system, a label service system and a recall service system respectively, wherein the order service system is used for generating corresponding order data according to user operation, the order is oil product order data for refueling the user, and specifically comprises information such as a user account number, a refueling volume, a refueling price, a fuel station and the like, and then the order data is stored in HBase; the label service system comprises the steps of acquiring index label data at regular time, specifically extracting different index label data from order data, adding the different index label data into a user label, and then storing the user label data into a query database Solr; the recall service system comprises a recall coupon sending module, a recall response module and other customized services, wherein the recall coupon is sent to a specific user according to service requirements, the recall response times are counted after the recall coupon is sent, and the recall response times are recorded in a user label.
As described above, the order obtaining unit 1 obtains oil product order data of a plurality of users through an order system, where the oil product order data includes member attributes, fueling consumption attributes and prediction attributes of the users, where the member attributes include basic information of the users, such as sex, address and contact information, and general information, such as vehicle type, time to first fuel, maximum number of fuel increments, number of recalls and coupon availability, and consumed fuel stations, etc. The refueling consumption attributes comprise common oil products, common oil stations, refueling times/liter number in nearly XX days and the like. . The predictive attributes may be used to direct recalls or direct continued consumption, such as predicted user consumption behavior data, based on user consumption habits.
As described in the index extracting unit 2, index tag data of each attribute, for example, attribute information such as gender, vehicle type of the stock, maximum fueling quantity of 50 liters, and common fueling station of xx-zone gas station, is extracted from the oil order data, and the index tag data at this time is "woman, stock, maximum fueling quantity of 50 liters, and xx-zone gas station", and then the user is marked according to the index tag data, and the tag data is bound and associated with the user.
Preferably, the system further comprises a storage data unit, wherein the storage data unit is used for storing the user, the index tag data and the user-index tag data association relationship into a designated storage database and a designated query database, such as a MySQL database and a Solr, respectively, so that the user, the index tag data and the user-index tag data association relationship can be subsequently called from the storage database at any time or queried based on the query database.
As described in the foregoing analyzing action unit 3, the user consumption behavior of the corresponding user is analyzed according to the index tag data of each attribute, specifically, the user consumption behavior may be represented by fueling trend data, frequency trend data, and price sensitive data, the fueling trend data is data predicted according to the fueling status of the user in the near future (e.g., within the last three months), for example, the user member attribute may be input into a preset prediction model for prediction to obtain a prediction result, the prediction result includes the user consumption behavior, such as fueling time, fueling amount, and the like, the prediction model may be a hidden markov model, and is trained based on the user member attribute and the recent fueling history data as training data, the prediction model is a prediction model obtained by training, which is an existing mature technology and is not repeated herein described a training process and a prediction calculation process, at this point, the fuel filling trend data can be directly used for representing the user consumption behaviors.
In addition, a fueling trend curve can be obtained according to the fueling interval duration and the fueling amount in the latest period of time, so that a corresponding fueling trend index, namely the fueling trend data, can be obtained, and predicted fueling data in a later period of time, including future fueling time, fueling amount and the like, can be obtained from the fueling trend curve. The frequency trend data is obtained by a user at a recent fueling frequency, for example, a frequency curve is obtained according to fueling time and fueling frequency in historical data, so as to obtain a frequency trend index, which is also the fueling trend data, so as to obtain the fueling frequency of the user in a future period of time, the price sensitive data represents the influence of the change of the fuel price on the behavior of the user, and specifically, the consumption behavior of the user is determined by the change of the historical fuel price and the change of the fueling behavior corresponding to the user, for example, the price sensitive index obtained by the change rate of the fuel price and the change of the fueling amount of the user in the same time, and the fueling trend index, the frequency trend index and the price sensitive index.
As described in the foregoing screening user unit 4, users needing to be recalled are screened from multiple users according to user consumption behaviors, for example, users who have not been refueled for a long time and have too low refueling frequency, such as users with the refueling trend index value below or above a preset range and users with the refueling trend index value below a preset frequency trend index value, are screened from the foregoing refueling trend data, frequency trend data and price sensitive data.
As described in the foregoing sending coupon unit 5, the preset coupons are then selected and sent to the users who need to recall, for example, the coupons with the specified amount are sent, or the coupons are fully reduced, corresponding strategies are pertinently adopted to send the coupons, users with low stickiness to the oil station enterprises are attracted, the user range is greatly reduced, and accurate delivery is realized.
In an embodiment, the screening subscriber unit 4 includes:
the judging user subunit is used for judging whether the user is a low-dependence user according to the user consumption behavior;
and the recall user subunit is used for judging that the user is a low-dependence user, judging that the user is a user needing recall, and otherwise, judging that the user is a user not needing recall.
In this embodiment, it is determined according to user consumption behavior that a user is a low-dependence user or a high-dependence user, where the low-dependence user is a user who does not refuel at a fuel station of a fuel station enterprise for a long time or whose refueling frequency is too low, and the high-dependence user is a user who frequently refuels at a fuel station of a fuel station enterprise and whose refueling frequency is relatively high, for example, it may be determined whether the user is a low-dependence user based on the refueling trend data obtained by the prediction model and the refueling trend data, or it may be determined whether the user is a low-dependence user specifically according to the refueling trend data, the frequency trend data, and the price sensitivity data, for example, the refueling trend index value, the frequency trend index value, and the price sensitivity index are all lower than a preset range, and it may be determined that the user is a user who needs to recall, otherwise it is determined that the user does not need to recall.
In one embodiment, the above apparatus includes:
the receiving parameter unit is used for receiving incoming parameters corresponding to the query rules, the incoming parameters are used for representing query conditions of users required by query, and different incoming parameters correspond to different index tag data;
and the display user unit is used for screening out users of the index tag data corresponding to the incoming parameters according to the incoming parameters and displaying the screened users.
In this embodiment, the query rule is a rule that determines a query condition according to an incoming parameter and screens out a corresponding user according to the query condition. The incoming parameters are used for representing the query conditions of the users required by the query, different incoming parameters correspond to different index tag data, for example, the query conditions are users with male gender and the first refueling time of 2021 year 11 month, the incoming parameters are male, the first refueling time of 2021 year 11 month, the corresponding index tag data are male and the first refueling time of 2021/11, the corresponding index tag data are matched through the incoming parameters, for example, "male" is screened out from a gender tag, then "the first refueling time of 2021/11" is screened out from a "male" tag, corresponding users are obtained, and then the users are displayed.
Parameters are transmitted in through the label service system according to the input query rule, so that the query conditions are spliced freely, and users meeting the conditions are screened out.
In one embodiment, the above apparatus includes:
the classification label unit is used for classifying the users according to the index label data to obtain a plurality of classified users with common labels, wherein different common labels correspond to different specific coupons;
and the acquisition specific unit is used for acquiring the corresponding specific ticket according to the common label and sending the specific ticket to the user in the corresponding classification.
In this embodiment, the users are classified according to the index tag data, for example, into male and female categories according to gender, for example, into categories according to car types, so that users having the same attribute belong to the same category and have a common tag. Then, corresponding specific coupons are obtained according to the common labels, for example, for users classified by females, the corresponding specific coupons are gift coupons, for users classified by males, the corresponding specific coupons are coupons, for users of different vehicle types, the corresponding specific coupons are gift coupons of corresponding vehicle types, and then the specific coupons are sent to user accounts of corresponding users. Therefore, under different labels, the oil station can be used for directionally serving different users, and the operability and feasibility are greatly improved.
Referring to fig. 3, the present application also provides a computer-readable storage medium 10, in which a computer program 20 is stored in the storage medium 10, and when the computer program runs on a computer, the computer is caused to execute the method for analyzing the user consumption behavior based on the oil order data described in the above embodiment.
Referring to fig. 4, the present application further provides a computer device 40 containing instructions, the computer device comprising a memory 30 and a processor 50, the memory 30 storing a computer program 20, the processor 30 when executing the computer program 20 implementing the method for analyzing user consumption behavior based on oil order data as described in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.