Flow package recommendation method based on artificial intelligence

The dual-task soft-sharing neural network model addresses the limitations of existing traffic package recommendation models by analyzing directional traffic and text features, enhancing recommendation precision and resource utilization through weight-sharing and soft-sharing mechanisms.

CN119135460APending Publication Date: 2024-12-13HUNAN COMM IND SERVICE CO LTD TECH TRAINING BRANCH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411403681.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing traffic package recommendation models fail to perform targeted feature analysis on traffic package features and do not fully utilize the value of raw data, limiting user consumption potential and recommendation effectiveness.

Method used

A dual-task soft-sharing neural network model is employed to recommend traffic packages and mobile phone models, incorporating directional traffic and text features, using weight-sharing fully connected layers and a cosine similarity merging layer to analyze matching degrees, with a soft-sharing mechanism to reuse features and minimize computing power expenditure.

Benefits of technology

The model achieves multi-feature, high-precision traffic package recommendations by fully utilizing data value, optimizing computing resources, and preventing catastrophic forgetting through weight amplification ablation experiments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135460A_ABST
    Figure CN119135460A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of traffic plan recommendation, and discloses a traffic plan recommendation method based on artificial intelligence, which adopts a double-task soft sharing neural network model to perform traffic plan recommendation and mobile phone model recommendation, gives consideration to directional traffic features and text features, and improves the traffic plan recommendation efficiency. According to the method, a full connection layer shared by two weights is used for carrying out re-representation and feature extraction on traffic features, a cosine similarity merging layer is used for analyzing the matching degree between directional traffic and user requirements, and in addition, a soft sharing mechanism is used for repeatedly utilizing the features used for traffic package recommendation tasks to carry out mobile phone model recommendation. By means of the technical means, the problems that an existing traffic plan recommendation model does not conduct targeted feature analysis on traffic plan features and data values are not fully developed are solved, and soft-sharing, high-precision and double-task traffic plan recommendation is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of traffic package recommendation, and specifically refers to a traffic package recommendation method based on artificial intelligence. Background Art

[0002] The traffic package recommendation method is a technology that provides users with personalized traffic package recommendations through data analysis and algorithm models based on factors such as user traffic usage habits, consumption capacity, and package preferences. For this purpose, the industry has invented a series of traffic package recommendation models, but traditional traffic package recommendation models only focus on feature construction of user consumption habits. They do not take into account the differences between traffic package features and other features, process traffic package features according to conventions, and do not conduct targeted feature analysis on traffic package features. The actual recommendation effect is unsatisfactory. In recent years, targeted traffic packages have gradually become popular, bringing more possibilities and diversity to traffic package services. However, the existing traffic package recommendation models do not analyze the matching degree between targeted traffic and user needs. In addition, the value of various types of raw data has not been fully developed. These problems seriously limit the further development of user consumption potential. Summary of the invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a traffic package recommendation method based on artificial intelligence. In view of the problem that the existing traffic package recommendation model does not perform targeted feature analysis on the traffic package features and the data value is not fully developed, the present invention adopts a dual-task soft sharing neural network model to recommend traffic packages and mobile phone models, taking into account both directional traffic features and text features. It uses two weight-shared fully connected layers to re-represent and extract features of directional traffic features and uses a cosine similarity merging layer to analyze the matching degree between directional traffic and user needs. In addition, it also uses a soft sharing mechanism to reuse the features used in the traffic package recommendation task to recommend mobile phone models, while increasing a little computing power expenditure, it fully develops the value of the original data, and organically combines the weight sharing mechanism and the soft sharing mechanism to achieve multi-feature, high-precision, dual-task traffic package recommendation.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a traffic package recommendation method based on artificial intelligence, and the method comprises the following steps:

[0005] Step S1: Collect package attribute records, software traffic usage records, package processing records and user mobile phone model records, and construct a data set;

[0006] Step S2: construct a dual-task soft-sharing neural network model;

[0007] Step S3: Use the dataset to perform multi-task training on the dual-task soft-shared neural network model in two stages by means of weight amplification ablation experiments;

[0008] Step S4: Use the dual-task soft-shared neural network model for prediction.

[0009] Furthermore, the process of constructing the data set in step S1 specifically includes the following steps:

[0010] Step S11: extracting a package handling record sample from the package handling record;

