Traffic package recommendation method and apparatus, and storage medium
By training a user demand prediction model and an LSTM time series prediction model, and combining the binary tree algorithm to optimize traffic package recommendations, the problem of dynamic changes in user traffic demand is solved, thereby improving user experience and the accuracy of traffic package recommendations.
Patent Information
- Application Number
- CN202211729551.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing technologies struggle to effectively handle the dynamic changes in users' demands for data products, resulting in a poor user experience and making it difficult for users to accept switching plans.
By determining user traffic usage within a target historical time period, a user demand prediction model is trained to predict future traffic demand values. Based on the traffic gap value, traffic package combinations are recommended. A time series prediction model is constructed using a Long Short-Term Memory (LSTM) artificial neural network, and the traffic package recommendation is optimized by combining a binary tree algorithm.
Effectively handle dynamic changes in user needs for products, enhance customer experience, and improve the accuracy and user acceptance of data package recommendations.
Smart Images

Figure CN116074889B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a traffic package recommendation method and device and storage medium. BACKGROUND
[0002] With the development of information technology, the richness of services that operators can provide to customers is increasing, and users also have different needs and usage habits for mobile services. In general, users are reluctant to spend too much time and effort to think about what traffic packages the operator has launched and how to combine these traffic packages to meet their own needs, so there is a need for a traffic recommendation system that can automatically predict the future traffic needs of users and match traffic packages based on the prediction results.
[0003] In the prior art, a "user-product" matrix is constructed using known information to calculate a purchase inclination value, and a suitable product is selected for the user based on the calculated value. This method cannot well meet the dynamic changes in user demand for products, and the existing product recommendation in the form of a package is also difficult for users to adopt due to the incompatibility of the package and the need to switch back and forth between packages, resulting in a poor user experience. Therefore, how to handle the dynamic changes in user demand for traffic products is a problem that needs to be solved. SUMMARY
[0004] The present application provides a traffic package recommendation method, device and storage medium, which can solve the problem of how to handle the dynamic changes in user demand for traffic products.
[0005] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a traffic package recommendation method, which comprises: determining the traffic usage of a plurality of target users in a target historical time period, the traffic usage comprising general traffic usage and directional traffic usage; training a user demand prediction model based on the traffic usage of the plurality of target users, the traffic usage of a target user comprising the sum of general traffic used by the target user and directional traffic used by the target user; using the user demand prediction model to predict the traffic demand value of each target user in a first time period, and determining the traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user; and recommending a traffic package combination for each target user based on the traffic gap value of each target user.
[0007] Based on the technical solution, the traffic package recommendation method provided by the embodiment of the application determines the traffic usage of a plurality of target users in a target historical time period, trains a user demand prediction model based on the traffic usage of the plurality of target users, predicts the traffic demand value of each target user in a first time period by using the user demand prediction model, and determines the traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, thereby recommending a traffic package combination to each target user based on the traffic gap value of each target user. The scheme is to recommend a traffic package based on mobile network traffic demand. For a user who has known current traffic and traffic usage records in a period of time, the future traffic demand of the user in a period of time is predicted, and a traffic package that meets the demand is recommended to the user according to the prediction, that is, the future traffic demand of the user in a period of time is predicted based on the historical usage of the user, the future traffic gap of the user in a period of time is calculated based on the traffic demand, and a suitable traffic package is recommended to the user based on the traffic gap, so that the problem of dynamic change of user demand for the product can be effectively handled, and the customer experience is improved.
[0008] In a first possible implementation manner of the first aspect, the determination of the traffic usage of the plurality of target users in the target historical time period comprises: determining a first start time and a first end time, and obtaining the target historical time period based on the first start time and the first end time; filtering the plurality of target users from the users in the target historical time period according to the traffic products with the existing structured information and the subscription records of the users to the traffic products; and calculating the daily traffic usage of each target user in the target historical time period according to the application program daily table, the traffic usage daily table, and the records of the user subscription to the traffic package.
[0009] In a second possible implementation manner of the first aspect, the training of the user demand prediction model based on the traffic usage of the plurality of target users comprises: taking the traffic usage of the plurality of target users as a data set, and dividing the plurality of target users into users of a training data set and users of a test data set, the training data set and the test data set being obtained by dividing the total traffic of the plurality of target users per day; performing scale transformation on the total traffic in the training data set and the test data set, and selecting data at a preset numerical position to transform the data to a preset interval to obtain a target sequence; constructing a time sequence prediction model based on a long short-term memory artificial neural network (LSTM), and reading the data in the target sequence based on the time sequence prediction model, the time sequence prediction model being composed of two layers of LSTM and a fully connected layer in series; performing multiple times of training on the time sequence prediction model by using a target loss function and the target sequence to obtain model parameters of a time of training with the minimum test loss value as the user demand prediction model.
[0010] In a third possible implementation manner of the first aspect, the user demand prediction model is adopted to predict the traffic demand value of each target user in the first time period, and the traffic gap value of each target user is determined based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, including: determining the second start time and the second end time, and obtaining the first time period based on the second start time and the second end time; inputting the directed traffic of each target user into the user demand prediction model to predict the traffic demand value of each target user in the first time period; calculating the remaining traffic of each target user in the first time period according to the traffic product subscription record of each target user; determining the traffic gap value of each target user based on the traffic demand value and the remaining traffic of each target user in the future time period.
[0011] In a fourth possible implementation manner of the first aspect, the traffic package combination is recommended for each target user based on the traffic gap value of each target user, including: judging whether there is a still invalid monthly package for the plurality of target users; in the case that there is no still invalid monthly package, recommending the traffic package combination for each target user based on the traffic gap value of each target user.
[0012] In a fifth possible implementation manner of the first aspect, the traffic package combination is recommended for each target user based on the traffic gap value of each target user, including: screening out the traffic packages with structured information that belong to the immediately effective traffic packages, and sorting according to the priority required by the business; for each target user, obtaining the subscribable products of each target user in the screened out immediately effective traffic packages, and constructing a binary tree based on the subscribable products, the binary tree including at least one node, the higher the level of the node, the higher the priority of the product, each node including two branches, one branch representing subscribing to the product and the other branch representing not subscribing to the product; adopting a depth-first traversal manner to find a target path based on the binary tree, the number of products on the target path being not more than a preset value, the sum of the traffic of the products on the target path being not less than the traffic gap value, and the sum of the valid period of the products on the target path being not less than the interval of the first time period; determining the recommended traffic package combination for each target user based on the combination of the traffic packages on the target path.
[0013] In a second aspect, the application provides a traffic package recommendation device, which comprises: a determination unit configured to determine traffic usage of a plurality of target users in a target historical time period, the traffic usage comprising general traffic usage and directional traffic usage; a training unit configured to train a user demand prediction model based on the traffic usage of the plurality of target users, the traffic usage of a target user comprising a sum of general traffic used by the target user and directional traffic used by the target user; a prediction unit configured to predict a traffic demand value of each target user in a first time period by using the user demand prediction model, and determine a traffic gap value of each target user based on the traffic demand value of each target user in the first time period and a remaining traffic of each target user; and a recommendation unit configured to recommend a traffic package combination for each target user based on the traffic gap value of each target user.
[0014] In a first possible implementation manner of the second aspect, the determination unit is specifically configured to: determine a first start time and a first end time, and obtain the target historical time period based on the first start time and the first end time; select the plurality of target users from users in the target historical time period according to traffic products with existing structured information and subscription records of the users to the traffic products; and calculate daily traffic usage of each target user in the target historical time period according to an application program daily table, a traffic usage daily table, and records of the users subscribing to traffic packages.
[0015] In a second possible implementation manner of the second aspect, the training unit is specifically configured to: take the traffic usage of the plurality of target users as a data set, and divide the plurality of target users into users of a training data set and users of a test data set, the training data set and the test data set being obtained by dividing total traffic of the plurality of target users per day; perform scale transformation on the total traffic in the training data set and the test data set, and select data at a preset numerical position to transform the data to a preset interval to obtain a target sequence; construct a time series prediction model based on a long short-term memory artificial neural network (LSTM), and read data in the target sequence based on the time series prediction model, the time series prediction model being composed of two layers of LSTM and a fully connected layer in series; and perform multiple times of training on the time series prediction model by using a target loss function and the target sequence, to obtain model parameters of a time of training with a minimum test loss value as the user demand prediction model.
[0016] In a third possible implementation manner of the second aspect, the prediction unit is specifically configured to: determine the second start time and the second end time, and obtain the first time period based on the second start time and the second end time; input the directional traffic of each target user into the user demand prediction model to obtain the traffic demand value of each target user in the first time period; calculate the residual traffic of each target user in the first time period according to the traffic product subscription record of each target user; and determine the traffic gap value of each target user based on the traffic demand value and the residual traffic of each target user in the future time period.
[0017] In a fourth possible implementation manner of the second aspect, the recommendation unit is specifically configured to: determine whether there is a still valid monthly traffic package for each target user; and recommend a traffic package combination for each target user based on the traffic gap value of each target user in a case where there is no still valid monthly traffic package.
[0018] In a fifth possible implementation manner of the second aspect, the recommendation unit is specifically configured to: filter out the traffic packages with immediate effect from the traffic packages with structured information, and sort the traffic packages with immediate effect according to the priority of the business requirement; for each target user, obtain the subscribable products of each target user from the filtered traffic packages with immediate effect, and construct a binary tree based on the subscribable products, the binary tree including at least one node, a node at a higher level representing a product with a higher priority, each node including two branches, one branch representing subscription of the product and the other branch representing non-subscription of the product; find a target path based on the binary tree in a depth-first traversal manner, the target path including a number of products not exceeding a preset value, a sum of traffic of the products on the target path being not less than the traffic gap value, and a sum of valid period days of the products on the target path being not less than the interval of the first time period; and determine the recommended traffic package combination for each target user based on the combination of the traffic packages on the target path.
[0019] In a third aspect, the present application provides a traffic package recommendation device, the device comprising: a processor and a communication interface; the communication interface and the processor are coupled, and the processor is configured to run a computer program or instructions to implement the traffic package recommendation method as described in the first aspect and any possible implementation manner of the first aspect.
[0020] In a fourth aspect, the present application provides a computer readable storage medium, the computer readable storage medium storing instructions, when the instructions are run on a terminal, causing the terminal to execute the traffic package recommendation method as described in the first aspect and any possible implementation manner of the first aspect.
[0021] In a fifth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when the computer program product runs on the traffic package recommendation device, cause the traffic package recommendation device to perform the traffic package recommendation method described in the first aspect and any possible implementation manner of the first aspect.
[0022] In a sixth aspect, an embodiment of the present application provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run a computer program or instructions to implement the traffic package recommendation method described in the first aspect and any possible implementation manner of the first aspect.
[0023] Specifically, the chip provided in the embodiment of the present application further comprises a memory configured to store the computer program or instructions. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 A flowchart of a traffic package recommendation method provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a construction process of total traffic and directional traffic provided in an embodiment of the present application;
[0026] Figure 3 A flowchart of a calculation process of available traffic and gap traffic provided in an embodiment of the present application;
[0027] Figure 4 A structural schematic diagram of a traffic package recommendation device provided in an embodiment of the present application;
[0028] Figure 5 A structural schematic diagram of another traffic package recommendation device provided in an embodiment of the present application;
[0029] Figure 6 A structural schematic diagram of a chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The traffic package recommendation method, device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0031] The term “and / or” in the present document is merely used to describe an association relationship of associated objects, and indicates that there can be three relationships, for example, A and / or B can represent three cases of existence of A alone, existence of A and B simultaneously, and existence of B alone.
[0032] The terms “first” and “second” and the like in the specification and the drawings of the present application are used to distinguish different objects, or to distinguish different treatments of the same object, and are not used to describe a specific order of the objects.
[0033] Moreover, the terms "comprise", "comprising", "have", "having", "include", "including", "contain", "containing", "provide", "providing", "offer", "offering", "may" and any variations thereof in the description and in the claims are intended to cover both the inclusive and the exclusive cases. For example, a process, method, system, product, or apparatus that comprises a list of steps or units is not necessarily limited to the listed steps or units, but can optionally include additional steps or units not listed, or can optionally include other steps or units inherent to the process, method, system, product, or apparatus.
[0034] It should be noted that the terms "exemplary" and "for example" are used herein to mean "an example of" or "one example among others." Any embodiment or design scheme described as "exemplary" or "for example" in the present application is not necessarily to be construed as preferred or advantageous over other embodiments or design schemes. Rather, use of the terms "exemplary" or "for example" is intended to present concepts in a particular manner.
[0035] In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0036] Hereinafter, the traffic package recommendation method provided by the embodiments of the present application is described through specific scenarios and implementation manners.
[0037] With the development of information technology, the richness of services that operators can provide to users is also increasing, and users have a great degree of freedom in the way and intensity of using network, voice, and information services through mobile phones. Under this freedom, users form different and diverse needs and use habits for mobile phone services, and always hope to meet their needs or use habits at the most favorable price, so users have different degrees of preference for service products provided by operators. In the big data era, in addition to the user's subscription history of products that can be obtained, the user's habits of using network, voice, and information services can also be obtained from the Internet records, call records, and information records, and the user's needs and use habits are just embodied in the user behaviors represented by these records, which can be perceived by certain technical means. Then, the products or product combinations that can meet the user's future needs are automatically found in the product library of the operator and recommended to the user. In this way, not only the user's needs can be met, but also the operator's revenue can be increased.
[0038] Since it can be considered that the past use of mobile network traffic by a user and the future use are both a use pattern of the user himself, which can be related to the degree of dependence of the user on network services, the use preference of various application programs (APP), the habit of using at which time, and the period of about several days, and this pattern can be maintained stable in a relatively short period of time, therefore, by analyzing the past traffic use behavior, the traffic use intensity of the user in the future period of time can be predicted. Generally, the user does not want to spend too much time and effort to think about which traffic package the operator has launched and how to combine these traffic packages to meet his own needs, so a traffic package recommendation system is needed to automatically predict the future traffic demand of the user and match the traffic package according to the prediction result.
[0039] Currently, there are some researches trying to solve the problem of identifying users with upgrade needs and matching new packages based on the prediction of future traffic use of users. However, from the perspective of operator marketing, it is a relatively strong recommendation method for users to switch the existing package - theoretically, the new package can be more cost-effective, but users are easy to resist such a big change, so the recommendation suggestion is difficult to be adopted, and the situation of the package is difficult to improve. Moreover, the demand for traffic of some users is different in different seasons, and it is not appropriate to recommend these users to switch between several packages.
[0040] In the current general product recommendation system, the basic method for predicting purchase tendency is to construct a "user-product" matrix using known values, obtain user and product representation vectors using matrix decomposition method, and then use these representation vectors to calculate the purchase tendency value. However, in actual application scenarios, for some products, this tendency value is not a fixed value, but a value that changes over time. For example, the traffic package product targeted by the present application, all online users will have a certain demand for using traffic to surf the Internet, but whether to really recommend a certain traffic package to the user and what kind of traffic package to recommend are beyond the scope of the current general product recommendation system.
[0041] Therefore, how to handle the dynamic change of user demand for traffic products is a problem to be solved.
[0042] To solve the above technical problems, the application provides a traffic package recommendation method, determines traffic usage of a plurality of target users in a target historical time period, and trains a user demand prediction model based on the traffic usage of the plurality of target users, then uses the user demand prediction model to predict traffic demand values of each target user in a first time period, and determines a traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, thereby recommending a traffic package combination for each target user based on the traffic gap value of each target user. The scheme is to recommend a traffic package based on mobile network traffic demand, for a user who has known current traffic and traffic usage records for a period of time, first predict the traffic demand of the user for a future period of time, and then recommend a traffic package that can meet the demand to the user according to the prediction, that is, the traffic demand of the user for a future period of time can be predicted based on the historical usage of the user, the traffic gap of the user for a future period of time is calculated based on the traffic demand, and a suitable traffic package is recommended to the user based on the traffic gap, so that the problem of dynamic change of user demand for the product can be effectively handled, and customer experience is improved.
[0043] As shown in Figure 1 the flowchart of the traffic package recommendation method provided by the embodiment of the application, the method comprises the following steps S101 to S104:
[0044] S101, determine the traffic usage of a plurality of target users in a target historical time period.
[0045] In the embodiment of the application, the traffic usage includes general traffic usage and directional traffic usage.
[0046] In an implementation manner, S101 can be implemented by S101a to S101c as follows:
[0047] S101a, determine a first start time and a first end time, and obtain a target historical time period based on the first start time and the first end time.
[0048] For example, three key time nodes are determined, namely the start date D1 of the user usage history studied, the current date D2, and the last day D3 of the current month, it is suggested that D2 is selected as the 15th day of a month, and D1 is the first day of the last month. It is considered that the user usage data from the day after D2 to D3 is unknown and to be predicted, and the purpose of the traffic package recommendation is to meet the traffic demand of the user for the remaining half month.
[0049] For example, a possible value is that D1 is February 1, 2022, D2 is March 15, 2022, and D3 is March 31, 2022, and the flow described in the application is run at zero o'clock on March 16, 2022.
[0050] S101b, filtering a plurality of target users from the users in the target historical time period according to the flow products with existing structured information and the subscription records of the users to the flow products.
[0051] In the embodiments of the present application, a batch of "researchable users" are filtered according to the products with existing structured information and the subscription records of the users to the products: all the products subscribed by each user between D1 and D2 are either free of flow or have known structured information.
[0052] It should be noted that some information describing the products is unstructured, such as web pages, pictures, texts, etc., which are difficult to be directly used by the method in the present application, and only some structured information can be used, that is, for each type of flow-included product, several fields are specified, and the product id and the values of each field form a table convenient for query. The fields of the package product should include product name, whether it is a 5G product, how much general flow it contains, how much special flow it contains, the name of the target APP series of the special flow; the fields of the flow package product should include product name, whether it is a 5G product, how long the validity period is, how much general flow it contains, whether it takes effect immediately or the next month, etc.
[0053] S101c, calculating the flow usage of each target user in each day in the target historical time period according to the application program daily table, the flow usage daily table and the record of the user subscribing to the flow package.
[0054] In the embodiments of the present application, the total flow and the special flow usage of each researchable user from D1 to D2 each day are calculated according to the APP daily table, the flow usage daily table and the record of the user subscribing to the package, which are denoted as uFlow_total and uFlow_special.
[0055] S102, training a user demand prediction model based on the flow usage of the plurality of target users.
[0056] In the embodiments of the present application, the flow usage of a target user includes the sum of the general flow used and the special flow used by the target user.
[0057] In the embodiments of the present application, a time series prediction model can be trained using the data of uFlow_total of each user, and it is used to predict the total flow of each user from D2 to D3.
[0058] Specifically, as Figure 2As shown, the corresponding package of each researchable user in each month within the research range D1~D3 is parsed from the history of the user ordering the package to form a three-column table (user, month, package id of the month); the package id of the above table is associated with the directional traffic APP item in the structured information of the package to form a new three-column table (user, month, directional traffic target APP series name of the package of the month), wherein the value of the package directional traffic target APP series name should be only a few; the APP daily table (user, date, APP name, traffic) of each month is sorted into a form (user, date, daily APP series 1 consumption traffic, daily APP series 2 consumption traffic,...) of daily total amount of sub-series statistics with only one row per day; the above obtained tables are associated, that is, the directional traffic consumed by each researchable user per day is obtained to form a three-column table (user, date, daily consumption directional traffic uFlow_special); the date of each target user is completed, that is, the dates without records of each user are all supplemented, and the value of uFlow_special is set to 0, so as to ensure that the records of each user in the formed table include each day of D1~D2; the records of the researchable users are obtained from the traffic usage daily table (user, date, total traffic, free traffic), and the date is completed, and finally a three-column table (user, date, daily total traffic consumption uFlow_special) is formed; the information of the above tables is combined to form a four-column table (user, date, uFlow_total, uFlow_special).
[0059] In an implementation manner, S102 can be implemented through S102a to S102d as follows.
[0060] S102a, the traffic usage of the plurality of target users is taken as a data set, and the plurality of target users are divided into users of a training data set and users of a test data set.
[0061] In the embodiments of the application, the training data set and the test data set are obtained by dividing the total traffic of the plurality of target users per day.
[0062] S102b, the total traffic in the training data set and the test data set is subjected to a scale transformation, and data at a preset numerical position is selected to transform the data to a preset interval to obtain a target sequence.
[0063] S102c, a time sequence prediction model based on LSTM is constructed, and data in the target sequence is read based on the time sequence prediction model.
[0064] In the embodiments of the application, the time sequence prediction model is composed of two layers of LSTM and a fully connected layer in series.
[0065] S102d, using the target loss function and the target sequence, the time series prediction model is trained multiple times, and the model parameters of the training with the minimum test loss value are obtained as the user demand prediction model.
[0066] Specifically, in the above data set (the traffic usage of multiple target users as a data set), the users are randomly divided according to 9:1, and are respectively used as the users of the training data set and the users of the test data set. The uFlow_total sequence of these users is constructed into the training data set and the test data set according to this division, so that the uFlow_total of each user is a data; the uFlow_total in the two data sets is scaled, the 99% quantile MAX_VALUE is first found, and then most of the data is transformed to the interval [-1, 1] according to the following formula: ; a time series prediction model based on LSTM is constructed, which is composed of two layers of LSTM and a fully connected layer in series, and its task is to update and maintain the memory and output of LSTM according to each value in the sequence when reading the value, and output the prediction of the next time value; after reading the entire sequence, the future parameter of the model is used to iteratively perform single-step prediction for future times; the root mean square error is used as the loss function, and the sequence in the training data set is used to train the above model, and the model is trained for 300 epochs. After each epoch is completed, the sequence in the test data set is used to test the loss value of the current model, and finally the model parameters of the epoch with the minimum test loss value are selected as the final user demand prediction model; the prediction model is used to read the entire sequence of all the users under study, and then future is set to the number of days between D2 and D3 minus 1, the traffic from D2 to D3 is predicted, and then the sum is calculated, that is, the total traffic of each user from D2 to D3 is predicted.
[0067] S103, using the user demand prediction model, the traffic demand value of each target user in the first time period is predicted, and based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, the traffic gap value of each target user is determined.
[0068] In the embodiment of the application, according to the prediction result and the historical record of subscribing to the traffic product (package, traffic package), the value of each user exceeding the existing traffic in the future is predicted, that is, the total traffic that needs to be supplemented and subscribed in the future is calculated.
[0069] In one implementation manner, S103 can be implemented by S103a to S103d as follows:
[0070] S103a, determine a second start time and a second end time, and obtain a first time period based on the second start time and the second end time.
[0071] S103b, input the directional traffic of each target user into a user demand prediction model to obtain a traffic demand value of each target user in the first time period.
[0072] S103c, calculate the remaining traffic of each target user in the first time period according to the traffic product subscription record of each target user.
[0073] S103d, determine a traffic gap value of each target user based on the traffic demand value and the remaining traffic of each target user in the future time period.
[0074] Specifically, as Figure 3As shown, the time truncation is performed on the traffic product subscription records of the users under study, i.e. all the records with the expiration time earlier than D1 and the effective time later than D2 are removed, and all the records with the effective time earlier than D1 are changed to D1, and all the records with the expiration time later than D3 are changed to D3; the users who have subscribed to the n-day traffic package are referred to as "users to be corrected", and the uFlow_total and uFlow_special of these users are taken out; for each user to be corrected, all the n-day traffic packages subscribed by the user are arranged in ascending order of effective time; each time a traffic package is taken, the sum of uFlow_total from the effective time to the expiration time is calculated, if the sum is less than the supply flow of the traffic package, then uFlow_total and uFlow_special are both "corrected" to 0; if the sum exceeds the supply flow of the traffic package, then the day from which the excess starts is found, and then uFlow_total and uFlow_special before the excess day are "corrected" to 0, uFlow_total and uFlow_special of the excess day are "corrected" to the excess part of the day, and uFlow_total and uFlow_special after the excess day are all retained; the corrected uFlow_total and uFlow_special values and the uFlow_total and uFlow_special values that do not need to be corrected are re-combined into a corrected table, and the number of rows of the table should remain consistent with the original uFlow_total and uFlow_special; for each user under study, the subscription records of the package and the monthly traffic package are taken, the structured information of the package and the traffic package is associated, and a four-column table (user, effective time, expiration time, and traffic provided each month) is obtained, and then the available traffic each month from D1 to D2 is calculated according to the table (only the package and the monthly traffic package, and the n-day traffic package has been processed in the previous step); the total usage traffic of the users under study each month from D1 to D2 is calculated according to the corrected uFlow_total and uFlow_special, and then according to the traffic consumption rule, the remaining traffic of the previous month is calculated first, and the remaining traffic is supplemented into the available traffic of the next month, and the iteration is performed until the remaining traffic of the current month is calculated; the predicted total traffic demand and the remaining traffic are associated, and the missing traffic / gap traffic of each user under study is calculated.
[0075] In S104, a traffic package combination is recommended for each target user based on the traffic gap value of each target user.
[0076] In the embodiments of the present application, according to the missing traffic size of each user, all traffic package combinations that can meet the missing traffic of the user are generated from the existing structured information traffic packages.
[0077] In an implementation, the S104 can be implemented by the following S104a and S104b.
[0078] S104a, determining whether there is still a non-expired monthly traffic package for each target user.
[0079] S104b, in the case where there is no non-expired monthly traffic package, recommending a traffic package combination for each target user based on the traffic gap value of each target user.
[0080] In an implementation, the S104 can be implemented by the following S1041 to S1044.
[0081] S1041, screening out the traffic packages that belong to the immediately effective traffic packages from the existing structured information, and sorting them according to the priority required by the business.
[0082] S1042, for each target user, obtaining each target user's subscribable product from the screened out immediately effective traffic packages, and constructing a binary tree based on the subscribable product.
[0083] In the embodiments of the present application, the binary tree includes at least one node, and the higher the level of the node, the higher the priority of the product. Each node includes two branches, one branch representing subscribing to the product, and the other branch representing not subscribing to the product.
[0084] S1043, using a depth-first traversal method to find a target path based on the binary tree.
[0085] In the embodiments of the present application, the number of products on the target path is not more than a preset value, the sum of the traffic of the products on the target path is not less than the traffic gap value, and the sum of the valid period of the products on the target path is not less than the interval of the first time period.
[0086] S1044, determining the recommended traffic package combination for each target user based on the combination of the traffic packages on the target path.
[0087] Specifically, the traffic packages with immediate effect are screened out from the traffic packages with structured information, and are sorted according to the priority required by the business; from the above four-column table (user, effective time, invalid time, and traffic provided each month), the users with the traffic package that has not yet been invalidated in the current month are screened out. According to the usage rules of the traffic package, these users cannot subscribe to other traffic packages; for each user to be studied, the subscribable products of the user are constructed into a binary tree, the root node represents the product with the highest priority, the left and right branches respectively represent whether to subscribe to the product or not, the two nodes of the second layer both represent the product with the second highest priority, and the meanings of the left and right branches remain unchanged, and so on. In order to save memory, it can be dynamically constructed locally according to the rules in subsequent steps; a first such path is found in a depth-first traversal manner: the number of products on the path does not exceed 3, the sum of the traffic of the products is not less than the missing traffic, and the sum of the valid period of the products is not less than the interval between D2 and D3, and the combination of the traffic packages on the obtained path is the traffic package combination matched for the user.
[0088] The embodiment of the application provides a traffic package recommendation method, determines traffic usage of a plurality of target users in a target historical time period, and trains a user demand prediction model based on the traffic usage of the plurality of target users, then uses the user demand prediction model to predict a traffic demand value of each target user in a first time period, and determines a traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, thereby recommending a traffic package combination for each target user based on the traffic gap value of each target user. The scheme is based on mobile network traffic demand to recommend a traffic package, for a user who knows the currently owned traffic and a traffic usage record in a period of time, the future traffic demand of the user in a period of time is predicted, and then a traffic package that can meet the demand is recommended to the user, that is, the future traffic demand of the user in a period of time can be predicted based on the historical usage of the user, the future traffic gap of the user in a period of time is calculated based on the traffic demand, and a suitable traffic package is recommended to the user based on the traffic gap, so that the problem of dynamic change of product demand of the user can be effectively handled, and the customer experience is improved.
[0089] The embodiment of the application can divide the function modules or function units of the traffic package recommendation device according to the above method examples, for example, each function module or function unit can be divided corresponding to each function, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware or in the form of software function module or function unit. The division of the modules or units in the embodiment of the application is illustrative, and is only a logical function division, and another division mode can be used in actual implementation.
[0090] As Figure 4 shown, a structure schematic diagram of a traffic package recommendation device provided by an embodiment of the present application is shown, the device comprises:
[0091] A determination unit 41 is configured to determine traffic usage of a plurality of target users in a target historical time period, the traffic usage comprising general traffic usage and directional traffic usage. A training unit 42 is configured to train a user demand prediction model based on the traffic usage of the plurality of target users, the traffic usage of one target user comprising a sum of general traffic used by the target user and directional traffic used by the target user. A prediction unit 43 is configured to predict a traffic demand value of each target user in a first time period by using the user demand prediction model, and determine a traffic gap value of each target user based on the traffic demand value of each target user in the first time period and a remaining traffic of each target user. A recommendation unit 44 is configured to recommend a traffic package combination for each target user based on the traffic gap value of each target user.
[0092] In a possible implementation, the determination unit 41 is specifically configured to: determine a first start time and a first end time, and obtain the target historical time period based on the first start time and the first end time; select a plurality of target users from users in the target historical time period according to traffic products with existing structured information and subscription records of the users to the traffic products; and calculate daily traffic usage of each target user in the target historical time period according to an application program daily table, a traffic usage daily table and records of the users subscribing to traffic packages.
[0093] In a possible implementation, the training unit 42 is specifically configured to: take the traffic usage of the plurality of target users as a data set, and divide the plurality of target users into users of a training data set and users of a test data set, the training data set and the test data set being obtained by dividing total traffic of the plurality of target users per day; perform scale transformation on the total traffic in the training data set and the test data set, and select data at a preset numerical position to transform the data to a preset interval to obtain a target sequence; construct a time series prediction model based on a long short-term memory artificial neural network (LSTM), and read data in the target sequence based on the time series prediction model, the time series prediction model being composed of two layers of LSTM and one fully connected layer in series; and perform multiple times of training on the time series prediction model by using a target loss function and the target sequence to obtain model parameters of one time of training with a minimum test loss value as the user demand prediction model.
[0094] In a possible implementation, the prediction unit 43 is specifically configured to: determine the second start time and the second end time, and obtain the first time period based on the second start time and the second end time; input the directional traffic of each target user into a user demand prediction model to obtain the traffic demand value of each target user in the first time period; calculate the residual traffic of each target user in the first time period according to the traffic product subscription record of each target user; and determine the traffic gap value of each target user based on the traffic demand value and the residual traffic of each target user in the future time period.
[0095] In a possible implementation, the recommendation unit 44 is specifically configured to: determine whether there is a still valid monthly traffic package for each target user; and recommend a traffic package combination for each target user based on the traffic gap value of each target user in a case where there is no still valid monthly traffic package.
[0096] In a possible implementation, the recommendation unit 44 is specifically configured to: filter out the traffic packages that belong to the immediately effective traffic packages from the existing structured information, and sort the immediately effective traffic packages according to the priority required by the business; for each target user, obtain the subscribable products of each target user from the filtered immediately effective traffic packages, and construct a binary tree based on the subscribable products, the binary tree including at least one node, a node at a higher level representing a product with a higher priority, each node including two branches, one branch representing subscribing to the product and the other branch representing not subscribing to the product; find a target path based on the binary tree in a depth-first traversal manner, the target path including a number of products not exceeding a preset value, a sum of traffic of the products on the target path being not less than the traffic gap value, and a sum of valid period days of the products on the target path being not less than the interval of the first time period; and determine the recommended traffic package combination for each target user based on the combination of the traffic packages on the target path.
[0097] In a hardware implementation, the determination unit 41, the training unit 42, the prediction unit 43 and the recommendation unit 44 in the embodiments of the present application can be integrated on a processor. The specific implementation is shown in Figure 5 .
[0098] Figure 5Another possible structural diagram of the traffic package recommendation apparatus involved in the above embodiments is shown. The traffic package recommendation apparatus includes a processor 302 and a communication interface 303. The processor 302 is configured to control and manage the actions of the traffic package recommendation apparatus, for example, to perform the steps performed by the determination unit 41, the training unit 42, the prediction unit 43 and the recommendation unit 44 described above, and / or to perform other processes of the techniques described herein. The communication interface 303 is configured to support the communication of the traffic package recommendation apparatus with other network entities. The traffic package recommendation apparatus can further include a memory 301 and a bus 304, the memory 301 being configured to store the program codes and data of the traffic package recommendation apparatus.
[0099] The memory 301 can be a memory in the traffic package recommendation apparatus, etc., which can include a volatile memory such as a random access memory, and can also include a non-volatile memory such as a read-only memory, a flash memory, a hard disk or a solid state disk, and can also include a combination of the above kinds of memories.
[0100] The processor 302 described above can be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a transistor logic device, a hardware component or any combination thereof, which can implement or execute the various exemplary logical blocks, modules and circuits described in connection with the disclosure of the present application. The processor can be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.
[0101] The bus 304 can be an extended industry standard architecture (EISA) bus or the like. The bus 304 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0102] Figure 6 The chip 170 provided by the embodiments of the present application is shown in the structural diagram. The chip 170 includes one or more than two (including two) processors 1710 and a communication interface 1730.
[0103] Optionally, the chip 170 further includes a memory 1740, which can include read-only memory and random access memory, and provides the processor 1710 with operation instructions and data. A part of the memory 1740 can further include non-volatile random access memory (NVRAM).
[0104] In some embodiments, the memory 1740 stores the following elements, execution modules or data structures, or a subset thereof, or an extended set thereof.
[0105] In the embodiments of the present application, corresponding operations are performed by calling operation instructions stored in the memory 1740 (the operation instructions can be stored in an operating system).
[0106] The processor 1710 can implement or execute the various exemplary logical blocks, units and circuits described in connection with the disclosure of the present application. The processor can be a central processing unit, a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, transistor logic device, hardware component or any combination thereof. It can implement or execute the various exemplary logical blocks, units and circuits described in connection with the disclosure of the present application. The processor can also be a combination of components that implement computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0107] The memory 1740 can include volatile memory, such as random access memory; the memory can also include non-volatile memory, such as read-only memory, flash memory, hard disk or solid state disk; the memory can also include a combination of the above types of memory.
[0108] The bus 1720 can be an Extended Industry Standard Architecture (EISA) bus or the like. The bus 1720 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0109] Those skilled in the art can clearly understand the above-mentioned technical solutions from the description of the above-embodiment, for the convenience and brevity of description, only the above-mentioned division of functional modules is exemplified, in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
[0110] The embodiment of the present application provides a computer program product containing instructions, when the computer program product runs on a computer, so that the computer executes the flow packet recommendation method in the method embodiment.
[0111] The embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores instructions, when the instructions run on a computer, so that the computer executes the flow packet recommendation method in the method flow shown in the method embodiment.
[0112] The computer readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). In the embodiment of the present application, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus.
[0113] The embodiment of the present application provides a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the flow packet recommendation method described in the above embodiment.
[0114] Since the flow packet recommendation device, the computer readable storage medium and the computer program product in the embodiment of the present application can be applied to the above method, the technical effects that can be obtained can be referred to the above method embodiment, and the embodiment of the present application will not be repeated here.
[0115] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiment is only schematic, for example, the division of the unit is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0116] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.
[0117] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.
[0118] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited to this. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for recommending data packages, characterized in that, The method includes: Determine the traffic usage of multiple target users within a target historical time period, including general traffic usage and targeted traffic usage; Based on the traffic usage of the multiple target users, a user demand prediction model is trained. The traffic usage of a target user includes the sum of the general traffic and the targeted traffic used by the target user. Using the user demand prediction model, the traffic demand value of each target user in the first time period is predicted, and based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, the traffic gap value of each target user is determined. Based on the traffic gap value of each target user, a traffic package combination is recommended for each target user.
2. The method according to claim 1, characterized in that, Determining the traffic usage of multiple target users within a target historical time period includes: Determine the first start time and the first end time, and obtain the target historical time period based on the first start time and the first end time; Based on existing structured information about traffic products and users' subscription records for traffic products, the multiple target users are selected from users within the target historical time period. Based on the application daily schedule, data usage daily schedule, and user data plan subscription records, the daily data usage of each target user within the target historical time period is calculated.
3. The method according to claim 1 or 2, characterized in that, The user demand prediction model trained based on the traffic usage of the multiple target users includes: The traffic usage of the multiple target users is used as a dataset, and the multiple target users are divided into users of the training dataset and users of the test dataset. The training dataset and the test dataset are obtained by dividing the total daily traffic of the multiple target users. The total traffic in the training dataset and the test dataset is scaled, and data at preset numerical positions is selected and transformed to a preset interval to obtain the target sequence. A time series prediction model based on a long short-term memory artificial neural network LSTM is constructed, and data in the target sequence is read based on the time series prediction model. The time series prediction model consists of two LSTM layers and a fully connected layer connected in series. The time series prediction model is trained multiple times using the target loss function and the target sequence. The model parameters of the training with the smallest test loss value are then used as the user demand prediction model.
4. The method according to claim 1, characterized in that, The step of using the user demand prediction model to predict the traffic demand value of each target user in the first time period, and determining the traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user, includes: Determine a second start time and a second end time, and obtain the first time period based on the second start time and the second end time; The targeted traffic of each target user is input into the user demand prediction model to predict the traffic demand value of each target user in the first time period. Based on the data traffic product subscription records of each target user, calculate the remaining data traffic of each target user in the first time period; Based on the future traffic demand and remaining traffic of each target user for a future time period, determine the traffic gap value of each target user.
5. The method according to claim 1, characterized in that, The step of recommending a data package combination for each target user based on the data gap value of each target user includes: Determine whether any of the target users still have valid monthly data packages. If no existing monthly data packages are available, a data package combination is recommended for each target user based on their data gap value.
6. The method according to claim 1 or 5, characterized in that, The step of recommending a data package combination for each target user based on the data gap value of each target user includes: Filter out the traffic packets with existing structured information that are immediately effective, and sort them according to the priority of business requirements; For each target user, obtain the products that each target user can order from the filtered, immediately effective traffic packages, and construct a binary tree based on the orderable products. The binary tree includes at least one node, where higher-level nodes represent products with higher priority. Each node includes two branches, one branch representing ordering the product and the other branch representing not ordering the product. The target path is found by using a depth-first traversal method based on the binary tree. The number of products on the target path does not exceed a preset value, the sum of the product traffic on the target path is not less than the traffic gap value, and the sum of the validity days of the products on the target path is not less than the interval of the first time period. Based on the combination of traffic packages on the target path, a recommended traffic package combination is determined for each target user.
7. A data package recommendation device, characterized in that, The device includes: The determining unit is used to determine the traffic usage of multiple target users within a target historical time period, wherein the traffic usage includes general traffic usage and targeted traffic usage; The training unit is used to train a user demand prediction model based on the traffic usage of the multiple target users. The traffic usage of a target user includes the sum of the general traffic and the targeted traffic used by the target user. The prediction unit is used to use the user demand prediction model to predict the traffic demand value of each target user in the first time period, and to determine the traffic gap value of each target user based on the traffic demand value of each target user in the first time period and the remaining traffic of each target user. The recommendation unit is used to recommend a combination of data packages for each target user based on the data gap value of each target user.
8. The apparatus according to claim 7, characterized in that, The determining unit is specifically used for: Determine the first start time and the first end time, and obtain the target historical time period based on the first start time and the first end time; Based on existing structured information about traffic products and users' subscription records for traffic products, the multiple target users are selected from users within the target historical time period. Based on the application daily schedule, data usage daily schedule, and user data plan subscription records, the daily data usage of each target user within the target historical time period is calculated.
9. The apparatus according to claim 7 or 8, characterized in that, The training unit is specifically used for: The traffic usage of the multiple target users is used as a dataset, and the multiple target users are divided into users of the training dataset and users of the test dataset. The training dataset and the test dataset are obtained by dividing the total daily traffic of the multiple target users. The total traffic in the training dataset and the test dataset is scaled, and data at preset numerical positions is selected and transformed to a preset interval to obtain the target sequence. A time series prediction model based on a long short-term memory artificial neural network LSTM is constructed, and data in the target sequence is read based on the time series prediction model. The time series prediction model consists of two LSTM layers and a fully connected layer connected in series. The time series prediction model is trained multiple times using the target loss function and the target sequence. The model parameters of the training with the smallest test loss value are then used as the user demand prediction model.
10. The apparatus according to claim 7, characterized in that, The prediction unit is specifically used for: Determine a second start time and a second end time, and obtain the first time period based on the second start time and the second end time; The targeted traffic of each target user is input into the user demand prediction model to predict the traffic demand value of each target user in the first time period. Based on the data traffic product subscription records of each target user, calculate the remaining data traffic of each target user in the first time period; Based on the future traffic demand and remaining traffic of each target user for a future time period, determine the traffic gap value of each target user.
11. The apparatus according to claim 7, characterized in that, The recommendation unit is specifically used for: Determine whether any of the target users still have valid monthly data packages. If no existing monthly data packages are available, a data package combination is recommended for each target user based on their data gap value.
12. The apparatus according to claim 7 or 11, characterized in that, The recommendation unit is specifically used for: Filter out the traffic packets with existing structured information that are immediately effective, and sort them according to the priority of business requirements; For each target user, obtain the products that each target user can order from the filtered, immediately effective traffic packages, and construct a binary tree based on the orderable products. The binary tree includes at least one node, where higher-level nodes represent products with higher priority. Each node includes two branches, one branch representing ordering the product and the other branch representing not ordering the product. The target path is found by using a depth-first traversal method based on the binary tree. The number of products on the target path does not exceed a preset value, the sum of the product traffic on the target path is not less than the traffic gap value, and the sum of the validity days of the products on the target path is not less than the interval of the first time period. Based on the combination of traffic packages on the target path, a recommended traffic package combination is determined for each target user.
13. A data package recommendation device, characterized in that, include: A processor and a communication interface; the communication interface is coupled to the processor, the processor being used to run computer programs or instructions to implement the traffic package recommendation method as described in any one of claims 1-6.
14. A computer-readable storage medium storing instructions, characterized in that, When the computer executes the instruction, the computer performs the traffic package recommendation method as described in any one of claims 1-6.
Citation Information
Patent Citations
Package recommendation method and device, electronic equipment and computer readable medium
CN114186129A
Traffic packet ordering service processing method and device, electronic equipment and storage medium
CN115345696A