[0011] Step S12: extract the package name and phone number from the package handling record sample, extract the mobile phone model from the user's mobile phone model record according to the phone number and perform one-hot encoding on it to generate a mobile phone model code;

[0012] Step S13: converting the parts of the package handling record sample except the telephone number and the package name into a string format and encoding them to generate a user attribute sequence;

[0013] Step S14: extracting directional flow records from the package attribute records according to the package name, and constructing user flow sequences and directional flow sequences;

[0014] Step S15: converting the records in the package attribute record except the directional flow record into a string format and encoding them to generate a package attribute sequence;

[0015] Step S16: Integrate the package attribute sequence, user attribute sequence, user traffic sequence, directional traffic sequence and mobile phone model code of the package handling record sample into a positive sample of the data set, and add a purchase mark to the positive sample of the data set. The value of the purchase mark of the positive sample of the data set is 1;

[0016] Step S17: repeating steps S11 to S16 until each package handling record sample in the package handling record has a corresponding data set positive sample;

[0017] Step S18: copy the positive samples of all data sets, and randomly exchange the package attribute sequence and directional flow sequence of each copied positive sample of the data set with the package attribute sequence and directional flow sequence of the positive samples of other data sets to generate negative samples of the data set, and the purchase mark value of the negative samples of the data set is 0;

[0018] Step S19: Aggregate all positive samples of the data set and all negative samples of the data set into a data set.

[0019] Furthermore, in step S14, the process of constructing the user traffic sequence and the directional traffic sequence specifically includes the following steps:

[0020] Step S141: extract the names of the software limited by the directional flow in all packages from the package attribute records, calculate the union of them to generate a directional flow software set, and construct a directional flow template binary according to the directional flow software set<u,t> , where u is the name of a single software, t is the monthly traffic, the unit of t is MB, and the default value is 0. The directional traffic template tuples are sorted by the first letter of u to form a directional traffic template sequence;

[0021] Step S142: Fill in the directional flow template sequence according to the flow usage records of each software to generate a user flow sequence, where the basic unit in the user flow sequence is a user flow binary group.<u,t1> , t1 is the traffic consumed by the user in this software in the last month;

[0022] Step S143: Fill in the directional traffic template sequence according to the directional traffic record to generate a directional traffic sequence, where the basic unit in the directional traffic sequence is a user traffic binary group.<u,t2> , t2 is the directional traffic of the software corresponding to u in the directional traffic record.

[0023] Furthermore, the step S2 specifically includes the following steps:

[0024] Step S21: constructing a directional traffic feature branch and a text feature branch;

[0025] Step S22: constructing a mobile phone recommendation branch and a package purchase probability branch;

[0026] Step S23: construct a dual-task soft-sharing neural network model.

[0027] Furthermore, the step S21 specifically includes the following steps:

[0028] Step S211: constructing a first shared fully connected layer, a second shared fully connected layer, and a cosine similarity merging layer, and connecting the first shared fully connected layer and the second shared fully connected layer to the cosine similarity merging layer to construct a directional traffic feature branch;

[0029] Step S212: construct a first shared embedding layer, a second shared embedding layer, a first shared bidirectional LSTM layer, a second shared bidirectional LSTM layer, a first concatenation layer, a one-dimensional convolution layer, a third bidirectional LSTM layer and a first Highway layer;

[0030] Step S213: Connect the first shared embedding layer to the first shared bidirectional LSTM layer, connect the second shared embedding layer to the second shared bidirectional LSTM layer, connect the first shared bidirectional LSTM layer to the second shared bidirectional LSTM layer to the first concatenation layer, connect the first concatenation layer, the one-dimensional convolution layer, the third bidirectional LSTM layer and the first Highway layer in sequence to construct a text feature branch.

[0031] Furthermore, the step S22 specifically includes the following steps:

[0032] Step S221: construct a second splicing layer, a second Highway layer, and a MaxoutDense layer, connect the first shared fully connected layer and the first shared bidirectional LSTM layer to the second splicing layer, connect the second splicing layer, the second Highway layer, and the MaxoutDense layer in sequence, and construct a mobile phone recommendation branch;

[0033] Step S223: construct a third splicing layer, a third Highway layer and a third fully connected layer, connect the cosine similarity merging layer and the first Highway layer to the third splicing layer, connect the third splicing layer, the third Highway layer and the third fully connected layer in sequence, and construct a package purchase probability branch.

[0034] Furthermore, the step S23 specifically includes the following steps:

[0035] Step S231: specifying the first shared fully connected layer, the second shared fully connected layer, the first shared embedding layer, and the second shared embedding layer as the input layer of the dual-task soft shared neural network model, and specifying the third fully connected layer and the MaxoutDense layer as the output layer of the dual-task soft shared neural network model;

[0036] Step S232: applying L1 regularization to all layers in the directional flow feature branch and the text feature branch except the cosine similarity merging layer and the first concatenation layer;

[0037] Step S233: Specify the loss function of the MaxoutDense layer as categorical_crossentropy, the loss function of the third fully connected layer as binary_crossentropy, and the optimizer as adam.

[0038] Furthermore, the step S3 specifically includes the following steps:

[0039] Step S31: designate the user traffic sequence in the data set as the input of the first shared fully connected layer, designate the directional traffic sequence in the data set as the input of the second shared fully connected layer, designate the user attribute sequence in the data set as the input of the first shared embedding layer, designate the package attribute sequence in the data set as the input of the second shared embedding layer, designate the mobile phone model code in the data set as the target output of the MaxoutDense layer, and designate the purchase mark in the data set as the target output of the third fully connected layer;

[0040] Step S32: Divide the data set into a training set and a test set in a ratio of 8:2, set the trainable attribute of each layer except the second splicing layer in the mobile phone recommendation branch to False, freeze the weight of each layer except the second splicing layer in the mobile phone recommendation branch, and call the model.fit method to perform the first model training;

[0041] Step S33: Formulate the index of neurons with weights less than 0.1 in the first shared bidirectional LSTM layer, generate the second task neuron index, perform weight amplification and ablation experiments on the neurons pointed to by the second task neuron index one by one, and generate the posterior second task neuron index;

[0042] Step S34: Unfreeze the weights of each layer frozen in step S32, freeze the weights of each layer in the package purchase probability branch except the third splicing layer, extract the weights of each neuron in each layer except the cosine similarity merging layer and the first splicing layer in the directional traffic feature branch and the text feature branch, freeze the neurons except the posterior second task neuron index in the first shared bidirectional LSTM layer, and call the model.fit method to perform the second model training.

[0043] Furthermore, the process of performing weight amplification ablation experiments on the neurons pointed to by the second task neuron index one by one in step S33 specifically includes the following steps:

[0044] Step S331: Record the original accuracy of the third fully connected layer output after the first model training;

[0045] Step S332: selecting a verification neuron in order according to the second task neuron index, and enlarging the weight of the verification neuron to 1;

[0046] Step S333: Use the test set to test the dual-task soft-shared neural network model and output the test accuracy;

[0047] Step S334: if the test accuracy rate drops by more than 5% compared with the original accuracy rate, the verification neuron is deleted from the second task neuron index, otherwise the verification neuron is marked as verified;

[0048] Step S335: repeating steps S332 to S334 until all neurons in the second task neuron index have been verified;

[0049] Step S336: Generate a posterior second task neuron index according to the remaining second task neuron index.

[0050] Furthermore, the step S4 specifically includes the following steps:

[0051] Step S41: construct a user attribute sequence and a user traffic sequence of the target user, construct a package attribute sequence and a directional traffic sequence for each package to generate a package feature sample, and integrate all package feature samples into a package feature set;

[0052] Step S42: Step S42: splice the user attribute sequence and user traffic sequence of the target user with each package feature sample in the package feature set, input the package feature set into the dual-task soft sharing neural network model one by one, and obtain the recommended mobile phone model code and package purchase probability list;

[0053] Step S43: restore the recommended mobile phone model code to the recommended mobile phone model, sort the package purchase probability list from large to small according to the probability, and extract the packages corresponding to the top five in the package purchase probability list to generate a package recommendation list.

[0054] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0055] (1) The present invention adopts a dual-task soft-sharing neural network model to recommend traffic packages and mobile phone models, taking into account both directional traffic features and text features. It uses two weight-sharing fully connected layers to re-represent and extract traffic features and uses a cosine similarity merging layer to analyze the matching degree between directional traffic and user needs. In addition, it also uses a soft-sharing mechanism to reuse the features used in the traffic package recommendation task to recommend mobile phone models. While increasing a little computing power expenditure, it fully develops the value of the original data and realizes multi-feature, high-precision, dual-task traffic package recommendation.

[0056] (2) A one-dimensional convolutional layer is innovatively added to the dual-task soft-shared neural network model for text processing. This overcomes the technical bias that the convolutional layer is only applicable to image processing. The convolutional computing characteristics can simultaneously shrink and extract text features, solving the problem of excessive data size after text feature splicing, and achieving the purpose of feature extraction while accelerating the computing process.

[0057] (3) The design concept of the twin network is introduced into the text feature branch. The shared embedding layer and the shared bidirectional LSTM layer are used to process the package attribute sequence and the user attribute sequence in parallel respectively. This leaves room for the mobile phone recommendation branch to obtain user attribute features through the soft sharing mechanism while reducing the number of parameters of the dual-task soft sharing neural network model, saving precious computing resources and improving the operating efficiency of the dual-task soft sharing neural network model.

[0058] (4) The dual-task soft-sharing neural network model uses L1 regularization to achieve multi-task learning. This technical feature makes the weights of unimportant neurons in the directional traffic feature branch and the text feature branch in the first training tend to zero. These neurons with weights tending to zero are intuitively considered to be unimportant to the performance of the model and are habitually reserved for the second task training weights. However, in fact, neurons tending to zero may play a role in helping the model to filter out irrelevant information. If their weights are changed arbitrarily, irrelevant information may confuse relevant information, thereby causing catastrophic forgetting. The present invention innovatively proposes a weight amplification ablation experiment to test the impact of weight amplification on model performance one by one, simulate the impact of the second task training on the first task, and freeze the neurons with weights tending to zero that play a key role in the second training. The weight amplification ablation experiment overcomes the technical bias that neurons tending to zero are unimportant to the performance of the model and solves the problem of catastrophic forgetting in the multi-task learning process.

[0059] (5) The dual-task soft-sharing neural network model uses a soft-sharing mechanism to share features between tasks, and a weight-sharing mechanism to share parameters between parallel layers. These two major technical features increase the utilization of data and computing power, realize knowledge transfer between different tasks, and effectively increase the operating efficiency and generalization performance of the dual-task soft-sharing neural network model, and increase the utilization efficiency of data assets and computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A schematic diagram of the dual-task soft-sharing neural network model proposed in the present invention;

[0061] Figure 2 A schematic diagram of the user traffic sequence proposed by the present invention;

[0062] Figure 3 A flow chart of a weight amplification ablation experiment is proposed for the present invention.

[0063] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0064] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0065] Embodiment 1, the present invention provides a method for recommending a traffic package based on artificial intelligence, the method comprising the following steps:

[0066] Step S1: Collect package attribute records, software traffic usage records, package handling records and user mobile phone model records, and construct a data set. In this embodiment, the software traffic usage records and user mobile phone model records are obtained from the online business hall APP reading the user's mobile phone;

[0067] Step S2: construct a dual-task soft-sharing neural network model;

[0068] Step S3: Use the dataset to perform multi-task training on the dual-task soft-shared neural network model in two stages by means of weight amplification ablation experiments;

[0069] Step S4: Use the dual-task soft-shared neural network model for prediction.

[0070] Embodiment 2: This embodiment is based on the above embodiment, and the process of constructing a data set in step S1 specifically includes the following steps:

[0071] Step S11: extracting a package handling record sample from the package handling record;

[0072] Step S12: extract the package name and phone number from the package application record sample, extract the mobile phone model from the user's mobile phone model record according to the phone number and perform one-hot encoding on it to generate a mobile phone model code. In this embodiment, the one-hot encoding is generated by the fit_transform method of the OneHotEncoder class of Scikit-learn;

[0073] Step S13: convert the part of the package handling record except the telephone number and the package name into a string format and encode it to generate a user attribute sequence. In this embodiment, the encoding process is implemented using the Keras word segmenter;

[0074] Step S14: extracting directional flow records from the package attribute records according to the package name, and constructing user flow sequences and directional flow sequences;

[0075] Step S15: converting the records in the package attribute record sample except the directional flow record into a string format and encoding them to generate a package attribute sequence. In this embodiment, the encoding process is implemented using the Keras tokenizer;

[0076] Step S16: Integrate the package attribute sequence, user attribute sequence, user traffic sequence, directional traffic sequence and mobile phone model code of the package handling record sample into a positive sample of the data set, and add a purchase mark to the positive sample of the data set. The value of the purchase mark of the positive sample of the data set is 1;

[0077] Step S17: repeating steps S11 to S16 until each package handling record sample in the package handling record has a corresponding data set positive sample;

[0078] Step S18: copy the positive samples of all data sets, and randomly exchange the package attribute sequence and directional flow sequence of each copied positive sample of the data set with the package attribute sequence and directional flow sequence of the positive samples of other data sets to generate negative samples of the data set, and the purchase mark value of the negative samples of the data set is 0;

[0079] Step S19: Aggregate all positive samples of the data set and all negative samples of the data set into a data set.

[0080] Embodiment 3: This embodiment is based on embodiment 2. In step S14, the process of constructing the user traffic sequence and the directional traffic sequence specifically includes the following steps:

[0081] Step S141: extract the names of the software limited by the directional flow in all packages from the package attribute records, calculate the union of them to generate a directional flow software set, and construct a directional flow template binary according to the directional flow software set<u,t> , where u is the name of a single software, t is the monthly traffic, the unit of t is MB, and the default value is 0. The directional traffic template tuples are sorted by the first letter of u to form a directional traffic template sequence;

[0082] Step S142: Fill in the directional flow template sequence according to the flow usage records of each software to generate a user flow sequence, where the basic unit in the user flow sequence is a user flow binary group.<u,t1> , t1 is the traffic consumed by the user in this software in the last month;

[0083] Step S143: Fill in the directional traffic template sequence according to the directional traffic record to generate a directional traffic sequence, where the basic unit in the directional traffic sequence is a user traffic binary group.<u,t2> , t2 is the directional traffic of the software corresponding to u in the directional traffic record.

[0084] Embodiment 4: This embodiment is based on embodiment 3, and step S2 specifically includes the following steps:

[0085] Step S21: constructing a directional traffic feature branch and a text feature branch, wherein the directional traffic feature branch extracts traffic matching features and user demand features from its input, and the text feature branch extracts user attribute features and user-package matching features from its input;

[0086] Step S22: constructing a mobile phone recommendation branch and a package purchase probability branch, wherein the package purchase probability branch outputs the package purchase probability according to the user-package matching feature and the traffic matching feature, and the mobile phone recommendation branch outputs the recommended mobile phone model code according to the user demand feature and the user attribute feature;

[0087] Step S23: construct a dual-task soft-sharing neural network model.

[0088] Embodiment 5: This embodiment is based on embodiment 4, and step S21 specifically includes the following steps:

[0089] Step S211: construct a first shared fully connected layer, a second shared fully connected layer and a cosine similarity merging layer, and connect the first shared fully connected layer and the second shared fully connected layer to the cosine similarity merging layer to construct a directional traffic feature branch. Since the formats of the user traffic sequence and the directional traffic sequence have been unified through targeted feature engineering in step S14, the cosine similarity merging layer can accurately capture traffic matching features and user demand features. In this embodiment, the cosine similarity merging layer is implemented by a Merge layer with a merging mode of cos;

[0090] Step S212: construct a first shared embedding layer, a second shared embedding layer, a first shared bidirectional LSTM layer, a second shared bidirectional LSTM layer, a first concatenation layer, a one-dimensional convolution layer, a third bidirectional LSTM layer and a first Highway layer;

[0091] Step S213: Connect the first shared embedding layer to the first shared bidirectional LSTM layer, connect the second shared embedding layer to the second shared bidirectional LSTM layer, connect the first shared bidirectional LSTM layer to the second shared bidirectional LSTM layer to the first concatenation layer, connect the first concatenation layer, the one-dimensional convolution layer, the third bidirectional LSTM layer and the first Highway layer in sequence to construct a text feature branch.

[0092] Embodiment 6: This embodiment is based on embodiment 5, and step S22 specifically includes the following steps:

[0093] Step S221: construct a second splicing layer, a second Highway layer, and a MaxoutDense layer, connect the first shared fully connected layer and the first shared bidirectional LSTM layer to the second splicing layer, connect the second splicing layer, the second Highway layer, and the MaxoutDense layer in sequence, and construct a mobile phone recommendation branch;

[0094] Step S223: construct a third splicing layer, a third Highway layer and a third fully connected layer, connect the cosine similarity merging layer and the first Highway layer to the third splicing layer, connect the third splicing layer, the third Highway layer and the third fully connected layer in sequence, and construct a package purchase probability branch.

[0095] Embodiment 7: This embodiment is based on embodiment 6, and step S23 specifically includes the following steps:

[0096] Step S231: specifying the first shared fully connected layer, the second shared fully connected layer, the first shared embedding layer, and the second shared embedding layer as the input layer of the dual-task soft shared neural network model, and specifying the third fully connected layer and the MaxoutDense layer as the output layer of the dual-task soft shared neural network model;

[0097] Step S232: applying L1 regularization to all layers in the directional flow feature branch and the text feature branch except the cosine similarity merging layer and the first concatenation layer;

[0098] Step S233: Specify the loss function of the MaxoutDense layer as categorical_crossentropy, the loss function of the third fully connected layer as binary_crossentropy, and the optimizer as adam.

[0099] Embodiment 8: This embodiment is based on Embodiment 7, and step S3 specifically includes the following steps:

[0100] Step S31: designate the user traffic sequence in the data set as the input of the first shared fully connected layer, designate the directional traffic sequence in the data set as the input of the second shared fully connected layer, designate the user attribute sequence in the data set as the input of the first shared embedding layer, designate the package attribute sequence in the data set as the input of the second shared embedding layer, designate the mobile phone model code in the data set as the target output of the MaxoutDense layer, and designate the purchase mark in the data set as the target output of the third fully connected layer;

[0101] Step S32: Divide the data set into a training set and a test set in a ratio of 8:2, set the trainable attribute of each layer except the second splicing layer in the mobile phone recommendation branch to False, freeze the weight of each layer except the second splicing layer in the mobile phone recommendation branch, and call the model.fit method to perform the first model training;

[0102] Step S33: Formulate the index of neurons with weights less than 0.1 in the first shared bidirectional LSTM layer, generate the second task neuron index, perform weight amplification and ablation experiments on the neurons pointed to by the second task neuron index one by one, and generate the posterior second task neuron index;

[0103] Step S34: Unfreeze the weights of each layer frozen in step S32, freeze the weights of each layer in the package purchase probability branch except the third splicing layer, extract the weights of each neuron in each layer except the cosine similarity merging layer and the first splicing layer in the directional traffic feature branch and the text feature branch, freeze the neurons except the posterior second task neuron index in the first shared bidirectional LSTM layer, and call the model.fit method to perform the second model training.

[0104] Embodiment 9, see Figure 3 This embodiment is based on the eighth embodiment, and the process of performing weight amplification ablation experiments on the neurons pointed to by the second task neuron index one by one in step S33 specifically includes the following steps:

[0105] Step S331: Record the original accuracy of the third fully connected layer output after the first model training;

[0106] Step S332: selecting a verification neuron in order according to the second task neuron index, and enlarging the weight of the verification neuron to 1;

[0107] Step S333: Use the test set to test the dual-task soft-shared neural network model and output the test accuracy;

[0108] Step S334: if the test accuracy rate drops by more than 5% compared with the original accuracy rate, the verification neuron is deleted from the second task neuron index, otherwise the verification neuron is marked as verified;

[0109] Step S335: repeating steps S332 to S334 until all neurons in the second task neuron index have been verified;

[0110] Step S336: Generate a posterior second task neuron index according to the remaining second task neuron index.

[0111] Embodiment 10: This embodiment is based on embodiment 9, and step S4 specifically includes the following steps:

[0112] Step S41: construct a user attribute sequence and a user traffic sequence of the target user, construct a package attribute sequence and a directional traffic sequence for each package to generate a package feature sample, and integrate all package feature samples into a package feature set;

[0113] Step S42: splicing the user attribute sequence and user traffic sequence of the target user with each package feature sample in the package feature set, inputting the package feature set into the dual-task soft sharing neural network model one by one, and obtaining a recommended mobile phone model code and a package purchase probability list;

[0114] Step S43: restore the recommended mobile phone model code to the recommended mobile phone model, sort the package purchase probability list from large to small according to the probability, and extract the packages corresponding to the top five in the package purchase probability list to generate a package recommendation list. In this embodiment, the process of restoring the recommended mobile phone model code to the recommended mobile phone model is completed using the inverse_transform method of the OneHotEncoder class of Scikit-learn.

[0115] Embodiment eleven, this embodiment is based on embodiment ten, and this embodiment runs in the Windows operating system environment. The experiment relies on the Anaconda3 environment, and uses Keras as the model framework of the dual-task soft shared neural network model. The Pandas library, Numpy library and Scikit-learn library are used to complete the data set construction work. The first shared fully connected layer and the second shared fully connected layer are the same fully connected layer instance that are repeatedly called, the first shared embedding layer and the second shared embedding layer are the same embedding layer instance that are repeatedly called, and the first shared bidirectional LSTM layer and the second shared bidirectional LSTM layer are the same bidirectional LSTM layer instance that are repeatedly called.

[0116] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or apparatus that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or apparatus.

[0117] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

[0118] The present invention and its embodiments are described above, which is not restrictive. What is shown in the accompanying drawings is only one of the embodiments of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in this field are inspired by it and do not deviate from the purpose of the invention, they can creatively design structural methods and embodiments similar to the technical scheme, which should all fall within the scope of protection of the present invention.

Claims

1. A method for recommending traffic packages based on artificial intelligence, characterized in that: The method comprises the following steps: Step S1: Collect package attribute records, monthly traffic usage data records, package application records and user mobile phone model records, and construct a data set; Step S2: construct a dual-task soft-sharing neural network model; Step S3: Use the dataset to perform multi-task training on the dual-task soft-shared neural network model in two stages by means of weight amplification ablation experiments; Step S4: Use the dual-task soft-shared neural network model for prediction.

2. According to the method for recommending traffic packages based on artificial intelligence according to claim 1, the step S2 specifically comprises the following steps: Step S21: constructing a directional traffic feature branch and a text feature branch; Step S22: constructing a mobile phone recommendation branch and a package purchase probability branch; Step S23: construct a dual-task soft-sharing neural network model.

3. The method for recommending traffic packages based on artificial intelligence according to claim 2, characterized in that: The step S21 specifically includes the following steps: Step S211: constructing a first shared fully connected layer, a second shared fully connected layer, and a cosine similarity merging layer, and connecting the first shared fully connected layer and the second shared fully connected layer to the cosine similarity merging layer to construct a directional traffic feature branch; Step S212: construct a first shared embedding layer, a second shared embedding layer, a first shared bidirectional LSTM layer, a second shared bidirectional LSTM layer, a first concatenation layer, a one-dimensional convolution layer, a third bidirectional LSTM layer and a first Highway layer; Step S213: Connect the first shared embedding layer to the first shared bidirectional LSTM layer, connect the second shared embedding layer to the second shared bidirectional LSTM layer, connect the first shared bidirectional LSTM layer to the second shared bidirectional LSTM layer to the first concatenation layer, connect the first concatenation layer, the one-dimensional convolution layer, the third bidirectional LSTM layer and the first Highway layer in sequence to construct a text feature branch.

4. The method for recommending traffic packages based on artificial intelligence according to claim 3, characterized in that: The step S22 specifically includes the following steps: Step S221: construct a second splicing layer, a second Highway layer, and a MaxoutDense layer, connect the first shared fully connected layer and the first shared bidirectional LSTM layer to the second splicing layer, connect the second splicing layer, the second Highway layer, and the MaxoutDense layer in sequence, and construct a mobile phone recommendation branch; Step S223: construct a third splicing layer, a third Highway layer and a third fully connected layer, connect the cosine similarity merging layer and the first Highway layer to the third splicing layer, connect the third splicing layer, the third Highway layer and the third fully connected layer in sequence, and construct a package purchase probability branch.

5. The method for recommending traffic packages based on artificial intelligence according to claim 4, characterized in that: The step S23 specifically includes the following steps: Step S231: specifying the first shared fully connected layer, the second shared fully connected layer, the first shared embedding layer, and the second shared embedding layer as the input layer of the dual-task soft shared neural network model, and specifying the third fully connected layer and the MaxoutDense layer as the output layer of the dual-task soft shared neural network model; Step S232: applying L1 regularization to all layers in the directional flow feature branch and the text feature branch except the cosine similarity merging layer and the first concatenation layer; Step S233: Specify the loss function of the MaxoutDense layer as categorical_crossentropy, the loss function of the third fully connected layer as binary_crossentropy, and the optimizer as adam.

6. The method for recommending traffic packages based on artificial intelligence according to claim 5, characterized in that: The process of constructing the data set in step S1 specifically includes the following steps: Step S11: extracting a package handling record sample from the package handling record; Step S12: extract the package name and phone number from the package handling record sample, extract the mobile phone model from the user's mobile phone model record according to the phone number and perform one-hot encoding on it to generate a mobile phone model code; Step S13: converting the parts of the package handling record sample except the telephone number and the package name into a string format and encoding them to generate a user attribute sequence; Step S14: extracting directional flow records from the package attribute records according to the package name, and constructing user flow sequences and directional flow sequences; Step S15: converting the records in the package attribute record except the directional flow record into a string format and encoding them to generate a package attribute sequence; Step S16: Integrate the package attribute sequence, user attribute sequence, user traffic sequence, directional traffic sequence and mobile phone model code of the package handling record sample into a positive sample of the data set, and add a purchase mark to the positive sample of the data set. The value of the purchase mark of the positive sample of the data set is 1; Step S17: repeating steps S11 to S16 until each package handling record sample in the package handling record has a corresponding data set positive sample; Step S18: copy the positive samples of all data sets, and randomly exchange the package attribute sequence and directional flow sequence of each copied positive sample of the data set with the package attribute sequence and directional flow sequence of the positive samples of other data sets to generate negative samples of the data set, and the purchase mark value of the negative samples of the data set is 0; Step S19: Aggregate all positive samples of the data set and all negative samples of the data set into a data set.

7. The method for recommending traffic packages based on artificial intelligence according to claim 6, characterized in that: The step S3 specifically comprises the following steps: Step S31: designate the user traffic sequence in the data set as the input of the first shared fully connected layer, designate the directional traffic sequence in the data set as the input of the second shared fully connected layer, designate the user attribute sequence in the data set as the input of the first shared embedding layer, designate the package attribute sequence in the data set as the input of the second shared embedding layer, designate the mobile phone model code in the data set as the target output of the MaxoutDense layer, and designate the purchase mark in the data set as the target output of the third fully connected layer; Step S32: Divide the data set into a training set and a test set in a ratio of 8:2, set the trainable attribute of each layer except the second splicing layer in the mobile phone recommendation branch to False, freeze the weight of each layer except the second splicing layer in the mobile phone recommendation branch, and call the model.fit method to perform the first model training; Step S33: Formulate the index of neurons with weights less than 0.1 in the first shared bidirectional LSTM layer, generate the second task neuron index, perform weight amplification and ablation experiments on the neurons pointed to by the second task neuron index one by one, and generate the posterior second task neuron index; Step S34: Unfreeze the weights of each layer frozen in step S32, freeze the weights of each layer in the package purchase probability branch except the third splicing layer, extract the weights of each neuron in each layer except the cosine similarity merging layer and the first splicing layer in the directional traffic feature branch and the text feature branch, freeze the neurons except the posterior second task neuron index in the first shared bidirectional LSTM layer, and call the model.fit method for the second model training.

8. The method for recommending traffic packages based on artificial intelligence according to claim 7, characterized in that: The process of performing weight amplification ablation experiments on the neurons pointed to by the second task neuron index one by one in step S33 specifically includes the following steps: Step S331: Record the original accuracy of the third fully connected layer output after the first model training; Step S332: selecting a verification neuron in order according to the second task neuron index, and enlarging the weight of the verification neuron to 1; Step S333: Use the test set to test the dual-task soft-shared neural network model and output the test accuracy; Step S334: if the test accuracy rate drops by more than 5% compared with the original accuracy rate, the verification neuron is deleted from the second task neuron index, otherwise the verification neuron is marked as verified; Step S335: repeating steps S332 to S334 until all neurons in the second task neuron index have been verified; Step S336: Generate a posterior second task neuron index according to the remaining second task neuron index.